cancel
Showing results for 
Search instead for 
Did you mean: 

Odata API API_MATERIAL_DOCUMENT_SRV throwing error Deficit of PU GR quantity 20 PC (M7021)

0 Kudos

We have a particular case where we post a Goods receipt against a Purchase order (Movement 101) after the goods receipt we post a Return Delivery to vendor (movement type 122)
with reference to the PO without any issue. However if we repeat the steps and try to post a second 122 movement we are receiving error 'Deficit of PU GR quantity 20 PC ....'  and the posting fails. In post goods movement MIGO it works fine.  

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

See KBA 2974296 for more information

https://launchpad.support.sap.com/#/notes/2974296

When using the GR based IV flag, if more than one GR has been posted, the system needs the reference information from the block assignment, the reference material document number of the goods receipt.

In the payload these reference fields need to be passed for a GR Based IV case. Without GR based IV it is enough to reference the purchase order and item involved.

As per the KBA these are the respective fields:

"InvtryMgmtReferenceDocument" : "xxxxxxxxxxx", (mseg-lfbnr)

"ReferenceDocumentFiscalYear" : "xxxx", (mseg-lfbja)

"InvtryMgmtRefDocumentItem" : "xxxx", (mseg-lfpos)

KBA 1969463 provides further information on the block assignment fields LFBNR, LFPOS & LFBJA

https://launchpad.support.sap.com/#/notes/1969463

Answers (2)

Answers (2)

0 Kudos

Just to point out

In Cloud release CE2008 the API does not yet fully support the GR Based IV processing.

These reference fields are not available until release CE2011 end of October start of Nov 2020

0 Kudos

Very helpful!