Skip to Content
0

Wrong BO Event triggered upon Purchase Contract change via ME32K

Jan 23 at 11:21 AM

98

avatar image

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.

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

3 Answers

Best Answer
Shafaqath Khanum Jan 30 at 10:57 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Jan 23 at 12:57 PM
0

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.
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hey Raymond,

Thanks for your reply.

Should I use the above given code in Receiver Type Function Module of BUS2012-CHANGED event linkage? Should the FM have certain format for all the parameters?

Can you please give more details on the same?

0

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?

0
Anjan Paul Jan 29 at 07:08 AM
0

Hi,

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

Thanks

Share
10 |10000 characters needed characters left characters exceeded