cancel
Showing results for 
Search instead for 
Did you mean: 

Export Button-ID to method when triggered

Former Member
0 Kudos

Hey,

one question before the weekend starts

When I use my button, I want him to export his ID to the method which is being called. So that I can use for example a case-statement to look for the correct values I need later.

It would be nice, because the methods of the buttons differ just a bit so it would be lot more work to implement a new method for each button.

Thanks for any hints!

Have a nice weekend

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

You can use same event handler method for 2 different buttons. You can get the button ID using below code:


DATA lv_button type string.

lv_button = wdevent->get_string( 'ID' ).

lv_button contains the button ID of the clicked event. Using this you can differentiate which button is clicked.

Alternately, you could use a READ TABLE statement on wdevent->parameters with key 'ID'.

hope this helps,

Regards,

Kiran

Former Member
0 Kudos

Thank you! Works exactly as it is supposed to

Answers (0)