Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

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

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 27, 2017 at 10:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 28, 2017 at 09:14 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 05, 2017 at 12:58 PM

    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 :)

    Add comment
    10|10000 characters needed characters exceeded