‎2009 Jul 03 9:18 AM
Hii,
I want a list to be populated based on the selection criteria of another list. I have a screen in which I have 2 listbox. I have populated the list box using VRM_SET_VALUES. If I select 1st listbox the 2nd listbox should be automatically populated.
Thanks.
‎2009 Jul 03 9:33 AM
Hi,
You can use the DYNP_VALUES_READ to read the value selected in the First parameter in the AT SELECTION-SCREEN ON <field2>.
AT SELECTION-SCREEN ON P_FIELD2.
* Read the first record as only one record will be present
read table li_dynpread into lwa_dynpread index 1.
P_FIELD1 = lwa_dynpread-fieldvalue.
lwa_dynpread-fieldname = 'P_FIELD1'.
append lwa_dynpread to li_dynpread.
clear lwa_dynpread.
* Read Screen Field Values.
call function 'DYNP_VALUES_READ'
exporting
dyname = sy-repid
dynumb = sy-dynnr
tables
dynpfields = li_dynpread.
‎2009 Jul 03 9:26 AM
Hi,
Pass the value to the second list box in the at selection-screen event.
Regards,
Himanshu
‎2009 Jul 03 9:33 AM
Hi,
You can use the DYNP_VALUES_READ to read the value selected in the First parameter in the AT SELECTION-SCREEN ON <field2>.
AT SELECTION-SCREEN ON P_FIELD2.
* Read the first record as only one record will be present
read table li_dynpread into lwa_dynpread index 1.
P_FIELD1 = lwa_dynpread-fieldvalue.
lwa_dynpread-fieldname = 'P_FIELD1'.
append lwa_dynpread to li_dynpread.
clear lwa_dynpread.
* Read Screen Field Values.
call function 'DYNP_VALUES_READ'
exporting
dyname = sy-repid
dynumb = sy-dynnr
tables
dynpfields = li_dynpread.
‎2009 Jul 03 9:44 AM
Hii,
I want the listbox to be populated in a screen. its a module pool program wherin in 1st screen I have 2 listbox and when user selects any value from 1st listbox the other should be automatically populated. I tried to populate the data in PAI event of the screen using VRM_SET_VALUES but it does not populate it in 2nd listbox.
Thanks.
‎2009 Jul 03 9:50 AM
Hi,
Check the demo program DEMO_DYNPRO_DROPDOWN_LISTBOX
Check the MODULE init_listbox in the PAI of screen 200 ...how list box field is getting populated in the screen 200.
In the same you need to populate the on the selecting the value in Field1. You need to assign the Function code to Field1 listbox.
Which get's triggered when you select the value in Field1. In the PBO check for this function code and call the MODULE init_listbox
‎2009 Jul 03 1:27 PM