cancel
Showing results for 
Search instead for 
Did you mean: 

Populate the value in drop-down based on value selected another drop-down in a row.

0 Kudos

Hi,

          I have a requirement where value selection of one drop-down fields should populate the value to another drop-down list fields in same row of a list UIBB .

          

Thanks and Regards,

Shashank S Honakeri

Accepted Solutions (0)

Answers (2)

Answers (2)

AbhishekSharma
Active Contributor
0 Kudos

Hi Shashank,

You can use SAP FPM standard Event which is raised 

gc_fpm_guibb_list_cell_action   TYPE fpm_event_id VALUE  'FPM_GUIBB_LIST_CELL_ACTION',

Handle this event in IF_FPM_GUIBB_LIST~PROCESS_EVENT method.

You can get selected value of Dropdown1 control as follows

WHEN gc_idb_btn-gc_event_stat_chg_form.
CLEAR gc_ok.
CALL METHOD io_event->mo_event_data->get_value
EXPORTING
iv_key   = lc_wdevent_params
IMPORTING
ev_value = lt_attrs.

After this you need to read selected value of Dropdown1 as below

READ TABLE lt_attrs ASSIGNING <fs_attr> WITH KEY name = 'KEY'.

Then you need to find out the Row Index of List to get which Row Dropdown Control you have done operation, this can be done as follows

        CALL METHOD io_event->mo_event_data->get_value
EXPORTING
iv_key   = ‘FPM_GUIBB_LIST_INDEX’
IMPORTING
ev_value = lv_tabix.

Read on table based on Index you got above, prepare your data what you want to bind in another Dropdown Control of same table row and bind it as you did for Dropdown1 Control.

Hope this will help.

Thanks-

Abhishek

Former Member
0 Kudos

Hello Shashank,

Assign some action to first drop down and onaction of this drop-down, pass required value to next drop down in get_data method using ct_data parameter.

Regards,

Naga