Hi Experts,
We have a business scenario, where we have to create a Purchase Order with fewer or different Service lines of a Purchase Requisition. The PO must be referenced to the PR.
Currently, to fulfill this requirement we have a program which calls the FM BAPI_PO_CREATE1 with the PR number, which creates the PO with all Service lines of the PR. After this process, the program calls the FM BAPI_PO_CHANGE and adjusts the service lines, according to certain input parameters that the user inserts.
The problem we have with this program is that, when the PR is referenced to a contract, and there is a Service line which exceeds the contract quantities, we get a standard error explaining that the quantities exceeds the contract (this is because, the program first creates the PO, and here is where it gets the error).
We came across different alternatives which could help us, but non of the worked:
1- Modify the Message to Warning: we could not find anyway to turn this message to Warning in the BAPI process or for the PO Type.
2 - Modify PR Service Lines: it is not possible to change Service lines through BAPI in the SAP version we are working on. Batch input is neither an option since, we have problems when changing screens or selecting service lines. Moreover since, this program is to be used as WebService, it generates a dump when calling from another application.
3- Creating directly the Service Lines in BAPI_PO_CREATE1: The problem with this solution is that even if I insert the Service Lines I need, the Services Lines of the Purchase Requisition are copied.
Did you have this problem before? How did you solve it? Are other alternatives? Could 1,2 or 3 work?
Any suggestion will be very helpful and appreciated.
Thank you very much in advance,
Lucas