SAP Knowledge Base Article - Public

3791778 - eDocument Mexico: ImpuestoRet Field in Withholding Tax Certificate XML Shows Two-Digit Value Instead of Three-Digit Value

Symptom

In the Mexico Withholding Tax Certificate (WTC) XML generated via the eDocument Cockpit, the ImpuestoRet field outputs a two-digit value (01, 02, or 03) instead of the three-digit value (001, 002, or 003) required by the SAT Retenciones v2.0 schema.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Open the Configure Value Mapping app and navigate to Namespace /EDOMX, Value Mapping Name WTC_TAX_TYPE_ASSIGN.
  2. Confirm that the Tax Type field contains two-digit values (01 / 02 / 03) selected via F4 help.
  3. Create a supplier invoice with a withholding tax indicator for the relevant company code.
  4. Post the corresponding outgoing payment.
  5. Run the Create Withholding Tax Certificate app for the company code.
  6. Open the eDocument Cockpit, locate the generated WTC document, and select Display Preview XML.
  7. Observe that the ImpuestoRet field contains a two-digit value (for example, 01) instead of the required three-digit value (001).

Cause

In the WTC_TAX_TYPE_ASSIGN value mapping, the F4 help for the Tax Type field provides only two-digit values (01 / 02 / 03). When a user selects a value using F4 and saves the configuration, the two-digit value is stored and output as-is to the ImpuestoRet field in the XML — no digit-padding conversion is applied.

The field value originates from the value mapping configuration: Namespace /EDOMX, Value Mapping Name WTC_TAX_TYPE_ASSIGN. The SAT Retenciones v2.0 schema requires three-digit values (001 / 002 / 003) for this field, which contradicts the two-digit values provided by the F4 catalog.

Resolution

Follow the instructions in Configuring Withholding Tax Type to SAT Tax Type (WTC_TAX_TYPE_ASSIGN) to update the value mapping with three-digit Tax Type values. Do not use F4 help when entering the values — F4 only provides two-digit options.

  1. Open the Configure Value Mapping app and navigate to Namespace /EDOMX, Value Mapping Name WTC_TAX_TYPE_ASSIGN.
  2. Delete the existing two-digit entry (for example, Tax Type = 01).
  3. Add a new entry and manually type the three-digit value (for example, Tax Type = 001). Do not use F4 help.
  4. Repeat for the remaining tax types (02 → 002, 03 → 003).
  5. Save the configuration.
  6. Generate a new WTC XML document and verify that the ImpuestoRet field now outputs the three-digit value (for example, 001).

See Also

Keywords

eDocument, Mexico, Withholding Tax Certificate, WTC, ImpuestoRet, WTC_TAX_TYPE_ASSIGN, Value Mapping, Three-Digit, Two-Digit, SAT, Retenciones, Tax Type, 001, 002, 003, 01, 02, 03 , KBA , CA-GTF-CSC-EDO-MX , Document Compliance Mexico , Problem

Product

SAP S/4HANA Cloud Public Edition all versions