Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

To Trigger FPM Event dynamically from Code - WDEVENT set value Parameter

Hi,

In our SAP standard FPM application.

I want to trigger an action (onActionSearch) from code. As we triggering this action dynamically from code.

For this we need to pass or have "wdevent" object.

we are able to create wdevent object but could NOT able to set Parameters table.

the Parameters table having columns (Row, Name, Value) but the Value column is Reference type.

DATA: lt_parameters TYPE  wdr_event_parameter_list.


BUT we are NOT able to fill the Value in the Parameter list. It is of type (Fref) Reference Value.

How to set Value for a Reference Variable.




Please find screenshots,

Code we had written, but getting Syntax Errors at setting Parameter-Value.

DATA: lv_wd TYPE REF TO cl_wd_custom_event.

      DATA: lt_parameters TYPE  wdr_event_parameter_list,

        lw_parameters LIKE LINE OF lt_parameters.

      CLEAR lw_parameters.

      lw_parameters-name = 'FPM_EVENT_ID' .

      lw_parameters-value = '->ON_SEARCH'.

      insert lw_parameters inTO lt_parameters index 1.

      CLEAR lw_parameters.

      lw_parameters-name = 'ID' .

      lw_parameters-value = '->_CFG_BUTTON_ROW_ELEMENT_26'.

     insert lw_parameters inTO lt_parameters index 2.

     CLEAR lw_parameters.

Kindly support

Former Member
Former Member replied

Thanks Maarten for immediate Response,

I had resolved this by another way by following the below help link.

http://help.sap.com/saphelp_nw74/helpdata/en/06/f049c5790a412f8c7aed210bf8ad80/content.htm?frameset=/en/c0/123fbb93734e0b953e50eca159cb8a/frameset.htm&current_toc=/en/fa/a222ce95ea454d9671b18ad191649a/plain.htm&node_id=20

we don't need a wdevent object to trigger action, if we know the event id then we can call the even directly by using code given in above link.

DATA lo_fpm TYPE REF TO if_fpm.

      lo_fpm = cl_fpm_factory=>get_instance( ).

      lo_fpm->raise_event_by_id( 'ON_SEARCH' ).  //wherein ON_SEARCH is the event id

Regards,

Hussain

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question