Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Trigger proxy when Process Order is released

Former Member
0 Likes
1,522

Dear ABAP Experts,

I have a requirement where in I am supposed to send out a proxy with the details of the Process Order that is being released when the PO is released using COR2 or COHVPI transaction. The same can be achieved by coding in specific User Exits. However, I would like to explore the feasibility of achieving the same using Work flows as I am new to WF's and this is my first attempt at it. Please do share your views if this is something which is do-able using Workflows and also do share the steps to meet my requirement. Hope this marks the beginning of my work in Workflows..

Thank you in advance.

Looking forward to your responses. Thanks again.

Best Regards,

Ram

1 ACCEPTED SOLUTION
Read only

ronen_weisz
Active Contributor
0 Likes
1,227

First of all there is a workflow forum

Secondly, you can use a workflow event to call a function module using transaction SWE2 or trigger a workflow and in it used a task to call an object or class method to call the proxy. in both cases calling the proxy in a user exit and not by workflow is more efficient because:

  • Catching the event is done by an RFC which adds a possibility for errors
  • Workflow logs every action which will adds unnecessary date to the DB in this case.


You use workflows for this kind of process when you have no user exit or BADI after the save to the DB. if this is the case you need to check if you have a standard event raised by the release of the production order (turn the event trace on in transaction SWELS, release an order and look at the log in transaction SWEL) if you do not have an event you can raise one by change documents/status changes/user exit etc.

4 REPLIES 4
Read only

ronen_weisz
Active Contributor
0 Likes
1,228

First of all there is a workflow forum

Secondly, you can use a workflow event to call a function module using transaction SWE2 or trigger a workflow and in it used a task to call an object or class method to call the proxy. in both cases calling the proxy in a user exit and not by workflow is more efficient because:

  • Catching the event is done by an RFC which adds a possibility for errors
  • Workflow logs every action which will adds unnecessary date to the DB in this case.


You use workflows for this kind of process when you have no user exit or BADI after the save to the DB. if this is the case you need to check if you have a standard event raised by the release of the production order (turn the event trace on in transaction SWELS, release an order and look at the log in transaction SWEL) if you do not have an event you can raise one by change documents/status changes/user exit etc.

Read only

0 Likes
1,227

Hi Ronen,

Thanks for taking your time and replying to my query.

I am considering the option of coding inside a User Exit. However, I am facing an issue when PO release is attempted using COHVPI transaction.

My objective is to trigger a proxy when a Process Order release is attempted from COHVPI Transaction but the Process Order Release should not happen. How do I restrict this?

Request your help in this considering we would be handling more than one process order in COHVPI transaction.

Thanks.

Regards,

Ram

Read only

0 Likes
1,227

Hi Rajan,

  try to use badi "WORKORDER_UPDATE" method "AT_RELEASE".

Inside this method you can trigger the proxy and after that you can raise the exception "FREE_FAILED_ERROR" to invalidade the release of Production Order.

Att,,

Ortiz

Read only

0 Likes
1,227

Thank You Ortiz. Your reply has been of a great help.

Thanks again.