Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
I507377
Product and Topic Expert
Product and Topic Expert
10,660
The e-invoice in Mexico is the final document in an regular  OTC process. CFDI 3.3 document is the only valid invoice document for the fiscal Mexican authorities.

In this blog post we will see how to prepare the system to trigger the electronic invoices document for the customers using the standard functionality for Mexico localization in SAP S/4HANA Cloud.

We will start with the first steps of configuration of the localization for e-inoice for Mexico.

Configure Value Mapping.

With the role of Configuation Expert (BR_CONF_EXPERT_BUS_NET_INT) open the app of Configure Value Mapping.



 

This process steps show you how to create the required value mapping for generate the electronic invoices.

Blart, payment document types



 

CFDI_PAYMETHOD Assign SAT(Mexican fiscal authorities) Payment Method codes. Those are the relation between SAP payment terms and SAT payment method codes (all the SAT codes catalog you can find it in the web page of the SAT).



 

CFDI_PAYMNT_MEANS Means of payment. Relation between payment method from SAP S/4HANA Cloud and payment means of the SAT authorities.



 

CFDI_TAXES_ASSIGN Assign SAT Tax types and factor types. You need to assign all the tax types you will be use in SAP S/4HANA Cloud and the relation with the SAT tax type.

 



 

CFDI_USAGE  Use of CFDI for correponding customer. Assign the corresponding CFDI usage at your customers, according at the type of transaction (This information is available in SAT catalog of CFDI in SAT government portal).



Note: In case you need to create your own logic for filling CFDI_USAGE per customer, you can implement the localization BADI for Mexico Usage of CFDI, this BADI is called during the maping of the XML, which is triggered when you submit an eDocument from the Mexico eInvoice processes of the eDocument Cockpit.



DOC_TYPE Document type. Identify for the SAT authorities what kind of transaction (incoming or egress) represent the document types used in SAP S/4HANA Cloud.



 

FORMA_PAGO Method of payment of the transaction.



 

PRODUCT_CODE Assign Product/Service codes to material numbers. It is the relation between the SAP products or services codes in your SAP S/4HANA Cloud system between the SAT codes, provided in the SAT catalog that you can download from SAT portal.



 

SERVICE_PROVIDER Assign service provider for a company code. Assign the name of your PAC (authorized supplier by the SAT to certified the e-invoice) provider for your company code.



 

TIPO_RELACION Relation type based on related document type. Relation between CFDI (SAT) documents and SAP S/4HANA Cloud documents.



 

UNIT_OF_MEASURE Value mapping for UOM with SAT description. Assign the relation between the unit of measures in SAP S/4HANA Cloud and SAT unit of measures (available in the SAT catalog mentioned above).



 

After you end all those previous steps, you can trigger you e-invoice documents, below show you how after invoice document is generated in billing in the create billing documents app, the invoice document is trigger to e-document cockpit.



 

In e-document cockpit we can see our invoice document, in preview status to be submitted to the PAC.



 

Once the invoice it´s submitted if everything was configured correct and the connection with the PAC it´s in place, you will see the status change in green color and the message "accepted by the authorities" that means your document have all the fiscal requirements and the XML document obtain the fiscal stamp and it´s a valid document as the image below..



 

The image below is the xml sample of the invoice triggered above.



 

Additional you can see the representative printing version of the XML obtained.



 

 

In conclusion


We saw from functional perspective all the previous requirement to configure the value mappings to obtain e-invoice document in Mexico will all the requirements needed by fiscal authorities, using the standard functionality of SAP S/4HANA Cloud.  Please follow all the steps and follow our best practices to obtain the reach the goal in SAP S/4HANA Cloud.

 

Please feel free to contact me by direct message or an e-mail, thanks.

 

 

 

 
25 Comments
davecarba
Member
Thank you Victor, it’s a great information.
0 Kudos
Muchas gracias Victor,

¿cómo podría ponerme en contacto contigo para hacerte unas cuestiones?, tenemos un cliente en México y no termino de entender algunas cosas.

Un saludo y gracias!
I507377
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Rogelio you can contact me posting your questions on the customer community or send your questions directly here, thanks.
scott_wesley
Explorer
0 Kudos
Thanks Victor   - good article. My global company is in the process of moving to S4 HANA by the end of 2022. As our Mexico business has grown, we have outgrown the company that we use to interface the SAT with. Can you list some recommend companies to look at for this as we move forward? It sounds like from your article, that we will still need a Certified 3rd party for CFDI 3.3 on HANA.

Thanks so much,

 

scott
I507377
Product and Topic Expert
Product and Topic Expert
Hi Scott,

Yes you will need a PAC (Certified supplier by the tax Authorities), i can listed you some supplier as options EDICOM, PEGASO, ekomercio, that you have time to evaluate and talk with them.

Regards

 

 
scott_wesley
Explorer
0 Kudos
Thank you very much Victor.

We currently send billing doc data from SAP to a 3rd party, who uses a "black-box" solution to add custom customer data, before sending to the PAC (currently MasFactura).

There are a lot of individual billing doc customizing that our customers in Mexico keep asking for, and I hope it will be more straight forward in HANA to accommodate them. Has this been your experience as well?

When we go to HANA for our Mexico operations, we would eliminate that middle-man, and our outputs would go directly to a PAC. BTW - what does PAC stand for? I know it's not Political Action Committee LOL.

Best regards,

scott
I507377
Product and Topic Expert
Product and Topic Expert
0 Kudos
Yes Scott, we have an standard solution in S/4HC for Mexico, to avoid as many workarounds possible. But you can contact me through an e-mail if you want to have more details and we can talk later.

Regards

 
wnash7658
Active Participant
0 Kudos
Strange question, but how close is the configuration in S4C to S4H OP?
I507377
Product and Topic Expert
Product and Topic Expert
0 Kudos
If you use the standard functionality in OP version is pretty close.
0 Kudos
Hello Victor,

Please let me know if the xml contains the status which gets updated in CFDI??
I507377
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Pratik,

If you are talk at the status of the invoice, only completed documents can trigger to create the CFDI in other case the xml is not generated.

 

Regards

 
former_member725803
Discoverer
0 Kudos
Hola Victor,

Quisiera tu apoyo con lo siguiente:

Actualmente estamos implementando S/4 HANA Cloud, el PAC es Pegaso y usaremos CPI. Tengo las siguientes preguntas:

1. La forma de enviar y recibir informacion es por el Idoc MXCFDIREQ001 y MXCFDIRESP001 respectivamente? o que otra opcion existe?

2. Debemos activar alguna nota o servicio para poder tener acceso a esta funcionalidad?

 

Gracias
I507377
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Anibal,

 

Regarding your comments, those forms that you mentioned are not necessary if you will be use CPI, throught cpi you will be use a standard iflow, so isn't longer needed use idocs.

Regards
sandeep_shah
Explorer
0 Kudos
HI

How should we maintain email id in BP for Proof of Payment and Invoice .
kat_kos01
Explorer
0 Kudos
Hello Victor=)

I have a faced some problems during configuration of mexico invoice, I hope there is a standart solution in S4HC  which can help me. We Bill our Clients from Projects and for some clients we have a really big item description wich we need to add to xml and to client pdf. In their old system (not cloud)  you can see that the field description permit them to add a large description for billing item:


By standart configuration SAP brings in xml a Material description, which is defined in Material master data or  also can be changed in project in billing part


MATERIAL DESCRIPTION


The problem is that this field has a limit and doesn permit us to add all information we needed.

The maximum what i can add in cloud is:


Cloud description


Is there any standart solutions which can help us to add large texts in Descriptions.

Thank you

Katia
I507377
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Ekaterina,

 

The only way that you can see this kind of large texts is implementing a logical in the Badi e-document México, to send this large descriptions to your xml file, as an instance based on your customer an material type, create your variant.

Hope those coments can guide you.

 

Regards
former_member7980
Discoverer
0 Kudos

p

kat_kos01
Explorer
0 Kudos
Hello Victor,

Thank you for your reply=) It's guide us but not too much to be honest.

We have checked the Badi's SAP offers us to Mexico e-invoice and from what we can see no one can solve our Problem. Because:

  1. Mexico: Filling of Fiscal texts for eInvoices -  as we see this Badi permits to add some texts in XML, but it linked with customer, not Material.

  2. Mexico: Filling of Item Data for eInvoices - as we can see here we can just  change this field CV_CUENTA_PREDIAL_NUMERO


and the last one is:

3. Mexico: Custom Data Filling . Which permits us to fill this   3 fields but it doesnt helps us bacause it doesnt change the description of material in xml and doesnt bring the text to every item in xml.

  1. Usage of CFDI

  2. Addenda (field for additional data)

  3. CFDI-Related Document Data (Document type and UUID)


Honestly it is really strange for me that we have this problem at all, because i think it is pretty comon to add more then 60 letters to the description of Item.

I really hope that i just couldn't find the rigth Badi and you can help me with it, otherwise I really don't know how we can solve this problem for our clients.

 

Thank you

Ekaterina

 
fegutieri
Product and Topic Expert
Product and Topic Expert
0 Kudos
Dear Ekaterina,

I am not quite familiar with the differences between the OnPrem solution and what we have in S/4HANA Cloud however from the technical point of view and talking specifically about e-Invoices (e- documents generated by SD documents), the logic found in the backend system pulls the description of the item from a field called VBRP-ARKTX  (Short Text for Sales Order Item) which has a length of 40 characters and drags into a new field ITEM-DESCRIPTION which is a string field (can hold way more than 40 characters) so maybe your problem is exactly here! My suggestion to you is the following:

  1. You can influence by giving suggestions and improvements to our Product Area by using our Customer Influence Portal (Link). If you get other companies to vote in your idea, SAP can deliver it in the next releases;

  2. You can create an incident to SAP but using this method is not a guarantee that you will have it fixed as soon as you might want to;

  3. In case you're using CPI to send the payload, you could extract the full item description using one of our APIs and modify the payload at the moment of sending it to the PAC ( I'm not sure whether this could help you or if it could work ).

  4. In Mexico, we have something called "Addendas" which is a section of the XML file where the SAT (Mexico tax authority) allows companies to add information that can be exchanged between the sender and the buyer. This is a section where the PAC does not perform any validations. In case none of the previous works for you, then you could try to suggest to your customer to set an agreement with their customers and use this "Addenda" section to add the full description of your items. To add any information, you can use the BADI that Victor suggested.


I hope that somehow any of my suggestions helps you with your project.

Thanks a lot,
kat_kos01
Explorer
0 Kudos
Hi Filipe,

Thank you for your reply=))

I've checked the option with Addendas, but from what I can see Addenda appears below all items and it is just one field. What i mean it doessn't appears below the item and can't be fiffrerent if any item has it's own description. For example as you can see at this picture, I have different description for Items and unique description for all items in  Addenda also as i mentioned before it is in the end of xml =(


 

I would like to use the badi, Victor suggested, but I don't understand what badi he means, because all I see don't solve my problem.

To open an incident to  SAP  - I think it will be my next step=))

 

Thank you 😃

 

 

addenda


 
fegutieri
Product and Topic Expert
Product and Topic Expert
0 Kudos
ello there,

Sorry for not replying to you sooner but the BADI Victor refers to is exactly the one you have used in order to create the addenda. As I said, the addenda is a section of the CFDI file where the mexican tax authority (SAT) allows companies to exchange information agreed between both parties ( buyer and supplier ) and this section is the last one in the CFDI file. Everything that comes prior to this section is created by the standard logic in S/4HANA Cloud and cannot be modified ( except for some really specific date such as withholding taxes ). This addenda solution I suggested is just a workaround because the standard is limited to those 40 characters I mentioned before).

Those "conceptos" nodes you can see are the items found in your billing document and you could ask to your developer to add the item line number as an ID and right next to the ID, inform the long description of your item - for instance:


Unfortunately you will not be able to affect what comes prior to the addenda because, as I said, it's pretty much standard logic and there's no functionality available so far to modify the description of the goods.
kat_kos01
Explorer
0 Kudos
Hello Victor,

i have another question about Addenda node in XML. Do you know if it is possible remove this node from our XML?

We have a different SAP Cloud systems and I can see that in one system when we create XML the Addenda node doesn't appears. It makes me belive that it is possible to remove it, but i can't find how=((

In case  if you know how we can do this, i have the next question. Is it possible to remove it just for one company code in the same SAP System?


Thank you

Ekaterina

Addenda

I507377
Product and Topic Expert
Product and Topic Expert
Hi Ekaterina,

 

Yes it´s possible, looks like you activate the foreign trade complement (or in spanish Complemento de Comercio Exterior), in e-invoice configuration settings for Mexico and looks your parameters in foreign trade for your customer.

 

Regards
kat_kos01
Explorer
0 Kudos
Thank you Victor=)
kat_kos01
Explorer
0 Kudos
Hello Victor,

I was checking the configuration we have in Manage your solution.

If you refer with activate the foreign trade complement - to this 103449  -  Assign Complement Types to Customers

We have nothing activated:


and there is another step 103804 - Define Fixed Values and Value Mappings for the Foreign Trade Complement , but i dont think you reffer to this one. 

Are there any other options how we can delete Addenda node  from XML?

 

thank you