cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Select event in dynamic ALV

Former Member
0 Kudos

Hi,

I have created dynamic ALV and now i want to checked the selected row value.

If in the selected row contain 'A' value then i have to disable the Button given on the screen.

If in the selected row contain B' value then i have to enable the Button given on the screen.

How to add the event once I select the row.

I have done like this . but it is not

lw_api_2->do_dynamic_navigation(

source_window_name = 'ZWDCHHR_EX_TASK_DELE'

source_vusage_name = 'ZWDVHHR_EX_TASK_DELE_USAGE_1'

source_plug_name = 'TO_ALV'

target_component_name = 'SALV_WD_TABLE'

target_component_usage = 'ALV_USAGE1'

target_view_name = 'TABLE'

target_plug_name = 'DEFAULT'

target_embedding_position = 'ZWDVHHR_EX_TASK_DELE/VIEW_DELEG_MY_TASKS' ).

  • register event handler

lw_cmp_usage_2->add_event_handler(

listener = lw_api_2

handler_name = 'ONSELECT_TAB1'

controller_name = 'INTERFACECONTROLLER'

event_name = 'ON_SELECT' ).

Thanks and regards

Amita Gandhi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I got answer by replacing event_name = 'ON_LEAD_SELECT'

But now How to get value of the selected row?

Waht is a type to declare R_param ?

Edited by: AmitaGandhi on Jul 31, 2009 1:02 PM

uday_gubbala2
Active Contributor
0 Kudos

Hi Amita,

You can try fetch the number of the row which was leadselected through R_PARAM->INDEX. (This would be just a normal integer variable. You can try check this out in debugging mode. ) Now you can just read the data of this row from the context node by saying as GET_ATTRIBUTE up on the nodes reference with the index as R_PARAM->INDEX.

Regards,

Uday