Skip to Content

Wrong BO Event triggered upon Purchase Contract change via ME32K

I need to trigger a custom workflow upon Purchase Contract change. While I check the trace to see the event triggered for Purchase Contract change (via ME32K), BUS2012-CHANGED is triggered which is for Purchase Order instead of BUS2014-CHANGED. Can anyone tell me how to correct this so that BUS2014 Event is triggered.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 30 at 10:57 AM

    Thanks Anjan for your reply.

    But SWEC did not have any entry for BUS2012-CHANGED.

    I resolved this issue by creating a subtype of BUS2014 and created a new event ZCHANGED within ZBUS2014.

    Configured SWEC for ZBUS2014-ZCHANGED for change and added the field restrictions and activated the event linkage for it from my custom WF.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 23 at 12:57 PM

    You could consider use of a function module in the event linkage of BUS2012 to adjust this: e.g. use of actual value of EKKO-BSTYO. (ref.Function Modules for Processing Events)

    CASE ekko-bstyp.
      WHEN 'A'.
        objecttype-catid  = 'BO'.
        objecttype-typeid = 'BUS2010'. " RFQ
      WHEN 'F'.
        objecttype-catid  = 'BO'.
        objecttype-typeid = 'BUS2012'. " PO
      WHEN 'K'. "Contract
        objecttype-catid  = 'BO'.
        objecttype-typeid = 'BUS2014'. " Ctr
      WHEN 'L'.
        objecttype-catid  = 'BO'.
        objecttype-typeid = 'BUS2013'. " Scd
    ENDCASE.
    Add comment
    10|10000 characters needed characters exceeded

    • Like you mentioned above, to check BSTYP and change the BO event, the interface to be used is 'SWE_CD_TEMPLATE_OBJTYPE_FB_2'. I copied the interface FM to ZFM and tried to add it in the check FM of BUS2012-CHANGED event linkage. However, it is not taking the FM either in check FM or in receiver type FM. It gives error

      'Check FM ZFM_CHANGE_BO: Parameter SENDER does not exist'

      'Receiver Type FM ZFM_CHANGE_BO: Parameter SENDER does not exist'.

      Can you please assist me with more details like where to add this ZFM?

  • Jan 29 at 07:08 AM

    Hi,

    Please check in SWEC which Object is linked for the change object.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded