SAP Knowledge Base Article - Public

3832768 - eDocument Mexico: IMPORTE GENERAL_ERROR on Discount Line

Symptom

When submitting a Mexico CFDI 4.0 eDocument for a billing invoice that contains a discount line item, one or both of the following issues occur:

  • The submission fails immediately. The document remains at status Sending Requested and the Interface Connector Log shows:
    • GENERAL_ERROR Error during proxy processing
    • fieldname: IMPORTE
  • The generated XML contains an incorrect header tax base. The SubTotal attribute reflects the correct net amount (after discounts), but the Base amount inside the <Impuestos> node is inflated — the discount's tax contribution is added rather than subtracted, causing the tax base to exceed the SubTotal.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Create a billing invoice that contains at least one discount line item.
  2. Open Manage Electronic Documents and locate the eDocument for the billing invoice.
  3. Choose Submit.
  4. Open the Interface Connector Log and observe the error GENERAL_ERROR Error during proxy processing with fieldname: IMPORTE.
  5. Alternatively, display the generated XML and observe that the Base attribute in the header <Traslado> node is higher than the SubTotal attribute of the <Comprobante> node.

Cause

Mexico CFDI 4.0 requires the Document and Reporting Compliance (DRC) eDocument solution to classify each pricing condition type used in Sales and Distribution (SD) billing documents as revenue, discount, surcharge, or tax. This classification is maintained in the SD_COND_TYPES value mapping under namespace /EDOMX in the Configure Value Mapping app.

When a custom discount condition type is absent from this mapping, the system cannot identify the corresponding billing line as a discount. The discount amount is then processed incorrectly during XML generation: the Importe attribute produced for the discount Concepto node is not a valid decimal value, causing the proxy serializer to fail with GENERAL_ERROR on the IMPORTE field. In addition, because the discount is not recognized as such, its tax amount is included in the header <Traslado Base> with the wrong sign, inflating the total tax base beyond the invoice SubTotal.

The same applies to custom surcharge condition types not mapped to SD_SURCHAR, and custom revenue condition types not mapped to SD_NET_AMT.

Resolution

Follow the steps below to resolve the issue:

  1. Identify all custom pricing condition types used in SD billing documents for your Mexico company code — in particular any discount, surcharge, or revenue condition types not present in the SD_COND_TYPES value mapping.
  2. Open the Configure Value Mapping app in SAP S/4HANA Cloud Public Edition.
  3. Navigate to namespace /EDOMX.
  4. Open value set SD_COND_TYPES.
  5. Add a new entry for each missing condition type:
    1. External Value: the condition type (for example, a custom discount condition type)
    2. Internal Value: the appropriate classification — SD_DISC for discounts, SD_SURCHAR for surcharges, SD_NET_AMT for revenue
  6. Save the configuration.
  7. Open Manage Electronic Documents, regenerate the affected eDocument, and submit again.
  8. Verify that the submission succeeds and that the Base value in the header <Traslado> node equals the invoice SubTotal.

Note: Review all custom pricing condition types across all Mexico company codes, not only the one that triggered the error. Any unmapped condition type can produce the same issue on future invoices.

See Also

Keywords

eDocument, Mexico, CFDI, GENERAL_ERROR, IMPORTE, Wrong Tax Base, Proxy Error, Discount, Descuento, Concepto, Traslado, SubTotal, Impuestos, Comprobante, Sending Requested, Interface Connector Log, SD_COND_TYPES, SD_DISC, SD_SURCHAR, SD_NET_AMT, Configure Value Mapping, DRC, Manage Electronic Documents, /EDOMX, CL_EDOC_MAP_MX_SD , KBA , CA-GTF-CSC-EDO-MX , Document Compliance Mexico , Problem

Product

SAP S/4HANA Cloud Public Edition all versions

Attachments

Pasted image.png