cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in PO Change Workflow

Former Member
0 Kudos

Hello Experts,

I  have a requirement to trigger a workflow when ever a certain field gets change in Purchase Order.

Only after the Approver review the change and approves it  then actual change should happend. Till that time it should not allow any other user to

change the PO.

I can trigger the Workflow when PO gets change, But I am stuck to lock the PO for the time until changes are not approved.

Please suggest me how we can achive this.

-Priyanka

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Priyanka,

Not sure but you can also use fm (http://scn.sap.com/thread/472209) to reset release back to 'unreleased/ blocked state' Implement the PO release fm in the exit or badi (http://scn.sap.com/thread/1624098).

Or else if you do not want to implement a FM in an exit, you can simply use exit

(http://scn.sap.com/thread/1624098) and whenever a field is changed (compare current and screen values) you can pass a toggle flag to any of USRC1 USRC2 USRN1 USRN2 fields. You will need slight functional knowledge of how class and characteristics are implements in release strategy.

Thanks,

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Priyanka, you need to use the application's functionality itself.  You don't mention whether the PO is created in ECC or SRM or in what release/support pack?  It's generally helpful to include that information in forum posts.

Taking an enqueue lock is probably not the best approach here - those are just temporary update locks, and a system refresh could throw them away without warning.

You want to look for a way to place a block on the Purchase Order that the Purchase Order application itself uses to prevent further changes i.e. you want to talk to someone in logistics about this.  Perhaps try the Materials Management forum or the SRM forum, rather than the workflow forum. 

Hope that helps.

Regards,

Jocelyn

former_member185167
Active Contributor
0 Kudos

Hello,

You can't do that without locking it.

regards

Rick

Former Member
0 Kudos

Any suggestion for the above questions, will be appreciated.

anjan_paul
Active Contributor
0 Kudos

Hi,

   Take a background task method after workflow trigger, where you use call function 'ENQUEUE_EMEKKOE' to lock the PO.

And after approver approve the PO from workfow inbox use another backgorund method where you use call function 'DEQUEUE_EMEKKOE' to unlock the PO.

former_member16044
Active Participant
0 Kudos

Hello Priyanka,

The lock objects have to be used in the BADi ME_PROCESS_PO_CUST(Or an user exit) on post method, as workflow trigger does not stop the PO change.

And at the end of approval, a background to de-que the lock.

Regards,

Rahul Kulkarni