cancel
Showing results for 
Search instead for 
Did you mean: 

Adding parameters to an FPM event dinamically

matteo_montalto
Contributor
0 Kudos

Hi gurus,

I have a standard FPM event, under certain conditions I'd like to add a parameter to it. This event does not have parameters itself, I just would like to add an information that will be carried by the event itself till the point in which I need it (a BADi... I guess it will be possible to retrieve that).

Please provide any suggestion or link to documentation as I searched but found nothing so far.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

matteo_montalto
Contributor
0 Kudos

Got it!!!

Given that lr_event (CL_FPM_EVENT) is my event and lv_pub_id is the event_id:

     fpm_params ?= lr_event->MO_EVENT_DATA.

     DATA: lv_pub_id TYPE FPM_EVENT_ID.

     lv_pub_id = <event_id_name>.

     CLEAR: lr_event.

     CALL METHOD CL_FPM_EVENT=>CREATE_BY_ID

       EXPORTING

         IV_EVENT_ID    = lv_pub_id

         IO_EVENT_DATA  = fpm_params

*        IV_ACTION_TYPE = IF_FPM_CONSTANTS=>GC_ACTION_TYPE-STANDARD

       RECEIVING

         RO_EVENT       = lr_event

         .

Answers (0)