on 07-03-2013 1:29 PM
Hi Webdynpro Guys,
How to do the coding for Event parameter mapping for User interface elements in a view of Webdynpro ABAP ?
I have gone through SAP Help document for parameter mapping.. I got quiet understand within that doc, but not much.So I couldn't able get to define same action method( one Event handler ) for Different UI elements in a same view of Webdynpro component.
Could you please share info with example regarding that one ...?
Thanks in advance.
Best Regards:
------------------
Sreenivas Pachva
Hi Sreenivas,
You can retrieve the UI element ID from the WDEVENT import parameter of the associated action method( one Event handler ).
For example if you have associated action 'GO' with 3 different UI elements then to identify which UI element has triggered this action you can use the below code snippet..
METHOD onactiongo .
* Data declaration
DATA lv_id TYPE string.
* Retrieve the UI element ID which has triggered the action
CALL METHOD wdevent->get_string
EXPORTING
name = 'ID'
RECEIVING
value = lv_id.
NB : 'wdevent' is the import parameter of the action handler
ENDMETHOD.
Hope this helps.
Regards,
Sonia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kishore,
Sorry for the late reply.
Please refer the below link for your query.
http://help.sap.com/saphelp_erp60_sp/helpdata/en/f9/64c0410c2dcc17e10000000a155106/content.htm
Regards,
Sonia
Hi Sreenivas,
Yes, you can use the same event handler for different actions of UI elements. The custom parameters desired for an event must be defined for each UI element in WDDOMODIFYVIEW. To map the parameters you should use a specific method of UI element for each permitted action.
In example, if you take a radiobutton (if_wd_radiobutton) in your view you can use the method "map_on_select" and define which context data would receive in event handler for select event of radiobutton. This parameters will arrive to WDEVENT parameter (common of all handlers) as a type of CL_WD_CUSTOM_EVENT.
Regards,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.