‎2009 Mar 04 6:22 AM
hi,
i am tryiNg to provide drop down list In a module pool program
In which event i need to write?PAI or PBo?
there is a chain staTement alsO Defined for this Field
Thanks in advance
‎2009 Mar 04 6:27 AM
it should be in PBO,
before displaying the DropDown.
Once the field is created in screen painter...
Double click on it....In the pop up..select the field on the box called "Dropdown"
We will have -> list box and list box with key.....select list box(...list box with key is just like extra field display in addition to the dropdown value...eg:if material is dropdown we can give material/material description in the dropdown and give material as the key)..Assign a function code to the field of the dropdown say "DROP"
Now the field is ready as dropdown...
There are many options to fill the dropdown
Static filling ->
(1) We can give fixed values in the domain and use the field referring to the data element..so that values
will always come from domain
Dynamic filling->
(2) use the function module VRM_SET_VALUES
check progrm DEMO_DYNPRO_DROPDOWN_LISTBOX
basically we have 2 fields for the table as dropdown ..key/text...we need to fill the field 'key' and pass it to the function module
call function 'VRM_SET_VALUES'
exporting
id = param -> field name in Caps
values = values. -> internal table that contains values to be shown in dropdown
Hope it helps
Rajnesh
Edited by: Rajnesh Dharmat on Mar 4, 2009 12:00 PM
‎2009 Mar 04 6:27 AM
‎2009 Mar 04 6:28 AM
‎2009 Mar 04 6:34 AM
Hi,
I would suggest to put your codes in initialization section because each time you perform some action on the selection screen this will trigger PBO and run your codes again.
Regards.
‎2009 Mar 04 6:42 AM
Hi Chitra,
Kindly go through this link below:
http://sap.niraj.tripod.com/id38.html
Hope it helps
Regrds
Mansi
‎2009 Mar 04 6:44 AM
Hi,
First create drop down list box on screen and push values into it in PBO
using VRM_SET_VALUES. i think you know how to provide values.
PBO.
Module list_box.(Double Click on it and write the code to enter values into list box)
then goto PAI module.
PAI.
CHAIN.
xxxxxxxx.
ENDCHAIN.
‎2009 Mar 04 6:51 AM
‎2009 Mar 04 7:01 AM
Hi ,
You have to code in any include of PBO event
please find the below relevant code for you clarification.
FORM update_listbox_material.
REFRESH: values.
values-key = '121101'.
values-text = 'SHG'.
APPEND values.
values-key = '121102'.
values-text = 'TOLL SHG'.
APPEND values.
values-key = '121104'.
values-text = 'J.SHG'.
APPEND values.
values-key = '121111'.
values-text = 'HG'.
APPEND values.
values-key = '121113'.
values-text = 'J.HG'.
APPEND values.
values-key = '121121'.
values-text = 'PW'.
APPEND values.
values-key = '121201'.
values-text = 'LEAD'.
APPEND values.
v_id = 'WA_MATDET-MATNR'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = v_id
values = values[]
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.
ENDFORM. " Update_Listbox_Tables
Thanks.
Murugan.B
‎2009 Mar 18 5:51 AM