SlideShare a Scribd company logo
1 of 73
Download to read offline
© 2014 SAP AG Page 1 of 73
User Guide
SAFT Framework:
SAF-T (PT) Customizing
and Execution
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 2 of 73
History
Version Responsible Date Change Description
1.0 Daniela Schobert 17.02.2014 First Release
1.1 Daniela Schobert 12.08.2014 First Revision
1.2 Daniela Schobert Second Revision
1.3 Daniela Schobert Third Revision
1.4 Paul Taylor 21.09.2017 Fourth Revision
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 3 of 73
Contents
1 Introduction.......................................................................................... 6
2 File structure and purpose ................................................................. 6
2.1 Annual file for audit purposes.......................................................................... 7
2.2 Monthly File for invoice reporting (E-fatura)..................................................... 8
3 Selection logic ..................................................................................... 9
3.1 Digitally signed documents: invoices and delivery documents......................... 9
Invoice Documents.......................................................................................... 9
Delivery Documents...................................................................................... 10
3.2 Working Documents...................................................................................... 10
3.3 Vendors as Customers.................................................................................. 10
3.4 Restrictions ................................................................................................... 11
Invoice Lists with Foreign Currencies............................................................ 11
Billing Documents in Invoice Lists ................................................................. 11
Sales Office Restriction................................................................................. 11
Plant abroad Restriction................................................................................ 11
4 Settings .............................................................................................. 11
4.1 How to access the customizing views ........................................................... 12
Generic Settings à Specify Generic Settings ............................................... 12
Country-Specific Settings à Portugal ........................................................... 13
4.2 Specify Generic Settings in detail.................................................................. 14
Specify Generic information .......................................................................... 15
Map Document Type to Invoice Type [FI Invoices]........................................ 16
Map Material Type to Product Type............................................................... 18
Specify Material Master Data ........................................................................ 19
Define Material Numbers Based on G/L Accounts......................................... 20
Map sales category to invoice type ............................................................... 21
Specify Sales Office...................................................................................... 23
4.3 Country-Specific Settings in detail................................................................. 24
Portugal à Specify Business Cases ............................................................. 24
Portugal à Specify Tax Code Details ........................................................... 27
Portugal à Define Ranges for Internal Documents ....................................... 29
Portugal à Define Alternate Accounts .......................................................... 31
Portugal à Specify Prefix for Material Numbers............................................ 33
Portugal à Source Document Mappings....................................................... 34
Portugal à Define Taxonomy Codes ............................................................ 37
Portugal à Assign Taxonomy Codes to G/L Accounts.................................. 37
5 Data Extraction .................................................................................. 38
5.1 Running the Data Extraction ......................................................................... 39
Extract........................................................................................................... 42
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 4 of 73
Delete ........................................................................................................... 42
System messages while executing................................................................ 43
Administration ............................................................................................... 43
Application Log ............................................................................................. 43
6 File Creation....................................................................................... 45
6.1 Rules............................................................................................................. 47
7 File Download ................................................................................... 47
8 File Validation .................................................................................... 51
9 Special Documents - External Documents...................................... 52
9.1 Integration of documents in SAP SD via summary documents (n:1).............. 53
9.2 Integration of documents in SAP SD via detailed document (1:1):................. 53
9.3 Documents created manually outside the system (on paper) ........................ 54
10 Special SAF-T file – Selfbilling ......................................................... 54
10.1 Selfbilling documents and vendors in SAFT .................................................. 54
Selfbilling vendor........................................................................................... 55
Self-billing documents ................................................................................... 55
10.2 Selfbilling file structure .................................................................................. 56
Yearly File..................................................................................................... 56
Monthly File................................................................................................... 56
10.3 Settings for Selfbilling file .............................................................................. 56
How to access the customizing views ........................................................... 56
10.1 Country-Specific Settings for Selfbilling......................................................... 57
Portugal à Specify Business Cases ............................................................. 57
Portugal à Specify Destination of XML files storage..................................... 57
Portugal à Generate Selfbilling files............................................................. 58
10.2 Data Extraction for Self-billing file.................................................................. 59
10.3 Deleting Extracted data for Selfbilling file ...................................................... 60
10.4 File Creation and Download for Selfbilling file ............................................... 61
10.5 File Validation for Selfbilling file..................................................................... 62
11 Special Configurations: FSV for GeneralLedger............................. 63
11.1 Legal Chart of Accounts - SNC ..................................................................... 63
11.2 Chart of Accounts in SAFT – GeneralLedger ................................................ 63
11.3 Chart of Accounts in the SAP system for SAFT............................................. 64
Using the FSV to create a hierarchical CoA .................................................. 64
How to create an FSV for SAFT.................................................................... 64
12 Special Configurations: Products in FI Invoices ............................ 69
12.1 Determination of the product data ................................................................. 69
Real Estate invoices (RE-FX): ProductCode definition .................................. 70
FI invoices: ProductCode definition ............................................................... 70
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 5 of 73
FI invoices with Material: ProductCode determination ................................... 72
12.2 Storing the product information (RE-FX and FI invoices)............................... 72
13 BADI.................................................................................................... 73
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 6 of 73
1 Introduction
According to Portaria 321-A/2007 of the Portuguese legislation, published in March 26th by the
Portuguese government, a requirement became mandatory as of fiscal year 2008 for all compa-
nies that use computerized means to manage their accounting and billing procedures: the obli-
gation consists in producing a file, the so-called SAF-T (PT) file, whenever requested by the tax
authorities for auditing purposes or as part of the year end closing activities.
This requirement is part of the requisites that belong to the Software Certification (Digital Signa-
ture for invoices and delivery documents. Check note 2107258 that is obligatory for Billing Soft-
ware, in Portugal. Both requisites are therefore linked together and reference will be made in
this manual whenever appropriate.
The SAF-T (PT) file also serves another purpose, which is the monthly reporting of invoices, the
so-called E-Fatura. This obligation was introduced by Law Decree 198/2012. There have been
several legal changes since.
Relevant legal references:
- Portaria 321-A/2007
- Portaria 1192/2009
- Portaria 160/2013
- Portaria 274/2013 – SAFT version 1.03_01.
- Portaria 302/2016 version 1.04_01
Under the following link you can find all useful information regarding the legal requirement,
namely the XSD file, validators, description of the structure, links to legal texts, etc.:
http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/NEWS_SAF-T_PT.htm
Note: The legal change according to Portaria 274/2013, version 1.03_01 is the one de-
scribed in this document.
This manual describes all the steps that are necessary to create the SAFT-PT file: Settings,
Data Extraction, File Creation and Download and Validation.
The process to create the SAF-T (PT) file is the same for both the monthly and the yearly file.
Whenever there are differences they are mentioned accordingly.
2 File structure and purpose
The SAF-T (PT) file is an XML file with different sections to accommodate the data from differ-
ent domains, e.g. accounting, billing, master data, etc. The composition of the file varies accord-
ing to its purpose. That is to say that not all the sections are always included.
Settings Extract
Creation &
Download
Validation
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 7 of 73
When creating the SAF-T (PT) file the user should be aware for which purpose the file is being
created.
Note: the file structure description in the law text contains a few errors. The correct structure is
given by the XSD file.
The table below shows the file sections of a complete SAF-T (PT) file.
File section Explanation
1.1. Header File header
2. MasterFiles Master Data
2.1. GeneralLedger GL Accounts master data
2.2. Customer Customers Master Data
2.3. Supplier Vendors Master Data
2.4. Product Products/Services Master Data
2.5. TaxTable Tax Master Data
3.1. GeneralLedgerEntries Accounting documents
4. SourceDocuments: Source Documents
4.1. SalesInvoices Billing documents
4.2. MovementOfGoods Delivery/Transport documents
4.3. WorkingDocuments Secondary documents to customers
4.4. Payments Receipts/Payment documents
The section containing the Accounting data (GeneralLedger) must contain the complete finan-
cial data of the company in one file only, not to be split in smaller files. The SourceDocument
section can be split into smaller portions.
2.1 Annual file for audit purposes
The annual file is normally provided to the tax authorities upon request and it is part of the year-
end closing activities. The obligation to report the data for audit purposes always consists in re-
porting the complete data. This can be done in one complete file or in several smaller files,
which altogether contain the complete data. The options and requirements are:
· Integrated file: contains the complete data in one file, related to accounting and logistics
(source documents: sales invoices, payments, movement of goods), both transaction
and master data.
· Accounting file: contains only data related with Accounting in one file, both transaction
and master data.
· Billing file: contains only data related with billing, both transaction and master data; it
can be split into smaller portions of smaller periods of at least one month.
There are different kinds of billing files according to the invoices’ nature, e.g. normal
customer invoices, invoices issued on behalf of a third-party and self-billing invoices.
The table below shows the composition of the file according to its nature, as described in the
law.
File section Explanation
Belongs to file type
(˜=included; ™=not included)
Integrated Accounting Billing
1.1. Header File header ˜ ˜ ˜
2. MasterFiles Master Data1 ˜ ˜ ˜
2.1. GeneralLedger GL Accounts master data ˜ ˜ ™
2.2. Customer Customers Master Data ˜ ˜ ˜
2.3. Supplier Vendors Master Data ˜ ˜ ˜
2.4. Product Products/Services Master Data ˜ ™ ˜
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 8 of 73
File section Explanation
Belongs to file type
(˜=included; ™=not included)
Integrated Accounting Billing
2.5. TaxTable Tax Master Data ˜ ˜ ˜
3.1. GeneralLedgerEntries Accounting documents ˜ ˜ ™
4. SourceDocuments: Source Documents ˜ ™ ˜
4.1. SalesInvoices Billing documents ˜ ™ ˜
4.2. MovementOfGoods Delivery/Transport documents ˜ ™ ˜
4.3. WorkingDocuments Secondary documents to customers ˜ ™ ˜
4.4. Payments Receipts/Payment documents ˜ ™ ˜
1 master data may be shown transaction dependent.
2.2 Monthly File for invoice reporting (E-fatura)
The monthly file is produced every month to report invoice data for tax purposes. This is done
by submitting the file on the portal of the tax authorities, the so-called E-fatura portal. When sub-
mitting the file, the portal executes some validations and discards the information that is not
needed, since only a limited amount of information is relevant for invoice reporting purposes.
The result is a much smaller file with a simplified structure containing only the information stored
in the database of the tax authorities.
According to the law, the monthly file for the purpose of reporting invoices (E-fatura) has the
structure of a billing file. In practice however, since not all the information is relevant to the tax
authorities some of the information that normally belongs to the billing file can be left out with no
impact on the quality of the reported data. This information is given explicitly or implicitly in the
law or can be derived from the behaviour of the portal. The simplified file, as mentioned above,
makes it evident how much of the information delivered in a SAF-T (PT) file is actually not
needed.
The table below shows the composition of the monthly file and shows the sections that are not
relevant, as explained above.
· File section Explanation
Belongs to Billing file type
(˜=included; ›= excluded from
E-fatura; ™=not included)
1.1. Header File header ˜
2. MasterFiles Master Data ˜
2.1. GeneralLedger GL Accounts master data ™
2.2. Customer Customers Master Data ˜
2.3. Supplier Vendors Master Data ›
2.4. Product Products/Services Master Data ›
2.5. TaxTable Tax Master Data ˜
3.1. GeneralLedgerEntries Accounting documents ™
4. SourceDocuments: Source Documents ˜
4.1. SalesInvoices Billing documents ˜
4.2. MovementOfGoods Delivery/Transport documents ›
4.3. WorkingDocuments Secondary documents to customers ›
4.4. Payments Receipts/Payment documents ˜
This data is not being excluded in the E-fatura file and when submitting the file in the AT-portal, it is auto-
matically discarded by the portal itself.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 9 of 73
3 Selection logic
3.1 Digitally signed documents: invoices and delivery
documents
Referring to the rules of Software Certification, invoices and delivery documents must be certi-
fied (digitally signed), without exception, regardless of where and how they were issued, in a
billing or in the accounting system.
Invoice Documents
Following this logic, the decisive criterion to select the relevant invoice documents for the ex-
traction and inclusion in the SAF-T (PT) file is the Digital Signature.
The Digital Signature validation presents multiple scenarios for our Customers, for example:
· SAF-T File Generation for any period prior to 2017, is always possible.
· If you have implemented the Note and you are carrying out a first execution in,
for example, September 2017, for the August 2017 period, and include un-
signed documents in your selection, then you will be able to create SAF-T files,
but you will receive warnings during the Data Extraction.
· If you have implemented the relevant Note in, for example, September 2017
and carried out the first execution during the same month, you will not be able
to extract any period from April 2018 onwards, if the selection contains un-
signed documents. You can only create SAF-T files with unsigned documents in
the 180 days following the first execution of the report.
3.1.1.1 Exceptions: Automatically Excluded Documents
Some documents are automatically excluded from the SAFT file:
DIGITAL SIGNATURE IS A PREREQUISITE FOR ALL INVOICE DOCUMENTS.
DUE TO THIS, A VALIDATION WAS PUT IN PLACE, OPERATING UNDER THE
FOLLOWING CONDITIONS:
· AFTER IMPLEMENTATION OF NOTE 2471144, AND FROM THE DATE OF THE FIRST
EXECUTION, DURING A 180-DAY PERIOD, IT IS STILL POSSIBLE TO EXTRACT DATA
AND GENERATE SAF-T FILES FROM DOCUMENTS LACKING A DIGITAL SIGNATURE,
BUT A WARNING IS ISSUED FOR EACH NUMBER RANGE AFFECTED.
· AFTER THIS 180-DAY PERIOD YOU WILL NO LONGER BE ABLE TO EXTRACT DATA IF
ANY OF YOUR DOCUMENTS WITHIN THE SELECTED PERIOD ARE NOT DIGITALLY
SIGNED, AS THE VALIDATION WILL CAUSE AN ERROR IN THE REPORT.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 10 of 73
3.1.1.1.1 Reversals
Reversal documents of FI and SD invoices are considered internal documents, not representing
a commercial transaction. They are therefore being excluded from the SAFT file – table 4.1. Only
the reversed document is shown in the file. Please note, that reversal documents must have their
own number range and document type.
3.1.1.1.2 Internal SD documents not posted in Accounting
Such documents are identified by their Posting Status equal D (VBRK-RFBSK) and are automat-
ically excluded from the SAFT file – table 4.1.
3.1.1.1.3 Rebate Agreement credit memos
Such documents are internal documents never to be printed or issued to a Customer. Therefore
they are excluded from the SAF-T file – table 4.1, based on their Billing Category equal B or C
(VBRK-FKTYP).
3.1.1.1.4 Delivery Document replaced by invoice
Invoices can be used as delivery documents when sent together with the goods shipment. In such
cases they replace the delivery document which can be considered an internal document that
shall not be included in the SAFT file – table 4.2. Such delivery documents will be excluded auto-
matically provided the respective settings are done.
Delivery Documents
According to Digital Signature requirements, document selection during data extraction will auto-
matically include Digitally-signed delivery documents, excluding unsigned delivery documents
(customer's internal documents not used for transportation).
3.2 Working Documents
Some SD documents are automatically reported as Working Documents (table 4.3) and not as
Sales Documents:
· Proforma Invoices identified based on their Document Category equal U
(VBRK-VBTYP).
· Internal documents according to the settings (FIPTC_DOC_EXC) are consid-
ered Working Documents. If, however, such documents don’t have a customer
line, they are also excluded from table 4.3 and will only be included as an Ac-
counting Document.
3.3 Vendors as Customers
When filling the Masterfiles section for Customers (2.2.) the program may select data related to
also to Vendors, provided the respective settings have been done, in order to reflect the Vendors
as Customers scenario.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 11 of 73
3.4 Restrictions
Invoice Lists with Foreign Currencies
The use of certain documents with foreign currencies (Invoice lists, for example) is unsupported
by the SAF-T solution. This may lead to inconsistencies due to exchange rate differences from
the invoice issue date to the invoice list issue date.
Although unsupported, you may still submit documents in foreign currencies. However, SAP can-
not guarantee acceptance and validation of amounts by the Tax Authorities due to differing ex-
change rates.
Billing Documents in Invoice Lists
If you use different fiscal periods for the Invoice List creation, you will produce an inconsistent
SAF-T file. To avoid this, you must create as many Invoice Lists as you have fiscal periods. For
example, you might have Invoices 1 & 2 in one fiscal period, and Invoice 3 & 4 in another fiscal
period, you cannot group these invoices in a single Invoice List, but must split them into two
separate Invoice Lists (Invoice List A for Invoices 1 & 2 and Invoice List B for Invoices 3 & 4).
If you need to carry out a reversal of an Invoice List, you must reverse it in the same fiscal period.
Sales Office Restriction
If you need to issue a SAF-T file (i.e. for e-Fatura purposes) for a Portuguese sales office in a
non-Portuguese company code, you can only issue a Billing SAF-T. You cannot extract Account-
ing SAF-T for non-Portuguese company codes (relevant for the annual audit file).
Plant abroad Restriction
Presently the Plant Abroad scenario is not supported.
4 Settings
Several customizing tasks must be carried out prior to executing the file to ensure that the cor-
rect data is collected, the correct file format is produced and the correct filling rules are applied
(e.g. to produce the Chart of Account hierarchical structure, to collect product data, where it is
not defined in the database, or to identify specific business scenarios).
This is important because sometimes a different behaviour is required to fill the SAF-T (PT) file
correctly. Normally the definition of such settings is a one-time activity or valid for a specific time
interval.
The several views in the SAFT-Framework customizing area are explained in this chapter. Use
these views to specify the cases that are applied in the company.
NOTE: The entity on which the SAFT(PT) file is based is the company code. It cannot be created
for multiple company codes in one step. Running the report for multiple company codes will result
Settings Extract
Creation &
Download
Validation
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 12 of 73
in multiple files, namely as many as there are company codes. These files cannot be merged.
Please bear in mind that the Accounting data must be in one file only according to the legal re-
quirement.
For the entire SAFT(PT) solution, the company code should be located in Portugal.
RPFIEU_SAFT extractions must be deleted and run again when customizing settings are
changed and a new RPFIEU_SAFT extraction is needed with the new settings.
4.1 How to access the customizing views
The views can be accessed in several ways:
Option 1:
Use the transaction code to go directly to a specific view, as specified in each customizing activ-
ity case in this chapter.
Option 2:
1) Execute RPFIEU_SAFT report and then select the Define Settings radio button to navigate
to the SAF-T Settings (EU) area menu.
2) Navigate to the next menu as needed
- Generic Settings à Specify Generic Settings
or
- Country-Specific Settings à Portugal
Click the Create New Entry icon to create a new setting. Or, select an existing entry and click
the Change Entry icon to change the existing setting. After creating new entries or changing ex-
isting ones, always save the data before exiting.
Generic Settings à Specify Generic Settings
This menu includes generic settings that are defined based on country. Therefore, always select
country PT before navigating to the specific sub-menu. Multiple definitions are possible, based
on company code and validity period.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 13 of 73
Country-Specific Settings à Portugal
This menu includes generic settings for each country. Open the menu belonging to Portugal to
access to the next sub-menu.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 14 of 73
4.2 Specify Generic Settings in detail
In this chapter each of the sub-menus will be explained in terms of function, use and the meaning
of the fields. You can access the customizing view by menu navigation as explained above, or
using the transaction code mentioned in each case.
In the following screen you will find the several configuration options, which are explained in this
chapter.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 15 of 73
Specify Generic information
Use this view to specify the generic parameters that define the scope of the data that needs to
be included in the various sections on the SAFT-T (PT) XML file. This customizing task is man-
datory.
Please note: You may also use transaction FIEU_GEN to maintain FIEUD_GENERIC table.
Explanation of the table fields
Fields Description Content
FSV_PCOA FSV Primary If your Portuguese Company Code uses the Primary
Chart of Accounts (KTOPL in the company code master
data), then specify the Financial statement version in this
field.*
FSV_CCOA FSV Country If your Portuguese Company Code uses the Country
Chart of Accounts (KTOPL2 in the company code master
data), then specify the Financial statement version in this
field.*
COA Chart of accounts Enter the main chart of accounts defined for the Portu-
guese Company Code (even if executing the report for
the country chart of accounts, the entry here is always the
main chart of accounts).
COMPANY_ID Company ID Specify the information required for CompanyID field in
the SAF-T (PT) file Header: Registration Place and Num-
ber, or in case of no registration indicate the VAT-ID only.
Use the syntax required according to SAFT rule:
· Only one space between the registry place and
the registration number. No spaces in the name
of the place
· No country prefix for the registration number.
Example: Vila_Nova_de_Gaia 500123456
BUSSINESS_NAME Business name Name of the Company for which it is commonly known
LEDGER Ledger The unique identification of a ledger, in case one is speci-
fied for the data belonging to Portugal. This is the ledger
that contains the data to be reported.
Note: RPFIEU_SAFT does not support Special Ledger
functionality. Only New GL and non-leading ledgers under
New GL are supported.
In case a non-leading ledger is selected then the data of
this ledger along with the data of the leading ledger will be
reported in the XML file. This means that the data of the
leading ledger is always automatically selected because
only the invoices in the leading ledger are digitally signed.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 16 of 73
Fields Description Content
TAXOREF Taxonomy Refer-
ence
This identifies the type of accounting standard used by
each business, per company code, as defined in Portaria
302/2016.
S - SNC (ASS)-based accounting rules
N - International Accounting Standards
M - SNC (ASS)-based rules for micro-companies
O - Other accounting systems (undefined)
DIR_SET FTWN Directory
Set
Indicate the Directory Set you have maintained for storing
SAFT XML files, under transaction FTWP, in the File di-
rectories tab, where the server path to store the SAFT
XML files is defined. This is only needed for downloading
very huge XML files. Refer to chapter File Download for
more information.
*Note: Maintain either Financial statement version (primary) or Financial statement version
(country), but not both.
Map Document Type to Invoice Type [FI Invoices]
According to the SAF-T(PT) definitions, the various invoice types are to be reported with the fol-
lowing values in the SAF-T file:
Invoice Type Invoice type accord-
ing to XML
Invoice FT
Simplified Invoice FS
Invoice-Receipt FR
Debit Note ND
Credit Note NC
Sale for Cash and Invoice/ Sales Ticket a) VD
Sale Ticket a) TV
Return Ticket a) TD
Assets Alienation a) AA
Assets Return a) DA
Premium or Premium Receipt RP
Return Insurance or Receipt of Return Insurance RE
Imputation to Co-Insurance Companies CS
Imputation to Leadership Co-Insurance Companies LD
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 17 of 73
Invoice Type Invoice type accord-
ing to XML
Accepted Re-Insurance RA
a) These document types are allowed only until 31-Dec-2012. SAF-T-(PT) files issued after this
date must not contain such invoice types.
FI invoices are identified through the document type. Thus, the system document types must be
classified according to the SAFT invoice types. In this customizing view the following is speci-
fied:
· FI invoice document types that must be included in the SAF-T(PT) file
· The SAF-T invoice type to which the document type corresponds
Prerequisites
· Manual FI Invoices checkbox in the Customizing view FIEUD_BC has been already se-
lected (see chapter Portugal → Specify Business Cases).
The InvoiceType field in the XML file is filled with the invoice type customized for the retrieved
document type.
Transaction: FIEU_MFI to maintain table FIEUD_MFI
Explanation of the table fields
Field Description Content
MANDT Client Client
LAND1 Cty Country PT
BUKRS CoCd Company code for which SAF-T file will be cre-
ated.
VALIDITY_FROM Valid from Start date of the validity period
VALIDITY_TO Valid to End date of the validity period
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 18 of 73
Field Description Content
DOC_TYPE Type System document type of FI documents which are
invoices, credit or debit notes and therefore to be
retrieved. This is the internal SAP document type
that will be conversed to FT, NC or ND according
to the SAFT logic and the nature of the document.
BP_LINE BP Line Check this box to define that business partner
(BP) lines are included in the Standard Audit File
for Tax Purpose (SAF-T) generated in XML for-
mat.
Unchecked, the system will only display the G/L
lines in the output.
TAGT_INV_TYPE Inv. Type The corresponding official invoice type as required
by the SAF-T(PT) file.
SOURCE Source For Portugal, this field should be defined as blank.
This field is used for SAF-T Luxembourg only.
NOTE: For the retrieval of FI documents, please also refer to the important note given in chapter
Using the FSV to create a hierarchical CoA.
Map Material Type to Product Type
According to the SAF-T(PT) definitions, products must be classified according to their type:
product, service, tax like product, or other. The corresponding value is shown in the XML file ac-
cording to the SAF-T(PT) rules:
Product Type Value in XML
Products P
Services S
Others O
Taxes, Levies & Parafis-
cal Charges
I
Special Consumer Taxes E
The SAP standard material types are already defined by default in the program as follows:
Material Type Product Type
DIEN S
FERT P
HAWA P
Customer specific material types must be customized in this view.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 19 of 73
Transaction: FIEU_PTYPE to maintain table FIEUD_PRODS.
Explanation of the Table Fields:
Field Description Content
MANDT Client Client
LAND1 Country Country PT
BUKRS Company code Company code for which SAF-T file
will be created.
VALIDITY_FROM Valid from Start date of the validity period
VALIDITY_TO Valid to End date of the validity period
PRD_TYPE Material Type The relevant material type as cus-
tomized in the system
TARG_PRD_TYPE Product Type Corresponding code as required by
SAFT file: S, P, O, I or E)
Specify Material Master Data
This view is used to determine Product master data information for FI invoices, in case it does not
exist. In such cases, one option is to define such details based on the revenue account(s) where
the FI invoices was posted to.
Also refer to chapter Special Configurations: Products in FI Invoices, where detailed information
on this process is provided.
Transaction: SAFTPT_FIMD to maintain table SAFTPT_FIMD.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 20 of 73
Explanation of the Table Fields:
Field Description Content
MANDT Client Client
BUKRS Company code Company code for which SAF-T file
will be created.
GLACCOUNTFROM G/L Account From Revenue Account of the account in-
terval that determines the product
GLACCOUNTTO G/L Account To Revenue Account of the account in-
terval that determines the product
PRODUCTCODE Product Code Product ID
PRODUCTTYPE Product Type Corresponding code as required by
SAFT file for filed ProdutType
PRODUCTGROUP Material Group De-
scription
Description of the Product group
PROD_DESCRIPTION Material Description Product description
CUST_SPECIFIC Batch Management
Indicator
This field can be ignored
Define Material Numbers Based on G/L Accounts
This view is used to determine the Product ID for FI invoices, in case it does not exist. In such
cases, one option is to define such details based on the revenue account(s) where the FI invoice
was posted to.
Note: Always be sure to define the product ID in such a way that it prevents the creation of dupli-
cates to the ones defined in MARA or for RE invoices.
Also refer to chapter Special Configurations: Products in FI Invoices, where detailed information
on this process is provided.
Transaction: PTSAFT_MATACCNT to maintain table PTSAFT_MATACCNT
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 21 of 73
.
Explanation of the Table Fields:
Field Description Content
MANDT Client Client
BUKRS Company code Company code for which SAF-T file
will be created.
GLACCOUNT G/L Account From Revenue Account based on which
the product is determined
MATNR Material Number Product ID assigned to the postings
of the respective account. This field
is the link to the MARA table.
Map sales category to invoice type
For SD invoices it is necessary to define the InvoiceType according to SAFT specific Invoice-
Type they correspond to. This is defined based on the document category in the SAP system.
You can use this transaction to do the following:
· Specify the possible sales document categories that must be included in the SAF-T
· Map sales document categories to the invoice types as required for SAF-T.
Invoice Type Invoice type according
to XML
Invoice FT
Simplified Invoice FS
Invoice-Receipt FR
Debit Note ND
Credit Note NC
Sale for Cash and Invoice/ Sales Ticket a) VD
Sale Ticket a) TV
Return Ticket a) TD
Assets Alienation a) AA
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 22 of 73
Invoice Type Invoice type according
to XML
Assets Devolution a) DA
Premium or Premium Receipt RP
Return Insurance or Receipt of Return Insurance RE
Imputation to Co-Insurance Companies CS
Imputation to Leadership Co-Insurance Companies LD
Accepted Re-Insurance RA
a) These document types are allowed only until 31-Dec-2012. SAF(T)-PT files issued after this
date must not contain such invoice types.
The following SD document categories are already mapped by default in the program:
Sales Document Category Invoice type according to XML
M FT
N FT
O NC
S NC
P ND
Use this customizing view to define other Sales document categories if needed. The corre-
sponding Invoice Type is then filled in the XML file.
Transaction: FIEU_SDGEN to maintain table FIEUD_SDGEN
Explanation of the table fields
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 23 of 73
Field Description Content
MANDT Client Client
LAND1 Country Country PT
BUKRS Company code Company code for which SAF-T
file will be created.
VALIDITY_FROM Customizing entry valid from
date.
Start date of the validity period
VALIDITY_TO Customizing entry valid to
date.
End date of the validity period
VBTYPE SD document category The relevant SD document cate-
gory that needs to be defined in
addition to the default mentioned
above.
TAGT_INV_TYPE SAF-T (PT) : Target Invoice
Type
The respective code for SAF-T
invoice type (FT, ND, NC,….).
Specify Sales Office
A company based in Portugal may have multiple sales offices from which the operations are
done. However, among those not all sales offices are necessarily relevant, or you may wish to
create a SAF-T(PT) file only containing the invoices of a specific Sales Office.
To include the invoices only from these specific sales office(s) in the SAF-T(PT), proceed as fol-
lows:
Use this customizing view to define the Sales Offices as needed. The corresponding Invoices
will be filtered to be included in the XML file.
Transaction: FIEU_SOFC to maintain table FIEUC_SALESOFC
Explanation of the table fields
Field Description Content
MANDT Client Client
LAND Country Fill with the Sales Office country
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 24 of 73
Field Description Content
BUKRS Company Code Company code for which SAF-T file will be
created and to which the sales office be-
longs.
VKORG Sales Organization Define the Sales Organization the Sales
Office belongs to
VKBUR Sales Office Define the Sales Office for which the in-
voice shall be filtered and included in the
SAFT(PT) file.
Restriction
1. Filtering invoices by Sales Office is only possible for Sales Offices located in Portugal
(Country is defined as “PT”), just as it is mandatory for the Company Code to be located
in Portugal as well, according to the restriction explained under chapter 3. Settings. If the
case is a company code in another country, with a sales office in Portugal, this solution
will not work.
2. The scenario for a foreign company code can only be realized through the implementation
of a BAdI method. Please refer to the BAdI documentation attached to SAP note
1987687.
3. In case there is more than one sales office, then the extraction / deletion of extracted data
must be done for all sales office in one step. It is not possible to extract/delete/create the
SAF-T file for each sales office at a time.
4. If you need to issue a monthly SAF-T (i.e. for e-Fatura purposes) for a non-Portuguese
company code, with a Portuguese sales office, you can only issue Billing SAF-T. You
cannot extract Accounting SAF-T for non-Portuguese company codes.
4.3 Country-Specific Settings in detail
In this chapter each of the sub-menus will be explained in terms of function, how to use it and the
meaning of the fields. You can access the customizing view by menu navigation as explained
above, or using the transaction code mentioned in each case.
Portugal à Specify Business Cases
Define system or business cases that apply to your company. The report will behave accord-
ingly when extracting the data or creating the file. Some of these options require additional cus-
tomizing.
This customizing task is mandatory.
Transaction: FIEU_BCP to maintain table FIEUD_BC
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 25 of 73
For a new entry, define the general parameters (country key, company code and validity dates)
and proceed to define the details in the frames below. Flag the options which apply in your com-
pany.
Explanation of the parameters
Master Data
Field Description Content
VEND_CUST_IND Vendors as Cus-
tomers
Check this to determine if the Vendor's manual
FI credit memos should be considered as man-
ual FI invoices during the XML file output.
INCL_SER_IND Service as Prod-
ucts
Report services as products in the XML file. This
is relevant if services are specified in the ASMD
table.
This indication is needed in order to properly fill
Product related information in the XML file for
the products maintained in the ASMD table.
COA_CONV_IND Chart of Account
Conversion
Indicate whether chart of account conversion or
changes to accounts have been performed in
previous years. This allows you to report the GL
based information as valid in that respective
year.
This setting can also be used in case you need
to reflect a different CoA in the file than the one
in the system (see details under chapter 9. Spe-
cial Configurations: FSV for GeneralLedger).
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 26 of 73
Master Data
Field Description Content
TAX_LINE_MAT_IND Tax like Material Special taxes on the invoice (e.g. luxury tax, al-
cohol tax, eco tax, etc.), other than VAT or
Stamp Tax, shall be shown in the XML file as an
invoiced product. Like for “normal” products,
there must be an entry in the Product master
data file section. In the sales document they are
shown in line items like an invoiced product.
MAIN_ALT_ACCT Main/Alternate
Account
Specifies which is the chart of accounts used in
the system for Portugal: the primary or the coun-
try chart of account.
Select M, if the Company Code uses the pri-
mary CoA for Portugal; or select A if the Com-
pany Code uses the country CoA for Portugal
TAXOREF Taxonomy Ref-
erence
This identifies the type of accounting standard
used by each business, per company code, as
defined in Portaria 302/2016.
S - SNC (ASS)-based accounting rules
N - International Accounting Standards
M - SNC (ASS)-based rules for micro-
companies
O - Other accounting systems (unde-
fined)
BUS_SECTOR Business Sector Check this box if the company's business sector
is related to the Insurance business.
Transaction Data
Field name Meaning
System data Select which billing documents, or which information regarding the
invoice payment to be extracted. The billing documents can be in
another module, or another system or of a specific kind for a specific
file type.
· Manual FI invoices
· Selfbilling Invoices
· FI-CA/IS-U
· RE Classic Data
· RE-FX
· IS-M
· Include Invoice Payment (4.1.4.20.6)
Enable the options that are applicable for your company.
The Include Invoice Payment (4.1.4.20.6) option allows to include
the payment information in the sub-structure 4.1.4.20.6 which for
performance reasons is excluded by default. This information is not
relevant from a fiscal point of view and may be included/excluded
according to the request of the Tax Authorities.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 27 of 73
Transaction Data
Field name Meaning
External data Select the source for invoices to extract; this can be another SAP
solution: Select an external source; this applies when you use other
systems that integrate in SAP (FI/SD). By making this setting, the in-
formation originated outside SAP, related to Invoice status, Invoice
number, Hash and Hash Control will be read from the respective
BAdI implementation. See chapter 7. Special Documents - External
Documents.
It can apply to accounting, billing and tax data.
Include FI-CA Data With the features in this box, you can include the data from an inte-
grated FI-CA module
Integrated FI + FI-
CA system
By checking this option, the data from the FI-CA systems will be in-
cluded in the file integrated with the FI data.
Stand-alone FI-CA
system
By checking this option, only the data from the FI-CA system will be
included in the file.
Portugal à Specify Tax Code Details
The tax master data (TaxTable) in the XML file requires tax information different from how it is
stored in the system. Use this view to specify the tax parameters as required to provide the VAT
information according to the requirements of SAF-T(PT). This information is needed in Master-
files/TaxTables and also in Sales Invoices.
Besides defining VAT or Stamp Duty, you can also use this table to make the settings for With-
holding tax. This information is required in Sales Invoices.
This customizing task is mandatory.
Transaction: SAFTPT_TAX to maintain table SAFT_PT_TAX_DATA
Explanation of the Table Fields
Field Description Content
MANDT Client Client
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 28 of 73
Field Description Content
TAXTYPE Tax Type Desc Define whether the tax code refers to
VAT (IVA), to Stamp Tax (imposto
de selo) (IS), or if it is not subject to
tax (NS).
TAXCOUNTRYREGION Country/ Region Country or Region according to Por-
tuguese tax regulation:
· For Mainland fill with PT
· For Madeira fill with PT-MA
· For Azores fill with:PT-AC
TAXCODE Tx Tax code in SAP system used for
VAT, Stamp Duty or Withholding tax
TAX_CODE_OFFICIA Tax.Code SAFT TaxCode, which classifies the
tax code according to its nature; this
information is required in TaxTables
and in Sales Invoices:
for TaxType = IVA:
· «RED» for reduced rate;
· «INT» for intermediate rate;
· «NOR» for normal rate;
· «ISE» for exempted rate;
· «OUT» for other;
· «IRS» for Withholding tax;
for TaxType = IS,
· fill with the official Stamp
Tax Law Code;
For TaxType=NS,
· fill with NS
TAXEXPIRATIONDAT Tax Expiry date End of validity: last valid date for this
tax rate. Do not fill any date if the tax
code is still in force.
DESCRIPTION Text For TaxType=IVA: fill with the de-
scription of the tax code as required
by law in the invoice.
For TaxType=IS: fill with description
of the tax event according to the
Stamp Duty Law.
TAXPERCENTAGE Condition Rate Fill the value of the tax percentage
(only the number, not “%”). If the tax
is not based on a percentage, do not
fill this field. For tax exemption or not
subject to tax fill with 0.
TAXAMOUNT LC tax amount Tax amount in local currency (EUR):
fill only in case tax is defined as
amount
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 29 of 73
Field Description Content
TAXEXEMPTIONREAS Tax Exemption.Reason Reason for Tax Exemption: manda-
tory when TaxPercentage or TaxA-
mount is zero (exempted or not sub-
ject). Fill with applicable legal funda-
ment; This information is required for
Sales Invoices
TAXCURRENCY Currency EUR
TAXEXEMPTIONCODE Tax Exemption Code ID code which identifies the reason
for tax exemption.
Example:
Client
Tax
Type
Desc1
Country/
Region
Tax
Code
Off.Tax.
Code
Tax Expiry
date
Text Rate
Tax
Amou
nt in
LC
Tax Ex-
emp.Rea-
son
Crcy
TaxEx
emp
300 IVA PT A1 NOR 30.06.2010
IVA à
Taxa nor-
mal …
20 EUR
300 IVA PT A1 NOR
IVA à
Taxa nor-
mal …
20 EUR
300 IVA PT A2 ISE
Isento de
IVA,
CIVA….
0
Isenção
artº….
EUR M08
300 IS PT X8 4
Cheques
de
qualquer
natureza
1.00 EUR
300 IVA PT M1 IRS
Retenção
IRS
22 EUR
300 NS PT XY NS
Não su-
jeito
0
Não su-
jeito
EUR M99
1
In case an invoice document is issued without a Tax Code the report will see this as a non-tax-
able transaction and by default, fills the fields as a non-taxable invoice. The report will assign
the following values:
TaxType - NS
TaxCountryRegion - PT
TaxCode - NS
TaxPercentage - 0
TaxExemptionReason - Não sujeito
TaxExemptionCode - M99
Portugal à Define Ranges for Internal Documents
Internal Documents are documents which you do not want to user for SAF-T file creation, as they
do not meet the legal requirement for an invoice. You must identify documents you consider as
internal document in SD, by defining a number range to which these documents must belong.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 30 of 73
Please note: When a document is considered as an internal document it is only possible to ex-
clude the ones that don´t have a customer line in the accounting document.
If the accounting document of the SD invoice has a customer line, it must be reported in Table
4.3 and cannot be excluded from Table 4.
For more information, please refer to 3.1.1.1.2 Internal SD documents not posted in Accounting.
Transaction FIPT_DOC_EXC
Explanation of the Table Fields
Field Description Content
BUKRS Company Code The organizational unit within finan-
cial accounting.
FKART Billing Type
NUMKI Number Range This defines a number range for in-
ternal documents. The number
range typically determines the docu-
ment type.
INACTIVE Inactive Determines if number range is inac-
tive or not.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 31 of 73
Field Description Content
WRKTYPE Work Type SAF-T files require a Work Type for
Working Documents.
· CM Table Consultation
· CC Consignment Credit
· FC Consignment Invoice
· FO Worksheets
· NE Order Forms
· OU Others
· OR Quotations
· PF Pro Forma
· DC Issued Documents
· RP Bonus or Bonus Re-
ceipt
· RE Reversal or Receipt of
Reversal
· CS Attribution to Co-In-
surer
· LD Attribution to Leading
Co-Insurer
· RA Accepted Re-Insur-
ance
Portugal à Define Alternate Accounts
Some companies may have carried out a Chart of Accounts Conversion (legally required in
2010 in Portugal), or simply changed a few accounts. In such cases the accounts history (for-
mer account number and name) may be lost.
In the SAF-T (PT) file, however, the data must be shown according to the facts of the reporting
year. For example, if a conversion was performed during 2010 and a SAFT file for 2009 is to be
created, the accounts’ data must correspond to the information valid in 2009.
Use the customizing table SAFTPT_ALT_ACCTS, to maintain account information that is devi-
ating from the currently set parameters.
Whenever an entry exists in this table for the given company code, fiscal year and account it is
taken into the file, otherwise the actual account will be taken from the accounts master data (ta-
ble SKB1).
Transaction: SAFTPT_ALTACCTS to maintain table SAFTPT_ALT_ACCTS
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 32 of 73
Explanation of the Table Fields
Field Name Description Meaning
MANDT Client Client
F_BUKRS CoCd Define a company code range for
which the account definition is validT_BUKRS Co.Code
VALIDTO Year
Fiscal year until which the defined
account parameters are valid
PRIMARYACCOUNT G/L Account
Current account number of the Main
Chart of Accounts
ALTERNATEACCOUNT Group acct no.
Account number as valid in given fis-
cal year for SAF-T (PT) file
Example:
Scenario 1:
In Company Code PT01, Chart of Accounts for Portugal (CAPT) is the main chart of accounts in
SAP system; You choose to create the SAF-T (PT) file with the option “Primary Chart of Ac-
counts”.
In 2009 account 100000 existed in CAPT. However, in 2010 it was replaced by a new account
with another account number 300000.
à SAFT-PT file for 2009 shall show account 100000 (in MasterFiles and GeneralLedg-
erEntries)
SAFT-PT file for 2010 shall show account 300000 (in MasterFiles and GeneralLedg-
erEntries)
à Customize SAFTPT_ALT_ACCTS:
CoCd Co.Code Year G/L Account Group acct no.
PT01 2009 300000 100000
Scenario 2:
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 33 of 73
In Company Code PT02, Chart of Accounts for Portugal (CAPT) is the Alternative Chart of ac-
counts in SAP system; You choose to create the SAF-T (PT) file with the option “Country Chart
of Accounts”
In 2009 the main account 100000 had the alternative account 1000 assigned;
In 2010 a new account is assigned to the same main account: 3000.
à SAFT-PT file for 2009 shall show account 1000 (in MasterFiles and General Ledger En-
tries)
à SAFT-PT file for 2010 shall show account 3000 (in MasterFiles and General Ledger En-
tries)
à Customize SAFTPT_ALT_ACCTS:
CoCd Co.Code Year G/L Account Group acct no.
PT02 2009 3000 1000
Portugal à Specify Prefix for Material Numbers
Use this view to specify a prefix for the Product code that identifies the real estate service. This
may be needed to avoid duplication of Product codes and to assure that the Product code is
unique.
See more detailed information in chapter Special Configurations: Products in FI Invoices.
Transaction: SAFT_MATPRE to maintain table PTSAFT_MATPRE
Explanation of the Table Fields
Field Name Description Meaning
BUKRS CoCd
Company code for which SAF-T file
will be created.
MAT_PREFIX Prefix of M No.
Prefix that is concatenated to the
Product ID derived from other pa-
rameters (see chapter 10. Special
Configurations: Products in FI In-
voices)
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 34 of 73
Portugal à Source Document Mappings
The following customizing tasks can be performed:
· Map payment method to payment mechanism
· Specify Details for Tax like materials
4.3.4.1 Map Payment Method to Payment Mechanism
Use this transaction to map the payment method customized in the system (specified in an in-
voice) to the payment mechanism indicators as required for SAFT file. The payment mecha-
nisms are to be reported with the following values in the SAF-T file:
Payment
Mechanism
according to
SAF-T
Meaning
CC Credit Card
CD Debit Card
CH Check
CO Check or gift card
CS Compensation of balances
DE Electronic money, e.g. customer loyalty card or points card, etc. ;
LC Bill of exchange
MB Multibanco reference (Portugal specific payment method);
NU Money
OU Others
PR Exchange of goods;
TB Bank transfer or authorized direct debit;
TR Restaurant Ticket
The following payment methods customized in the SAP system are already mapped by default
in the program:
Payment Method acc. to SAFT Payment Method in SAP
C CH
T TB
If it's required to map any other payment methods other than the above-mentioned default val-
ues, then this has to be customized in this view. If no entry is maintained in this table, then the
program takes the value OU (=other) by default to fill this field in the SAF(T) PT file.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 35 of 73
Transaction: FIEU_PAYM to maintain table FIEUD_PAYM
Explanation of the table fields:
Field Description Content
MANDT Client Client
LAND1 Country Country PT
BUKRS Company Code Company code for which SAF-T file
will be created.
VALIDITY_FROM Valid from Start date of the validity period
VALIDITY_TO Valid to End date of the validity period
PAY_MECH Payment Method Specify the relevant SAP payment
method (C, T …).
TARG_PAY_MECH Payment Mechanism Select the respective code for SAF-
T (PT) payment mechanism (NU,
CH, TB,…).
4.3.4.2 Specify Details for Tax Like Materials (Product)
Special taxes other than VAT or Stamp Tax shall be treated as an invoiced product (e.g. excise
duty, specific ecological charges, etc.). In terms of SAP system such taxes are normally defined
in the SD pricing conditions. These pricing conditions shall be found and shown as a separate
line item in the invoice, net of VAT. All line item amounts and VAT amounts are recalculated ac-
cordingly:
· DebitAmount/CreditAmount (SAFT fields 4.1.4.19.13 and 4.1.4.19.14): indicate the
amount of the tax/charge/fee in question, net of VAT. In case it is subject to VAT and
the VAT amount is included in the amount given by the pricing condition, the VAT
amount is substracted automatically by the program.
· Tax (4.1.4.19.15): the VAT information regarding this tax-like-material, in case it is sub-
ject to VAT, will be filled in these fields. The VAT amount, subtracted automatically from
the amount given in the pricing condition, is shown here.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 36 of 73
These taxes must also have an entry in Masterfiles/Product, as they represent a product. For
this, a customizing table must be maintained in order to define the “product” information, e.g.
product number, product type, etc.
The respective pricing conditions in the SAP system must be identify and customized in table
SAFTPT_IMAT.
Transaction: SAFTPT_TAXMAT to maintain table SAFTPT_IMAT
Explanation of the table fields:
Field Description Content
MANDT Client Client
BUKRS Company Code Company code for which SAF-T file
will be created.
TAXLIKEMAT TaxLikeMaterial Indicate the pricing condition of the
tax-like-material. It will also be taken
as Product ID.
MATKL Material Group for SAFT-PT Material Group for Tax like material
EAN11 EAN/UPC International Article Number
(EAN/UPC); identical with the
ProductID
VAT_RELEVANT VAT Relevant VAT relevant Indicator: indicate
whether the tax is subject to VAT. In
case the pricing condition is defined
as “Surcharge” (Condition Class =
A) => non-relevant; in case the pric-
ing condition is defined as “Taxes”
(Condition Class = D) => relevant.
PRODUCT_TYPE Tax-like Material Value The following values are possible:
O=Other, E=Special Consumer
Taxes; I= Taxes, Levies & Parafis-
cal Charges;
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 37 of 73
Portugal à Define Taxonomy Codes
Portaria 302/2016 introduced the concept of taxonomy classification codes (Taxonomy Codes),
as described in the official taxonomy lists published in Annex II and III of the Portaria, by the Tax
Authority in Portugal. These Taxonomy Codes must be customized to indicate the accounting
standard associated with each Taxonomy Code.
Transaction FIPT_TAXOCODE to Customize table FIPTC_TAXOCODE
Explanation of the table fields:
Field Description Content
TAXOREF Taxonomy Reference Enter the accounting Taxonomy Ref-
erence for your company code.
According to Portaria 302/2016 all
Portuguese companies must have as-
signed a Taxonomy Reference, which
will identify the type of accounting
standard used by the company.
TAXOCODE Taxonomy Code Enter a Taxonomy code to classify
your company's G/L accounts ac-
cording to the official classification
provided by the Tax Authorities.
DESCRIPTION Taxonomy Code Description Manual entry of the description for
this Taxonomy Code.
Portugal à Assign Taxonomy Codes to G/L Accounts
To each G/L account under one Company Code, and validity period, you must assign a Taxonomy
Code.
Transaction: FIPT_TAXOACC to Customize table FIPTC_TAXOACC
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 38 of 73
Explanation of the table fields:
Field Description Content
BUKRS Company code
BEGDATE From Date Define the beginning date of a validity
period for the assignment of Taxon-
omy Codes to G/L Accounts.
ACC_FROM From Account Define the beginning of a range of
G/L Account numbers for the assign-
ment of Taxonomy Codes.
ENDDATE To Date Define the end date of a validity pe-
riod for the assignment of Taxonomy
Codes to G/L Accounts.
ACC_TO To Account Define the end of a range of G/L Ac-
count numbers for the assignment of
Taxonomy Codes.
TAXOCODE Taxonomy Code Classify your company's G/L Ac-
counts according to an official classifi-
cation provided by the Portuguese
Tax Authorities
5 Data Extraction
The next step is to perform the data extraction, in order to fill the RPFIEU_SAFT extraction ta-
bles (FIEUD_FIDOC_H, FIEUD_FIDOC_I, FIEUD_FISUMMARY, FIEUD_SDINV_H, etc.).
Settings Extract
Creation &
Download
Validation
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 39 of 73
These tables are the basis for data retrieval while running the report. Before running the extrac-
tion you must take some decisions:
- For which purpose do you want to create the file?
- For how many/which periods do you want to create the file?
- Do you want to create a file containing all sections, or only a few?
The answers to these questions determine the scope of the SAFT file.
NOTE:
Invoices should always be created in “normal” periods (1-12). Special periods are meant for
special accounting activities, such as results determination, account transfers, etc. If there is the
case of invoices being posted in special periods, this will be reflected in the SAFT file and return
an error by the AT-portal validation.
The master data to populate the Masterfiles section is read directly from the system tables dur-
ing the XML file generation; no specific RPFIEU_SAFT extraction tables are used in this case.
This is important to bear in mind especially if you perform frequent data reorganization that im-
plies deletion. Once you delete master data it is no longer available in the database tables.
Thus, you should create the XML files before deleting data. In case you archive data, you need
to use the function to retrieve data from the archives.
5.1 Running the Data Extraction
Execute RPFIEU_SAFT report and then select the Extract Data option.
The selection screen for the data extraction will open. Here you can make your selection ac-
cording to the scope of the file you want to create. Consider the explanation of each field shown
below.
First you determine whether you want to extract data and fill the RPFIEU_SAFT tables, or if you
first want to delete the current content of the RPFIEU_SAFT tables. If the RPFIEU_SAFT tables
are populated with data from a previous run - for the same or an overlapping period of time -
you must first delete it before running the extraction you need, unless the content is exactly the
one you need.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 40 of 73
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 41 of 73
Field name Meaning
Extract
By selecting this radio button you determine that you want to extract
data and populate the RPFIEU_SAFT tables
Delete
By selecting this radio button you determine that you want to delete
data from the RPFIEU_SAFT tables
Extract Module
Choose the module for which you want to perform the action. Press
F4 key to see the possible values. For Portugal all modules are
valid, except 5-Assets and 6-Purchase Invoices.
An extraction for each module has to be run if data from both mod-
ules has to be included in the same file.
Company Code
The company code for which you wish to run the extract and create
the XML file, or remove data from the RPFIEU_SAFT extraction ta-
bles.
Extraction Date
Specify the date interval of the data to be extracted, or of the extract
to be removed. You can choose the date interval by pressing F4
key. NOTE: This selection is based on the date configuration made
under chapter Portugal à Specify Business Casesas described
above.
The Date field provides an F4 help option that allows you to see the
intervals that have already been extracted. This will help the user to
choose the correct time intervals and/or the correct extract that al-
ready exists, instead of re-creating it.
You must adjust the extraction dates to the XML creation date inter-
val you will use. The interval must match with the period of the fiscal
year that is reported.
Fiscal year
The fiscal year for which you create the extract and want to create
the XML file.
If the fiscal year as defined in the company code is not identical to
the calendar year, the user does not need to worry about that. The
program will always retrieve the data based on the fiscal year.
Note: The SAFT(PT) file is always created based on fiscal year, not
on calendar year. Companies that use a fiscal year that is different
from the calendar year must be aware that they will not be able to
create one file based on calendar year, if the fiscal year goes across
years.
Non-calendar fiscal years must follow the rules of the IRC Code
(Corporate Income Tax Law). Data of SAFT(PT) field 1.8 FiscalYear
must corresponds to the year of field 1.9 StartDate.
Database Use this option to retrieve data from the database.
Includes archive
If documents from the database are linked in the document flow with
archived documents you must select this option to additionally in-
clude the archived data.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 42 of 73
Field name Meaning
Archive
Use this option to retrieve archived data of the selected extract mod-
ule.
If in the selected interval some documents are in the database and
others archived, you must run two extractions. One with Database
option and a second one with the Archive option.
If the archived data is to be retrieved from FI and SD but the ar-
chives cover different periods of time, the archives must be ex-
tracted individually. This mixed situation is presently not covered.
Extract
Extract the data into the extract tables for a single period, for the complete fiscal year or for a
freely defined interval. The data extracted includes:
· FI transactional data for Accounting data (GeneralLedgerEntries)
· SD transactional data for Billing data (SalesInvoices)
· FI transactional data for Billing data, i.e. FI invoices (SalesInvoices)
Note: make sure that all settings are correctly done as described in chapter Settings.
Choose Extract to run the data extraction from relevant modules (Accounting / Billing). Addition-
ally, the report will also calculate the total values (total entries, total debit and credit) during the
extraction.
If the data volume is high, execute the report in background mode.
If the tables already contain extracted data it is only possible to extract a distinct date interval in
order to add data. It is not possible to run the extraction for overlapping date ranges.
Restrictions:
Delete
Choose Delete under operation selection if you want to remove extracted data from the table.
This can be useful e.g. when
· New documents have been posted in a period after RPFIEU_SAFT data was last ex-
tracted.
· Customizing settings have been changed and a new RPFIEU_SAFT extraction is
needed with the new settings.
· You have previously created an extract with the wrong selection criteria.
· The data is no longer needed
· The table size has reached storage limit
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 43 of 73
Note: when deleting RPFIEU_SAFT data you should be using the same dates’ definition you
used when creating the extract. Partial deletion is not possible, extracted dates can be selected
from F4 help.
System messages while executing
While running the extraction, file creation or deletion the following situations will trigger a mes-
sage:
Extraction / Creation:
· Error message when only for “from date” is selected
· Information message when no data is present for extraction.
· Success message when data has been successfully extracted.
· Error message if the extraction is performed for already extracted date range.
· If the fiscal year set is different from the fiscal year of the interval. The same error mes-
sage will appear if the dates given belong to different fiscal years.
· If the company code indicated is not configured in the customizing table.
Creation:
· If the dates indicated belong only partially to one of the extracted intervals.
Deletion:
· Information message to avoid partial deletion.
· Success message when data is deleted successfully.
Administration
If new postings are made in a period which has already been extracted, the table content must
be deleted and the period re-extracted.
Note that accounting documents must be extracted if there are FI invoices even if GeneralLedg-
erEntries are not to be included.
Application Log
Once the file creation is concluded the system creates a log reporting the number of entries for
each master data section as well as for the transaction data. The log is shown right after the ex-
ecution. However, all logs will be stored in the system and can be consulted at any time later.
To view the log, proceed as explained below.
Transaction: SLG1 to access the application Logs created during the different stages of the
SAF-T file creation process.
The Analyze Application Log screen will open (see image below). Enter the selection data as
explained in the table below.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 44 of 73
Field Description
Object Enter RPFISAFT_LOG
Sub Object In case of the SAF-T (PT) (i.e. for Portugal) enter PT in this field
External ID This field can be left blank
Time Restriction
From (Date/time) From Date / time information of the interval when the
RPFIEU_SAFT report was executed
To (Date/time) To Date /time information of the interval when the RPFIEU_SAFT
report was executed
Log Triggered By
User If known, enter the user name of who had executed the report
Transaction Code Enter *, for any transaction
Program Enter RPFIEU_SAFT
Log Class Select the “All Logs” option
Log Creation Select the “Any” option
Log Source and
Formatting
Select the “Format Completely form Database” option
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 45 of 73
After having defined all selection fields, press execute or F8 to run the log. In the next screen,
as result of running the log, a list containing all application logs that correspond to the selection
criteria will be shown.
The red, yellow or green symbol will tell you whether there were any errors in the execution.
Double click on the exectution you want to see in detail and check the details in the frame
below.
The counter beside the symbols shows the number of existing incidents for
each situation, e.g. errors, warnings and simple information.
Look for the critical entries and analyse the error. This can be for instance missing information
of a particular field, missing accounting document to a particular invoice, etc.
6 File Creation
The next step is to perform the file creation, in order to obtain the XML file.
For this choose the option “Create File”. As you click on that radio button the selection screen
opens. Consider the explanation of each field shown below.
Settings Extract
Creation &
Download
Validation
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 46 of 73
Field name Meaning
Company Code The company code for which you created the extract and want to
create the XML file.
Tax Accounting Basis ‘TaxAccountingBasis’ field in File Header: Specify which data to in-
clude in the file: C=Accounting; F=Billing; I=Integrated Accounting
and Billing; S=Self Billing; P=Partial Billing.
Depending on the option you select the following data will be in-
cluded in each case (see chapter 2.1):
I = complete data included in the SAF-T (PT) file
• Master data GL accounts with the opening and closing balance
• Master data Customers
• Master data Suppliers
• Master data Products
• Master data Tax Table
• General Ledger Entries
• Source Documents (SalesInvoices, MovementOfGoods, Working-
Documents, Payment)
C = Only accounting information included in the SAF-T (PT) file
• Master data GL accounts with the opening balance
• Master data Customers
• Master data Suppliers
• Master data Tax Table
• General Ledger Entries
F and P = Only Billing information included in the SAF-T (PT) file
• Master data Customers
• Master data Products
• Master data Tax Table
• Source Documents
Date Date interval for which you created the extract and want to create
the XML file.
Fiscal year The fiscal year for which you created the extract and want to create
the XML file.
Tax Entity Tax entity, which indicates the establishment that the generated
SAF-T file.
Header Comment Field ‘HeaderComment‘ in File Header: fill with your own free text
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 47 of 73
Field name Meaning
File Name File name and path of the target XML file you want to create.
If you have maintained a directory set in transaction FTWP (see
customizing details for FTWN Directory Set) you should respect
specific rules in this field: only file name (without file path) should
be provided, otherwise the XML will be generated in the path spec-
ified, but will not be accessible from FTWN transaction. An entry
would be present in the transaction FTWN for the file.
6.1 Rules
For yearly reporting only one Accounting file shall be created for the entire year. Billing files can
be created in multiple smaller files (e.g. per period).
Monthly file: The following rules apply:
· When to run: every month
· What to report: Masterfiles: Customer and Taxes; SourceDocuments: Sales invoices
(Billing and FI Invoices), VATon CAsh Payments
· Deadline: 25th of the following month
· How: Submit the file on the portal
Annual file: The following rules apply:
· When to run: at year end closing or upon request from the Tax Authorities
· What to report:
o Masterfiles: GeneralLedger, Customer, Supplier, Product, TaxTable;
o SourceDocuments: SalesInvoices (Billing and FI Invoices), MovementOfGoods,
WorkingDocuments, Payments
o GeneralLedgerEntries
· Deadline: According to “when to run” specified above.
· How: hand over the file to the TaxAuthorities
7 File Download
To download the file to your local PC, run the report RPFIEU_SAFT and proceed with the
Download File option.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 48 of 73
If you choose Download File, an additional frame will open below, with 3 options. These options
refer to the estimated file size. Select the option that is most suitable for your case. The report
will keep this configuration for the future, but you can change it anytime with the Back (F3) but-
ton.
There are 3 options,
· Small to medium files (up to 300 MB): select the ‘File size < 300MB option
· Larger files (more than 300MB up to 1GB): select the File size < 1GB option
· Very large files (more than 1 GB): select the File size > 1GB option
Each option has its own behavior, as explained below:
· For option 1 – File Size < 300 MB (Program RFASLDPC): the following screen will
open:
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 49 of 73
Field name Meaning
Source file This field is pre-filled with the generated file; you can also
choose another file.
Input the data used in RPFIEU_SAFT, option Create File,
field File Name.
File type Fill with “**”
Delete source file Check only if you want to delete the file from the server
Copy source file Check this field if you don’t want to remove the file from the
server
Change byte order Leave this field empty
Target disk drive Choose the target drive, or press the Selection of Path and
File button.
Subdirectory (hard disk) Define the target directory
Target file Define the target file name
Standard Code Page 1100 Do not check this option
SAP Logon code Page Do not check this option
No Character Set Conversion Check this option
Manual Entry of Code Page Do not check this option
Target Code Page Do not check this option
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 50 of 73
Press the Execute button to download the file. The file download will be confirmed with the fol-
lowing message on the next screen.
· For option 2 – File Size < 1 GB (Transaction CG3Y): the following screen will open:
Field name Meaning
Source file on application
server
Indicate the source file path and name.
Input the data used in RPFIEU_SAFT, option Create File,
field File Name.
Target file on front end Define target path and file name on the local pc
Transfer format for data Define as “BIN”
Overwrite file Check this box if you want to overwrite a previously saved
file with the same name.
Press the Download button to download the file. The file download will be confirmed with the fol-
lowing message on the next screen.
· For option 3 – File Size > 1 GB (Transaction FTWN): the following screen will open:
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 51 of 73
If you have previously made the right settings to use this option (see customizing and file crea-
tion details) the XML file will be stored in the FTWN environment, in the directory set defined
and under the corresponding fiscal year as indicated for the file creation. The following window
of the FTWN environment will open:
Drilldown to the file you are looking for by opening the fiscal year folder, the SAFT directory set
you defined and you will find the file(s) that have been created. The file will remain here until
you delete it. You can now use the Export to local file function in the upper menu to download
the file to the local PC.
Note: if downloading the file is not possible due to size issues you can also get it directly from
the server.
8 File Validation
In order to confirm that the file is according to the legal requirement in terms of structure please
use the official validator from the Tax Authorities.
Select the Option: Validate file.
If you choose Validate File, the system displays the following screen:
Settings Extract
Creation &
Download
Validation
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 52 of 73
Online validator:
http://info.portaldasfinancas.gov.pt/apps/SAFT-pt03/
Use this link to validate files that contain invoices that are digitally signed. Use the application
provided on the portal of the Tax Authorities, that you can install locally.
Validator installed locally:
Click on the following link and download the application as shown below:
http://info.portaldasfinancas.gov.pt/apps/SAFT-pt03/local/validador_v1_03.exe
This application requires you to indicate the public key. Be sure to have it at hand. This key is
different regarding test and productive environment.
Note: The validation of a file created in a system other than the productive system will return er-
ror, as the public key is not known for test systems.
When submitting a monthly SAF-T (PT) file for the purpose of reporting invoices to the Tax Au-
thorities (https://faturas.portaldasfinancas.gov.pt/home.action), another file validator is provided.
This validator excludes some of the validations as they are not relevant for this purpose. It is au-
tomatically called when submitting the file in the portal of the Tax Authorities without the user
noticing.
9 Special Documents - External Documents
Sometimes companies use other billing software to create invoices or delivery documents, apart
from the SAP system. Such invoices are digitally signed and included in the SAFT file in the
source software.
Sometimes these invoices are integrated in the SAP ERP. In that case, they must be included in
the SAFT file that is created in the SAP system, identified as external documents. According to
SAFT instructions, the documents must be handled differently.
This chapter covers invoices, debit and credit memos and delivery documents. Working docu-
ments (SAFT table 4.3) can also be affected. Though they are not specifically mentioned here,
the same rules apply.
Documents that are integrated in the target system in the Accounting section only are not rele-
vant for this process, as they are not integrated as invoices and therefore not relevant for the
Billing file. Such documents are included in the GeneralLedgerEntries (table 3) file section only
and are not subject to any special handling.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 53 of 73
9.1 Integration of documents in SAP SD via summary
documents (n:1)
If the integration is achieved via summary documents into SAP SD, it is important to ensure the
following:
- Use a specific number range when integrating such summary documents in the target
system.
- Integrate this document in the SAFT file of the target system, considering the following
rules:
o The InvoiceStatus field shall be filled with R (R stands for summary document
that includes other documents created in another application, e.g. a document
that includes all the invoices to a specific customer issued in a specific period)
o The Hash and HashControl fields must contain the digital signature infor-
mation from the target system (SAP)
9.2 Integration of documents in SAP SD via detailed doc-
ument (1:1):
If the integration is achieved by integrating the original document into SAP SD, on a 1:1 basis, it
is important to ensure the following:
- The values/amounts calculated in the source system must not be changed.
- Use a specific number range when integrating such documents in the target system.
- Integrate the information of the digital signature from the source system.
- When printing, the phrase ‘Cópia do documento original’ must be mentioned on the
printout.
- Integrate this document in the SAFT file of the target system (using a BADI*), consider-
ing the following rules:
o Fill HashControl field in tables 4.1 as follows: certificate number from the
source software + dot + version of the certificate of the source software. Exam-
ple: “9999.1”; where 9999 is the certificate number and 1 is the certificate ver-
sion key.
In case the source application is not a certified software, fill the HashControl
field with the phrase ‘Não certificado’
o Fill Hash field with the digital signature created in the source software.
In case the source application is not a certified software, fill the Hash field with
‘0’ (zero).
o Fill SourceBilling with the value ‘I’
o In case the source application is not a certified software, the Hash field should
be filled with ‘0’ (zero) and the HashControl field with the phrase ‘Não certifi-
cado’
* Check note 1987687 - Documentation for BAdI methods for report RPFIEU_SAFT for the spe-
cific BAdI “IDENTIFY_EXT_INVOICES_SD"
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 54 of 73
9.3 Documents created manually outside the system (on
paper)
Documents that are created manually on paper, i.e. in case of system downtime, and later inte-
grated in the billing and accounting system should follow specific rules:
- Use a specific number range when integrating such documents in the target system and
activate the digital signature for such documents.
- Integrate this document in the SAF-T file considering the following rules:
o Fill HashControl field in tables 4.1 and 4.2 with the certificate key version + hy-
phen + the SAFT document number; add the value ‘M’ at the end of the docu-
ment type (which is part of the SAF-T document number). Example: 1-FTM
abc/00995, where ‘FT’ is the document type; ‘M’ is the added value that identi-
fies the document as a manual document; ‘abc’ is the series and 00995 is the
sequential number.
10 Special SAF-T file – Selfbilling
Special SAF-T files are files that are issued when special business scenarios exist, for instance
Selfbilling. All steps described above apply to the special SAFT files as well. The specificities are
described here.
Selfbilling invoices are invoices that a company issues to itself on behalf of the vendor. These
are invoices that need to be reported in the SAF-T (PT) file, namely in the SourceDocuments –
SalesInvoices section of the SAF-T structure.
When this scenario is practiced it is assumed that an agreement exists between the selling and
buying party. In practice, Selfbilling invoices are issued by the client. Being documents that are
reported as Sales Invoices they must be reported by the Selling party. However, they are cre-
ated in the buyer’s system According to the legal requirement of the SAF-T file, the SAF-T file
should always be created in the system where the data is created and the reported documents
are issued.
From this, it is clear that it is the Buyer (the issuer of the Selfbilling invoices) who is obliged to
create the Selfbilling SAF-T file. Once the file is created, he hands it over to the vendor, who
eventually submits it to the authorities.
Note: It is necessary, and legally required, to create one separate SAF-T file per Selfbilling ven-
dor. Each file contains the Selfbilling invoices, Products and Vendor data pertaining to that spe-
cific vendor only. There will be as many Selfbilling SAF-T files as there are Selfbilling Vendors
with Selfbilling invoices in the reporting period.
The Selfbilling SAF-T file shall not be integrated with any other SAF-T file. The structure of the
file is described next.
10.1 Selfbilling documents and vendors in SAFT
The self-billing files are to be generated for each vendor with whom the company has the self-
billing agreement set.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 55 of 73
Selfbilling vendor
To define a vendor as Selfbilling vendor, you need to do the appropriate settings in the vendor
master record. Go to the vendor’s master record and in the Purchasing data tab flag the Au-
toEvalGRSetm Del. and AutoEvalGRSetm Ret.checkboxes.
Self-billing documents
Only invoices created with the following transaction and certified according to legal requirement
are considered when creating the Selfbilling SAFT file in SAP:
§ MRRL: Evaluated Receipt Settlement
§ MRKO: Settle Consignment/Pipeline Liabs.
§ MIRO: Enter Incoming Invoice
Note: other transactions used to generate Selfbilling invoices, including invoices generated in
FI, are not supported.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 56 of 73
10.2 Selfbilling file structure
The structure differs only very little from the normal Billing SAFT-T file, the so-called “F” file
(TaxAccountingBasis = F). The differences are specified here. In all other aspects the same
rules as for F-files apply.
Yearly File
The Yearly Selfbilling SAF-T file includes the following file sections, with the respective content:
· Table 1: Header (content: data of the Supplier company)
· Table 2: Master Data
o Table 2.2 – Customer (content: data of the invoice issuer – only one entry)
o Table 2.4 - Product (content: only the products mentioned in the invoices)
o Table 2.5 - TaxTable (content: only the tax information from the included in-
voices)
· Table 4: SourceDocuments
o Table 4.1 – SalesInvoices (content: self-invoices issued on behalf of the par-
ticular supplier mentioned in the Header)
Monthly File
The Monthly Selfbilling SAF-T file includes the following file sections, with the respective con-
tent:
· Table 1: Header (content: data of the Supplier company)
· Table 2: Master Data
o Table 2.2 – Customer (content: data of the invoice issuer – only one entry)
o Table 2.5 - TaxTable (content: only the tax information from the included in-
voices)
· Table 4: SourceDocuments
o Table 4.1 – SalesInvoices (content: self-invoices issued on behalf of the par-
ticular supplier mentioned in the Header)
According to the general rules of the monthly SAF-T file, the Product table (2.4) is not included.
10.3 Settings for Selfbilling file
Before using the RPFIEU_SAFT report to create the Selfbilling SAFT file, a few configurations
must be made. These are described in this chapter.
How to access the customizing views
Follow the instructions detailed under the chapters How to access the customizing views and
Country-Specific Settings -> Portugal to access the settings area. You will find a submenu that
is meant for Selfbilling settings only.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 57 of 73
10.1 Country-Specific Settings for Selfbilling
In this chapter the Selfbilling relevant sub-menus will be explained in terms of function, how to
use it and the meaning of the fields. You can access the customizing view by menu navigation as
explained above, or using the transaction code mentioned in each case.
Portugal à Specify Business Cases
Follow the instructions detailed under chapter Portugal Specify Business Cases and enable the
Selfbilling business case.
Portugal à Specify Destination of XML files storage
When files for multiple vendors are to be generated maintain the file path where the files shall
be stored in the application server by maintaining the information here.
Transaction: FIEU_PATH to maintain table FIEUC_SBXML_PATH
Explanation of the Table Fields
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 58 of 73
Field Name Description Meaning
LAND1 Ctr Country Code
BUKRS CoCd Company Code
INV_SOURCE Invoice Source
Choose Self Billing (MM module ) in-
voices generated via MRKO/MRRL
transaction
FILE_TYPE File Type Choose Self Billing
FILE_PATH File name
Provide the complete path and file
name in the server where you wish
to store the files.
Portugal à Generate Selfbilling files
Here you make the settings regarding which transaction and document type you use to create
Selfbilling invoices for a vendor.
Transaction: FIEU_SBINFO to maintain table FISAFTPTC_SBINFO
Explanation of the Table Fields
Field Name Description Meaning
BUKRS Company Code Company Code
LIFNR SAFT PT: Self Billing Vendors ID of the vendor
BLART Document Type Document Type used for that vendor
VALIDFROM Date for beginning of validity Date from which this setting is valid
VALIDTO Date validity ends Date until which this setting is valid
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 59 of 73
Field Name Description Meaning
SHKZG Debit/Credit Indicator Is the posting made as debit or credit
TCODE Transaction Code
Transaction code used to post the
Selfbilling invoice. This can be either
MRRL or MRKO. If all transactions
are used for the same vendor, main-
tain the value BOTH.
10.2 Data Extraction for Self-billing file
Proceed as described under chapter Data Extraction in order to extract Selfbilling data, choose
the respective Extract Module 9 Self Billing. Upon filling the selection parameters, a new user
input sub window appears. It is specific for the Selfbilling scenario and allows you to choose the
vendors for whom you want to run the report and create the file.
Options:
§ Extract for individual Vendor: choose this option to run the file only for specific Vendors
§ Create data for All Vendors: choose this option to run the file for all Vendors at once. A
Selfbilling SAFT file will be created for each of the vendors entered in the customizing
table as described under chapter Portugal -> Generate Selfbilling files.
§ Selfbilling Vendor: fill this field with the vendor ID or vendor ID range according to the files
you want to create. These selection fields are available for the Extract for individual Ven-
dor option only.
Continue as described under chapter Data Extraction.
In the case of Selfbilling SAFT file creation the log will refer to the data related to the Selfbilling
vendors set, whether documents exist, etc.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 60 of 73
10.3 Deleting Extracted data for Selfbilling file
To delete the extract for re-extraction of data for the same vendor for already extracted periods
or for clearing the database after the submission process is completed and verified, if needed,
select the option Extract Data > “Delete” as shown below.
Like the Extraction, the Deletion of extracted data can be done for individual vendors or for all
vendors as maintained in the table and for which there were data extracted previously.
To delete the data for an individual vendor or for a few vendors, select the “Delete for Individual
Vendor” option and provide the relevant vendor numbers in the “Self Billing Vendor” selection
field.
If all Selfbilling data extracts need to be deleted select the “Delete for All Vendors” option and
execute the report
In both cases the deleted data from the extract table is shown in the log showing next.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 61 of 73
10.4 File Creation and Download for Selfbilling file
Proceed as described under chapter File Creation. All that is described there applies for Selfbilling
SAFT file creation.
For creating Selfbilling SAFT files, some of the selection parameters have to be filled with specific
values:
§ TaxAccountingBasis: S
Upon filling the selection parameters, a new user input sub window appears. It is specific for the
Selfbilling scenario and allows you to choose the vendors for whom you want to run the report
and create the file(s).
Options:
§ Individual Vendor: choose this option to run the file only for specific Vendors
§ Create File for All Vendors: choose this option to run the file only for all Vendors at one
time. A Selfbilling SAFT file will be created for each of the vendors entered in the custom-
izing table as described under chapter Portugal -> Generate Selfbilling files.
§ Selfbilling Vendor: fill this field with the vendor ID or vendor ID range according to the files
you want to create. These selection fields are available for the Individual Vendor option
only.
When creating the file for an individual vendor, provide the file name in the appropriate File Name
field on the selection screen. If no path is specified the file will be stored in the physical path
location maintained as the logical file path DIR_HOME.
In case of file generation for all vendors, the file name is created automatically, consisting of the
vendor ID, the date interval for which the file is created, creation date and time.
Once the process is completed, an application log with the file names and the summary of the
data included in each file will be shown.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 62 of 73
For downloading the file proceed as described in chapter File Download.
10.5 File Validation for Selfbilling file
For validating the Selfbilling file proceed as described in chapter File Validation.
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 63 of 73
11 Special Configurations: FSV for Gener-
alLedger
The file section GeneralLedger in Masterfiles contains the data regarding the company’s ac-
counts..
As of Portaria 160/2013, this section shall include all accounts, even internal accounts, in a hier-
archically structured manner. This is a legal change compared to the previous rule, where only
valid bookkeeping accounts were required and the hierarchical structure was not reflected.
To achieve this, special configurations are needed in the SAP system. The tool used is the Fi-
nancial Statement Version (FSV), a standard tool in SAP Financials. In SAP, this information is
pulled from FI.
Once the FSV has been created it must be defined in the RPFIEU_SAFT settings so that the
program knows which one to use. If necessary, update the FSV every time the chart of accounts
changes. To know more about how to set the FSV for the report, please refer to chapter Specify
Generic information.
NOTE: The existence of an FSV is NOT needed for retrieving the accounting documents into
SAFT. In compliance with the legal requirement, all financial postings are selected for SAFT.
11.1 Legal Chart of Accounts - SNC
In the Portuguese Official Chart of Accounts – SNC – accounts are structured in a hierarchy
consisting of movement accounts (lower level) and grouping accounts (higher level) (see picture
below). Movement accounts are accounts where the actual postings are registered and group-
ing accounts are accounts that group movement accounts of the same kind and totalize the bal-
ances.
The image below is an excerpt of the SNC.
11.2 Chart of Accounts in SAFT – GeneralLedger
The 2.1.-GeneralLedger file section includes the Chart of Accounts information. It has the fol-
lowing fields:
Field number Field name
SAP AG®
User guide
© 2015 SAP AG 9/22/2017
UserManual_RPFIEU_SAFT_1.04_EN.docx
Page 64 of 73
2.1.1 AccountID
2.1.2 AccountDescription
2.1.3 OpeningDebitBalance
2.1.4 OpeningCreditBalance
2.1.5 ClosingDebitBalance
2.1.6 ClosingCreditBalance
2.1.7 GroupingCategory
2.1.8 GroupingCode
The fields GroupingCategory and GroupingCode characterize an account in two aspect.
The GroupingCategory field indicates
· the level of the account: 1st level, grouping account or movement account, and
· whether it is an internal or analytical account, or a bookkeeping account
The GroupingCode field indicates the account in the immediate upper level of the account in
question, except for 1st level accounts, which are the highest level.
Thus, the accounts information included in the GeneralLedger section reflects the CoA structure
according to the SNC.
11.3 Chart of Accounts in the SAP system for SAFT
In the SAP system, accounts are stored in a flat table. The concept of a hierarchical Chart of Ac-
counts (CoA) with grouping and movement accounts does not exist. In order to correctly select
and structure the account information as required, the Financial Statement Version (FSV) is
used. The FSV is a tool in Standard SAP Financials that is used to build a report structure
based on accounts, such as the Balance Sheet, the P&L Statement, etc.
Using the FSV to create a hierarchical CoA
The FSV is a reporting tool that is used in this context to build the CoA as needed in the Gener-
alLedger section. It allows you to build the hierarchy, to define the account groups, to character-
ize accounts as internal or as bookkeeping accounts, to distinguish movement, grouping and 1st
level accounts and to sum balances.
In this chapter important details are described that have to be considered to create an FSV that
fulfils all SAFT requirements.
IMPORTANT NOTE: It is recommended to create a specific FSV for the SAFT purpose. The
ones normally used for Balance Sheet or Trial Balances do not comply with all requisites. Only
by creating a specific FSV can you ensure that all the necessary settings can be done without
interfering with other FSV applications.
How to create an FSV for SAFT
Use transaction OB58 to create the FSV.
The FSV can be created based on the Primary Chart of Accounts (KTOPL) or on the Country
Chart of Accounts (KTOP2). Choose the option that is in place in your company code.
When defining the FSV for SAFT please consider the following.
a) The CoA structure according to SNC:
User manual rpfieu_saft_1.04_en (1)
User manual rpfieu_saft_1.04_en (1)
User manual rpfieu_saft_1.04_en (1)
User manual rpfieu_saft_1.04_en (1)
User manual rpfieu_saft_1.04_en (1)
User manual rpfieu_saft_1.04_en (1)
User manual rpfieu_saft_1.04_en (1)
User manual rpfieu_saft_1.04_en (1)
User manual rpfieu_saft_1.04_en (1)

More Related Content

What's hot

SAP Configuration Guide for Functional Modules (Based on IDES)
SAP Configuration Guide for Functional Modules (Based on IDES)SAP Configuration Guide for Functional Modules (Based on IDES)
SAP Configuration Guide for Functional Modules (Based on IDES)sapdocs. info
 
Canadian tax configuration in sap
Canadian tax configuration in sapCanadian tax configuration in sap
Canadian tax configuration in sapAmit Sawant
 
Sap mm-configuration-step-by-step-guide
Sap mm-configuration-step-by-step-guideSap mm-configuration-step-by-step-guide
Sap mm-configuration-step-by-step-guidevenkat1571
 
Sap fico blueprint 2017 final Anilkumar chowdary
Sap fico blueprint 2017 final Anilkumar chowdarySap fico blueprint 2017 final Anilkumar chowdary
Sap fico blueprint 2017 final Anilkumar chowdaryANILKUMARPULIPATI1
 
172275575 sample-fscm-config-user-guide (2)
172275575 sample-fscm-config-user-guide (2)172275575 sample-fscm-config-user-guide (2)
172275575 sample-fscm-config-user-guide (2)Shailendra Surana
 
Fixed assets enduser_training_manual
Fixed assets enduser_training_manualFixed assets enduser_training_manual
Fixed assets enduser_training_manualRoshan55
 
Report Painter in SAP: Introduction
Report Painter in SAP: IntroductionReport Painter in SAP: Introduction
Report Painter in SAP: IntroductionJonathan Eemans
 
SAP FICO BBP Sample Document PDF NEW!
SAP FICO BBP Sample Document PDF NEW!SAP FICO BBP Sample Document PDF NEW!
SAP FICO BBP Sample Document PDF NEW!sapdocs. info
 
New GL parallel ledgers in asset accounting
New GL parallel ledgers in asset accounting New GL parallel ledgers in asset accounting
New GL parallel ledgers in asset accounting Hari Krishna
 
Funds management configuration sap ag
Funds management configuration sap agFunds management configuration sap ag
Funds management configuration sap agLluckyy
 
55811936 product-costing-cost-estimation-in-sap
55811936 product-costing-cost-estimation-in-sap55811936 product-costing-cost-estimation-in-sap
55811936 product-costing-cost-estimation-in-sapPepa Pencheva
 
Sap mm configuration_step_by_step_guide
Sap mm configuration_step_by_step_guideSap mm configuration_step_by_step_guide
Sap mm configuration_step_by_step_guideigosnell
 
Functional spcification doc for vendor debit memo report
Functional spcification doc for vendor debit memo reportFunctional spcification doc for vendor debit memo report
Functional spcification doc for vendor debit memo reportLokesh Modem
 
Sap system-measurement-guide
Sap system-measurement-guideSap system-measurement-guide
Sap system-measurement-guideotchmarz
 
Cash management configue doc v1
Cash management   configue doc v1Cash management   configue doc v1
Cash management configue doc v1Hari Krishna
 
357823861 treasury-and-risk-management-configuration-pdf
357823861 treasury-and-risk-management-configuration-pdf357823861 treasury-and-risk-management-configuration-pdf
357823861 treasury-and-risk-management-configuration-pdfMayura Mulla
 

What's hot (20)

SAP Configuration Guide for Functional Modules (Based on IDES)
SAP Configuration Guide for Functional Modules (Based on IDES)SAP Configuration Guide for Functional Modules (Based on IDES)
SAP Configuration Guide for Functional Modules (Based on IDES)
 
Canadian tax configuration in sap
Canadian tax configuration in sapCanadian tax configuration in sap
Canadian tax configuration in sap
 
Sap mm-configuration-step-by-step-guide
Sap mm-configuration-step-by-step-guideSap mm-configuration-step-by-step-guide
Sap mm-configuration-step-by-step-guide
 
Sap fico blueprint 2017 final Anilkumar chowdary
Sap fico blueprint 2017 final Anilkumar chowdarySap fico blueprint 2017 final Anilkumar chowdary
Sap fico blueprint 2017 final Anilkumar chowdary
 
172275575 sample-fscm-config-user-guide (2)
172275575 sample-fscm-config-user-guide (2)172275575 sample-fscm-config-user-guide (2)
172275575 sample-fscm-config-user-guide (2)
 
Fixed assets enduser_training_manual
Fixed assets enduser_training_manualFixed assets enduser_training_manual
Fixed assets enduser_training_manual
 
FS for FICO
FS for FICOFS for FICO
FS for FICO
 
Report Painter in SAP: Introduction
Report Painter in SAP: IntroductionReport Painter in SAP: Introduction
Report Painter in SAP: Introduction
 
Cutover activities
Cutover activitiesCutover activities
Cutover activities
 
SAP FICO BBP Sample Document PDF NEW!
SAP FICO BBP Sample Document PDF NEW!SAP FICO BBP Sample Document PDF NEW!
SAP FICO BBP Sample Document PDF NEW!
 
SAP Conifgdoc
SAP ConifgdocSAP Conifgdoc
SAP Conifgdoc
 
New GL parallel ledgers in asset accounting
New GL parallel ledgers in asset accounting New GL parallel ledgers in asset accounting
New GL parallel ledgers in asset accounting
 
Funds management configuration sap ag
Funds management configuration sap agFunds management configuration sap ag
Funds management configuration sap ag
 
55811936 product-costing-cost-estimation-in-sap
55811936 product-costing-cost-estimation-in-sap55811936 product-costing-cost-estimation-in-sap
55811936 product-costing-cost-estimation-in-sap
 
Early-warning Alerts on SAP issues
Early-warning Alerts on SAP issues Early-warning Alerts on SAP issues
Early-warning Alerts on SAP issues
 
Sap mm configuration_step_by_step_guide
Sap mm configuration_step_by_step_guideSap mm configuration_step_by_step_guide
Sap mm configuration_step_by_step_guide
 
Functional spcification doc for vendor debit memo report
Functional spcification doc for vendor debit memo reportFunctional spcification doc for vendor debit memo report
Functional spcification doc for vendor debit memo report
 
Sap system-measurement-guide
Sap system-measurement-guideSap system-measurement-guide
Sap system-measurement-guide
 
Cash management configue doc v1
Cash management   configue doc v1Cash management   configue doc v1
Cash management configue doc v1
 
357823861 treasury-and-risk-management-configuration-pdf
357823861 treasury-and-risk-management-configuration-pdf357823861 treasury-and-risk-management-configuration-pdf
357823861 treasury-and-risk-management-configuration-pdf
 

Similar to User manual rpfieu_saft_1.04_en (1)

Specification of the Linked Media Layer
Specification of the Linked Media LayerSpecification of the Linked Media Layer
Specification of the Linked Media LayerLinkedTV
 
R3 tax interface configuration guide
R3 tax interface configuration guideR3 tax interface configuration guide
R3 tax interface configuration guideracingboat
 
R3 tax interface configuration guide
R3 tax interface configuration guideR3 tax interface configuration guide
R3 tax interface configuration guideracingboat
 
R3 tax interface configuration guide
R3 tax interface configuration guideR3 tax interface configuration guide
R3 tax interface configuration guideNaval Bhatt ,PMP
 
sum2_abap_unix_hana.pdf
sum2_abap_unix_hana.pdfsum2_abap_unix_hana.pdf
sum2_abap_unix_hana.pdfssuser9f920a1
 
Ibm total storage tape selection and differentiation guide sg246946
Ibm total storage tape selection and differentiation guide sg246946Ibm total storage tape selection and differentiation guide sg246946
Ibm total storage tape selection and differentiation guide sg246946Banking at Ho Chi Minh city
 
Ibm total storage tape selection and differentiation guide sg246946
Ibm total storage tape selection and differentiation guide sg246946Ibm total storage tape selection and differentiation guide sg246946
Ibm total storage tape selection and differentiation guide sg246946Banking at Ho Chi Minh city
 
Data source integration guide for HP Performance Agent
Data source integration guide for HP Performance AgentData source integration guide for HP Performance Agent
Data source integration guide for HP Performance Agenthernajes
 
Gdfs sg246374
Gdfs sg246374Gdfs sg246374
Gdfs sg246374Accenture
 
Accounting and chargeback with tivoli decision support for os 390 sg246044
Accounting and chargeback with tivoli decision support for os 390 sg246044Accounting and chargeback with tivoli decision support for os 390 sg246044
Accounting and chargeback with tivoli decision support for os 390 sg246044Banking at Ho Chi Minh city
 
software-eng.pdf
software-eng.pdfsoftware-eng.pdf
software-eng.pdffellahi1
 
Software Engineering
Software EngineeringSoftware Engineering
Software EngineeringSoftware Guru
 
Best Python tutorial (release 3.7.0)
Best Python tutorial (release 3.7.0)Best Python tutorial (release 3.7.0)
Best Python tutorial (release 3.7.0)youssef bouferdou
 
0802 python-tutorial
0802 python-tutorial0802 python-tutorial
0802 python-tutorialZahid Hasan
 

Similar to User manual rpfieu_saft_1.04_en (1) (20)

Specification of the Linked Media Layer
Specification of the Linked Media LayerSpecification of the Linked Media Layer
Specification of the Linked Media Layer
 
R3 tax interface configuration guide
R3 tax interface configuration guideR3 tax interface configuration guide
R3 tax interface configuration guide
 
R3 tax interface configuration guide
R3 tax interface configuration guideR3 tax interface configuration guide
R3 tax interface configuration guide
 
R3 tax interface configuration guide
R3 tax interface configuration guideR3 tax interface configuration guide
R3 tax interface configuration guide
 
sum2_abap_unix_hana.pdf
sum2_abap_unix_hana.pdfsum2_abap_unix_hana.pdf
sum2_abap_unix_hana.pdf
 
Ibm total storage tape selection and differentiation guide sg246946
Ibm total storage tape selection and differentiation guide sg246946Ibm total storage tape selection and differentiation guide sg246946
Ibm total storage tape selection and differentiation guide sg246946
 
Ibm total storage tape selection and differentiation guide sg246946
Ibm total storage tape selection and differentiation guide sg246946Ibm total storage tape selection and differentiation guide sg246946
Ibm total storage tape selection and differentiation guide sg246946
 
IBM Streams - Redbook
IBM Streams - RedbookIBM Streams - Redbook
IBM Streams - Redbook
 
Data source integration guide for HP Performance Agent
Data source integration guide for HP Performance AgentData source integration guide for HP Performance Agent
Data source integration guide for HP Performance Agent
 
Software guide 3.20.0
Software guide 3.20.0Software guide 3.20.0
Software guide 3.20.0
 
Gdfs sg246374
Gdfs sg246374Gdfs sg246374
Gdfs sg246374
 
Accounting and chargeback with tivoli decision support for os 390 sg246044
Accounting and chargeback with tivoli decision support for os 390 sg246044Accounting and chargeback with tivoli decision support for os 390 sg246044
Accounting and chargeback with tivoli decision support for os 390 sg246044
 
software-eng.pdf
software-eng.pdfsoftware-eng.pdf
software-eng.pdf
 
I ntools+v+7+tutorial
I ntools+v+7+tutorialI ntools+v+7+tutorial
I ntools+v+7+tutorial
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
Best Python tutorial (release 3.7.0)
Best Python tutorial (release 3.7.0)Best Python tutorial (release 3.7.0)
Best Python tutorial (release 3.7.0)
 
Tutorial edit
Tutorial editTutorial edit
Tutorial edit
 
0802 python-tutorial
0802 python-tutorial0802 python-tutorial
0802 python-tutorial
 
0802 python-tutorial
0802 python-tutorial0802 python-tutorial
0802 python-tutorial
 
Python everthing
Python everthingPython everthing
Python everthing
 

Recently uploaded

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 

Recently uploaded (20)

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 

User manual rpfieu_saft_1.04_en (1)

  • 1. © 2014 SAP AG Page 1 of 73 User Guide SAFT Framework: SAF-T (PT) Customizing and Execution
  • 2. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 2 of 73 History Version Responsible Date Change Description 1.0 Daniela Schobert 17.02.2014 First Release 1.1 Daniela Schobert 12.08.2014 First Revision 1.2 Daniela Schobert Second Revision 1.3 Daniela Schobert Third Revision 1.4 Paul Taylor 21.09.2017 Fourth Revision
  • 3. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 3 of 73 Contents 1 Introduction.......................................................................................... 6 2 File structure and purpose ................................................................. 6 2.1 Annual file for audit purposes.......................................................................... 7 2.2 Monthly File for invoice reporting (E-fatura)..................................................... 8 3 Selection logic ..................................................................................... 9 3.1 Digitally signed documents: invoices and delivery documents......................... 9 Invoice Documents.......................................................................................... 9 Delivery Documents...................................................................................... 10 3.2 Working Documents...................................................................................... 10 3.3 Vendors as Customers.................................................................................. 10 3.4 Restrictions ................................................................................................... 11 Invoice Lists with Foreign Currencies............................................................ 11 Billing Documents in Invoice Lists ................................................................. 11 Sales Office Restriction................................................................................. 11 Plant abroad Restriction................................................................................ 11 4 Settings .............................................................................................. 11 4.1 How to access the customizing views ........................................................... 12 Generic Settings à Specify Generic Settings ............................................... 12 Country-Specific Settings à Portugal ........................................................... 13 4.2 Specify Generic Settings in detail.................................................................. 14 Specify Generic information .......................................................................... 15 Map Document Type to Invoice Type [FI Invoices]........................................ 16 Map Material Type to Product Type............................................................... 18 Specify Material Master Data ........................................................................ 19 Define Material Numbers Based on G/L Accounts......................................... 20 Map sales category to invoice type ............................................................... 21 Specify Sales Office...................................................................................... 23 4.3 Country-Specific Settings in detail................................................................. 24 Portugal à Specify Business Cases ............................................................. 24 Portugal à Specify Tax Code Details ........................................................... 27 Portugal à Define Ranges for Internal Documents ....................................... 29 Portugal à Define Alternate Accounts .......................................................... 31 Portugal à Specify Prefix for Material Numbers............................................ 33 Portugal à Source Document Mappings....................................................... 34 Portugal à Define Taxonomy Codes ............................................................ 37 Portugal à Assign Taxonomy Codes to G/L Accounts.................................. 37 5 Data Extraction .................................................................................. 38 5.1 Running the Data Extraction ......................................................................... 39 Extract........................................................................................................... 42
  • 4. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 4 of 73 Delete ........................................................................................................... 42 System messages while executing................................................................ 43 Administration ............................................................................................... 43 Application Log ............................................................................................. 43 6 File Creation....................................................................................... 45 6.1 Rules............................................................................................................. 47 7 File Download ................................................................................... 47 8 File Validation .................................................................................... 51 9 Special Documents - External Documents...................................... 52 9.1 Integration of documents in SAP SD via summary documents (n:1).............. 53 9.2 Integration of documents in SAP SD via detailed document (1:1):................. 53 9.3 Documents created manually outside the system (on paper) ........................ 54 10 Special SAF-T file – Selfbilling ......................................................... 54 10.1 Selfbilling documents and vendors in SAFT .................................................. 54 Selfbilling vendor........................................................................................... 55 Self-billing documents ................................................................................... 55 10.2 Selfbilling file structure .................................................................................. 56 Yearly File..................................................................................................... 56 Monthly File................................................................................................... 56 10.3 Settings for Selfbilling file .............................................................................. 56 How to access the customizing views ........................................................... 56 10.1 Country-Specific Settings for Selfbilling......................................................... 57 Portugal à Specify Business Cases ............................................................. 57 Portugal à Specify Destination of XML files storage..................................... 57 Portugal à Generate Selfbilling files............................................................. 58 10.2 Data Extraction for Self-billing file.................................................................. 59 10.3 Deleting Extracted data for Selfbilling file ...................................................... 60 10.4 File Creation and Download for Selfbilling file ............................................... 61 10.5 File Validation for Selfbilling file..................................................................... 62 11 Special Configurations: FSV for GeneralLedger............................. 63 11.1 Legal Chart of Accounts - SNC ..................................................................... 63 11.2 Chart of Accounts in SAFT – GeneralLedger ................................................ 63 11.3 Chart of Accounts in the SAP system for SAFT............................................. 64 Using the FSV to create a hierarchical CoA .................................................. 64 How to create an FSV for SAFT.................................................................... 64 12 Special Configurations: Products in FI Invoices ............................ 69 12.1 Determination of the product data ................................................................. 69 Real Estate invoices (RE-FX): ProductCode definition .................................. 70 FI invoices: ProductCode definition ............................................................... 70
  • 5. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 5 of 73 FI invoices with Material: ProductCode determination ................................... 72 12.2 Storing the product information (RE-FX and FI invoices)............................... 72 13 BADI.................................................................................................... 73
  • 6. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 6 of 73 1 Introduction According to Portaria 321-A/2007 of the Portuguese legislation, published in March 26th by the Portuguese government, a requirement became mandatory as of fiscal year 2008 for all compa- nies that use computerized means to manage their accounting and billing procedures: the obli- gation consists in producing a file, the so-called SAF-T (PT) file, whenever requested by the tax authorities for auditing purposes or as part of the year end closing activities. This requirement is part of the requisites that belong to the Software Certification (Digital Signa- ture for invoices and delivery documents. Check note 2107258 that is obligatory for Billing Soft- ware, in Portugal. Both requisites are therefore linked together and reference will be made in this manual whenever appropriate. The SAF-T (PT) file also serves another purpose, which is the monthly reporting of invoices, the so-called E-Fatura. This obligation was introduced by Law Decree 198/2012. There have been several legal changes since. Relevant legal references: - Portaria 321-A/2007 - Portaria 1192/2009 - Portaria 160/2013 - Portaria 274/2013 – SAFT version 1.03_01. - Portaria 302/2016 version 1.04_01 Under the following link you can find all useful information regarding the legal requirement, namely the XSD file, validators, description of the structure, links to legal texts, etc.: http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/NEWS_SAF-T_PT.htm Note: The legal change according to Portaria 274/2013, version 1.03_01 is the one de- scribed in this document. This manual describes all the steps that are necessary to create the SAFT-PT file: Settings, Data Extraction, File Creation and Download and Validation. The process to create the SAF-T (PT) file is the same for both the monthly and the yearly file. Whenever there are differences they are mentioned accordingly. 2 File structure and purpose The SAF-T (PT) file is an XML file with different sections to accommodate the data from differ- ent domains, e.g. accounting, billing, master data, etc. The composition of the file varies accord- ing to its purpose. That is to say that not all the sections are always included. Settings Extract Creation & Download Validation
  • 7. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 7 of 73 When creating the SAF-T (PT) file the user should be aware for which purpose the file is being created. Note: the file structure description in the law text contains a few errors. The correct structure is given by the XSD file. The table below shows the file sections of a complete SAF-T (PT) file. File section Explanation 1.1. Header File header 2. MasterFiles Master Data 2.1. GeneralLedger GL Accounts master data 2.2. Customer Customers Master Data 2.3. Supplier Vendors Master Data 2.4. Product Products/Services Master Data 2.5. TaxTable Tax Master Data 3.1. GeneralLedgerEntries Accounting documents 4. SourceDocuments: Source Documents 4.1. SalesInvoices Billing documents 4.2. MovementOfGoods Delivery/Transport documents 4.3. WorkingDocuments Secondary documents to customers 4.4. Payments Receipts/Payment documents The section containing the Accounting data (GeneralLedger) must contain the complete finan- cial data of the company in one file only, not to be split in smaller files. The SourceDocument section can be split into smaller portions. 2.1 Annual file for audit purposes The annual file is normally provided to the tax authorities upon request and it is part of the year- end closing activities. The obligation to report the data for audit purposes always consists in re- porting the complete data. This can be done in one complete file or in several smaller files, which altogether contain the complete data. The options and requirements are: · Integrated file: contains the complete data in one file, related to accounting and logistics (source documents: sales invoices, payments, movement of goods), both transaction and master data. · Accounting file: contains only data related with Accounting in one file, both transaction and master data. · Billing file: contains only data related with billing, both transaction and master data; it can be split into smaller portions of smaller periods of at least one month. There are different kinds of billing files according to the invoices’ nature, e.g. normal customer invoices, invoices issued on behalf of a third-party and self-billing invoices. The table below shows the composition of the file according to its nature, as described in the law. File section Explanation Belongs to file type (˜=included; ™=not included) Integrated Accounting Billing 1.1. Header File header ˜ ˜ ˜ 2. MasterFiles Master Data1 ˜ ˜ ˜ 2.1. GeneralLedger GL Accounts master data ˜ ˜ ™ 2.2. Customer Customers Master Data ˜ ˜ ˜ 2.3. Supplier Vendors Master Data ˜ ˜ ˜ 2.4. Product Products/Services Master Data ˜ ™ ˜
  • 8. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 8 of 73 File section Explanation Belongs to file type (˜=included; ™=not included) Integrated Accounting Billing 2.5. TaxTable Tax Master Data ˜ ˜ ˜ 3.1. GeneralLedgerEntries Accounting documents ˜ ˜ ™ 4. SourceDocuments: Source Documents ˜ ™ ˜ 4.1. SalesInvoices Billing documents ˜ ™ ˜ 4.2. MovementOfGoods Delivery/Transport documents ˜ ™ ˜ 4.3. WorkingDocuments Secondary documents to customers ˜ ™ ˜ 4.4. Payments Receipts/Payment documents ˜ ™ ˜ 1 master data may be shown transaction dependent. 2.2 Monthly File for invoice reporting (E-fatura) The monthly file is produced every month to report invoice data for tax purposes. This is done by submitting the file on the portal of the tax authorities, the so-called E-fatura portal. When sub- mitting the file, the portal executes some validations and discards the information that is not needed, since only a limited amount of information is relevant for invoice reporting purposes. The result is a much smaller file with a simplified structure containing only the information stored in the database of the tax authorities. According to the law, the monthly file for the purpose of reporting invoices (E-fatura) has the structure of a billing file. In practice however, since not all the information is relevant to the tax authorities some of the information that normally belongs to the billing file can be left out with no impact on the quality of the reported data. This information is given explicitly or implicitly in the law or can be derived from the behaviour of the portal. The simplified file, as mentioned above, makes it evident how much of the information delivered in a SAF-T (PT) file is actually not needed. The table below shows the composition of the monthly file and shows the sections that are not relevant, as explained above. · File section Explanation Belongs to Billing file type (˜=included; ›= excluded from E-fatura; ™=not included) 1.1. Header File header ˜ 2. MasterFiles Master Data ˜ 2.1. GeneralLedger GL Accounts master data ™ 2.2. Customer Customers Master Data ˜ 2.3. Supplier Vendors Master Data › 2.4. Product Products/Services Master Data › 2.5. TaxTable Tax Master Data ˜ 3.1. GeneralLedgerEntries Accounting documents ™ 4. SourceDocuments: Source Documents ˜ 4.1. SalesInvoices Billing documents ˜ 4.2. MovementOfGoods Delivery/Transport documents › 4.3. WorkingDocuments Secondary documents to customers › 4.4. Payments Receipts/Payment documents ˜ This data is not being excluded in the E-fatura file and when submitting the file in the AT-portal, it is auto- matically discarded by the portal itself.
  • 9. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 9 of 73 3 Selection logic 3.1 Digitally signed documents: invoices and delivery documents Referring to the rules of Software Certification, invoices and delivery documents must be certi- fied (digitally signed), without exception, regardless of where and how they were issued, in a billing or in the accounting system. Invoice Documents Following this logic, the decisive criterion to select the relevant invoice documents for the ex- traction and inclusion in the SAF-T (PT) file is the Digital Signature. The Digital Signature validation presents multiple scenarios for our Customers, for example: · SAF-T File Generation for any period prior to 2017, is always possible. · If you have implemented the Note and you are carrying out a first execution in, for example, September 2017, for the August 2017 period, and include un- signed documents in your selection, then you will be able to create SAF-T files, but you will receive warnings during the Data Extraction. · If you have implemented the relevant Note in, for example, September 2017 and carried out the first execution during the same month, you will not be able to extract any period from April 2018 onwards, if the selection contains un- signed documents. You can only create SAF-T files with unsigned documents in the 180 days following the first execution of the report. 3.1.1.1 Exceptions: Automatically Excluded Documents Some documents are automatically excluded from the SAFT file: DIGITAL SIGNATURE IS A PREREQUISITE FOR ALL INVOICE DOCUMENTS. DUE TO THIS, A VALIDATION WAS PUT IN PLACE, OPERATING UNDER THE FOLLOWING CONDITIONS: · AFTER IMPLEMENTATION OF NOTE 2471144, AND FROM THE DATE OF THE FIRST EXECUTION, DURING A 180-DAY PERIOD, IT IS STILL POSSIBLE TO EXTRACT DATA AND GENERATE SAF-T FILES FROM DOCUMENTS LACKING A DIGITAL SIGNATURE, BUT A WARNING IS ISSUED FOR EACH NUMBER RANGE AFFECTED. · AFTER THIS 180-DAY PERIOD YOU WILL NO LONGER BE ABLE TO EXTRACT DATA IF ANY OF YOUR DOCUMENTS WITHIN THE SELECTED PERIOD ARE NOT DIGITALLY SIGNED, AS THE VALIDATION WILL CAUSE AN ERROR IN THE REPORT.
  • 10. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 10 of 73 3.1.1.1.1 Reversals Reversal documents of FI and SD invoices are considered internal documents, not representing a commercial transaction. They are therefore being excluded from the SAFT file – table 4.1. Only the reversed document is shown in the file. Please note, that reversal documents must have their own number range and document type. 3.1.1.1.2 Internal SD documents not posted in Accounting Such documents are identified by their Posting Status equal D (VBRK-RFBSK) and are automat- ically excluded from the SAFT file – table 4.1. 3.1.1.1.3 Rebate Agreement credit memos Such documents are internal documents never to be printed or issued to a Customer. Therefore they are excluded from the SAF-T file – table 4.1, based on their Billing Category equal B or C (VBRK-FKTYP). 3.1.1.1.4 Delivery Document replaced by invoice Invoices can be used as delivery documents when sent together with the goods shipment. In such cases they replace the delivery document which can be considered an internal document that shall not be included in the SAFT file – table 4.2. Such delivery documents will be excluded auto- matically provided the respective settings are done. Delivery Documents According to Digital Signature requirements, document selection during data extraction will auto- matically include Digitally-signed delivery documents, excluding unsigned delivery documents (customer's internal documents not used for transportation). 3.2 Working Documents Some SD documents are automatically reported as Working Documents (table 4.3) and not as Sales Documents: · Proforma Invoices identified based on their Document Category equal U (VBRK-VBTYP). · Internal documents according to the settings (FIPTC_DOC_EXC) are consid- ered Working Documents. If, however, such documents don’t have a customer line, they are also excluded from table 4.3 and will only be included as an Ac- counting Document. 3.3 Vendors as Customers When filling the Masterfiles section for Customers (2.2.) the program may select data related to also to Vendors, provided the respective settings have been done, in order to reflect the Vendors as Customers scenario.
  • 11. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 11 of 73 3.4 Restrictions Invoice Lists with Foreign Currencies The use of certain documents with foreign currencies (Invoice lists, for example) is unsupported by the SAF-T solution. This may lead to inconsistencies due to exchange rate differences from the invoice issue date to the invoice list issue date. Although unsupported, you may still submit documents in foreign currencies. However, SAP can- not guarantee acceptance and validation of amounts by the Tax Authorities due to differing ex- change rates. Billing Documents in Invoice Lists If you use different fiscal periods for the Invoice List creation, you will produce an inconsistent SAF-T file. To avoid this, you must create as many Invoice Lists as you have fiscal periods. For example, you might have Invoices 1 & 2 in one fiscal period, and Invoice 3 & 4 in another fiscal period, you cannot group these invoices in a single Invoice List, but must split them into two separate Invoice Lists (Invoice List A for Invoices 1 & 2 and Invoice List B for Invoices 3 & 4). If you need to carry out a reversal of an Invoice List, you must reverse it in the same fiscal period. Sales Office Restriction If you need to issue a SAF-T file (i.e. for e-Fatura purposes) for a Portuguese sales office in a non-Portuguese company code, you can only issue a Billing SAF-T. You cannot extract Account- ing SAF-T for non-Portuguese company codes (relevant for the annual audit file). Plant abroad Restriction Presently the Plant Abroad scenario is not supported. 4 Settings Several customizing tasks must be carried out prior to executing the file to ensure that the cor- rect data is collected, the correct file format is produced and the correct filling rules are applied (e.g. to produce the Chart of Account hierarchical structure, to collect product data, where it is not defined in the database, or to identify specific business scenarios). This is important because sometimes a different behaviour is required to fill the SAF-T (PT) file correctly. Normally the definition of such settings is a one-time activity or valid for a specific time interval. The several views in the SAFT-Framework customizing area are explained in this chapter. Use these views to specify the cases that are applied in the company. NOTE: The entity on which the SAFT(PT) file is based is the company code. It cannot be created for multiple company codes in one step. Running the report for multiple company codes will result Settings Extract Creation & Download Validation
  • 12. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 12 of 73 in multiple files, namely as many as there are company codes. These files cannot be merged. Please bear in mind that the Accounting data must be in one file only according to the legal re- quirement. For the entire SAFT(PT) solution, the company code should be located in Portugal. RPFIEU_SAFT extractions must be deleted and run again when customizing settings are changed and a new RPFIEU_SAFT extraction is needed with the new settings. 4.1 How to access the customizing views The views can be accessed in several ways: Option 1: Use the transaction code to go directly to a specific view, as specified in each customizing activ- ity case in this chapter. Option 2: 1) Execute RPFIEU_SAFT report and then select the Define Settings radio button to navigate to the SAF-T Settings (EU) area menu. 2) Navigate to the next menu as needed - Generic Settings à Specify Generic Settings or - Country-Specific Settings à Portugal Click the Create New Entry icon to create a new setting. Or, select an existing entry and click the Change Entry icon to change the existing setting. After creating new entries or changing ex- isting ones, always save the data before exiting. Generic Settings à Specify Generic Settings This menu includes generic settings that are defined based on country. Therefore, always select country PT before navigating to the specific sub-menu. Multiple definitions are possible, based on company code and validity period.
  • 13. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 13 of 73 Country-Specific Settings à Portugal This menu includes generic settings for each country. Open the menu belonging to Portugal to access to the next sub-menu.
  • 14. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 14 of 73 4.2 Specify Generic Settings in detail In this chapter each of the sub-menus will be explained in terms of function, use and the meaning of the fields. You can access the customizing view by menu navigation as explained above, or using the transaction code mentioned in each case. In the following screen you will find the several configuration options, which are explained in this chapter.
  • 15. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 15 of 73 Specify Generic information Use this view to specify the generic parameters that define the scope of the data that needs to be included in the various sections on the SAFT-T (PT) XML file. This customizing task is man- datory. Please note: You may also use transaction FIEU_GEN to maintain FIEUD_GENERIC table. Explanation of the table fields Fields Description Content FSV_PCOA FSV Primary If your Portuguese Company Code uses the Primary Chart of Accounts (KTOPL in the company code master data), then specify the Financial statement version in this field.* FSV_CCOA FSV Country If your Portuguese Company Code uses the Country Chart of Accounts (KTOPL2 in the company code master data), then specify the Financial statement version in this field.* COA Chart of accounts Enter the main chart of accounts defined for the Portu- guese Company Code (even if executing the report for the country chart of accounts, the entry here is always the main chart of accounts). COMPANY_ID Company ID Specify the information required for CompanyID field in the SAF-T (PT) file Header: Registration Place and Num- ber, or in case of no registration indicate the VAT-ID only. Use the syntax required according to SAFT rule: · Only one space between the registry place and the registration number. No spaces in the name of the place · No country prefix for the registration number. Example: Vila_Nova_de_Gaia 500123456 BUSSINESS_NAME Business name Name of the Company for which it is commonly known LEDGER Ledger The unique identification of a ledger, in case one is speci- fied for the data belonging to Portugal. This is the ledger that contains the data to be reported. Note: RPFIEU_SAFT does not support Special Ledger functionality. Only New GL and non-leading ledgers under New GL are supported. In case a non-leading ledger is selected then the data of this ledger along with the data of the leading ledger will be reported in the XML file. This means that the data of the leading ledger is always automatically selected because only the invoices in the leading ledger are digitally signed.
  • 16. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 16 of 73 Fields Description Content TAXOREF Taxonomy Refer- ence This identifies the type of accounting standard used by each business, per company code, as defined in Portaria 302/2016. S - SNC (ASS)-based accounting rules N - International Accounting Standards M - SNC (ASS)-based rules for micro-companies O - Other accounting systems (undefined) DIR_SET FTWN Directory Set Indicate the Directory Set you have maintained for storing SAFT XML files, under transaction FTWP, in the File di- rectories tab, where the server path to store the SAFT XML files is defined. This is only needed for downloading very huge XML files. Refer to chapter File Download for more information. *Note: Maintain either Financial statement version (primary) or Financial statement version (country), but not both. Map Document Type to Invoice Type [FI Invoices] According to the SAF-T(PT) definitions, the various invoice types are to be reported with the fol- lowing values in the SAF-T file: Invoice Type Invoice type accord- ing to XML Invoice FT Simplified Invoice FS Invoice-Receipt FR Debit Note ND Credit Note NC Sale for Cash and Invoice/ Sales Ticket a) VD Sale Ticket a) TV Return Ticket a) TD Assets Alienation a) AA Assets Return a) DA Premium or Premium Receipt RP Return Insurance or Receipt of Return Insurance RE Imputation to Co-Insurance Companies CS Imputation to Leadership Co-Insurance Companies LD
  • 17. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 17 of 73 Invoice Type Invoice type accord- ing to XML Accepted Re-Insurance RA a) These document types are allowed only until 31-Dec-2012. SAF-T-(PT) files issued after this date must not contain such invoice types. FI invoices are identified through the document type. Thus, the system document types must be classified according to the SAFT invoice types. In this customizing view the following is speci- fied: · FI invoice document types that must be included in the SAF-T(PT) file · The SAF-T invoice type to which the document type corresponds Prerequisites · Manual FI Invoices checkbox in the Customizing view FIEUD_BC has been already se- lected (see chapter Portugal → Specify Business Cases). The InvoiceType field in the XML file is filled with the invoice type customized for the retrieved document type. Transaction: FIEU_MFI to maintain table FIEUD_MFI Explanation of the table fields Field Description Content MANDT Client Client LAND1 Cty Country PT BUKRS CoCd Company code for which SAF-T file will be cre- ated. VALIDITY_FROM Valid from Start date of the validity period VALIDITY_TO Valid to End date of the validity period
  • 18. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 18 of 73 Field Description Content DOC_TYPE Type System document type of FI documents which are invoices, credit or debit notes and therefore to be retrieved. This is the internal SAP document type that will be conversed to FT, NC or ND according to the SAFT logic and the nature of the document. BP_LINE BP Line Check this box to define that business partner (BP) lines are included in the Standard Audit File for Tax Purpose (SAF-T) generated in XML for- mat. Unchecked, the system will only display the G/L lines in the output. TAGT_INV_TYPE Inv. Type The corresponding official invoice type as required by the SAF-T(PT) file. SOURCE Source For Portugal, this field should be defined as blank. This field is used for SAF-T Luxembourg only. NOTE: For the retrieval of FI documents, please also refer to the important note given in chapter Using the FSV to create a hierarchical CoA. Map Material Type to Product Type According to the SAF-T(PT) definitions, products must be classified according to their type: product, service, tax like product, or other. The corresponding value is shown in the XML file ac- cording to the SAF-T(PT) rules: Product Type Value in XML Products P Services S Others O Taxes, Levies & Parafis- cal Charges I Special Consumer Taxes E The SAP standard material types are already defined by default in the program as follows: Material Type Product Type DIEN S FERT P HAWA P Customer specific material types must be customized in this view.
  • 19. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 19 of 73 Transaction: FIEU_PTYPE to maintain table FIEUD_PRODS. Explanation of the Table Fields: Field Description Content MANDT Client Client LAND1 Country Country PT BUKRS Company code Company code for which SAF-T file will be created. VALIDITY_FROM Valid from Start date of the validity period VALIDITY_TO Valid to End date of the validity period PRD_TYPE Material Type The relevant material type as cus- tomized in the system TARG_PRD_TYPE Product Type Corresponding code as required by SAFT file: S, P, O, I or E) Specify Material Master Data This view is used to determine Product master data information for FI invoices, in case it does not exist. In such cases, one option is to define such details based on the revenue account(s) where the FI invoices was posted to. Also refer to chapter Special Configurations: Products in FI Invoices, where detailed information on this process is provided. Transaction: SAFTPT_FIMD to maintain table SAFTPT_FIMD.
  • 20. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 20 of 73 Explanation of the Table Fields: Field Description Content MANDT Client Client BUKRS Company code Company code for which SAF-T file will be created. GLACCOUNTFROM G/L Account From Revenue Account of the account in- terval that determines the product GLACCOUNTTO G/L Account To Revenue Account of the account in- terval that determines the product PRODUCTCODE Product Code Product ID PRODUCTTYPE Product Type Corresponding code as required by SAFT file for filed ProdutType PRODUCTGROUP Material Group De- scription Description of the Product group PROD_DESCRIPTION Material Description Product description CUST_SPECIFIC Batch Management Indicator This field can be ignored Define Material Numbers Based on G/L Accounts This view is used to determine the Product ID for FI invoices, in case it does not exist. In such cases, one option is to define such details based on the revenue account(s) where the FI invoice was posted to. Note: Always be sure to define the product ID in such a way that it prevents the creation of dupli- cates to the ones defined in MARA or for RE invoices. Also refer to chapter Special Configurations: Products in FI Invoices, where detailed information on this process is provided. Transaction: PTSAFT_MATACCNT to maintain table PTSAFT_MATACCNT
  • 21. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 21 of 73 . Explanation of the Table Fields: Field Description Content MANDT Client Client BUKRS Company code Company code for which SAF-T file will be created. GLACCOUNT G/L Account From Revenue Account based on which the product is determined MATNR Material Number Product ID assigned to the postings of the respective account. This field is the link to the MARA table. Map sales category to invoice type For SD invoices it is necessary to define the InvoiceType according to SAFT specific Invoice- Type they correspond to. This is defined based on the document category in the SAP system. You can use this transaction to do the following: · Specify the possible sales document categories that must be included in the SAF-T · Map sales document categories to the invoice types as required for SAF-T. Invoice Type Invoice type according to XML Invoice FT Simplified Invoice FS Invoice-Receipt FR Debit Note ND Credit Note NC Sale for Cash and Invoice/ Sales Ticket a) VD Sale Ticket a) TV Return Ticket a) TD Assets Alienation a) AA
  • 22. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 22 of 73 Invoice Type Invoice type according to XML Assets Devolution a) DA Premium or Premium Receipt RP Return Insurance or Receipt of Return Insurance RE Imputation to Co-Insurance Companies CS Imputation to Leadership Co-Insurance Companies LD Accepted Re-Insurance RA a) These document types are allowed only until 31-Dec-2012. SAF(T)-PT files issued after this date must not contain such invoice types. The following SD document categories are already mapped by default in the program: Sales Document Category Invoice type according to XML M FT N FT O NC S NC P ND Use this customizing view to define other Sales document categories if needed. The corre- sponding Invoice Type is then filled in the XML file. Transaction: FIEU_SDGEN to maintain table FIEUD_SDGEN Explanation of the table fields
  • 23. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 23 of 73 Field Description Content MANDT Client Client LAND1 Country Country PT BUKRS Company code Company code for which SAF-T file will be created. VALIDITY_FROM Customizing entry valid from date. Start date of the validity period VALIDITY_TO Customizing entry valid to date. End date of the validity period VBTYPE SD document category The relevant SD document cate- gory that needs to be defined in addition to the default mentioned above. TAGT_INV_TYPE SAF-T (PT) : Target Invoice Type The respective code for SAF-T invoice type (FT, ND, NC,….). Specify Sales Office A company based in Portugal may have multiple sales offices from which the operations are done. However, among those not all sales offices are necessarily relevant, or you may wish to create a SAF-T(PT) file only containing the invoices of a specific Sales Office. To include the invoices only from these specific sales office(s) in the SAF-T(PT), proceed as fol- lows: Use this customizing view to define the Sales Offices as needed. The corresponding Invoices will be filtered to be included in the XML file. Transaction: FIEU_SOFC to maintain table FIEUC_SALESOFC Explanation of the table fields Field Description Content MANDT Client Client LAND Country Fill with the Sales Office country
  • 24. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 24 of 73 Field Description Content BUKRS Company Code Company code for which SAF-T file will be created and to which the sales office be- longs. VKORG Sales Organization Define the Sales Organization the Sales Office belongs to VKBUR Sales Office Define the Sales Office for which the in- voice shall be filtered and included in the SAFT(PT) file. Restriction 1. Filtering invoices by Sales Office is only possible for Sales Offices located in Portugal (Country is defined as “PT”), just as it is mandatory for the Company Code to be located in Portugal as well, according to the restriction explained under chapter 3. Settings. If the case is a company code in another country, with a sales office in Portugal, this solution will not work. 2. The scenario for a foreign company code can only be realized through the implementation of a BAdI method. Please refer to the BAdI documentation attached to SAP note 1987687. 3. In case there is more than one sales office, then the extraction / deletion of extracted data must be done for all sales office in one step. It is not possible to extract/delete/create the SAF-T file for each sales office at a time. 4. If you need to issue a monthly SAF-T (i.e. for e-Fatura purposes) for a non-Portuguese company code, with a Portuguese sales office, you can only issue Billing SAF-T. You cannot extract Accounting SAF-T for non-Portuguese company codes. 4.3 Country-Specific Settings in detail In this chapter each of the sub-menus will be explained in terms of function, how to use it and the meaning of the fields. You can access the customizing view by menu navigation as explained above, or using the transaction code mentioned in each case. Portugal à Specify Business Cases Define system or business cases that apply to your company. The report will behave accord- ingly when extracting the data or creating the file. Some of these options require additional cus- tomizing. This customizing task is mandatory. Transaction: FIEU_BCP to maintain table FIEUD_BC
  • 25. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 25 of 73 For a new entry, define the general parameters (country key, company code and validity dates) and proceed to define the details in the frames below. Flag the options which apply in your com- pany. Explanation of the parameters Master Data Field Description Content VEND_CUST_IND Vendors as Cus- tomers Check this to determine if the Vendor's manual FI credit memos should be considered as man- ual FI invoices during the XML file output. INCL_SER_IND Service as Prod- ucts Report services as products in the XML file. This is relevant if services are specified in the ASMD table. This indication is needed in order to properly fill Product related information in the XML file for the products maintained in the ASMD table. COA_CONV_IND Chart of Account Conversion Indicate whether chart of account conversion or changes to accounts have been performed in previous years. This allows you to report the GL based information as valid in that respective year. This setting can also be used in case you need to reflect a different CoA in the file than the one in the system (see details under chapter 9. Spe- cial Configurations: FSV for GeneralLedger).
  • 26. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 26 of 73 Master Data Field Description Content TAX_LINE_MAT_IND Tax like Material Special taxes on the invoice (e.g. luxury tax, al- cohol tax, eco tax, etc.), other than VAT or Stamp Tax, shall be shown in the XML file as an invoiced product. Like for “normal” products, there must be an entry in the Product master data file section. In the sales document they are shown in line items like an invoiced product. MAIN_ALT_ACCT Main/Alternate Account Specifies which is the chart of accounts used in the system for Portugal: the primary or the coun- try chart of account. Select M, if the Company Code uses the pri- mary CoA for Portugal; or select A if the Com- pany Code uses the country CoA for Portugal TAXOREF Taxonomy Ref- erence This identifies the type of accounting standard used by each business, per company code, as defined in Portaria 302/2016. S - SNC (ASS)-based accounting rules N - International Accounting Standards M - SNC (ASS)-based rules for micro- companies O - Other accounting systems (unde- fined) BUS_SECTOR Business Sector Check this box if the company's business sector is related to the Insurance business. Transaction Data Field name Meaning System data Select which billing documents, or which information regarding the invoice payment to be extracted. The billing documents can be in another module, or another system or of a specific kind for a specific file type. · Manual FI invoices · Selfbilling Invoices · FI-CA/IS-U · RE Classic Data · RE-FX · IS-M · Include Invoice Payment (4.1.4.20.6) Enable the options that are applicable for your company. The Include Invoice Payment (4.1.4.20.6) option allows to include the payment information in the sub-structure 4.1.4.20.6 which for performance reasons is excluded by default. This information is not relevant from a fiscal point of view and may be included/excluded according to the request of the Tax Authorities.
  • 27. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 27 of 73 Transaction Data Field name Meaning External data Select the source for invoices to extract; this can be another SAP solution: Select an external source; this applies when you use other systems that integrate in SAP (FI/SD). By making this setting, the in- formation originated outside SAP, related to Invoice status, Invoice number, Hash and Hash Control will be read from the respective BAdI implementation. See chapter 7. Special Documents - External Documents. It can apply to accounting, billing and tax data. Include FI-CA Data With the features in this box, you can include the data from an inte- grated FI-CA module Integrated FI + FI- CA system By checking this option, the data from the FI-CA systems will be in- cluded in the file integrated with the FI data. Stand-alone FI-CA system By checking this option, only the data from the FI-CA system will be included in the file. Portugal à Specify Tax Code Details The tax master data (TaxTable) in the XML file requires tax information different from how it is stored in the system. Use this view to specify the tax parameters as required to provide the VAT information according to the requirements of SAF-T(PT). This information is needed in Master- files/TaxTables and also in Sales Invoices. Besides defining VAT or Stamp Duty, you can also use this table to make the settings for With- holding tax. This information is required in Sales Invoices. This customizing task is mandatory. Transaction: SAFTPT_TAX to maintain table SAFT_PT_TAX_DATA Explanation of the Table Fields Field Description Content MANDT Client Client
  • 28. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 28 of 73 Field Description Content TAXTYPE Tax Type Desc Define whether the tax code refers to VAT (IVA), to Stamp Tax (imposto de selo) (IS), or if it is not subject to tax (NS). TAXCOUNTRYREGION Country/ Region Country or Region according to Por- tuguese tax regulation: · For Mainland fill with PT · For Madeira fill with PT-MA · For Azores fill with:PT-AC TAXCODE Tx Tax code in SAP system used for VAT, Stamp Duty or Withholding tax TAX_CODE_OFFICIA Tax.Code SAFT TaxCode, which classifies the tax code according to its nature; this information is required in TaxTables and in Sales Invoices: for TaxType = IVA: · «RED» for reduced rate; · «INT» for intermediate rate; · «NOR» for normal rate; · «ISE» for exempted rate; · «OUT» for other; · «IRS» for Withholding tax; for TaxType = IS, · fill with the official Stamp Tax Law Code; For TaxType=NS, · fill with NS TAXEXPIRATIONDAT Tax Expiry date End of validity: last valid date for this tax rate. Do not fill any date if the tax code is still in force. DESCRIPTION Text For TaxType=IVA: fill with the de- scription of the tax code as required by law in the invoice. For TaxType=IS: fill with description of the tax event according to the Stamp Duty Law. TAXPERCENTAGE Condition Rate Fill the value of the tax percentage (only the number, not “%”). If the tax is not based on a percentage, do not fill this field. For tax exemption or not subject to tax fill with 0. TAXAMOUNT LC tax amount Tax amount in local currency (EUR): fill only in case tax is defined as amount
  • 29. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 29 of 73 Field Description Content TAXEXEMPTIONREAS Tax Exemption.Reason Reason for Tax Exemption: manda- tory when TaxPercentage or TaxA- mount is zero (exempted or not sub- ject). Fill with applicable legal funda- ment; This information is required for Sales Invoices TAXCURRENCY Currency EUR TAXEXEMPTIONCODE Tax Exemption Code ID code which identifies the reason for tax exemption. Example: Client Tax Type Desc1 Country/ Region Tax Code Off.Tax. Code Tax Expiry date Text Rate Tax Amou nt in LC Tax Ex- emp.Rea- son Crcy TaxEx emp 300 IVA PT A1 NOR 30.06.2010 IVA à Taxa nor- mal … 20 EUR 300 IVA PT A1 NOR IVA à Taxa nor- mal … 20 EUR 300 IVA PT A2 ISE Isento de IVA, CIVA…. 0 Isenção artº…. EUR M08 300 IS PT X8 4 Cheques de qualquer natureza 1.00 EUR 300 IVA PT M1 IRS Retenção IRS 22 EUR 300 NS PT XY NS Não su- jeito 0 Não su- jeito EUR M99 1 In case an invoice document is issued without a Tax Code the report will see this as a non-tax- able transaction and by default, fills the fields as a non-taxable invoice. The report will assign the following values: TaxType - NS TaxCountryRegion - PT TaxCode - NS TaxPercentage - 0 TaxExemptionReason - Não sujeito TaxExemptionCode - M99 Portugal à Define Ranges for Internal Documents Internal Documents are documents which you do not want to user for SAF-T file creation, as they do not meet the legal requirement for an invoice. You must identify documents you consider as internal document in SD, by defining a number range to which these documents must belong.
  • 30. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 30 of 73 Please note: When a document is considered as an internal document it is only possible to ex- clude the ones that don´t have a customer line in the accounting document. If the accounting document of the SD invoice has a customer line, it must be reported in Table 4.3 and cannot be excluded from Table 4. For more information, please refer to 3.1.1.1.2 Internal SD documents not posted in Accounting. Transaction FIPT_DOC_EXC Explanation of the Table Fields Field Description Content BUKRS Company Code The organizational unit within finan- cial accounting. FKART Billing Type NUMKI Number Range This defines a number range for in- ternal documents. The number range typically determines the docu- ment type. INACTIVE Inactive Determines if number range is inac- tive or not.
  • 31. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 31 of 73 Field Description Content WRKTYPE Work Type SAF-T files require a Work Type for Working Documents. · CM Table Consultation · CC Consignment Credit · FC Consignment Invoice · FO Worksheets · NE Order Forms · OU Others · OR Quotations · PF Pro Forma · DC Issued Documents · RP Bonus or Bonus Re- ceipt · RE Reversal or Receipt of Reversal · CS Attribution to Co-In- surer · LD Attribution to Leading Co-Insurer · RA Accepted Re-Insur- ance Portugal à Define Alternate Accounts Some companies may have carried out a Chart of Accounts Conversion (legally required in 2010 in Portugal), or simply changed a few accounts. In such cases the accounts history (for- mer account number and name) may be lost. In the SAF-T (PT) file, however, the data must be shown according to the facts of the reporting year. For example, if a conversion was performed during 2010 and a SAFT file for 2009 is to be created, the accounts’ data must correspond to the information valid in 2009. Use the customizing table SAFTPT_ALT_ACCTS, to maintain account information that is devi- ating from the currently set parameters. Whenever an entry exists in this table for the given company code, fiscal year and account it is taken into the file, otherwise the actual account will be taken from the accounts master data (ta- ble SKB1). Transaction: SAFTPT_ALTACCTS to maintain table SAFTPT_ALT_ACCTS
  • 32. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 32 of 73 Explanation of the Table Fields Field Name Description Meaning MANDT Client Client F_BUKRS CoCd Define a company code range for which the account definition is validT_BUKRS Co.Code VALIDTO Year Fiscal year until which the defined account parameters are valid PRIMARYACCOUNT G/L Account Current account number of the Main Chart of Accounts ALTERNATEACCOUNT Group acct no. Account number as valid in given fis- cal year for SAF-T (PT) file Example: Scenario 1: In Company Code PT01, Chart of Accounts for Portugal (CAPT) is the main chart of accounts in SAP system; You choose to create the SAF-T (PT) file with the option “Primary Chart of Ac- counts”. In 2009 account 100000 existed in CAPT. However, in 2010 it was replaced by a new account with another account number 300000. à SAFT-PT file for 2009 shall show account 100000 (in MasterFiles and GeneralLedg- erEntries) SAFT-PT file for 2010 shall show account 300000 (in MasterFiles and GeneralLedg- erEntries) à Customize SAFTPT_ALT_ACCTS: CoCd Co.Code Year G/L Account Group acct no. PT01 2009 300000 100000 Scenario 2:
  • 33. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 33 of 73 In Company Code PT02, Chart of Accounts for Portugal (CAPT) is the Alternative Chart of ac- counts in SAP system; You choose to create the SAF-T (PT) file with the option “Country Chart of Accounts” In 2009 the main account 100000 had the alternative account 1000 assigned; In 2010 a new account is assigned to the same main account: 3000. à SAFT-PT file for 2009 shall show account 1000 (in MasterFiles and General Ledger En- tries) à SAFT-PT file for 2010 shall show account 3000 (in MasterFiles and General Ledger En- tries) à Customize SAFTPT_ALT_ACCTS: CoCd Co.Code Year G/L Account Group acct no. PT02 2009 3000 1000 Portugal à Specify Prefix for Material Numbers Use this view to specify a prefix for the Product code that identifies the real estate service. This may be needed to avoid duplication of Product codes and to assure that the Product code is unique. See more detailed information in chapter Special Configurations: Products in FI Invoices. Transaction: SAFT_MATPRE to maintain table PTSAFT_MATPRE Explanation of the Table Fields Field Name Description Meaning BUKRS CoCd Company code for which SAF-T file will be created. MAT_PREFIX Prefix of M No. Prefix that is concatenated to the Product ID derived from other pa- rameters (see chapter 10. Special Configurations: Products in FI In- voices)
  • 34. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 34 of 73 Portugal à Source Document Mappings The following customizing tasks can be performed: · Map payment method to payment mechanism · Specify Details for Tax like materials 4.3.4.1 Map Payment Method to Payment Mechanism Use this transaction to map the payment method customized in the system (specified in an in- voice) to the payment mechanism indicators as required for SAFT file. The payment mecha- nisms are to be reported with the following values in the SAF-T file: Payment Mechanism according to SAF-T Meaning CC Credit Card CD Debit Card CH Check CO Check or gift card CS Compensation of balances DE Electronic money, e.g. customer loyalty card or points card, etc. ; LC Bill of exchange MB Multibanco reference (Portugal specific payment method); NU Money OU Others PR Exchange of goods; TB Bank transfer or authorized direct debit; TR Restaurant Ticket The following payment methods customized in the SAP system are already mapped by default in the program: Payment Method acc. to SAFT Payment Method in SAP C CH T TB If it's required to map any other payment methods other than the above-mentioned default val- ues, then this has to be customized in this view. If no entry is maintained in this table, then the program takes the value OU (=other) by default to fill this field in the SAF(T) PT file.
  • 35. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 35 of 73 Transaction: FIEU_PAYM to maintain table FIEUD_PAYM Explanation of the table fields: Field Description Content MANDT Client Client LAND1 Country Country PT BUKRS Company Code Company code for which SAF-T file will be created. VALIDITY_FROM Valid from Start date of the validity period VALIDITY_TO Valid to End date of the validity period PAY_MECH Payment Method Specify the relevant SAP payment method (C, T …). TARG_PAY_MECH Payment Mechanism Select the respective code for SAF- T (PT) payment mechanism (NU, CH, TB,…). 4.3.4.2 Specify Details for Tax Like Materials (Product) Special taxes other than VAT or Stamp Tax shall be treated as an invoiced product (e.g. excise duty, specific ecological charges, etc.). In terms of SAP system such taxes are normally defined in the SD pricing conditions. These pricing conditions shall be found and shown as a separate line item in the invoice, net of VAT. All line item amounts and VAT amounts are recalculated ac- cordingly: · DebitAmount/CreditAmount (SAFT fields 4.1.4.19.13 and 4.1.4.19.14): indicate the amount of the tax/charge/fee in question, net of VAT. In case it is subject to VAT and the VAT amount is included in the amount given by the pricing condition, the VAT amount is substracted automatically by the program. · Tax (4.1.4.19.15): the VAT information regarding this tax-like-material, in case it is sub- ject to VAT, will be filled in these fields. The VAT amount, subtracted automatically from the amount given in the pricing condition, is shown here.
  • 36. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 36 of 73 These taxes must also have an entry in Masterfiles/Product, as they represent a product. For this, a customizing table must be maintained in order to define the “product” information, e.g. product number, product type, etc. The respective pricing conditions in the SAP system must be identify and customized in table SAFTPT_IMAT. Transaction: SAFTPT_TAXMAT to maintain table SAFTPT_IMAT Explanation of the table fields: Field Description Content MANDT Client Client BUKRS Company Code Company code for which SAF-T file will be created. TAXLIKEMAT TaxLikeMaterial Indicate the pricing condition of the tax-like-material. It will also be taken as Product ID. MATKL Material Group for SAFT-PT Material Group for Tax like material EAN11 EAN/UPC International Article Number (EAN/UPC); identical with the ProductID VAT_RELEVANT VAT Relevant VAT relevant Indicator: indicate whether the tax is subject to VAT. In case the pricing condition is defined as “Surcharge” (Condition Class = A) => non-relevant; in case the pric- ing condition is defined as “Taxes” (Condition Class = D) => relevant. PRODUCT_TYPE Tax-like Material Value The following values are possible: O=Other, E=Special Consumer Taxes; I= Taxes, Levies & Parafis- cal Charges;
  • 37. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 37 of 73 Portugal à Define Taxonomy Codes Portaria 302/2016 introduced the concept of taxonomy classification codes (Taxonomy Codes), as described in the official taxonomy lists published in Annex II and III of the Portaria, by the Tax Authority in Portugal. These Taxonomy Codes must be customized to indicate the accounting standard associated with each Taxonomy Code. Transaction FIPT_TAXOCODE to Customize table FIPTC_TAXOCODE Explanation of the table fields: Field Description Content TAXOREF Taxonomy Reference Enter the accounting Taxonomy Ref- erence for your company code. According to Portaria 302/2016 all Portuguese companies must have as- signed a Taxonomy Reference, which will identify the type of accounting standard used by the company. TAXOCODE Taxonomy Code Enter a Taxonomy code to classify your company's G/L accounts ac- cording to the official classification provided by the Tax Authorities. DESCRIPTION Taxonomy Code Description Manual entry of the description for this Taxonomy Code. Portugal à Assign Taxonomy Codes to G/L Accounts To each G/L account under one Company Code, and validity period, you must assign a Taxonomy Code. Transaction: FIPT_TAXOACC to Customize table FIPTC_TAXOACC
  • 38. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 38 of 73 Explanation of the table fields: Field Description Content BUKRS Company code BEGDATE From Date Define the beginning date of a validity period for the assignment of Taxon- omy Codes to G/L Accounts. ACC_FROM From Account Define the beginning of a range of G/L Account numbers for the assign- ment of Taxonomy Codes. ENDDATE To Date Define the end date of a validity pe- riod for the assignment of Taxonomy Codes to G/L Accounts. ACC_TO To Account Define the end of a range of G/L Ac- count numbers for the assignment of Taxonomy Codes. TAXOCODE Taxonomy Code Classify your company's G/L Ac- counts according to an official classifi- cation provided by the Portuguese Tax Authorities 5 Data Extraction The next step is to perform the data extraction, in order to fill the RPFIEU_SAFT extraction ta- bles (FIEUD_FIDOC_H, FIEUD_FIDOC_I, FIEUD_FISUMMARY, FIEUD_SDINV_H, etc.). Settings Extract Creation & Download Validation
  • 39. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 39 of 73 These tables are the basis for data retrieval while running the report. Before running the extrac- tion you must take some decisions: - For which purpose do you want to create the file? - For how many/which periods do you want to create the file? - Do you want to create a file containing all sections, or only a few? The answers to these questions determine the scope of the SAFT file. NOTE: Invoices should always be created in “normal” periods (1-12). Special periods are meant for special accounting activities, such as results determination, account transfers, etc. If there is the case of invoices being posted in special periods, this will be reflected in the SAFT file and return an error by the AT-portal validation. The master data to populate the Masterfiles section is read directly from the system tables dur- ing the XML file generation; no specific RPFIEU_SAFT extraction tables are used in this case. This is important to bear in mind especially if you perform frequent data reorganization that im- plies deletion. Once you delete master data it is no longer available in the database tables. Thus, you should create the XML files before deleting data. In case you archive data, you need to use the function to retrieve data from the archives. 5.1 Running the Data Extraction Execute RPFIEU_SAFT report and then select the Extract Data option. The selection screen for the data extraction will open. Here you can make your selection ac- cording to the scope of the file you want to create. Consider the explanation of each field shown below. First you determine whether you want to extract data and fill the RPFIEU_SAFT tables, or if you first want to delete the current content of the RPFIEU_SAFT tables. If the RPFIEU_SAFT tables are populated with data from a previous run - for the same or an overlapping period of time - you must first delete it before running the extraction you need, unless the content is exactly the one you need.
  • 40. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 40 of 73
  • 41. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 41 of 73 Field name Meaning Extract By selecting this radio button you determine that you want to extract data and populate the RPFIEU_SAFT tables Delete By selecting this radio button you determine that you want to delete data from the RPFIEU_SAFT tables Extract Module Choose the module for which you want to perform the action. Press F4 key to see the possible values. For Portugal all modules are valid, except 5-Assets and 6-Purchase Invoices. An extraction for each module has to be run if data from both mod- ules has to be included in the same file. Company Code The company code for which you wish to run the extract and create the XML file, or remove data from the RPFIEU_SAFT extraction ta- bles. Extraction Date Specify the date interval of the data to be extracted, or of the extract to be removed. You can choose the date interval by pressing F4 key. NOTE: This selection is based on the date configuration made under chapter Portugal à Specify Business Casesas described above. The Date field provides an F4 help option that allows you to see the intervals that have already been extracted. This will help the user to choose the correct time intervals and/or the correct extract that al- ready exists, instead of re-creating it. You must adjust the extraction dates to the XML creation date inter- val you will use. The interval must match with the period of the fiscal year that is reported. Fiscal year The fiscal year for which you create the extract and want to create the XML file. If the fiscal year as defined in the company code is not identical to the calendar year, the user does not need to worry about that. The program will always retrieve the data based on the fiscal year. Note: The SAFT(PT) file is always created based on fiscal year, not on calendar year. Companies that use a fiscal year that is different from the calendar year must be aware that they will not be able to create one file based on calendar year, if the fiscal year goes across years. Non-calendar fiscal years must follow the rules of the IRC Code (Corporate Income Tax Law). Data of SAFT(PT) field 1.8 FiscalYear must corresponds to the year of field 1.9 StartDate. Database Use this option to retrieve data from the database. Includes archive If documents from the database are linked in the document flow with archived documents you must select this option to additionally in- clude the archived data.
  • 42. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 42 of 73 Field name Meaning Archive Use this option to retrieve archived data of the selected extract mod- ule. If in the selected interval some documents are in the database and others archived, you must run two extractions. One with Database option and a second one with the Archive option. If the archived data is to be retrieved from FI and SD but the ar- chives cover different periods of time, the archives must be ex- tracted individually. This mixed situation is presently not covered. Extract Extract the data into the extract tables for a single period, for the complete fiscal year or for a freely defined interval. The data extracted includes: · FI transactional data for Accounting data (GeneralLedgerEntries) · SD transactional data for Billing data (SalesInvoices) · FI transactional data for Billing data, i.e. FI invoices (SalesInvoices) Note: make sure that all settings are correctly done as described in chapter Settings. Choose Extract to run the data extraction from relevant modules (Accounting / Billing). Addition- ally, the report will also calculate the total values (total entries, total debit and credit) during the extraction. If the data volume is high, execute the report in background mode. If the tables already contain extracted data it is only possible to extract a distinct date interval in order to add data. It is not possible to run the extraction for overlapping date ranges. Restrictions: Delete Choose Delete under operation selection if you want to remove extracted data from the table. This can be useful e.g. when · New documents have been posted in a period after RPFIEU_SAFT data was last ex- tracted. · Customizing settings have been changed and a new RPFIEU_SAFT extraction is needed with the new settings. · You have previously created an extract with the wrong selection criteria. · The data is no longer needed · The table size has reached storage limit
  • 43. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 43 of 73 Note: when deleting RPFIEU_SAFT data you should be using the same dates’ definition you used when creating the extract. Partial deletion is not possible, extracted dates can be selected from F4 help. System messages while executing While running the extraction, file creation or deletion the following situations will trigger a mes- sage: Extraction / Creation: · Error message when only for “from date” is selected · Information message when no data is present for extraction. · Success message when data has been successfully extracted. · Error message if the extraction is performed for already extracted date range. · If the fiscal year set is different from the fiscal year of the interval. The same error mes- sage will appear if the dates given belong to different fiscal years. · If the company code indicated is not configured in the customizing table. Creation: · If the dates indicated belong only partially to one of the extracted intervals. Deletion: · Information message to avoid partial deletion. · Success message when data is deleted successfully. Administration If new postings are made in a period which has already been extracted, the table content must be deleted and the period re-extracted. Note that accounting documents must be extracted if there are FI invoices even if GeneralLedg- erEntries are not to be included. Application Log Once the file creation is concluded the system creates a log reporting the number of entries for each master data section as well as for the transaction data. The log is shown right after the ex- ecution. However, all logs will be stored in the system and can be consulted at any time later. To view the log, proceed as explained below. Transaction: SLG1 to access the application Logs created during the different stages of the SAF-T file creation process. The Analyze Application Log screen will open (see image below). Enter the selection data as explained in the table below.
  • 44. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 44 of 73 Field Description Object Enter RPFISAFT_LOG Sub Object In case of the SAF-T (PT) (i.e. for Portugal) enter PT in this field External ID This field can be left blank Time Restriction From (Date/time) From Date / time information of the interval when the RPFIEU_SAFT report was executed To (Date/time) To Date /time information of the interval when the RPFIEU_SAFT report was executed Log Triggered By User If known, enter the user name of who had executed the report Transaction Code Enter *, for any transaction Program Enter RPFIEU_SAFT Log Class Select the “All Logs” option Log Creation Select the “Any” option Log Source and Formatting Select the “Format Completely form Database” option
  • 45. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 45 of 73 After having defined all selection fields, press execute or F8 to run the log. In the next screen, as result of running the log, a list containing all application logs that correspond to the selection criteria will be shown. The red, yellow or green symbol will tell you whether there were any errors in the execution. Double click on the exectution you want to see in detail and check the details in the frame below. The counter beside the symbols shows the number of existing incidents for each situation, e.g. errors, warnings and simple information. Look for the critical entries and analyse the error. This can be for instance missing information of a particular field, missing accounting document to a particular invoice, etc. 6 File Creation The next step is to perform the file creation, in order to obtain the XML file. For this choose the option “Create File”. As you click on that radio button the selection screen opens. Consider the explanation of each field shown below. Settings Extract Creation & Download Validation
  • 46. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 46 of 73 Field name Meaning Company Code The company code for which you created the extract and want to create the XML file. Tax Accounting Basis ‘TaxAccountingBasis’ field in File Header: Specify which data to in- clude in the file: C=Accounting; F=Billing; I=Integrated Accounting and Billing; S=Self Billing; P=Partial Billing. Depending on the option you select the following data will be in- cluded in each case (see chapter 2.1): I = complete data included in the SAF-T (PT) file • Master data GL accounts with the opening and closing balance • Master data Customers • Master data Suppliers • Master data Products • Master data Tax Table • General Ledger Entries • Source Documents (SalesInvoices, MovementOfGoods, Working- Documents, Payment) C = Only accounting information included in the SAF-T (PT) file • Master data GL accounts with the opening balance • Master data Customers • Master data Suppliers • Master data Tax Table • General Ledger Entries F and P = Only Billing information included in the SAF-T (PT) file • Master data Customers • Master data Products • Master data Tax Table • Source Documents Date Date interval for which you created the extract and want to create the XML file. Fiscal year The fiscal year for which you created the extract and want to create the XML file. Tax Entity Tax entity, which indicates the establishment that the generated SAF-T file. Header Comment Field ‘HeaderComment‘ in File Header: fill with your own free text
  • 47. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 47 of 73 Field name Meaning File Name File name and path of the target XML file you want to create. If you have maintained a directory set in transaction FTWP (see customizing details for FTWN Directory Set) you should respect specific rules in this field: only file name (without file path) should be provided, otherwise the XML will be generated in the path spec- ified, but will not be accessible from FTWN transaction. An entry would be present in the transaction FTWN for the file. 6.1 Rules For yearly reporting only one Accounting file shall be created for the entire year. Billing files can be created in multiple smaller files (e.g. per period). Monthly file: The following rules apply: · When to run: every month · What to report: Masterfiles: Customer and Taxes; SourceDocuments: Sales invoices (Billing and FI Invoices), VATon CAsh Payments · Deadline: 25th of the following month · How: Submit the file on the portal Annual file: The following rules apply: · When to run: at year end closing or upon request from the Tax Authorities · What to report: o Masterfiles: GeneralLedger, Customer, Supplier, Product, TaxTable; o SourceDocuments: SalesInvoices (Billing and FI Invoices), MovementOfGoods, WorkingDocuments, Payments o GeneralLedgerEntries · Deadline: According to “when to run” specified above. · How: hand over the file to the TaxAuthorities 7 File Download To download the file to your local PC, run the report RPFIEU_SAFT and proceed with the Download File option.
  • 48. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 48 of 73 If you choose Download File, an additional frame will open below, with 3 options. These options refer to the estimated file size. Select the option that is most suitable for your case. The report will keep this configuration for the future, but you can change it anytime with the Back (F3) but- ton. There are 3 options, · Small to medium files (up to 300 MB): select the ‘File size < 300MB option · Larger files (more than 300MB up to 1GB): select the File size < 1GB option · Very large files (more than 1 GB): select the File size > 1GB option Each option has its own behavior, as explained below: · For option 1 – File Size < 300 MB (Program RFASLDPC): the following screen will open:
  • 49. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 49 of 73 Field name Meaning Source file This field is pre-filled with the generated file; you can also choose another file. Input the data used in RPFIEU_SAFT, option Create File, field File Name. File type Fill with “**” Delete source file Check only if you want to delete the file from the server Copy source file Check this field if you don’t want to remove the file from the server Change byte order Leave this field empty Target disk drive Choose the target drive, or press the Selection of Path and File button. Subdirectory (hard disk) Define the target directory Target file Define the target file name Standard Code Page 1100 Do not check this option SAP Logon code Page Do not check this option No Character Set Conversion Check this option Manual Entry of Code Page Do not check this option Target Code Page Do not check this option
  • 50. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 50 of 73 Press the Execute button to download the file. The file download will be confirmed with the fol- lowing message on the next screen. · For option 2 – File Size < 1 GB (Transaction CG3Y): the following screen will open: Field name Meaning Source file on application server Indicate the source file path and name. Input the data used in RPFIEU_SAFT, option Create File, field File Name. Target file on front end Define target path and file name on the local pc Transfer format for data Define as “BIN” Overwrite file Check this box if you want to overwrite a previously saved file with the same name. Press the Download button to download the file. The file download will be confirmed with the fol- lowing message on the next screen. · For option 3 – File Size > 1 GB (Transaction FTWN): the following screen will open:
  • 51. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 51 of 73 If you have previously made the right settings to use this option (see customizing and file crea- tion details) the XML file will be stored in the FTWN environment, in the directory set defined and under the corresponding fiscal year as indicated for the file creation. The following window of the FTWN environment will open: Drilldown to the file you are looking for by opening the fiscal year folder, the SAFT directory set you defined and you will find the file(s) that have been created. The file will remain here until you delete it. You can now use the Export to local file function in the upper menu to download the file to the local PC. Note: if downloading the file is not possible due to size issues you can also get it directly from the server. 8 File Validation In order to confirm that the file is according to the legal requirement in terms of structure please use the official validator from the Tax Authorities. Select the Option: Validate file. If you choose Validate File, the system displays the following screen: Settings Extract Creation & Download Validation
  • 52. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 52 of 73 Online validator: http://info.portaldasfinancas.gov.pt/apps/SAFT-pt03/ Use this link to validate files that contain invoices that are digitally signed. Use the application provided on the portal of the Tax Authorities, that you can install locally. Validator installed locally: Click on the following link and download the application as shown below: http://info.portaldasfinancas.gov.pt/apps/SAFT-pt03/local/validador_v1_03.exe This application requires you to indicate the public key. Be sure to have it at hand. This key is different regarding test and productive environment. Note: The validation of a file created in a system other than the productive system will return er- ror, as the public key is not known for test systems. When submitting a monthly SAF-T (PT) file for the purpose of reporting invoices to the Tax Au- thorities (https://faturas.portaldasfinancas.gov.pt/home.action), another file validator is provided. This validator excludes some of the validations as they are not relevant for this purpose. It is au- tomatically called when submitting the file in the portal of the Tax Authorities without the user noticing. 9 Special Documents - External Documents Sometimes companies use other billing software to create invoices or delivery documents, apart from the SAP system. Such invoices are digitally signed and included in the SAFT file in the source software. Sometimes these invoices are integrated in the SAP ERP. In that case, they must be included in the SAFT file that is created in the SAP system, identified as external documents. According to SAFT instructions, the documents must be handled differently. This chapter covers invoices, debit and credit memos and delivery documents. Working docu- ments (SAFT table 4.3) can also be affected. Though they are not specifically mentioned here, the same rules apply. Documents that are integrated in the target system in the Accounting section only are not rele- vant for this process, as they are not integrated as invoices and therefore not relevant for the Billing file. Such documents are included in the GeneralLedgerEntries (table 3) file section only and are not subject to any special handling.
  • 53. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 53 of 73 9.1 Integration of documents in SAP SD via summary documents (n:1) If the integration is achieved via summary documents into SAP SD, it is important to ensure the following: - Use a specific number range when integrating such summary documents in the target system. - Integrate this document in the SAFT file of the target system, considering the following rules: o The InvoiceStatus field shall be filled with R (R stands for summary document that includes other documents created in another application, e.g. a document that includes all the invoices to a specific customer issued in a specific period) o The Hash and HashControl fields must contain the digital signature infor- mation from the target system (SAP) 9.2 Integration of documents in SAP SD via detailed doc- ument (1:1): If the integration is achieved by integrating the original document into SAP SD, on a 1:1 basis, it is important to ensure the following: - The values/amounts calculated in the source system must not be changed. - Use a specific number range when integrating such documents in the target system. - Integrate the information of the digital signature from the source system. - When printing, the phrase ‘Cópia do documento original’ must be mentioned on the printout. - Integrate this document in the SAFT file of the target system (using a BADI*), consider- ing the following rules: o Fill HashControl field in tables 4.1 as follows: certificate number from the source software + dot + version of the certificate of the source software. Exam- ple: “9999.1”; where 9999 is the certificate number and 1 is the certificate ver- sion key. In case the source application is not a certified software, fill the HashControl field with the phrase ‘Não certificado’ o Fill Hash field with the digital signature created in the source software. In case the source application is not a certified software, fill the Hash field with ‘0’ (zero). o Fill SourceBilling with the value ‘I’ o In case the source application is not a certified software, the Hash field should be filled with ‘0’ (zero) and the HashControl field with the phrase ‘Não certifi- cado’ * Check note 1987687 - Documentation for BAdI methods for report RPFIEU_SAFT for the spe- cific BAdI “IDENTIFY_EXT_INVOICES_SD"
  • 54. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 54 of 73 9.3 Documents created manually outside the system (on paper) Documents that are created manually on paper, i.e. in case of system downtime, and later inte- grated in the billing and accounting system should follow specific rules: - Use a specific number range when integrating such documents in the target system and activate the digital signature for such documents. - Integrate this document in the SAF-T file considering the following rules: o Fill HashControl field in tables 4.1 and 4.2 with the certificate key version + hy- phen + the SAFT document number; add the value ‘M’ at the end of the docu- ment type (which is part of the SAF-T document number). Example: 1-FTM abc/00995, where ‘FT’ is the document type; ‘M’ is the added value that identi- fies the document as a manual document; ‘abc’ is the series and 00995 is the sequential number. 10 Special SAF-T file – Selfbilling Special SAF-T files are files that are issued when special business scenarios exist, for instance Selfbilling. All steps described above apply to the special SAFT files as well. The specificities are described here. Selfbilling invoices are invoices that a company issues to itself on behalf of the vendor. These are invoices that need to be reported in the SAF-T (PT) file, namely in the SourceDocuments – SalesInvoices section of the SAF-T structure. When this scenario is practiced it is assumed that an agreement exists between the selling and buying party. In practice, Selfbilling invoices are issued by the client. Being documents that are reported as Sales Invoices they must be reported by the Selling party. However, they are cre- ated in the buyer’s system According to the legal requirement of the SAF-T file, the SAF-T file should always be created in the system where the data is created and the reported documents are issued. From this, it is clear that it is the Buyer (the issuer of the Selfbilling invoices) who is obliged to create the Selfbilling SAF-T file. Once the file is created, he hands it over to the vendor, who eventually submits it to the authorities. Note: It is necessary, and legally required, to create one separate SAF-T file per Selfbilling ven- dor. Each file contains the Selfbilling invoices, Products and Vendor data pertaining to that spe- cific vendor only. There will be as many Selfbilling SAF-T files as there are Selfbilling Vendors with Selfbilling invoices in the reporting period. The Selfbilling SAF-T file shall not be integrated with any other SAF-T file. The structure of the file is described next. 10.1 Selfbilling documents and vendors in SAFT The self-billing files are to be generated for each vendor with whom the company has the self- billing agreement set.
  • 55. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 55 of 73 Selfbilling vendor To define a vendor as Selfbilling vendor, you need to do the appropriate settings in the vendor master record. Go to the vendor’s master record and in the Purchasing data tab flag the Au- toEvalGRSetm Del. and AutoEvalGRSetm Ret.checkboxes. Self-billing documents Only invoices created with the following transaction and certified according to legal requirement are considered when creating the Selfbilling SAFT file in SAP: § MRRL: Evaluated Receipt Settlement § MRKO: Settle Consignment/Pipeline Liabs. § MIRO: Enter Incoming Invoice Note: other transactions used to generate Selfbilling invoices, including invoices generated in FI, are not supported.
  • 56. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 56 of 73 10.2 Selfbilling file structure The structure differs only very little from the normal Billing SAFT-T file, the so-called “F” file (TaxAccountingBasis = F). The differences are specified here. In all other aspects the same rules as for F-files apply. Yearly File The Yearly Selfbilling SAF-T file includes the following file sections, with the respective content: · Table 1: Header (content: data of the Supplier company) · Table 2: Master Data o Table 2.2 – Customer (content: data of the invoice issuer – only one entry) o Table 2.4 - Product (content: only the products mentioned in the invoices) o Table 2.5 - TaxTable (content: only the tax information from the included in- voices) · Table 4: SourceDocuments o Table 4.1 – SalesInvoices (content: self-invoices issued on behalf of the par- ticular supplier mentioned in the Header) Monthly File The Monthly Selfbilling SAF-T file includes the following file sections, with the respective con- tent: · Table 1: Header (content: data of the Supplier company) · Table 2: Master Data o Table 2.2 – Customer (content: data of the invoice issuer – only one entry) o Table 2.5 - TaxTable (content: only the tax information from the included in- voices) · Table 4: SourceDocuments o Table 4.1 – SalesInvoices (content: self-invoices issued on behalf of the par- ticular supplier mentioned in the Header) According to the general rules of the monthly SAF-T file, the Product table (2.4) is not included. 10.3 Settings for Selfbilling file Before using the RPFIEU_SAFT report to create the Selfbilling SAFT file, a few configurations must be made. These are described in this chapter. How to access the customizing views Follow the instructions detailed under the chapters How to access the customizing views and Country-Specific Settings -> Portugal to access the settings area. You will find a submenu that is meant for Selfbilling settings only.
  • 57. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 57 of 73 10.1 Country-Specific Settings for Selfbilling In this chapter the Selfbilling relevant sub-menus will be explained in terms of function, how to use it and the meaning of the fields. You can access the customizing view by menu navigation as explained above, or using the transaction code mentioned in each case. Portugal à Specify Business Cases Follow the instructions detailed under chapter Portugal Specify Business Cases and enable the Selfbilling business case. Portugal à Specify Destination of XML files storage When files for multiple vendors are to be generated maintain the file path where the files shall be stored in the application server by maintaining the information here. Transaction: FIEU_PATH to maintain table FIEUC_SBXML_PATH Explanation of the Table Fields
  • 58. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 58 of 73 Field Name Description Meaning LAND1 Ctr Country Code BUKRS CoCd Company Code INV_SOURCE Invoice Source Choose Self Billing (MM module ) in- voices generated via MRKO/MRRL transaction FILE_TYPE File Type Choose Self Billing FILE_PATH File name Provide the complete path and file name in the server where you wish to store the files. Portugal à Generate Selfbilling files Here you make the settings regarding which transaction and document type you use to create Selfbilling invoices for a vendor. Transaction: FIEU_SBINFO to maintain table FISAFTPTC_SBINFO Explanation of the Table Fields Field Name Description Meaning BUKRS Company Code Company Code LIFNR SAFT PT: Self Billing Vendors ID of the vendor BLART Document Type Document Type used for that vendor VALIDFROM Date for beginning of validity Date from which this setting is valid VALIDTO Date validity ends Date until which this setting is valid
  • 59. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 59 of 73 Field Name Description Meaning SHKZG Debit/Credit Indicator Is the posting made as debit or credit TCODE Transaction Code Transaction code used to post the Selfbilling invoice. This can be either MRRL or MRKO. If all transactions are used for the same vendor, main- tain the value BOTH. 10.2 Data Extraction for Self-billing file Proceed as described under chapter Data Extraction in order to extract Selfbilling data, choose the respective Extract Module 9 Self Billing. Upon filling the selection parameters, a new user input sub window appears. It is specific for the Selfbilling scenario and allows you to choose the vendors for whom you want to run the report and create the file. Options: § Extract for individual Vendor: choose this option to run the file only for specific Vendors § Create data for All Vendors: choose this option to run the file for all Vendors at once. A Selfbilling SAFT file will be created for each of the vendors entered in the customizing table as described under chapter Portugal -> Generate Selfbilling files. § Selfbilling Vendor: fill this field with the vendor ID or vendor ID range according to the files you want to create. These selection fields are available for the Extract for individual Ven- dor option only. Continue as described under chapter Data Extraction. In the case of Selfbilling SAFT file creation the log will refer to the data related to the Selfbilling vendors set, whether documents exist, etc.
  • 60. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 60 of 73 10.3 Deleting Extracted data for Selfbilling file To delete the extract for re-extraction of data for the same vendor for already extracted periods or for clearing the database after the submission process is completed and verified, if needed, select the option Extract Data > “Delete” as shown below. Like the Extraction, the Deletion of extracted data can be done for individual vendors or for all vendors as maintained in the table and for which there were data extracted previously. To delete the data for an individual vendor or for a few vendors, select the “Delete for Individual Vendor” option and provide the relevant vendor numbers in the “Self Billing Vendor” selection field. If all Selfbilling data extracts need to be deleted select the “Delete for All Vendors” option and execute the report In both cases the deleted data from the extract table is shown in the log showing next.
  • 61. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 61 of 73 10.4 File Creation and Download for Selfbilling file Proceed as described under chapter File Creation. All that is described there applies for Selfbilling SAFT file creation. For creating Selfbilling SAFT files, some of the selection parameters have to be filled with specific values: § TaxAccountingBasis: S Upon filling the selection parameters, a new user input sub window appears. It is specific for the Selfbilling scenario and allows you to choose the vendors for whom you want to run the report and create the file(s). Options: § Individual Vendor: choose this option to run the file only for specific Vendors § Create File for All Vendors: choose this option to run the file only for all Vendors at one time. A Selfbilling SAFT file will be created for each of the vendors entered in the custom- izing table as described under chapter Portugal -> Generate Selfbilling files. § Selfbilling Vendor: fill this field with the vendor ID or vendor ID range according to the files you want to create. These selection fields are available for the Individual Vendor option only. When creating the file for an individual vendor, provide the file name in the appropriate File Name field on the selection screen. If no path is specified the file will be stored in the physical path location maintained as the logical file path DIR_HOME. In case of file generation for all vendors, the file name is created automatically, consisting of the vendor ID, the date interval for which the file is created, creation date and time. Once the process is completed, an application log with the file names and the summary of the data included in each file will be shown.
  • 62. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 62 of 73 For downloading the file proceed as described in chapter File Download. 10.5 File Validation for Selfbilling file For validating the Selfbilling file proceed as described in chapter File Validation.
  • 63. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 63 of 73 11 Special Configurations: FSV for Gener- alLedger The file section GeneralLedger in Masterfiles contains the data regarding the company’s ac- counts.. As of Portaria 160/2013, this section shall include all accounts, even internal accounts, in a hier- archically structured manner. This is a legal change compared to the previous rule, where only valid bookkeeping accounts were required and the hierarchical structure was not reflected. To achieve this, special configurations are needed in the SAP system. The tool used is the Fi- nancial Statement Version (FSV), a standard tool in SAP Financials. In SAP, this information is pulled from FI. Once the FSV has been created it must be defined in the RPFIEU_SAFT settings so that the program knows which one to use. If necessary, update the FSV every time the chart of accounts changes. To know more about how to set the FSV for the report, please refer to chapter Specify Generic information. NOTE: The existence of an FSV is NOT needed for retrieving the accounting documents into SAFT. In compliance with the legal requirement, all financial postings are selected for SAFT. 11.1 Legal Chart of Accounts - SNC In the Portuguese Official Chart of Accounts – SNC – accounts are structured in a hierarchy consisting of movement accounts (lower level) and grouping accounts (higher level) (see picture below). Movement accounts are accounts where the actual postings are registered and group- ing accounts are accounts that group movement accounts of the same kind and totalize the bal- ances. The image below is an excerpt of the SNC. 11.2 Chart of Accounts in SAFT – GeneralLedger The 2.1.-GeneralLedger file section includes the Chart of Accounts information. It has the fol- lowing fields: Field number Field name
  • 64. SAP AG® User guide © 2015 SAP AG 9/22/2017 UserManual_RPFIEU_SAFT_1.04_EN.docx Page 64 of 73 2.1.1 AccountID 2.1.2 AccountDescription 2.1.3 OpeningDebitBalance 2.1.4 OpeningCreditBalance 2.1.5 ClosingDebitBalance 2.1.6 ClosingCreditBalance 2.1.7 GroupingCategory 2.1.8 GroupingCode The fields GroupingCategory and GroupingCode characterize an account in two aspect. The GroupingCategory field indicates · the level of the account: 1st level, grouping account or movement account, and · whether it is an internal or analytical account, or a bookkeeping account The GroupingCode field indicates the account in the immediate upper level of the account in question, except for 1st level accounts, which are the highest level. Thus, the accounts information included in the GeneralLedger section reflects the CoA structure according to the SNC. 11.3 Chart of Accounts in the SAP system for SAFT In the SAP system, accounts are stored in a flat table. The concept of a hierarchical Chart of Ac- counts (CoA) with grouping and movement accounts does not exist. In order to correctly select and structure the account information as required, the Financial Statement Version (FSV) is used. The FSV is a tool in Standard SAP Financials that is used to build a report structure based on accounts, such as the Balance Sheet, the P&L Statement, etc. Using the FSV to create a hierarchical CoA The FSV is a reporting tool that is used in this context to build the CoA as needed in the Gener- alLedger section. It allows you to build the hierarchy, to define the account groups, to character- ize accounts as internal or as bookkeeping accounts, to distinguish movement, grouping and 1st level accounts and to sum balances. In this chapter important details are described that have to be considered to create an FSV that fulfils all SAFT requirements. IMPORTANT NOTE: It is recommended to create a specific FSV for the SAFT purpose. The ones normally used for Balance Sheet or Trial Balances do not comply with all requisites. Only by creating a specific FSV can you ensure that all the necessary settings can be done without interfering with other FSV applications. How to create an FSV for SAFT Use transaction OB58 to create the FSV. The FSV can be created based on the Primary Chart of Accounts (KTOPL) or on the Country Chart of Accounts (KTOP2). Choose the option that is in place in your company code. When defining the FSV for SAFT please consider the following. a) The CoA structure according to SNC: