cancel
Showing results for 
Search instead for 
Did you mean: 

Call outbound plug dynamically

0 Kudos

Hi all,

I want to fire an outbound plug dynamically. To do this I use this coding:

lv_outplug = 'to_view_01'.  "this can be any value

concatenate 'fire_' lv_outplug '_plg' into lv_outplug.

try.

  call method wd_this->(lv_outplug).
  catch cx_sy_dyn_call_error.
endtry.

Unfortunately this gives me an exception CX_SY_DYN_CALL_ILLEGAL_METHOD.

Does anyone have an idea how to fire a plug dynamically?

Any help appreciated.

Regards,

Stefan

Accepted Solutions (1)

Accepted Solutions (1)

former_member210266
Active Participant
0 Kudos

Hi Stefan

    DATA lo_view_controller TYPE REF TO if_wd_view_controller.
  lo_view_controller = wd_this->wd_get_api( ).

  lo_view_controller->fire_plug(
    EXPORTING
*      parameters =     " Parameter of Outbound Plug
      plug_name  = 'OP1'     " Web Dynpro: Runtime Structure of In/Outbound Plugs
  ).

Hope it helps.

Regards

Swati

0 Kudos

Hi Swati

Your solution works perfectly. Thanks for your help.

Regards,

Stefan

Answers (0)