SAP Knowledge Base Article - Public

2839034 - Error M8476 via SoaP API with mixed items


You are using the Soap API, from Communication Scenario 'Supplier Invoice Integration' (SAP_COM_0057) to create and park Supplier Invoices. When you process a payload, referencing a Purchase Order with a mixture of a normal items and return items. The posting fails with error 'The quantity reversed cannot be larger than the quantity credited to date' (M8476).


SAP S/4HANA Cloud All versions

Reproducing the Issue

  1. Create a Purchase order with a regular item and a return item. 
  2. Process a payload via the API to post an IV invoice for this Purchase Order. 
  3. The posting fails with error M8476.
  4. Open the Create Supplier Invoice APP.
  5. Simulate the posting of the Invoice for this mixed Purchase Order, no errors.  


The SOAP UI does not support mixed invoices containing both, debit and credit items. In the API, the debit/credit indicator is derived from the Invoice-TypeCode (XRECH) All items with reference to a Purchase Order are assigned the same value for SHKZG. It is therefore not possible to have invoice and credit memo items (both with Purchase Order reference) in the same document.


It is possible to Park the mixed Invoice via the SoaP UI and manually adjust the credit/debit indicator in the Parked Invoice.
This can be done using the “Assignment Options” in APP 'Supplier Invoices List' or by the same method in the 'Display Supplier Invoice Advanced' webgui tile.

See Also

API Documentation


SupplierInvoiceERPCreateRequestConfirmation_In, credit, debit, shkzg, ECC_SUPLRINVCERPCRTRC, Supplier Invoice Integration, SAP_COM_0057, M8476, M8 476, RBKPB-XRECHR. , KBA , MM-IV-LIV , Logistics Invoice Verification , MM-FIO-IV , Fiori UI for Invoice Verification , Problem


SAP S/4HANA Cloud all versions