2011 Jun 10 3:35 PM
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
Have you thought about deleting the previous document upon error instead of rollback.
If you PO failed, delete PR and SO, etc.
2011 Jun 10 10:14 PM
Have you thought about deleting the previous document upon error instead of rollback.
If you PO failed, delete PR and SO, etc.
2011 Jun 11 7:16 PM
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????
2011 Jun 13 3:55 PM
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.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |