Symptom
An incorrect value is displayed for the tag ClaveProdServ in the eDocument XML.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Go to the eDocument Cockcpit App.
- In the Source Document field, enter ABC (where ABC represents Source Document ID)
- Mark the eDocument ABC.
- Select Display -> Preview/Display XML.
The tag ClaveProdServ is displayed with the value 84111506.
Cause
For Credit Memos, the Document Type is maintained as 'DG' and the same is mapped as 'E' in the DOC_TYPE value mapping.
According to the current standard system behavior in the SAP S/4HANA Cloud Public Edition, any DOC_TYPE maintained as 'E' will determine the Product Code according to internal fixed value CFDI_PRODUCT_CODE and not the information maintained in the value mapping PRODUCT_CODE & Namespace '/EDOMX'.
The fixed value for CFDI_PRODUCT_CODE is determined per standard as “84111506”. As a result, the tag "Claveprodserv" is determined as “84111506” for materials maintained in Credit Memo eDocuments. These internal fixed values are delivered and maintained in the system in accordance with the official SAT documentation, specifically Anexo 20 – Guía de llenado del CFDI (page 65: Anexo_20_Guia_de_llenado_CFDI.pdf).
In this scenario, the value mapping logic cannot be changed. Any material added to a Credit Memo will always have the tag “Claveprodserv” determined as “84111506”.
Resolution
This is the standard system behavior.
Since Product Code "84111506" is the standard determination for materials in Credit Memos, it's recommend consulting your SAP consultant and the Tax Authority before proceeding with any changes. The change for the Product Code (84111506) for a material maintained in Credit Memo eDocuments can be performed directly in the eDocument XML using the BAdI EDOC_ADAPTOR_CLOUD.
Using the Badi EDOC_ADAPTOR will allow you to influence the determination of any XML values in the eDocuments XML in a more direct way to avoid incorrect information.
See Also
Community Blog: Enhancing the Standard XML File for Electronic Documents using the BAdI EDOC_ADAPTOR_CLOUD
Keywords
EDOC_ADAPTOR_CLOUD, Product Code, Claveprodserv, Credit Memo , KBA , CA-GTF-CSC-EDO-MX , Document Compliance Mexico , Problem
SAP Knowledge Base Article - Public