Symptom
When processing a Mexico CFDI electronic invoice in SAP S/4HANA Cloud Public Edition via Document and Reporting Compliance (DRC), the billing document posts successfully but the eDocument fails with an arithmetic overflow error during CFDI generation.
Error observed in the eDocument Cockpit interface log:
- Exception type: CX_SY_ARITHMETIC_OVERFLOW
- Location: CL_EDOC_MAP_MX_SD=============CM010, Line 33
- Message: "Overflow in arithmetic operation :="
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Open the eDocument Cockpit.
- Locate the affected CFDI eDocument originating from the billing document.
- Choose Go to > Interface Log and review the processing logs to observe the error.
Cause
The error CX_SY_ARITHMETIC_OVERFLOW occurs during the CFDI generation process, specifically in the tax amount calculation within the eDocument Mexico mapping. The issue is triggered because the calculated tax amount — 1,600,000,000.00 MXN (16% of 10,000,000,000.00 MXN) — exceeds the internal capacity of the ABAP variable used in the mapping process, which supports a maximum of 9 integer digits (999,999,999).
Resolution
This is a known design limitation of the standard eDocument Mexico solution. The eDocument Mexico mapping was not designed to handle tax amounts exceeding 999,999,999 MXN in a single billing document. Invoices within this threshold are processed normally.
Workaround: Split the billing document into two or more documents, ensuring the net amount of each individual document does not exceed 6,249,999,999.99 MXN (so that the corresponding IVA tax amount stays below 999,999,999 MXN). Mexican fiscal regulations (SAT) do not prohibit issuing multiple CFDI documents to cover a single transaction, so this workaround is fully compliant.
Customers who wish to have the supported amount range extended in a future release may submit a request in the SAP Document and Report Compliance Customer Influence Forum.
Keywords
eDocument, Mexico, CFDI, Generation, CX_SY_ARITHMETIC_OVERFLOW, CL_EDOC_MAP_MX_SD=============CM010, Line 33, Overflow in arithmetic operation :=, amount range, 999,999,999 MXN , KBA , CA-GTF-CSC-EDO-MX , Document Compliance Mexico , How To
SAP Knowledge Base Article - Public