Skip to Content
0

SAP MDG : How to capture user action (SAVE/SUBMIT/REJECT) in USMD_RULE_SERVICE BADI

Sep 27, 2017 at 01:09 AM

295

avatar image
Former Member

Hi All,

I need to perform a validation only when user REJECT the CR. not on SAVE and SUBMIT.

How can I capture Event ID for REJECT button in USMD_RULE_SERVICE BADI

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
avatar image
Former Member Dec 18, 2017 at 06:51 PM
0

HI All,

Thanks for response,

Issue has been resolved with below code

io_event->mv_event_id = 'CR_SUBMIT'.

IO_EVENT TYPE REF TO CL_FPM_EVENT " ID of the FPM Event

Bregards

Saurabh

Share
10 |10000 characters needed characters left characters exceeded
Varun Jain Sep 27, 2017 at 10:45 AM
0

HI Saurabh ,

Your methid would have this parameters CV_NEW_STEP CV_NEW_CR_STATUS you can check this value what you have define during workflow design ( BRF+ ).

Regards,

Varun

Share
10 |10000 characters needed characters left characters exceeded
Loga Nathan Duraisamy Sep 28, 2017 at 09:14 AM
0

Hi,

Can't really know exact action initiated in the derivation method.Save the event from the feeder class in memory id or in varibale then refer that variable value in derivation method.

Thanks and Regards,

Logan.D

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Oct 05, 2017 at 12:58 PM
0

1) Create instance of CL_FPM using FPM Factory class

2) Use the method READ_EVENT_QUEUE of CL_FPM. This method will have the events raised during the current FPM loop.

I, however, would advise caution here, USMD_RULE_SERVICE BADI is called in many offline scenarios like consolidation, or when creating a change request using API.During this offline scenario, you will not have any transaction FPM events triggered. Have sufficient safeguards in code.

It may not be a good idea to handle transaction events in the BADI. Just thought :)

Share
10 |10000 characters needed characters left characters exceeded