0% found this document useful (0 votes)
2K views20 pages

Saft

The document discusses the standard audit file for tax purposes in Portugal (SAFT-PT). It outlines the process for creating an XML file from SAP data to comply with Portuguese legislation. This includes extracting data, customizing product and tax data, and filling specific fields. Methods are provided for different types of financial invoice data to determine product information for the XML file.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views20 pages

Saft

The document discusses the standard audit file for tax purposes in Portugal (SAFT-PT). It outlines the process for creating an XML file from SAP data to comply with Portuguese legislation. This includes extracting data, customizing product and tax data, and filling specific fields. Methods are provided for different types of financial invoice data to determine product information for the XML file.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

SAP Iberia SAFT-PT (EN)

12-Fev-2009

SAFT-PT: Standard Audit File for Tax Purposes for Portugal RTXDART_PT

Contents
1. Introduction ............................................................................................................................... 1 2. Overview .................................................................................................................................... 2 3. Product data determination for FI invoices ................................................................................. 3 4. Product data customizing for FI invoices ..................................................................................... 6 5. DART preparation ....................................................................................................................... 7 6. DART configuration (FTWP) ........................................................................................................ 8 7. Data Extract (FTW1A) ................................................................................................................. 9 8. Tax data customizing (transaction: PTDART_TAX) ..................................................................... 12 9. Create XML file ......................................................................................................................... 13 10. Optimize memory configuration ............................................................................................. 15 11. Splitting files........................................................................................................................... 15 12. Merge XML files with report RDART_FILE_MERGE .................................................................. 15 13. Recommendations for splitting extracts and merging files ...................................................... 16 14. How to fill specific fields with a user exit: ............................................................................... 17 15. Configure date fields in the DMEE tree ................................................................................... 19 16. Create a transaction for report RTXDART_PT and RDART_FILE_MERGE .................................. 19

1. Introduction
According to Portaria n 321-A/2007 of Portuguese legislation, published on March 26thby the Portuguese government, a new requirement became mandatory as of fiscal year 2008 for all companies that use computerized means to manage their accounting and billing procedures. This new obligation consists in producing a file, the so-called SAF-T-PT file, whenever required by the Tax Authorities for auditing purposes. This file contains the data from the Accounting and Billing systems. Considering the fact that companies use the most diverse systems for their data processing, which at the same time are subject to verification by Tax Authorities, it was found necessary to follow a norm in order to obtain the same data export independently from the source so that the auditor is not forced to acquire skills in various systems. The structure of the file is thus a standard to follow in all cases and is described in the Portaria. According to the legally required file format and content the XML file consists of the following sections:

Page 1

SAP Iberia SAFT-PT (EN)


Header MasterFiles General Ledger Customer Supplier Product Tax Table GeneralLedgerEntries SourceDocuments: SalesInvoices File header Master Data GL Accounts from legal Chart of Accounts Customers Master Data Vendors Master Data Products/Services Master Data Tax Master Data Accounting documents Source Documents Billing documents (from SD or FI)

12-Fev-2009

Most of the data can be read directly from the system (DART Extract or Data Base Tables) to populate the fields in the XML file. However, some data has to be derived under specific conditions before being sent to the file. Whenever this is the case it is explained in this document. The objective is to obtain one SAFT-PT XML file for one fiscal year containing all the relevant data. The SAP Notes 1082823 and 1293083 provide the required functionality that enables SAP ERP users to create the SAF-T_PT file according to Portuguese Legislation - Portaria 321a/2007. Each one of the programs is suitable for different situations: Note 1293083 refers to the program RSAFT_PT_XML. This program is suitable for all company codes, from small to very large amount of data. You may produce a file for the data of a complete year. Additional notes add corrections and should be implemented. Note 1082823 refers to the program RTXDART_PT. This program is suitable only for company codes with a small to medium amount of data (< 1Mio FI or SD documents per year; < 999 line items per SD document ; < 250.000 Customers / Vendors / Materials). Additional notes add corrections or additional functionality and should be implemented as well. The notes are mentioned under Related Notes. For example note 1321746 adds functionality to RTXDART_PT for FI-invoices; these invoices are manually created invoices in FI or invoices created out of SAP Real Estate. This Manual refers to Report RTXDART_PT and focuses particularly on the creation of the xml file for FI invoices. Nevertheless, the user should be aware that he can use this report to create a SAFT file for Master Data and SD invoices as well.

2. Overview
All solutions work based on the same process: Step 1: Produce a data extract in DART with the relevant data for single periods or for the complete fiscal year; Step 2: Run the XML conversion report (RTXDART_PT) to produce an XML file out of the data in the DART extract. This program will create a file in the legally required format. Step 3: Merge the single XML files in case you create files for small subperiods instead of one for the complete period as requested. Use program RDART_FILE_MERGE for this step. If you create a file for the complete year right away you will not need to execute this step. Step 4: Download the file on your local PC with program RFASLDPC or get it directly from the server.

Page 2

SAP Iberia SAFT-PT (EN)

12-Fev-2009

3. Product data determination for FI invoices


Special attention has to be paid to the Product Data for FI invoices. This data is not stored in a specific data base; it only exists in the document itself. Therefore it has to be derived from there to fill the specific fields in the file adequately. Besides, a system for the numbering of the products has to be defined. Three different situations for the determination of the Product Data are identified: 1. For Real Estate FI invoice: o This type of FI invoice is identified by having the fields Contract Type (TZB0A-RANTYP) and Flow Type (TZB0A-SBEWART) filled; the concatenation of these two fields shall be taken automatically as the Product Code; a number prefix can be added. o The Materials Master Data Record (table MARA) or table SAFT_PT_FIMD shall be used to store the relevant Product data for these documents and maintained accordingly. The user may choose between these two options: if Materials Master Record for MM or SD is already being used he may find it more practical to just add the information here. If that is not the case he may find it more practical to just maintain the table SAFT_PT_FIMD which requires only the information for this particular purpose). A number prefix can be used to assure that the numbering of these entries in table MARA is unique; this prefix is maintained in table PTSAFT_MATPRE. o Customizing: Master Data Record (table MARA) or Table SAFT_PT_FIMD PTSAFT_MATPRE for number prefix (if required). o Process:

Page 3

SAP Iberia SAFT-PT (EN)

12-Fev-2009

2.

For FI manual invoice (non RE) with a clear identification of the Product based on GL account: o If the FI invoice does not fulfill the criteria for situation 1 then it is automatically identified as an FI manual invoice. In this case the product can be identified according to the GL account range it is posted to. The product numbering is customized in table PTSAFT_MATACCNT . o The Materials Master Data Record (table MARA) or Table SAFT_PT_FIMD (if MARA is not to be used for the same reason as explained under 1.) shall be used to store the relevant Product data for these documents and maintained accordingly. The product number shall be taken as customized in table PTSAFT_MATACCNT. o Customizing: Master Data Record (table MARA) or Table SAFT_PT_FIMD PTSAFT_MATACCNT for Product numbering according to GL-Account. o Process:

3.

FI manual invoice (non RE) based on GL line item text: o This is an exceptional situation and is therefore treated as customer specific. If the FI invoice does not fulfill the criteria for situation 1 and 2 then it is automatically identified as an FI manual invoice whose product data will be identified according to GL line item text and GL account range. The program will call a user exit passing the Line Item Text and it will return the ProductCode; This is customized in a customer specific table. o The structure SAFTPT_PRODS shall be used to maintain the product master data as required for the Master Data in the xml file. o This approach should be used only as an exception for documents that cannot be categorized easily as described in point 1 and 2. o Customizing: User Exit FI-Invoices Case 1 (see chapter 14 in this document) User Exit FI-Invoices Case 2 (see chapter 14 in this document) User Exit FI-Invoices Case 3 (see chapter 14 in this document) o Process:

Page 4

SAP Iberia SAFT-PT (EN)

12-Fev-2009

In terms of fields in the XML file it can be summarized as follows


Field Code
2.4.1.

XML Field
ProductType

Description
Indicator for product type; for FI invoices it is generally related to a service. (Set P for products, S for services and O for Others). Unique code to identify the product

Manda tory

SAP Solution in SAFTPT_FIMD


This is set as "S" by default; Fill the user exit for customer specific definition or maintain accordingly in Material Master Data or SAFTPT_FIMD;

* For FI invoices from RE: read TXW_MAT; For FI invoices where product is dependent on GL-Accnt: read TXW_MAT or SAFTPT_FIMD-PRODUCTCODE For FI invoices where product corresponds to GL-line item text based on GL-Accnt range: read structure SAFTPT_PRODS. For FI invoices from RE: read TXW_MAT; For FI invoices where product is dependent on GL-Account: read TXW_MAT or SAFTPT_FIMD; For FI invoices where product corresponds to GL-line item text based on GL-Account range: read structure SAFTPT_PRODS. *

2.4.2.

ProductCode

* 2.4.3. ProductGroup Product group

2.4.4.

ProductDescription

Product description

For FI invoices from RE: read TXW_MAT; For FI invoices where product is dependent on GL-Account: read TXW_MAT or SAFTPT_FIMD; For FI invoices where product corresponds to GL-line item text based on GL-Account range: read structure SAFTPT_PRODS. Equal ProductCode (2.4.2.)

* 2.4.5. ProductNumberCode EAN Code. If not available fill field with ProductCode (2.4.2.) *

Page 5

SAP Iberia SAFT-PT (EN)


Field Code
4.1.4.10.3.

12-Fev-2009
XML Field
ProductCode

Description
Product code derived from the FI document *

Mandatory

SAP Solution
For FI invoices from RE: concatenate the fields TZB0ARANTYP and TZB0A-SBEWART to compose the product code; For FI invoices where product is dependent on GLAccount: read PTSAFT_MATACCNT and based on GLAccount find the Product Code. For FI invoices where product corresponds to GL-line item text based on GL-Account range: read user exit and customer specific table and identify Product Code according to GL line item text. For FI invoices from RE: read TXW_MAT; For FI invoices where product is dependent on GLAccount: read TXW_MAT or SAFTPT_FIMD; For FI invoices where product corresponds to GL-line item text based on GL-Account range: read user exit and customer specific table and identify ProductDescription according to GL line item text. per default = 1 N/A

4.1.4.10.4.

ProductDescription

Product description according to Master Data

4.1.4.10.5. 4.1.4.10.6.

Quantity UnitOfMeasure

Quantity Unit of measure

4. Product data customizing for FI invoices


New data has to be maintained in order to obtain what is described under point 3: Material Master Data Maintain Material Master Record for Products in FI invoices: maintain at least these fields in the Material Master Data. This data will be taken from the DART-Extract to the XML file.
Field Name
MANDT BUKRS MATNR MATNAME MATGROUP

Meaning
Client Company code Product number Product description Product group

PTSAFT_MATPRE (optional) Define Product Number Prefix: As Material Master Data records are created for RE Services/Products with numbering taken from the concatenation of TZB0A-RANTYP and TZB0ASBEWART, number prefixes may have to be defined to avoid duplicated Material Number.
Field Name
MANDT BUKRS MAT_PREFIX

Meaning
Client Company code Product number prefix for RE invoices

PTSAFT_MATACCNT Define Product Number depending on GL-Account: where there is a clear relationship between the GL account and the service/product from the invoice the product data can be defined based on the GL Account
Field Name
MANDT BUKRS GLACCOUNT MATNR

Meaning
Client Company code General ledger account Product number

Page 6

SAP Iberia SAFT-PT (EN)

12-Fev-2009

SAFTPT_FIMD Maintain Product Master Data: this can be used whenever the Material Master Data is not suitable: this table is only used to read Master Data for the XML file; so whatever is maintained in this table will be transferred to the xml file.
Field Name
MANDT COMPANY_CODE GLACCOUNTFROM GLACCOUNTTO PRODUCTCODE PRODUCTTYPE PRODUCTGROUP PROD_DESCRIPTION

Meaning
Client Company code From General ledger account To General ledger account Product number Product type Product group Product description

SAFTPT_PRODS This is filled at runtime for line item text based Product data using User Exit Case 2. This will provide the Product Master Data for this kind of invoices.
Field Name
MATNR MTREF CNAME1 MAKTX EAN11

Meaning
Product number Product type Product group Product description EAN11 code

5. DART preparation
a) Check DART version: proceed as follows: for 4.6C release: (1) SE11 -> Utilities-> Other Dictionary objects (2) insert DART1 in Type Group (3) click on display for releases > 4.6C: (1) SE12 -> Select radio button "Type Group" (2) -> Enter DART1 (3) -> Click on "Display" or "F7"; under section of constants you can find: CONSTANTS: dart1_rl LIKE txw_c_v0-dart_rl VALUE '2.5'. This indicates the DART version. Please note that the minimal requirement is DART version 2.4. If this is not the case in your system please carry out the upgrade of the DART tool first. Please refer to the relevant SAP Notes (component CA-GTF-DRT) and make also sure that error correction notes related to DART are implemented. (Please check OSS note 945615 for some more details on DART tool). To upgrade DART release from 2.3 to 2.4, refer the note: 810014 This note has correction instruction and also SAR files (in the note attachment); Implement both correction instruction and the SAR file. b) Assign the DART data volume to your company code Execute transaction SM30; specify TXW_C_BUKRS; Assign the data volume ALL to the company code.

Page 7

SAP Iberia SAFT-PT (EN)

12-Fev-2009

6. DART configuration (FTWP)


For a complete understanding of the DART tool please check also the respective Online Documentation. Only the most relevant steps for producing the SAFT-PT file are explained here a) Make the following configuration of DART in tab Data Extraction: here you define the items that shall appear on the selection screen of the data extract program or the parameters that influence the extract. When running the program you can still select or unselect the options. Select at least the following items: Go to tab Transaction Data

Go to tab Master Data Check the selection check box Enable master data segment selection; this activates the fields on the selection screen when running the data extract enabling you to make the selection when running the extract.

Go to tab Technical Settings Make sure that the technical settings are adequately defined according to your system environment. The figures shown here are only examples and may not be the best configuration for your system Page 8

SAP Iberia SAFT-PT (EN)

12-Fev-2009

The limitation of data volume may be convenient for testing purposes and you can select or unselect it later on the selection screen.

b) File Directories: Create the file directories where to locate the data extract Go to Details to define Directory Set, Directory Set Description, the file location; you may receive an error message XW163: file name is limited to n digits. This is an Operating System issue. Proceed as follows: SM30, enter V_FILESYS and press maintain. Here you can define more digits for the respective operating system. Click Create

7. Data Extract (FTW1A)


Create a data extract: a) Specify the following parameters to run the data extract according to customer specific environment: General Company Code Fiscal Year Posting Period (optional) Maximum number of documents (optional) Transaction Data Choose the items you want to extract: Finance Documents (FI) 1. Master data segments In order to select only the master data that is needed in the extract according to the requirement it is sufficient to select the following items: TXW_BSEC TXW_COMPC TXW_CUST_E1 TXW_GLACC TXW_LFAS TXW_MAT One-Time Account Company code master (mandatory) Customer master G/L account master Vendor master Material master Page 9 One-time-Customers/Vendors Company Code master data (selected by default) Customer Master Data GL accounts Master Data Vendor Customer Master Materials Customer Master

SAP Iberia SAFT-PT (EN)


TXW_PLANT TXW_VENDOR Plant master Vendor master

12-Fev-2009
Plant Customer Master Vendor Customer Master

Select radio button Select all and then press button Select individual master data segments in order to restrict the selection. Data file Data file name (any user defined file name) Directory set (defined previously using FTWP)

After executing the extract use transaction FTWF to browse the file extract.

Page 10

SAP Iberia SAFT-PT (EN)

12-Fev-2009

Note: To obtain the following section of the Audit File you need to select the following data source items:
Audit File Section Data source FTW1A DART segment(s); Selection RSAFT_FIRE screen fields Is created automatically when running RTXDART_PT DART segment: Selection Screen fields: TXW_COMPC Company ID Tax Accounting Basis Header Comment

Audit File Header

MasterFiles General Ledger Customer To include One-time-Customers: DART segment: TXW_GLACC DART segment: TXW_CUST_E1 Selection Screen field: Finance documents (FI) DART segment: TXW_BSEC DART segment: TXW_LFAS TXW_VENDOR Selection Screen field: Finance documents (FI) DART segment: TXW_BSEC DART segment: TXW_MAT TXW_PLANT Table: PTDART_TAX_DATA Selection Screen field: Finance documents (FI) DART segment: TXW_BSEC

Supplier To include One-time-Vendors:

Product

Tax Table GeneralLedgerEntries

Page 11

SAP Iberia SAFT-PT (EN)


Audit File Section Data source FTW1A DART segment(s); Selection screen fields Selection Screen field: Finance documents (FI) Sales documents (SD) Delivery documents (SD) Billing Documents (SD) DART segment: TXW_PLANT TXW_CUST_E1 TXW_LFAS

12-Fev-2009

RSAFT_FIRE

SourceDocuments To include FI-invoices: To include SD-invoices:

8. Tax data customizing (transaction: PTDART_TAX)


According to the mandatory file structure the tax codes master data (Tax Table) shall include tax code information which does not exist in the system. In order to be able to reflect this tax data in the file according to the legal requirement a new table - PTDART_TAX_DATA - is used to maintain the data as required for all tax codes, such as:

The fields in table PTDART_TAX_DATA have the following meaning: Field Tx Tax type Tax Descr Content Tax code define whether the tax code refers to VAT (IVA) or to Stamp Tax (imposto de selo) (IS) Define to which region the tax code refers to (concatenated with tax type: IVACON for Continente; IVARAA for Regio Autnoma dos Aores; IVARAM for Regio Autnoma da Madeira; IS for Stamp Tax; Code for tax rate type: 1 Intermdia (Intermediate); 2 Normal; 3 Reduzida (Reduced); 4 Isenta (Exempted); 5 Outras (Others); Full text for tax rate type: Normal; Intermdio; Reduzida; Isenta Tax percentage SAFT field Description

Tax C. Det. Description Condition rate

TaxCode Description TaxPercentage

Run the transaction PTDART_TAX; Press the button Maintain. Click the button New Entries and specify the values for all the fields and save the entries. Example: Page 12

SAP Iberia SAFT-PT (EN)


Tx AB AB AC AD AF S1 Tax type IVA IVA IVA IVA IVA IS Tax Descr IVACON IVARAA IVARAM IVACON IVACON IS Tax C. Det. 1 2 3 4 5 4 Description Intermdia Normal Reduzida Isenta Outras Cheques de qualquer natureza

12-Fev-2009
Condition rate 12 20 5 0 n/a 1

9. Create XML file


After creating the extract(s) of the data you want to report in the xml file you have to run a report to produce the xml file(s) in the requested structure. If you have created several extracts you will have to create the same number of XML files. In the end you obtain the complete file for one fiscal year by merging them into one final file. To create an xml file, according to the XSD requested by Portuguese Tax Law proceed as follows: 1. Create XML file: program RSAFT_FIRE: a. Execute transaction SA38 for report RSAFT_FIRE or follow the menu path: Accounting -> Financial Accounting -> General Ledger -> Reporting -> Tax Reports -> Portugal -> DART: create XML file (Portugal) (report: RSAFT_FIRE). b. Selection fields in RSAFT_FIRE

Page 13

SAP Iberia SAFT-PT (EN)

12-Fev-2009

Field name Data extract data Data file name Directory set Master Data Extract File

Meaning The extract for which you want to create the xml file Where the extract files are stored The extract file that contains the relevant master data; fill only in case it is not included in the data file (first field) itself. Please consider the details explained under point 9 and the recommendations given. Please keep in mind that when creating the XML file for Billing documents you need to indicate the correspondent Master Data extract in order to obtain a complete file as some of the required data is taken from the Master Data tables (e.g. Addresses). This is only necessary in case the master data is in a separate extract. The company code for which you created the extract and want to create the xml file. The fiscal year for which you created the extract and want to create the xml file. The relevant plants for the company code to which you want to limit the Materials Master Data Select the Ledger Check this radio button if your Portuguese Chart of Accounts is the main Chart of Accounts in your Company Code Master Data (KTOPL) check this radio button if your Portuguese Chart of Accounts is Check parallel Chart of Accounts in your Company Code Master Data (KTOP2) Field CompanyID in File Header: Registration Number of the company Field TaxAccountingBasis in File Header: Specify for which data you are creating the file: financial data, or billing data, or integrated data: Contabilidade or Facturao or Integrado Contabilidade e Facturao Field HeaderComment in File Header: fill with you own free text File name of the target xml file you want to create

Company specific data Company Code Fiscal year Plants Ledger Legal chart of accounts Primary Chart of Account

Country Chart of Accounts

XML file data Company ID Tax Accounting Base

Header Comment File Name Invoice selection FI invoices Document types

Check this box if you have FI invoices Specify the document type(s) for the FI invoices; only FI documents with this document type will be selected as invoices. Line item selection for documents Doc.types shown with GL Select the document type of the FI invoices for which you want to show the GL lines in the file; this is the default configuration of the report Doc.types shown with BP Select the document type of the FI invoices for which you want to show the Business Partner lines in the file; SD Billing documents Check this box if you have SD invoices

c. Execute: to execute in online mode press Enter or F8. You can also run the report in background. This is recommended if you are processing a huge amount of data. When the execution of the report is finished you will receive a success message. 2. Obtain the XML: use program RFASLDPC or from the server. a. The XML file can be downloaded with the program RFASLDPC or it can be fetched directly from the server (if you have a Unicode system you have to convert the file to ANSI format locally). b. When running RFASLDPC specify File type as **.

Page 14

SAP Iberia SAFT-PT (EN)

12-Fev-2009

10. Optimize memory configuration


In some situations, especially on 32bit platforms or/and with a huge data volume this procedure may be extremely memory consuming and problems may arise to complete the program execution. Please refer to notes 353579 and 552209 for further suggestions on how to enhance system and OS settings for better memory conditions when producing the SAF-T file on 32 bit systems. If necessary avoid running other processes at the same time.

11. Splitting files


If you have memory problems due to very huge data volume, or you want to distribute the tasks of creating the SAFT-PT file over the year you may follow the approach of creating several files and merge these to one SAFT-PT file at the end. In such cases proceed as described here: Step 1: split the data extraction of one fiscal year into small units such as per quarters, or periods or you may even split into GL documents, SD documents and Master Data. Step 2: create one XML file for each of these extracts. Step 3: Join all single XML files to one file in the correct format for the whole data of one year.

12. Merge XML files with report RDART_FILE_MERGE


If you create several xml files each with a data subset from the relevant fiscal year, you will have to merge them to one file after creating all the subset XML files. 1. Merge XML files: program RDART_FILE_MERGE a. Selection screen fields for RDART_FILE_MERGE: File name Master Data file XML files press the arrow button beside this field to enter all the files you want to merge indicate the xml file which contains the master data. All other files will be merged into this file. indicate the name of the target xml file

Page 15

SAP Iberia SAFT-PT (EN)

12-Fev-2009

b. Execute the report. Once the file is created you will receive a success message. 2. Obtain XML file: program RFASLDPC or from the server The XML file can be downloaded with the program RFASLDPC or it can be fetched directly from the server.

13. Recommendations for splitting extracts and merging files


This step in the process is normally not needed, as you can generate the file for the whole year in one program execution. However, in case you want to create the files period by period you need to merge them in the end to one single file for a whole fiscal year. In this case you need to take the following aspects into consideration: - Some Billing documents fields in the XML file (ship-to and bill-to addresses) may be filled with information from the Customer and Vendor Master Records. - Customer and Vendor master data are complemented with data from FI documents (One-timecustomers/vendors). - Though Master Data are not as time dependent as transactional data they can change during the year. Thus, it is necessary to create specific extracts or xml files simultaneously so that the data is complete. The following matrix gives a step by step instruction on how to proceed to create one file in one execution and in a splitting files scenario. This is only a recommendation. The example below considers only the splitting of the Billing documents in periods. However, the same can be done for the Accounting documents as well.

Page 16

SAP Iberia SAFT-PT (EN)

12-Fev-2009

14. How to fill specific fields with a user exit:


For some fields it is necessary to define the filling procedure with a user exit. This is the case when you need to influence the output in the respective fields in a different way than defined by SAP standard. Name : PT_USER_EXIT_DART. Purpose : To fill up the following fields of XML file. Customers can indicate their own rule where to find or how to fill the correct content for the above fields. Field in xml file ProductType Description Invoice Type Xml structure Masterfiles Product ProductType GeneralLedgerEntries Journal Transaction SalesInvoices Invoice InvoiceType Field according to Port.321a/2007 2.4.1. 3.4.3.5. 4.1.4.4.

Description

Proceed as described here: Page 17

SAP Iberia SAFT-PT (EN)


1. Transaction to edit the source code of the user exit: SE37 2. Structure : Import Parameters: WA_MASTER TYPE PTDART_ITEMS TRANSACTION_TYPE TYPE I. Export Parameters: PRODUCT_TYPE TYPE MTREF TDGL_DESC TYPE BKTXT INVOICE_TYPE TYPE BKTXT

12-Fev-2009

Note: From the report key fields will be sent to the above user exit and transaction also the transaction type. Work area wa_master will contain the key fields, For TRANSACTION_TYPE = 1. Wa_master will contain values for ProductCode and ProductGroup. User has to fill the value for variable PRODUCT_TYPE based on above 2 fields For TRANSACTION_TYPE = 2. Wa_master will contain the key fields JOURNAL_ID, TransactionID and also other related to the document header and the line item (RecordID, AccountID ). User has to fill the value for variable TDGL_DESC based on the key fields present in the work area wa_master. For TRANSACTION_TYPE = 3. Wa_master will contain the key fields InvoiceNo, LineNumber and also other related to the document header and the line item User has to fill the value for variable INVOICE_TYPE based on the key fields present in the work area wa_master. Depending on the TRANSACTION_TYPE (report will pass the value while calling the user exit), respective export parameters can be filled using the work are wa_master. FI Invoices User exit details Case 1: * 4.1.4.10.3 / 4.1.4.10.4 CALL FUNCTION 'ZPT_USER_EXIT_DART' EXPORTING wa_master = wa_master transaction_type = '1' IMPORTING prod_code = wa_master-sd_matnr Case 2 : SAFT_PTPRODS . Master data creation. Case 3: product based on line item text / other cases. CALL FUNCTION 'ZPT_USER_EXIT_DART' EXPORTING WA_MASTER = wa_master TRANSACTION_TYPE = '5' IMPORTING PROD_CODE = wa_master-sd_matnr PROD_DESCRIPTION = prod_desc TABLES IT_EXPREPROD = IT_EXPREPROD. Page 18

SAP Iberia SAFT-PT (EN)


Case . 4 : Prefix Invoice YYYY/0 CALL FUNCTION 'ZPT_USER_EXIT_DART' EXPORTING WA_MASTER = wa_master TRANSACTION_TYPE = '4' IMPORTING PROD_DESCRIPTION = prod_desc TABLES IT_EXPREPROD = IT_EXPREPROD.

12-Fev-2009

15. Configure date fields in the DMEE tree


After uploading DMEE trees please check mapping procedure for all the date fields of the XML file. The format of these fields may not correspond to the legally required and shall be changed according to the instructions in the respective notes. For releases R/3 Enterprise and higher please follow the instructions in SAP note 1268403; For release 4.6C check SAP Notes 1142934 and 1161775.

16. Create a transaction for report RTXDART_PT and RDART_FILE_MERGE


In order to have a direct access to the reports RTXDART_PT and RDART_FILE_MERGE you may want to create a transaction. In that case please proceed as explained below in on example to create it manually in your system. You can also install it via an upcoming Support Package. Proceed the same way for each of the reports. Step 1: Go to transaction SE80 and open the report RDART_FILE_MERGE. Follow the menu path (right click on the report): Report Create Transaction.

Step 2: You will see the following screen; proceed as follows: Specify Transaction code e.g. safpt_merge (you can specify your own name for this) Specify Short text, e.g. Dart PT: XML file merge report (you can specify your own name for this) Select radio button : Program and selection screen (report transaction)

Page 19

SAP Iberia SAFT-PT (EN)

12-Fev-2009

Step 3: System will show the following screen. Proceed as follows: Specify Program : RDART_FILE_MERGE Select all GUI support parameters Save the transaction. Specify package as ID-FI.

Page 20

You might also like