Select language:

Procedure documentationCreating 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.

Note Note

You must use DART, version 2.4 or higher.

End of the note.

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.

Prerequisites

You have made settings as described in Customizing for SAFT-PT File Creation with DART

You have specified a Portuguese company code while extracting tax-relevant data.

In addition, you have implemented the necessary coding in function module PT_USER_EXIT_DART on the SAP Easy Access screen, by choosing Start of the navigation path Tools Next navigation stepABAP Workbench Next navigation stepDevelopment Next navigation stepFunction Builder End of the navigation path.

Procedure

  1. On the SAP Easy Access screen, choose Start of the navigation path Tools Next navigation stepAdministration Next navigation stepAdministration Next navigation stepData Retention Tool. End of the navigation path

  2. On the SAP Easy Access Data Retention Tool screen, choose Start of the navigation path Configuration Next navigation stepData Extracts End of the navigation path (FTWP transaction) and make settings as follows:

    1. 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

    2. 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.

    3. On the Data Extraction tab page, choose the Technical Settings tab page, enter your technical settings according to your system environment.

    4. 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.

  3. On the SAP Easy Access Data Retention Tool screen, choose Start of the navigation path Utilities Next navigation stepExtract Data End of the navigation path (FTW1A transaction) and make settings as follows:

    1. In the Transaction Data group box, select the items you want to extract.

    2. In the Master Data group box, select the following individual master data segments:

      Master Data Segment

      Description

      Cross-Application

      TXW_PLANT

      Plant Master

      Financial Accounting (FI)

      TXW_COMPC

      Company Code Master

      TXW_GLACC

      G/L Account Master

      TXW_VENDOR

      Vendor Master

      TXW_LFAS

      Vendor Master (VAT registration numbers general section)

      TXW_CUST_E1

      Customer Master (Extension)

      TXW_BSEC

      One-Time Account Data Document Segment

      Materials Management (MM)

      TXW_MAT

      Materials master

    3. 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.

    4. 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 Start of the navigation path Information System Next navigation stepData Extract Browser End of the navigation path (FTWF transaction).

  4. Generate the XML file with the SAFT-PT: XML File Creation report.

    To access the report, on the SAP Easy Access screen, choose Start of the navigation path Accounting Next navigation stepFinancial Accounting Next navigation stepGeneral Ledger Next navigation stepReporting Next navigation stepTax Reports Next navigation stepPortugal Next navigation stepStandard Audit File for Tax Purposes (SAFT-PT) Next navigation stepSAFT-PT: XML File Creation End of the navigation path.

Result

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 Start of the navigation path Tools Next navigation stepAdministration Next navigation stepMonitor Next navigation stepPerformance Next navigation stepExceptions/Users Next navigation stepExceptions Next navigation stepSAP Directories End of the navigation path (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?