SAP Knowledge Base Article - Public

2893949 - Error happens when using Purchase Contract OData API with batch mode

Symptom

Error 'Purchase contract cannot be edited as currently it is in approval' happens when using API to update approved purchas contract.

Environment

  • Sourcing and Procurement
  • SAP S/4HANA Cloud Public Edition 1905

Cause

1. Contract is Approved that means PROCSTAT = 05.

2. In the BATCH call i am sending 2 ITEMS to be created in two separate changesets.

3. The ODATA API process the change sets in LOOP and the POST calls gets processed in a loop.

4. As soon as the first POST call finishes , the PROCSTAT value gets changed to 03 , even if the commit is not yet completed.

5. Because now the PROCSTAT is 03 , the second POST calls raises error that Contract is in APPROVAL and hence cancels the update process.

Resolution

This will be fix in further release.

See Also

Fiori app

Keywords

S4, HANA, Purchase Contract, API , KBA , MM-PUR-OA-CON , Contract , Problem

Product

SAP S/4HANA Cloud 1911