cancel
Showing results for 
Search instead for 
Did you mean: 

Check for event results (if an error occoured)

matteo_montalto
Contributor
0 Kudos

Hi all expert,

dealing with an FPM event raise, as standard does:

* raise events

     IF lr_event IS NOT INITIAL.

       wd_this->mr_fpm->if_fpm~raise_event( lr_event ).

How can I check simply if the event has been triggered and executed without errors ?


In my requirement I created a custom FPM button, which should trigger a standard FPM action and THEN execute some other stuff.

Obviously "other stuff" should be executed only if the standard FPM action has been executed without errors.

A "workaround" could be reading the message area in order to check whether an error has occoured... but I'd prefer to check on the FPM itself, if possible.


Any suggestion will be highly appreciated

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Matteo,

If you are raising standard event through custom button , MV_EVENT_IS_VALIDATING parameter will be abap_true, it will raised sucessfuly there is no need to check it. Your raised event will take place in new event loop.

Thanks

Praveen Gupta

matteo_montalto
Contributor
0 Kudos

Hi Praveen,
I created a new button in a standard FPM_OIF_COMPONENT - based application of SRM 7.02, using Component Configurator.

This button. once triggered, should execute a standard FPM event (action_id = "PUBLISH") AND some other stuffs.

These stuffs must be executed only if the previous standard event has been executed successfully; we should further explain the concept of "correct execution".

The "PUBLISH" event, as the name itself says, publish a bid. Preconditions for the publication are that the document itself is complete and correct (e.g, all the mandatory fields are filled); otherwise, pressing "Publish" button results in some errors in the message area.

As far as I've seen in debug, however, the event seems to be executed successfully even if errors are present in the message area... my requirement seems not so straightforward, then.

MV_EVENT_IS_VALIDATING is set to 'X' before AND after the raise_event( ) call, so understanding if the Bid has been correctly published seems not that easy

EDIT: my "workaround" doesn't work anyway. As the raise_event() is executed, if I get the message area and look for messages... I get an empty message table. I guess this is because the raise_event() just enqueue the event without executing it in real time.

Answers (0)