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
- Open the Configure Value Mapping app and navigate to Namespace /EDOMX, Value Mapping Name WTC_TAX_TYPE_ASSIGN.
- Confirm that the Tax Type field contains two-digit values (01 / 02 / 03) selected via F4 help.
- Create a supplier invoice with a withholding tax indicator for the relevant company code.
- Post the corresponding outgoing payment.
- Run the Create Withholding Tax Certificate app for the company code.
- Open the eDocument Cockpit, locate the generated WTC document, and select Display Preview XML.
- 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.
- Open the Configure Value Mapping app and navigate to Namespace /EDOMX, Value Mapping Name WTC_TAX_TYPE_ASSIGN.
- Delete the existing two-digit entry (for example, Tax Type = 01).
- Add a new entry and manually type the three-digit value (for example, Tax Type = 001). Do not use F4 help.
- Repeat for the remaining tax types (02 → 002, 03 → 003).
- Save the configuration.
- 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
SAP Knowledge Base Article - Public