cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member230279
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member230279
Participant
0 Kudos

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

0 Kudos

Hi Saurabh,

I have a similar requirement. I need to perform validations only on SUBMIT.

Could you please tell me how did you handle your case? Which BADI(method) was used for the same?

Thanks!

Answers (3)

Answers (3)

0 Kudos

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 🙂

loga201
Contributor
0 Kudos

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

varun_jain3
Active Participant
0 Kudos

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