Creating SAFT-PT Files with DART
In Portugal, you are required to create a standard data export file called Standard Audit File for Tax Purposes (SAFT-PT) to store all tax-relevant data in XML format and submit the file to the tax authorities for tax auditing purposes when required.
To create the XML files, you follow the standard procedure of the Data Retention Tool (DART) and the process described below.
You must use DART, version 2.4 or higher.
The system generates a flat file containing the relevant data and stores it on the SAP application server. You convert it to an XML file. You can download the file to your local workstation and submit it to the tax authorities when required.
Due to the large data volume, the procedure of creating the XML file can consume a large amount of memory, especially on 32–bit platforms, and memory problems may arise during the program execution. If the system is unable to create one standard data export file, you must create several files first by splitting data as described in Processing of Large Data Volume.
You need to submit the XML file to the tax authorities for tax auditing purposes, when they request them.
You have made settings as described in Customizing for SAFT-PT File Creation with DART
In addition, you have implemented the necessary coding in function module PT_USER_EXIT_DART on the SAP Easy Access screen, by choosing.
On the SAP Easy Access screen, choose
On the SAP Easy Access Data Retention Tool screen, choose(FTWP transaction) and make settings as follows:
On the Data Extraction tab page, choose the Transaction Data tab page and
Select the Finance documents (FI), Sales documents (SD), Delivery documents (SD), and Billing documents (SD) checkboxes
Choose Select source tables automatically in the Source Tables for Sales and Use Tax Data group box
Select the Billing document pricing conditions and checkbox in the Additional Transaction Data group box
On the Data Extraction tab page, choose the Master Data tab page and select the Enable master data segment selection checkbox in the Additional Options group box.
On the Data Extraction tab page, choose the Technical Settings tab page, enter your technical settings according to your system environment.
On the File Directories tab page, enter the DART directory set with a description, select the row, and choose Choose.
Enter the directory name of the application server manually.
On the SAP Easy Access Data Retention Tool screen, choose(FTW1A transaction) and make settings as follows:
In the Transaction Data group box, select the items you want to extract.
In the Master Data group box, select the following individual master data segments:
Master Data Segment
Financial Accounting (FI)
Company Code Master
G/L Account Master
Vendor Master (VAT registration numbers general section)
Customer Master (Extension)
One-Time Account Data Document Segment
Materials Management (MM)
In the Data File group box, enter a data file name and the DART directory set and its description.
The system enters all the other data you specified in step 2.
Execute the report.
The system generates a flat file and stores it on the application server. You can search for the file with the Data Extract Browser on the SAP Easy Access Data Retention Tool screen, by choosing(FTWF transaction).
Generate the XML file with the SAFT-PT: XML File Creation report.
To access the report, on the SAP Easy Access screen, choose.
The system generates the XML file and stores it on the application server. To check both the flat file and the XML file, on the SAP Easy Access screen, choose(AL11 transaction).
You can download the generated XML file using the Download Files: Parameters (CG3Y transaction) transaction or you can download the file directly from the server you indicated while creating the file with the SAFT-PT: XML File Creation program to your local PC.
Was this page helpful to you?
Do you have any additional feedback?
The following content is not part of SAP product documentation. For more information, see the following disclaimer .