Friday, December 17, 2010
Use function module VRM_SET_VALUES at AT SELECTION-OUTPUT event if it is SE38 program or at PROCESS BEFORE EVENT if it is module pool program.
To get Drop Drown Box on Selection-screen for parameter.
To get Drop Drown Box on screen .
Follow these steps.
1.Go to T.Code SE51 and Select Laypout for the Screen.
2.Double click on the field for which u want Dropdown box.
3.Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box
Follow these steps.
1.Go to T.Code SE51 and Select Laypout for the Screen.
2.Double click on the field for which u want Dropdown box.
3.Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box
or ListBox with key . Better to to select first one.
4.Save and Activate ur screen .
5.Enter the following piece of code in the PBO of the screen.(Change for ur
4.Save and Activate ur screen .
5.Enter the following piece of code in the PBO of the screen.(Change for ur
requirement).
TYPE-POOLS :vrm. DATA: i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values w_natio LIKE LINE OF i_natio. DATA: BEGIN OF i_t005t OCCURS 0, land1 TYPE t005t-land1, natio TYPE t005t-natio, END OF i_t005t.
IF i_t005t[] IS INITIAL. SELECT land1 natio FROM t005t INTO TABLE i_t005t WHERE spras = sy-langu. IF sy-subrc = 0. LOOP AT i_t005t . w_natio-key = i_t005t-land1. w_natio-text = i_t005t-natio. APPEND w_natio TO i_natio. CLEAR w_natio. ENDLOOP. ENDIF. ENDIF. CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed. values = i_natio EXCEPTIONS id_illegal_name = 1 OTHERS = 2. IF sy-subrc <> 0. "MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO " WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
1.define parameter.
PARAMETERS: p_drop type pernr-pernr as listbox.
2.Write down the above code under AT SELECTION-SCREEN OUTPUT event.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
how to make one of the list values as default and that value should not be repeated twice in the list .because when I am trying to make it as a default , it is displayed twice in the list.
ReplyDeletehow to make one of the values of list as a default value and it should not be repeated twice in the list. kindly help me with this
ReplyDelete