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

Sales order processing

Former Member
0 Likes
581

HI All

In our system, when we create or change any salesorder, a Purchase requisition is always created.

My requirement is to change a material in the salesorder using BAPI_SALESORDER_CHANGE, then a new purchase requisition line item is created, and using that PR i have to create purchase order .

So this is the sequence "SO change--->PR--->PO".

But I want to only commit, after the PO creation, not in between.If anything fails in between i want to roll back everything including sales order change.

So here comes the problem, because i am not commiting this after salesorder change, i am not getting PR and hence i will not be able to create an PO.

Please let me know if i can anyway get the PR without committing the Salesorder change, or suggest me anyother way to acheive this?

I tried to search in the Forum, but couldnt find anything related to my problem.

Regards,

Robin

3 REPLIES 3
Read only

former_member191735
Active Contributor
0 Likes
547

Have you thought about deleting the previous document upon error instead of rollback.

If you PO failed, delete PR and SO, etc.

Read only

0 Likes
547

Sampath,

Thanks for the reply.But My functional consultant does not want create the documents unnecessarily and then deleting them.

But i felt your idea was a "Worth try" one.

ANy other option????

Read only

0 Likes
547

The last few posts of this thread were accidentally deleted, here is a reconstruction, sorry for the inconvenience:

Chen K V:

Hi,

Could you confirm, how is the PR created? Is this automatic/manual provide more info.

Regards,

Chen

robinhood:

Chen,

PR creation is automatic...

Chen K V:

May be i should have been more precise,

As you say the flow is as below,

So this is the sequence "SO change--->PR--->PO"

Now as and when a SO is created/changed a PR is created(now you have confirmed that is automatic), what i wanted to know was how is it automated...is it via some configuration/User Exit/Output type etc.

Regards,

Chen

robin hood:

Chen,

This is via configuration.