cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro abap call specific action dinamic

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

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

Former Member
0 Kudos

thank you very much

Answers (0)