on 07-16-2009 7:12 AM
Hi ,
I have created Tabstirp and ALV dynamically.
Now I want to Add ONclick event for Button and i want to show POPup message after clicking on that Button.
But I don't know how to Add Event in dynamically on each ALV cell?
Please help me on this topic.
Thanks and regards
Amita Gandhi
I got the answer with following code :
l_cmp_usage->add_event_handler(
listener = l_cmp_api
handler_name = 'ONCLICK'
controller_name = 'INTERFACECONTROLLER'
event_name = 'ON_CLICK' ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got the answer with following code :
l_cmp_usage->add_event_handler(
listener = l_cmp_api
handler_name = 'ONCLICK'
controller_name = 'INTERFACECONTROLLER'
event_name = 'ON_CLICK' ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It is not possible to define the source code of an action handler method dynamically. But it is possible to define, which existing action handler will be called when an event is caught.
1. Create an action handler MY_ACTION before hand and map that to a button as below and write the handling code on button click in that event method.
"binding actoin dynamically to a button
LR_BUTTON = CL_WD_BUTTON=>NEW_BUTTON( text = MY_TEXT
On_action = 'MY_ACTION' ).
"OR
LR_BUTTON->SET_ON_ACTION( value = 'MY ACTION' ).
If you have many buttons, u can assign same action to all the buttons and inside handling you get the last triggered action using importing parameter WD_EVENT->GEN_NAME
Regards,
Manne.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.