on 12-13-2013 5:39 AM
Hi everyone. I have a WDP abap -> view -> the table with link column -> event onAction. How can I trigger this event dynamically. In other words I need to click on a line from abap code dynamically(example from WDDOMODIFYVIEW). Sample code will be the perfect answer. Thank you.
P.S. I'm sorry for my english
Hi Vitaliy,
You can call the event handler of any action as normal method in wda.
Example :
I have an action "GO_NEXT" for the button "NEXT" in my view.
Now I need to call event handler for this on action event " ONACTIONGO_NEXT".
Please refer the below lines
DATA lo_event TYPE REF TO cl_wd_custom_event.
DATA lt_parameters TYPE wdr_event_parameter_list.
DATA ls_parameters LIKE LINE OF lt_parameters.
" Prepare parameters
CLEAR ls_parameters.
ls_parameters-name = 'ID'.
GET REFERENCE OF 'NEXT' INTO ls_parameters-value.
INSERT ls_parameters INTO TABLE lt_parameters.
" Create custom event object with parameters
CREATE OBJECT lo_event
EXPORTING
name = 'ON_ACTION'
parameters = lt_parameters.
" Call event handler
CALL METHOD wd_this->onactionnext
EXPORTING
wdevent = lo_event.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.