2008 Jan 22 11:29 AM
Hi,
I want to use simple drop down list in screen of module pool
program. & have to set 3 values initially.
How to add that values in listbox.
Hi,
I want to use simple drop down list in screen of module pool
program. & have to set 3 values initially.
How to add that values in listbox.
2008 Jan 22 11:39 AM
Check the code in RSDEMO_DROPDOWN_LISTBOX program and u will find how to set the values in a list box. The same functionality can be written in u'r module pool program to set the values.
2008 Jan 22 11:42 AM
Set the attribute of the field on the screen as Listbox in the dropdown box
In PBO write this code for your field
CLEAR wa_itab.
wa_itab-key = '1'.
wa_itab-text = '1'.
APPEND wa_itab TO it_itab.
wa_itab-key = '2'.
wa_itab-text = '2'.
APPEND wa_itab TO it_itab.
wa_itab-key = '3'.
wa_itab-text = '3'.
APPEND wa_itab TO it_itab.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'ZMATERIAL' "Here use your input box name in which you need dropdown
values = it_itab
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
2008 Jan 22 11:43 AM
Hi,
Use the function module F4IF_INT_TABLE_VALUE_REQUEST for that.
for example see the sample program DEMO_DROPDOWN_LIST_BOX
Regards,
Renjith Michael.
2008 Jan 22 11:45 AM
hi,
u can do like this
declare that field as list box... ( in attribute )
then write this after PAI in screen flow logic...
PROCESS ON VALUE-REQUEST.
FIELD ifmtp-form_type MODULE fm_drop.
MODULE fm_drop INPUT.
CLEAR ifmtp.
REFRESH ifmtp.
ifmtp-form_type = 'C'.
APPEND ifmtp.
ifmtp-form_type = 'F'.
APPEND ifmtp.
ifmtp-form_type = 'H'.
APPEND ifmtp.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FORM_TYPE'
value_org = 'S'
TABLES
value_tab = ifmtp.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " fm_drop INPUT
here ifmtp-form_type is my field of screen which i have declared as list box...
and u have to declare one internal table with this field in TOP Module...
DATA : BEGIN OF ifmtp OCCURS 0,
form_type LIKE zform_track_mast-form_type,
END OF ifmtp.
reward if usefull...
Edited by: Dhwani shah on Jan 22, 2008 12:45 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |