cancel
Showing results for 
Search instead for 
Did you mean: 

Execute custom function after SC WF completion

kyle_mccarter
Participant
0 Kudos

Greetings!

We have recently upgraded to SRM 7.0 (release 740 SP 12), and have configured standard SAP process control WF for shopping cart processes. We are using workflow template WS40000014.

We want to trigger the execution of a custom method AFTER workflow is statused 'COMPLETE' (regardless of approve/reject). It doesn't appear there is any existing events I can tie a small custom workflow to when a SC workflow completes. I thought I may be able to trigger off status change to the shopping cart header, but the only BAdI I could find to trigger an event based on document status is flagged for implementation by SAP internally only (BBP_BDI_DOC_STATUS_CHG).

This requirement was overlooked during initial design, and is a bit urgent.

Any ideas the community can share as to how I can trigger a custom method execution at SC WF completion is greatly appreciated.

Kind Regards,

KM

Accepted Solutions (0)

Answers (1)

Answers (1)

kyle_mccarter
Participant
0 Kudos

I was able to solve my problem by implementing an implicit enhancement at the end of /SAPSRM/CL_WF_EVENT_ADAPTER-TRIGGER_EVENT. I didn't want to do it this way, but ran short on time, and (I'm ashamed to admit) ran short on ideas.

At any rate, this method is called at several times during the workflow processing. My solution executes a method call in a separate task if the event passed in is APPROVAL_PROCESS_DOC_APPROVED.

It seems to work perfectly, but if you have any better ideas... I'd love to hear them.

Cheers for now!

KM