Skip to Content
Author's profile photo Swapnil Agrawal

Argentina E-Invoicing Web Service – SAP Package RG 2904 – SAP SD Implementation


Argentina E-Invoicing Web Service – SAP Package RG2904 – SAP SD Implementation


SAP Note 1537823 has been released to implement latest E-Invoicing Solution for Argentina in ECC R/3 system. This document captures the basic process flow as a result of the implementation of this solution package RG 2904 & also provides in brief the basic SD Configuration required to implement the same.

Author: Swapnil Agrawal

Created On: 16th September, 2014

Author Bio: Swapnil is a Consultant at Infosys & has over 4 years of professional work experience in SAP Sales and Distribution module. He is Engineering graduate from GBPUA&T University, Pantnagar, Uttarakhand & post graduate in General Management from NMIMS University, Mumbai. He would like to thank his team members Prashanth Raj, Sanu Pillai, Hemant Tewari, Sandeep Sahota, Neha Sinha , Farooq Syed & Bhargavi Vaidya for their contribution for this implementation.

Process Understanding

·         All the domestic & export SD invoices with tax has be to submitted to Argentina Government Portal called as AFIP – Portal de la Administración Federal de Ingresos (English Translation: Portal of the Federal Revenue Administration) for Approval & after tax approval, such invoices can be posted for accounting.

·         SAP Note 1537823 has been released to implement the above. Through this, a new transaction J1AMONITOR has been introduced for sending the invoice details in XML format to AFIP (Through PI Interface) & then, receiving back the approved/rejected invoices from AFIP.

Below is the flow chart to explain the process in more detail:Process Flow.png

Below is a screenshot of the J1AMONITOR screen after an invoice has been approved with the logs for the invoice document:



Once, the invoice is approved, the reference field in header data tab of the invoice gets updated with a 13 digit number which is a combination of Branch(4 digits) + Print Character(1 Digit) + Official Document Number ODN(8 Digits) as shown below:


A 14-Digit CAE Number is generated in the AFIP Portal & sent back to SAP(only for the Approved Document) which is also displayed in J1AMONITOR as shown below:


The Invoices will then be released for accounting once they are approved by AFIP.


Main SAP Configurations Done:

1.      Document Numbering

SPRO: Cross-Application Components -> General Application Functions -> Cross-Application Document Numbering -> Argentina


●     Define Issuing Branches

0200, 0273 & 0274 are relevant for domestic scenarios(for the example used)


●     Define Document Classes


  • Assign Document Class to Document Type


The ODN could be set as either B or C.

●     Maintain Print Characters


●     Generate Number Groups


●     Maintain Number Ranges(Transaction J1AB):


This is the last approved ODN number which should match with the one shown in J1AMONITOR.

●     Maintain Branch as Webservice Branch – 0273 & 0274 with 0200 as contingency branch(example)


The Automatic Release to Accounting incidator shows that the accounting document would be generated automatically as soon as it is approved by AFIP:


●    Branch Determination For Billing Documents

Based on the sales area, branch is determined as shown below:


·         Maintain RFC Destination


Contingency Mode:

●     In case of issues with AFIP server, SAP has given a provision to process invoices in contingency mode.

●     When a document is processed in contingency mode, it is not required to be sent to AFIP server.

●     CAI number(instead of CAE no.) is generated internally in SAP which is assigned to the invoice document which is displayed in the output of the invoice.

SAP Configuration for Contingency Mode:

●    Define branch as contingency branch(0200 branch is contingency branch):


●    CAI number is generated using the below table for ‘Define Print Authorization Codes’:



Business benefits

1.    After saving the invoice, the XML file is automatically sent to AFIP server & the response is received automatically in SAP. No manual activity involved for the key user.

2.    All the information related to the invoice available in J1AMONITOR which helps in better tracking of the invoices.

3.     Since, this is a legal process, companies in Argentina are required to mandatorily required to implement them

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      This was helpful to understand the concept and configurations in SAP related to e-Invoicing . Thanks Swapnil!

      Author's profile photo Kunal Mali
      Kunal Mali

      Thanks Swapnil,

      Can you please help put some insight into NIF, that would be helpfull

      Author's profile photo Former Member
      Former Member

      Perfect, thanks for the hints.

      Author's profile photo Osvaldo Lopez
      Osvaldo Lopez

      My God! I'll never imagine read a doc like this here 😛

      Thanks from Argentine! +1k !


      Author's profile photo Former Member
      Former Member

      Great help by providing step by step process.

      Author's profile photo Danilo Giraudo
      Danilo Giraudo

      Great! Thanks for your post!


      Could you please tell us where SAP keeps AFIP's response XMLs? J_1ACAE table only has the XML ID field, but you cannot see the XML there. Are there any table for that?



      Author's profile photo Funcional Soporte
      Funcional Soporte



      Could someone tell me how/where config or set the log messages?

      We found an invoice approved by AFIP, all data in the J_1ACAE table, but the account document was not saved. In the J1AMONITOR log, nothing appeared as error.

      In J1AMONITOR log we could not see the accounting document message, not when it is done, and not in this case, when something happened and error avoid the acc. doc. saved.


      Thanks for you support




      Author's profile photo Anuradha Kumara
      Anuradha Kumara

      @Funcional Soporte, Did all your issues regarding the Argentina E-Invoicing solve? I need some more details on the standard SAP solution in this regard. Can you please message me on