on 08-18-2009 8:45 AM
Hi,
I am just checking whether it is possible to build calculator or not in webdynpro for abap.
I have some buttons and i have associated same action for all the buttons and in that action i would like to know which button is clicked.
Please let me know the code for that
Thanks
Bala Duvvuri
Hi Bala,
Its possible. Just go to the action handler for the button & read the attribute ID of the WDEVENT which is passed by the framework. This id will contain the id of the button which triggered the event. Consider the code fragment below:
method ONACTIONACTION .
DATA: lv_button_name type string.
lv_button_name = wdevent->get_string( name = 'ID' ).
endmethod.
At the end of execution lv_button_name will have the ID of the button which triggered the event.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use WDEVENT which is used to capture the UI element events that you have created on the View.
data l_button_name type string.
l_button_name = wdevent->get_string( name = 'ID' ).
case l_button_name.
when u2018button1u2019.
<Code>
when ' button2'.
<Code>
endcase
using above , u will able to fetch the Button ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.