SAP Knowledge Base Article - Public

3786998 - Error M8_2/211 when posting supplier invoice via api_supplierinvoice_process_srv for service entry sheet

Symptom

Posting a supplier invoice via API_SUPPLIERINVOICE_PROCESS_SRV for a service purchase order with a limit item and goods‑receipt‑based invoice verification fails.

The system returns error M8_2/211: "Service procurement: Goods receipt reversed for item XYZ". 

Manual posting of the first invoice works, but a subsequent posting via the API after releasing another service entry sheet fails.

XYZ means Item ID.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Create a service purchase order with a limit item and enable goods‑receipt‑based invoice verification.
  2. Create a service entry sheet for the order and release it.
  3. Create and release an additional service entry sheet for the same order.
  4. Post a supplier invoice via API_SUPPLIERINVOICE_PROCESS_SRV with reference to the service entry sheet and goods receipt.

Cause

Resolution

  1. Remove the toSupplierInvoiceItmAcctAssgmt (SupplierInvoiceItmAcctAssgmt) navigation block from the payload when posting the invoice via API with reference to a service entry sheet/limit item.
  2. If the error persists, verify that the invoice header amount (invoiceGrossAmount) equals the sum of all item amounts in the payload.
  3. Ensure quantity parameters follow guidance: provide purchaseOrderQuantityUnit and quantityInPurchaseOrderUnit at the item level and do not duplicate them in the account assignment block.

See Also

refer to: Error message M8_2/211 when using API to create supplier invoice

Keywords

M8_2/211, goods receipt reversed, service procurement, supplier invoice, api_supplierinvoice_process_srv, service entry sheet, limit item, gr-based invoice verification, public cloud, account assignment, toSupplierInvoiceItmAcctAssgmt, invoiceGrossAmount, quantityInPurchaseOrderUnit, purchaseOrderQuantityUnit, posting via API , KBA , MM-IV-LIV-BAPI-2CL , BAPI (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions