cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to fill the "NoIdentificación" tag in the XML of an Electronic Invoice for Mexico in SAP S/4HANA

JFCorreaMejia
Newcomer
0 Likes
632

Hello everyone,

I need to fill the "NoIdentificación" tag in the XML of an Electronic Invoice for an eDocument in Mexico within SAP S/4HANA Public Cloud. However, I haven't found a specific BAdI for this. Currently, the "NoIdentificación" tag is fill with the Material Number, but it needs to be filled with the information from the "Customer Reference" field instead.

I noticed that there is a BAdI called EDOC_MX_FILL_CUSTOM_DATA to modify the electronic document XML before its generation, but we were unable to make it work. We found this in the Application Extensibility: eDocument Cockpit.

Could someone assist us in how to populate the "NoIdentificación" tag in the XML of an Electronic Invoice for an eDocument in Mexico?

I would greatly appreciate any suggestions or advice you can provide.
Many thanks!

Best regards from Colombia!

 

Additional Information:
In Custom Logic, I have the following:

YY1_MX_INVOICE_ITEM
MX_Invoice_Item

DATA lv_salesorder TYPE i_salesorder-salesorder.

SELECT SINGLE salesorder
INTO @LV_salesorder
FROM zcds_billing_flow
WHERE billing EQ @billinginfo-billingdocinfo-billingdocumentnum.

IF sy-subrc EQ 0.
ITEM-DESCRIPCION = lv_salesorder.

SELECT SINGLE MaterialByCustomer FROM i_salesdocumentitem INTO @ITEM-NO_IDENTIFICACION
WHERE SalesDocument EQ @billinginfo-billingdocinfo-billingdocumentnum
AND SalesDocumentItem EQ @billinginfo-billingdocinfo-billingdocitemnum.
ENDIF.

 

By clicking on the ShowSampleCode icon:

Sample Code

CONSTANTS no_identificacion TYPE string VALUE 'TICKET 0001'.
CONSTANTS clave_prod_serv TYPE string VALUE '01010101'.
CONSTANTS clave_unidad TYPE string VALUE 'ACT'.
CONSTANTS descripcion TYPE string VALUE 'Venta' ##NO_TEXT.
CONSTANTS cantidad TYPE string VALUE '1'.

item-no_identificacion = no_identificacion.
item-clave_prod_serv = clave_prod_serv.
item-clave_unidad = clave_unidad.
item-descripcion = descripcion.
item-cantidad = cantidad.

CLEAR item-unidad.

 

 

Thank you very much for your attention, have a great day!
Vielen Dank für Ihre Aufmerksamkeit, einen schönen Tag noch!
非常感谢您的关注,祝您有美好的一天!
¡Muchas gracias por tu atención, que tengas un feliz día!
شكرًا جزيلاً على انتباهك، أتمنى لك يومًا سعيدًا!
आपके ध्यान के लिए बहुत धन्यवाद, आपका दिन शुभ हो!
Merci beaucoup pour votre attention, passez une excellente journée !
আপনার মনোযোগের জন্য অনেক ধন্যবাদ, আপনাকে একটি সুখী দিন কামনা করি!
Muito obrigado pela sua atenção, tenha um ótimo dia!
Большое спасибо за ваше внимание, желаю вам счастливого дня!

Accepted Solutions (0)

Answers (2)

Answers (2)

Chris1973
Active Contributor
0 Likes

Hi  @JFCorreaMejia 

Did you get any response from the expert?

Best regards

Chris

chrisobim
Participant
0 Likes

Withdraw