(06.24.01-00) SAP-F2-EXT
The current feature has been converted into a custom enhancement for a specific business requirement.
Content was last updated in 06.22.02-00
Revision History
Accounts Receivable (AR) refers to the outstanding invoices a company has or the money clients owe the company. The phrase refers to accounts a business has the right to receive because it has delivered a product or service. So, an AR Invoice refers to a consolidated list of all inwards (expected) transactions from a specific client (source) to the company.
When financial accounting is being done through a 3rd party tool, the invoice need to be generated in a compatible format.
Thus, we are extended our support to post the invoice in SAP-F2-EXT format where it generates XML and CSV files. The XML output can be processed and integrated with NAV accounting system of Hungarian Tax Authority as mandated by Hungarian government.
Let us see the details that's being displayed in the two files.
The CSV file displays the following details
Table 1.0: CSV file column details
CSV file data | Description |
Region | Displays the site region |
GL code | Displays the GL code |
Document Date |
|
Booking Date |
|
Invoice number | Displays the Invoice ID |
Transaction currency | Displays the transaction currency |
Exchange Rate | Displays the exchange rate |
Invoice type | Displays the type of the invoice |
Customer number | Displays the customer ID |
Amount |
|
Cash discount name |
|
Project description | Displays the project description |
Account |
|
Tax code |
|
Cash discount |
|
Cash discount deadline |
|
Invoice deadline |
|
Internal Order |
|
The XML file displays the following details
XML file data | Description |
Invoice ID | Displays the Invoice ID |
Parent ID | Displays Parent Invoice ID |
Parent Fulfillment Date | Displays the Parent Fulfillment Date |
Comments |
|
Project Description | Description of the project tagged to order |
Project ID | ID of the project tagged to order |
Event Description | Description of the Event tagged to Order |
Event ID | ID of the Event tagged to Order |
Order Department | Department tagged for the Order |
Invoice Type | Type of the Invoice |
Order Type | Type of the Order |
Transaction Currency Code | Displays the Transaction Currency Code |
Site Currency Code | Displays the Site UDF Posting Currency value |
Bill date | displays the billing date of the invoice |
Start Date | Displays the start Date of |
End Date | Displays the end date |
Fulfillment date | Displays the Fulfillment date of the invoice |
Exchange Rate Date | Displays the Exchange Rate date of the invoice. The calculation is based on the formula: 1/(Posting Currency => Transaction Currency). |
Due Date | Displays the due date |
Pay Method | Displays the method of the payment |
Site Bank one | Displays the bank one SITE UDF field value |
Site Bank two | Displays the bank two SITE UDF field value |
Site Bank four | Displays the bank four SITE UDF field value |
Tax region ID | Displays the ID of the tax region |
Schedule ID | Tax schedule ID |
Tax Percentage | Tax percentage of the tagged tax schedule |
Tax Amount | Displays the tax amount |
Total Tax amount | Displays the total tax amount |
Site Total Tax amount | Displays the Site total tax amount in Posting currency (Site UDF) |
Total Net amount | Displays the Total Net amount |
Site Total Net amount | Displays the site total net amount in Posting currency (Site UDF) |
Total Gross amount | Displays the invoice line item Gross amount |
Site Total Gross amount | Displays the invoice total Gross amount in Posting currency (Site UDF) |
Site name | Displays the site name |
Address | Displays the site address |
Tax ID | Displays the Tax ID provided in site UDF field value |
VAT ID | Displays the VAT ID site UDF field value |
Telephone | Displays the phone no. provided in the Site edit window |
Fax | Displays the fax no. provided in the Site edit window |
Web | Displays the web value provided in the site UDF |
Note |
|
Customer ID | Displays the ID of the customer |
Company name | Displays the company name |
Street | Displays the company's billing address street |
City | Displays the company's billing address city |
State | Displays the company's billing address state |
ZIP | Displays the company's billing address ZIP |
Country ID | Displays the company's billing address country ID |
Tax ID | Displays the Customer's TAX ID provided in Company UDF |
VAT ID | Displays the Customers' VAT ID provided in Company UDF |
Company ID | Displays the company's ID |
Source Currency Code | Displays the transaction currency code of the order associated with the invoice. |
Target Currency Code | Displays the Site UDF posting currency. |
Calculation rate | Displays the calculation rate in Posting currency (Site UDF) |
ID | Displays the Invoice line id |
Invoiced quantity | Displays the Invoice line quantity |
Net each | Displays the Invoice line net each amount |
Unit code | Displays the Invoice line unit code |
Description | Displays the Invoice line description |
Order Id | Displays the Invoice line order ID |
Note |
|
Tax region | Displays the Invoice line tax region |
Schedule ID | Displays the Invoice line schedule ID |
Tax percentage | Displays the Invoice line tax percentage tagged to the schedule |
Tax Amount | Displays the Invoice tax amount |
Line Tax amount | Displays the Invoice line tax amount |
Site Line Tax amount | Displays the Invoice site line tax amount in Posting currency (Site UDF) |
Line Net amount | Displays the Invoice line net amount |
Site Line Net amount | Displays the Invoice site line net amount in Posting currency (Site UDF) |
Line Gross amount | Displays the Invoice line gross amount |
Site Line Gross amount | Displays the Invoice site line gross amount in Posting currency (Site UDF) |
Po number | Displays the Invoice PO number |
Planned Return Date | Displays the Invoice planned return date |
Encoding the reserved special characters in XML output
The following five reserved special characters are passed in an encoded form in the XML output when posting the invoice.
the output of these characters without encoding, system is vulnerable to cross site scripting (XSS) attacks.
To prevent this vulnerability, these characters have been encoded as escape sequence (Refer Figure 1.0 for event description and xml output to see the Event description tag.
Reserved special characters | Escape sequence |
< | < |
> | > |
& | & |
" | " |
' | ' |
How to post the invoice in SAP-F2-EXT format?
Pre-requisites
Create a site [Budapest] and set the site currency for them.
Define the conversion rates in Configuration module.

Figure 1.0: Currency Conversion window
Define the Invoice UDFs such as Fulfillment Date and Exchange Rate Date.
Open the R2 installation root folder,
In the r2.ini file, paste the parameter value: CUSTOM_POSTING=SAP-F2-EXT
Place the json file and mention the Site ID as Budapest.
This is to validate the UDFs Fulfillment date and Exchange Rate Date are entered for the invoices belonging to the mentioned site id. Only if the UDFs value are entered, you will be able to post the batch.

Figure 1.1: Jason file
Workflow
Create an order in R2.
Add the items.

Figure 1.0: Order created
Fill and ship all the items.
Generate the Invoice.

Figure 1.1: Order invoiced
Close the Order.
Open Invoicing module.
Ensure to fill the Fulfillment Date and Exchange Rate Date UDF.

Figure 1.2: User Fields
Create a batch and add the generated invoice.

Figure 1.2: Batch created
Exit the Invoice batch window.
Select the batch and click Actions > Post.
Post Batch window displays as shown below. For Invoice format, Select Custom from dropdown.
Custom is identified as SAP-F2-EXT as defined in R2.ini as CUSTOM_POSTING=SAP-F2-EXT parameter value.

Figure 1.4: Post Batch window
Click OK.
Now, go to export file path. and you can see the csv and xml files generated with the following naming conventions.
CSV file: <BatchID>.csv — Contains SAP-F2 integration files. Same as SAP-F2 format export.
XML file: <RegionID>_<BatchID>.xml — Contains xml for all invoices of a region: This is the additional file to integrate with Hungarian Tax Authority NAV system.

Figure 1.5: Output files

Figure 1.6: CSV output
Figure 1.7: XML output
<?xml version="1.0"?>
<BATCH>
<INVOICE>
<ID>INV-1189</ID>
<PARENTID/>
<PARENTFULFILLMENTDATE/>
<COMMENTS/>
<PROJECTDESCRIPTION>"Engineer's Day" & inauguration <></PROJECTDESCRIPTION>
<PROJECTID>ENG DAY</PROJECTID>
<EVENTDESCRIPTION>"Engineer's Day" & Inauguration <453></EVENTDESCRIPTION>
<EVENTID>ENGINEERS DAY</EVENTID>
<ORDERDEPARTMENT>ADMINISTRATION</ORDERDEPARTMENT>
<INVOICETYPE>Invoice</INVOICETYPE>
<ORDERTYPE>Rental</ORDERTYPE>
<TRANSACTIONCURRENCYCODE>EUR</TRANSACTIONCURRENCYCODE>
<SITECURRENCYCODE>HUF</SITECURRENCYCODE>
<BILLDATE>2022-02-16</BILLDATE>
<STARTDATE>2022-02-11</STARTDATE>
<ENDDATE>2022-02-15</ENDDATE>
<FULFILLMENTDATE>2022-03-08</FULFILLMENTDATE>
<EXCHANGERATEDATE>2022-02-28</EXCHANGERATEDATE>
<DUEDATE>2022-02-21</DUEDATE>
<PAYMETHOD>Cash</PAYMETHOD>
<SITEBANKONE/>
<SITEBANKTWO/>
<SITEBANKFOUR/>
<TAXREGIONID>ARTAX</TAXREGIONID>
<TAXSCHEDULES>
<TAXSCHEDULES_ROW>
<SCHEDULEID>0%</SCHEDULEID>
<TAXPERCENT>0.00</TAXPERCENT>
<TAXAMOUNT>0.00</TAXAMOUNT>
</TAXSCHEDULES_ROW>
</TAXSCHEDULES>
<TOTALTAXAMOUNT>0.00</TOTALTAXAMOUNT>
<SITETOTALTAXAMOUNT>0.00</SITETOTALTAXAMOUNT>
<TOTALNETAMOUNT>10200.00</TOTALNETAMOUNT>
<SITETOTALNETAMOUNT>6181812.00</SITETOTALNETAMOUNT>
<TOTALGROSSAMOUNT>10200.00</TOTALGROSSAMOUNT>
<SITETOTALGROSSAMOUNT>6181812.00</SITETOTALGROSSAMOUNT>
<SITEINFORMATION>
<SITEINFORMATION_ROW>
<SITENAME>Budapest</SITENAME>
<ADDRESS>
<ADDRESS_ROW>
<STREET>Bem rakpart 23</STREET>
<CITY>Takos</CITY>
<STATE>SZABOLCS-SZATMAR-BEREG</STATE>
<ZIP>4845</ZIP>
<COUNTRYID>Hungary</COUNTRYID>
<COUNTRY/>
</ADDRESS_ROW>
</ADDRESS>
<TAXID/>
<VATID/>
<TELEPHONE>0623400400</TELEPHONE>
<FAX>555-123-4567</FAX>
<WEB/>
<NOTE/>
</SITEINFORMATION_ROW>
</SITEINFORMATION>
<CUSTOMERINFORMATION>
<CUSTOMERINFORMATION_ROW>
<CUSTOMERID>RC123</CUSTOMERID>
<COMPANYNAME>Rovio Corporation</COMPANYNAME>
<BILLINGADDRESS>
<BILLINGADDRESS_ROW>
<STREET>11 Jungle Road,</STREET>
<CITY>Leominster</CITY>
<STATE>MA</STATE>
<ZIP/>
<COUNTRYID>USA</COUNTRYID>
<COUNTRY/>
</BILLINGADDRESS_ROW>
</BILLINGADDRESS>
<TAXID/>
<VATID/>
<COMPANYID>RC123</COMPANYID>
</CUSTOMERINFORMATION_ROW>
</CUSTOMERINFORMATION>
<PRICINGEXCHANGERATE>
<PRICINGEXCHANGERATE_ROW>
<SOURCECURRENCYCODE>EUR</SOURCECURRENCYCODE>
<TARGETCURRENCYCODE>HUF</TARGETCURRENCYCODE>
<CALCULATIONRATE>606.06</CALCULATIONRATE>
</PRICINGEXCHANGERATE_ROW>
</PRICINGEXCHANGERATE>
<INVOICELINE>
<INVOICELINE_ROW>
<ID>1</ID>
<INVOICEDQUANTITY>1</INVOICEDQUANTITY>
<NETEACH>10200.00</NETEACH>
<UNITCODE>Period</UNITCODE>
<DESCRIPTION>Engineers Day</DESCRIPTION>
<ORDERID>CO1505215832</ORDERID>
<NOTE/>
<TAXREGIONID>ARTAX</TAXREGIONID>
<TAXSCHEDULES>
<TAXSCHEDULES_ROW>
<SCHEDULEID>0%</SCHEDULEID>
<TAXPERCENT>0.00</TAXPERCENT>
<TAXAMOUNT>0.00</TAXAMOUNT>
</TAXSCHEDULES_ROW>
</TAXSCHEDULES>
<LINETAXAMOUNT>0.00</LINETAXAMOUNT>
<SITELINETAXAMOUNT>0.00</SITELINETAXAMOUNT>
<LINENETAMOUNT>10200.00</LINENETAMOUNT>
<SITELINENETAMOUNT>6181812.00</SITELINENETAMOUNT>
<LINEGROSSAMOUNT>10200.00</LINEGROSSAMOUNT>
<SITELINEGROSSAMOUNT>6181812.00</SITELINEGROSSAMOUNT>
<PONUMBER/>
<PLANNEDRETURNDATE>2022-02-15</PLANNEDRETURNDATE>
</INVOICELINE_ROW>
</INVOICELINE>
</INVOICE>
</BATCH>
while posting, even if you add the invoice that does not belong to the specific region into the batch, you will still be able to post the invoice and output files will be generated.