SAP Knowledge Base Article - Public

3800606 - eDocument Mexico: Incorrect Amounts in Complemento de Pago XML When Credit Memo Has No Invoice Reference

Symptom

When generating a Mexico Complemento de Pago (payment supplement) XML for a payment that covers multiple invoices and credit memos, the ImpSaldoAnt, ImpPagado, and ImpSaldoInsoluto amounts reported for individual invoices in the DoctoRelacionado node are incorrect. The total payment amount (Monto) remains correct, but amounts are incorrectly distributed between invoice entries.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Post a customer payment that covers multiple invoices, where some invoices have corresponding credit memos.
  2. Generate the Mexico Complemento de Pago in Manage Electronic Documents.
  3. Open the generated XML and review the ImpSaldoAnt and ImpPagado values in each DoctoRelacionado node.
  4. Observe that the amounts for one or more invoices do not match the expected balances after applying the corresponding credit memos, although the total Monto remains correct.

Cause

The ePayment generation logic determines which credit memo belongs to which invoice by reading the Invoice Ref. field in the credit memo's FI document. If this field is empty, the system cannot establish the relationship between the credit memo and its corresponding invoice, and the credit memo amount is distributed proportionally across all invoices instead of being applied to the correct one.

Resolution

Please ensure the Invoice Ref. field in the credit memo's FI document is populated with the FI document number of the original invoice. Once correctly populated, regenerate the Complemento de Pago and verify that ImpSaldoAnt and ImpPagado now reflect the correct amounts for each invoice.

See Also

Keywords

eDocument, Mexico, Complemento de Pago, Payment Supplement, ImpSaldoAnt, ImpPagado, ImpSaldoInsoluto, DoctoRelacionado, Credit Memo, Invoice Reference, BSEG-REBZG, Incorrect Amount, Wrong Amount, Missing Invoice Reference, CL_EDOC_MAP_MX_FI_PMNT , KBA , CA-GTF-CSC-EDO-MX , Document Compliance Mexico , Problem

Product

SAP S/4HANA Cloud Public Edition all versions