I want to trigger an IDoc or Web-service after releasing a purchase order. What is the best way to do it? Via output determination (what would be the condition in this case?) or via a BADI or user exit?
Best Regards
I want to trigger an IDoc or Web-service after releasing a purchase order. What is the best way to do it? Via output determination (what would be the condition in this case?) or via a BADI or user exit?
Best Regards
For this kind of requests, I would suggest to use SAP Business Workflow. In your case, the SAP standard will trigger the event Released
of the business object BUS2012
(Purchase Order) in the Business Object Repository (BOR). With transaction SWETYPV
, you can attach consumers to this event. The consumers will automatically be called (if workflow is active in your system, of course). A consumer may be a workflow, a function module or a method of an ABAP OO class.
Advantages, compared to other possible solutions:
SWEL
).
You can try M06E0005 user-exit. It is used to change release role determination during release workflow events and can be utilized to run custom code.