cancel
Showing results for 
Search instead for 
Did you mean: 

ALV In Web Dynpro ABAP

Former Member
0 Kudos

Hey,

I have a user-defined function in the ALV toolbar of my Web Dynpro Component. When user clicks the button assigned to the function,the even 'ON_FUNCTION' is triggered. Now I want to know which row is currently selected in the alv display in the event handler method of 'ON_Function'.

The only parameter that is passed to event handler by the component gives me information about the function code of the user-defined function.(IF_SALV_WD_TABLE_FUNCTION->id).

Is there any way by which I can know the current row selected.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Yashpal
Active Contributor
0 Kudos

Hi ,

when u select a row .. the lead selection for the node is set as the selected row.. so get that element by calling the method get_lead_selection of if_wd_context_node .

regards

Yash

Former Member
0 Kudos

Thanks Yash,but doesnt seem to work. Node in question has an internal which is displayed using a ALV component.

Madhu2004
Active Contributor
0 Kudos

Hai Anubhav,

Read the node which is binded to the alv and use the following syntax:

CALL METHOD node_first_page_output->get_lead_selection_index
  receiving
    index  = index

.

where index is type i. and will return u the lead selection.

Regards,

Madhu

Madhu2004
Active Contributor
0 Kudos

Ho w did u solve your problem??

Former Member
0 Kudos

Actually yash's method worked. I just used the node bound to ALV,in the required view and called the method get_lead_selection.

Thanks for your help madhu