Sei sulla pagina 1di 19

Table of Contents

BAdI Definition: FIEU_SAFT_USER_EXIST ..................................................................................................... 3


1. BAdI Method: UPDATE_CUSTOMER_MASTER.................................................................................. 5
2. BAdI Method: UPDATE_VENDOR_MASTER ...................................................................................... 5
3. BAdI Method: SET_AMOUNTS_CREDIT_DEBIT ................................................................................. 5
4. BAdI Method: SET_JOURNAL_DESC .................................................................................................. 6
5. BAdI Method: TAX_LIKE_MATERIAL ................................................................................................. 6
6. BAdI Method: UPDATE_TRANSID_REBATE ....................................................................................... 7
7. BAdI Method: SET_NET_TAX............................................................................................................. 7
8. BAdI Method: SET_NEG_POSTING_AMT_INV .................................................................................. 8
9. BAdI Method: SET_TRANSACTION_TYPE .......................................................................................... 8
10. BAdI Method: SET_INVOICE_TYPE ................................................................................................ 8
11. BAdI Method: SET_COUNTRY_LAND ............................................................................................ 9
12. BAdI Method: SET_SHIPTO_ADDRESS .......................................................................................... 9
13. BAdI Method: SET_SHIPFROM_ADDRESS ..................................................................................... 9
14. BAdI Method: SET_CUSTOMER_ID_SD ....................................................................................... 10
15. BAdI Method: IDENTIFY_EXT_INVOICES_SD (Obsolete) ............................................................. 11
16. BAdI Method: IDENTIFY_EXT_INVOICES_FI ................................................................................ 11
17. BAdI Method: SET_SIGNATURE_INFO_SD .................................................................................. 11
18. BAdI Method: SET_SIGNATURE_INFO_FI.................................................................................... 12
19. BAdI Method: SET_PRODUCT_TYPE ........................................................................................... 13
20. BAdI Method: POPULATE_TAX_DATA......................................................................................... 13
21. BAdI Method: REPLACE_CURRENCY_KEY ................................................................................... 14
22. BAdI Method: UPDATE_HEADER_INFO ...................................................................................... 14
23. BAdI Method: SET_MATNR_FOR_FI_INV.................................................................................... 14
24. BAdI Method: IDENTIFY_DISCOUNT_AMT.................................................................................. 15
25. BAdI Method: ASSET_AUTO_LINE............................................................................................... 15
26. BAdI Method: SET_DEL_MOV_DATES......................................................................................... 16
27. BAdI Method: SET_SOURCE_BILLING ......................................................................................... 16
28. BAdI Method: SET_INVOICE_STATUS_SD ................................................................................... 16
29. BAdI Method: SET_INVOICE_STATUS_MFI ................................................................................. 17
30. BAdI Method: SET_ORIGINATING_ON ........................................................................................ 17
31. BAdI Method: UPDATE_TAXPOINT_DATE................................................................................... 17
32. BAdI Method: FILL_SD_ITEMS_AFS............................................................................................. 18
33. BAdI Method: SET_DELIVERY_DATE ........................................................................................... 18
34. BAdI Method: SET_PRODUCTNUMBERCODE ............................................................................. 18
35. BAdI Method: GET_NON_REVEUNE_BASED_TAX_CODE ........................................................... 19
Version History

Version No. Comments


V9 Table of Contents added to the document
V10 • Deleted the documentation for the following
BAdI methods as these methods are no
longer relevant:
• IDENTIFY_FI_INVOICES
• IDENTIFY_INTERNAL_BILLING
• SET_MFI_INV_TYP

• Deleted information about the parameter


CV_DEL_DATE from the documentation for
the BAdI method SET_DEL_MOV_DATES
as this parameter is no longer valid.

• Added documentation for the following BAdI


methods:
• SET_ORIGINATING_ON

• Updated documentation for the method:


• UPDATE_CUSTOMER_MASTER

V11
V12 • Updated documentation for BAdI methods:
• SET_INVOICE_STATUS_SD
• SET_INVOICE_STATUS_MFI
V13 • Added documentation for the following BAdI
methods:
• FILL_AFS
V15 • SET_DELIVERY_DATE
V16 • SET_PRODUCTNUMBERCODE
V17 • GET_NON_REVEUNE_BASED_TAX_CODE

Business Add-In (BAdI) Definition

BAdI Definition: FIEU_SAFT_USER_EXIST


This Business Add-In (BAdI) is used in the Financial Accounting (FI-LOC) component.

You use this BAdI to update or modify the default values reported in the output XML file generated by the
Standard Audit File for Tax Purpose (SAFT) (RPFIEU_SAFT) report as per customer-specific
requirements.

This BAdI is called when you execute the Standard Audit File for Tax Purpose (RPFIEU_SAFT) report.

Standard settings
For more information about the standard settings (filters, single or multiple uses), see the Enhancement Spot
Element Definitions tab in the BAdI Builder (transaction SE18).

See also

BAdI Methods:
BAdI Methods
1. BAdI Method: UPDATE_CUSTOMER_MASTER
Use

You use this Business Add-In (BAdI) method to add customers in the Customer section inside the
MasterFiles section.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters:

• CT_CUST_MASTERS : If you want to add the customers not getting reported in the SAF-
T file.

====================================================================================

2. BAdI Method: UPDATE_VENDOR_MASTER


Use

You use this Business Add-In (BAdI) method to update the vendor details in the Supplier section
inside the MasterFiles section.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters:

• CT_VEND_MASTERS: If you want to modify the vendor address reported by default in


the XML file for country-version, update this changing parameter based on the import
parameters

=====================================================================================

3. BAdI Method: SET_AMOUNTS_CREDIT_DEBIT


Use

You use this Business Add-In (BAdI) method to update the debit amount, credit amount, and unit
price of the line item in the SalesInvoices section inside the SourceDocuments section.

Parameters
The following list contains only the changing parameters that require additional information:

Changing Parameters:

• CV_INV_DEBIT_AMT: Tf you want to modify the line item debit amount reported by
default in the XML file, update this changing parameter based on the import parameters

• CV_INV_CREDIT_AMT: If you want to modify the line item credit amount reported by
default in the XML file, update this changing parameter based on the import parameters

• CV_UNIT_PRICE: If you want to modify the line item unit price reported by default in
the XML file, update this changing parameter based on the import parameters

If the currency is not EURO, then only you need to set the values of the following parameters:

o CV_CURR_DEBTI_AMT
o CV_CURR_CREDIT_AMT

=====================================================================================

4. BAdI Method: SET_JOURNAL_DESC


Use

You use this Business Add-In (BAdI) method to update the journal general description and
transaction description in the Journal section inside the GeneralLedgerEntries section.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters:

• EV_FI_DOC_DESC: If you want to modify the document type description reported by


default in the XML file, update this changing parameter based on the import parameters
• EV_FI_JR_DESC: If you want to modify the document description reported by default in
the XML file, update this changing parameter based on the import parameters

=====================================================================================

5. BAdI Method: TAX_LIKE_MATERIAL


Use

You use this Business Add-In (BAdI) method to include tax like material amounts in the
DocumentTotal sections.
Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters:

• TAX_MAT_IND : If you want to report the tax-like material amounts in the


DocumentTotals section, set the value of this changing parameter as X.

=====================================================================================

6. BAdI Method: UPDATE_TRANSID_REBATE


Use

You use this Business Add-In (BAdI) method to update the transcation id in the TranscationID
field in case if multiple accounting documents exist for a SD invoice.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters:

• CS_TRANSAID: If you want to modify the transaction ID reported by default in the XML
file, update this changing parameter based on the import parameters

=====================================================================================

7. BAdI Method: SET_NET_TAX


Use

You use this Business Add-In (BAdI) method to update the NetTotal and TaxPayable fields in
DocumentTotal in case of offers scenario.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters:

• CV_INV_NET_AMT: If you want to modify the net total amount reported by default in
the XML file, update this changing parameter based on the import parameters
• CV_INV_TAX_AMT: If you want to modify the tax payable amount reported by default
in the XML file, update this changing parameter based on the import parameters

=====================================================================================
8. BAdI Method: SET_NEG_POSTING_AMT_INV
You use this Business Add-In (BAdI) method to if you want to switch the debit amount and credit
amount reported in the GeneralLedger section of the output XML file. This method is used when
have documents posted with negative values. As per the requirements of tax authorities, negative
values are not to be reported in the output XML file.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters:

• EV_TOGGLE_AMT: If you want to switch the debit and credit amount reported in the
GeneralLedger section of the output file (to prevent the reporting of negative values in the
output file), set the value of this changing parameter as X.

=====================================================================================

9. BAdI Method: SET_TRANSACTION_TYPE


You use this Business Add-In (BAdI) method to override the value of the TransactionType tag in
the GeneralLedger section of the file.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters:

• CV_TRANS_TYP: In this parameter you set the allowed transaction type. The report by
defualt sets N for all documents.

=====================================================================================

10. BAdI Method: SET_INVOICE_TYPE


You use this Business Add-In (BAdI) method to change the invoice type in SD invoices that you
have already defined in the Map Sales Category to Invoice Type (FIEUD_SDGEN) table, thus
enabling you to report the invoice type of your choice in the output XML file.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters
• CV_INV_TYP: This parameter allows you to modify the invoice type reported by default in
the XML file.

=====================================================================================

11. BAdI Method: SET_COUNTRY_LAND


You use this Business Add-In (BAdI) method to change the country key to PT (Portugal) or LU
(Luxembourg).

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_LAND: This parameter allows you to modify the country key reported in the XML file.

=====================================================================================

12. BAdI Method: SET_SHIPTO_ADDRESS


You use this Business Add-In (BAdI) method to change the address to which the goods are
planned to be shipped.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

The following parameters allow you to change the address:

• CV_CUST_ADDRESS
• CV_CUST_CITY
• CV_CUST_POSTALCODE
• CV_CUST_COUNTRY

=====================================================================================

13. BAdI Method: SET_SHIPFROM_ADDRESS


You use this Business Add-In (BAdI) method to change the address from where the goods are
being shipped.

Parameters

The following list contains only the changing parameters that require additional information:
Changing Parameters

The following parameters allow you to change the address:

• CV_PLANT_ADDRESS
• CV_PLANT_CITY
• CV_PLANT_POSTALCODE
• CV_PLANT_COUNTRY

=====================================================================================

14. BAdI Method: SET_CUSTOMER_ID_SD


You use this Business Add-In (BAdI) method to change the customer number in a sales
document. When you do use this BAdI method to change the customer number, also ensure to
update the customer number in customer master using the UPDATE_CUSTOMER_MASTER
BAdI method.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_CUST_ID: This parameter allows you to modify the customer number reported in the
XML file.
15. BAdI Method: IDENTIFY_EXT_INVOICES_SD (Obsolete)
(Note: The feature was replaced by the SIPT_IF_VBRK table. See note 2166344)

You use this Business Add-In (BAdI) method to identify SD invoices generated in an external
system. The system considers these invoices when calculating the total debit and total credit, and
offsets the source billing as “I” in the output file.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• EV_EXT_IND: If you want to identify externally generated SD invoices, update this


changing parameter based on the import parameters.

====================================================================================

16. BAdI Method: IDENTIFY_EXT_INVOICES_FI


You use this Business Add-In (BAdI) method to identify FI invoices generated in an external
system. The system considers these invoices when calculating the total debit and total credit, and
offsets the source billing as “I” in the output file.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• EV_EXT_IND_FI: If you want to identify externally generated FI invoices, update this


changing parameter based on the import parameters.

====================================================================================

17. BAdI Method: SET_SIGNATURE_INFO_SD


You use this Business Add-In (BAdI) method to change hash, hash control, and invoice number
details for SD invoices generated in an external system. The system maps these values to the
corresponding fields in the output file.

Note
This method is called by the Standard Audit File for Tax Purpose (SAF-T)
(RPFIEU_SAFT) report only for documents having source billing values I (external
system) and M (manual/backup invoices).

Prerequisites

You have performed the following:

• Defined source billing values in the SET_SOURCE_BILLING BAdI method


• Maintained invoice status for external billing invoices in the
IDENTIFY_EXT_INVOICES_SD BAdI method

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_INVOICE_NUM: This parameter allows you to change the invoice numbers of


externally generated SD invoices reported in the XML file.
• CV_HASH and CV_HASHCONTROL: These parameters allow you to change the hash
and hash control values of externally generated SD invoices reported in the XML file.

Note
You can change the above-mentioned parameters only when the source billing value is I.
If the source billing value is M, then you can only change the CV_HASHCONTROL
parameter.

=====================================================================================

18. BAdI Method: SET_SIGNATURE_INFO_FI


You use this Business Add-In (BAdI) method to change hash, hash control, and invoice number
details for FI invoices generated in an external system. The system maps these values to the
corresponding fields in the output file.

Note
This method is called by the Standard Audit File for Tax Purpose (SAF-T)
(RPFIEU_SAFT) report only for documents having source billing values I (external
system) and M (manual/backup invoices).

Prerequisites

You have performed the following:

• Defined source billing values in the SET_SOURCE_BILLING BAdI method


• Maintained invoice status for external billing invoices in the
IDENTIFY_EXT_INVOICES_SD BAdI method

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_INVOICE_NUM: This parameter allows you to change the invoice numbers of


externally generated of FI invoices reported in the XML file.
• CV_HASH and CV_HASHCONTROL: These parameters allow you to change the hash
and hash control values of externally generated FI invoices reported in the XML file.
Note
You can change the above-mentioned parameters only when the source billing value is I.
If the source billing value is M, then you can only change the CV_HASHCONTROL
parameter.

=====================================================================================

19. BAdI Method: SET_PRODUCT_TYPE


You use this Business Add-In (BAdI) method to change the product type you have already
defined in the SAFT : Product Type (FIEUD_PRODS) table. The system uses this value and
reports it in the output XML file.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• IV_PROD_TYP: If you want to change the product type, update this changing parameter
based on the import parameters.

=====================================================================================

20. BAdI Method: POPULATE_TAX_DATA


You use this Business Add-In (BAdI) method to report tax data of invoices created in an external
system in the output XML file. Also ensure that you pass either the tax percentage or the tax
amount value in the import parameters.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

The following parameters allow you to report tax data:

CV_TAXCODE CV_TAX_PER

CV_TAXTYPE CV_TAX_EXMP_RSN

CV_TAX_CNTRY_REG CV_TAX_AMT

=====================================================================================
21. BAdI Method: REPLACE_CURRENCY_KEY
You use this Business Add-In (BAdI) method to clear the currency key you have defined
internally, and hence avoid reporting the incorrect currency key in the output file.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_CURR_KEY: If you want to avoid reporting the incorrect currency key, update this
changing parameter based on the import parameters.

=====================================================================================

22. BAdI Method: UPDATE_HEADER_INFO


You use this Businesss Add-In (BAdI) method to change the header details of a company code in
the output file.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

The following parameters allow you to change the header details:

CV_ADDRESS CV_LAND

CV_EMAIL CV_POSTALCODE

CV_FAX CV_CITY

CV_PHONE_NO CV_COMP_NAME

CV_COMPANY_ID CV_TAX_REG_NO

CV_BUSS_NAME

=====================================================================================

23. BAdI Method: SET_MATNR_FOR_FI_INV


You use this Business Add-In (BAdI) method to fill the material number and description for FI
invoices that cannot otherwise be done through Portugal-specific customizing tables.

Parameters

The following list contains only the changing parameters that require additional information:
Changing Parameters

The following parameters allow you to fill the material number for FI invoices:

• CV_MATNR
• CV_MATNR_DESC

=====================================================================================

24. BAdI Method: IDENTIFY_DISCOUNT_AMT

You use this Business Add-In (BAdI) method to change the discount amount and condition type.
Note that the RPFIEU_SAFT report determines the discount amount based on the condition type
SKTO.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

The following parameters allow you to change the discount amount and condition type:

• CV_KSCHL
• CV_DISCOUNT_AMT

=====================================================================================

25. BAdI Method: ASSET_AUTO_LINE


You use this Business Add-In (BAdI) method to include auto generated lines in the asset
postings.

Remarks:

- Only Valid for PT

- BADI Method called in ‘extraction’ and ‘generation’ (if any adjust repeat extraction process)

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_IND: If you want the asset postings to include auto generated lines, update this
changing parameter based on the import parameters.

=====================================================================================
26. BAdI Method: SET_DEL_MOV_DATES
You use this Business Add-In (BAdI) method to change MovementStartTime in Sales and
Distribution (SD) invoices.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

The following parameters allow you to change the delivery date and movement start date:

• CV_MOV_DATE

=====================================================================================

27. BAdI Method: SET_SOURCE_BILLING


You use this Business Add-In (BAdI) method to change the invoice source billing in either SD or
manual FI invoices.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_SOURCEBILLING: If you want to change the invoice source billing, update this
changing parameter based on the import parameters.
By default, the status of the source billing is set to P. However, for external invoices, the
status is set to I.

=====================================================================================

28. BAdI Method: SET_INVOICE_STATUS_SD


You use this Business Add-In (BAdI) method to change the status of Sales and Distribution (SD)
invoices.

Note
If the invoice status is A (canceled docs/cancellation) or F, then the debit/credit amounts
are not considered at the time of total debit/credit calculation.
For all other status options, the invoices are considered at the time of total debit/credit
calculation.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters
• CV_INV_STATUS: If you want to change the status of an SD invoice, update this
changing parameter based on the import parameters.

=====================================================================================

29. BAdI Method: SET_INVOICE_STATUS_MFI


You use this Business Add-In (BAdI) method to set invoice status for manual Financial
Accounting (FI) invoices.

Note
If the invoice status is A (canceled docs/cancellation) or F, then the debit/credit amounts
are not considered at the time of total debit/credit calculation.
For all other status options, the invoices are considered at the time of total debit/credit
calculation.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_INV_STATUS: If you want to change the status of a manual FI invoice, update this
changing parameter based on the import parameters.

30. BAdI Method: SET_ORIGINATING_ON


You use this Business Add-In (BAdI) method to change the value of OriginatingOn tag in the
SalesInvoice section.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_ORIGINATION_ON: if you want to change the value of the OriginatingOn parameter,


update this changing parameter based on the import parameters.

==================================================================================

31. BAdI Method: UPDATE_TAXPOINT_DATE


You use this Business Add-In (BAdI) method to change the value of TaxPointDate tag in the
SalesInvoice section.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters
• CV_INV_LNES: if you want to change the value of the TaxPointDate parameter, update
this changing parameter with the desired value.
• CV_FLAG: if you changed any tax point date please return this parameter with an ‘X’.

==================================================================================

32. BAdI Method: FILL_SD_ITEMS_AFS


You use this Business Add-In (BAdI) method to change the value of DeliveryDate tag in the
SalesInvoice section.
Use case: by default this field is discarded by SAF-T, this BAdI method will allow to report it if the
company business sector is insurance.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_INV_LNES: update with the desired values, if you want to change the value of the
following parameters:
▪ Quantity
▪ Unit Price
▪ Credit Amount
▪ Debit Amount
▪ Tax Code
▪ Tax Amount
• CV_FLAG: if you changed any parameter please return this parameter with an ‘X’.

==================================================================================

33. BAdI Method: SET_DELIVERY_DATE


You use this Business Add-In (BAdI) method to report DeliveryDate SD line items.
Use case: this scenario is only possible for insurance companies.

Parameters

The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_DELIVERYDATE: if you want to change the value of the DeliveryDate parameter,


update this changing parameter based on the import parameter.

==================================================================================

34. BAdI Method: SET_PRODUCTNUMBERCODE


You use this Business Add-In (BAdI) method to change the value of ProductNumberCode tag in
Product section

Parameters
The following list contains only the changing parameters that require additional information:

Changing Parameters

• CV_PRODUCTNUMBERCODE: if you want to change the value of the


ProductNumberCode parameter, update this changing parameter based on the import
parameter.

35. BAdI Method: GET_NON_REVEUNE_BASED_TAX_CODE


You use this Business Add-In (BAdI) method to get a tax code for taxes that are not revenue
based for the invoice item (SD or FI invoice)

Parameters

The following list contains the required parameters. All importing parameters are optional. When
considering SD invoices, only the relevant SD fields will have values. When considering FI
invoices only the relevant FI fields will have values.

Importing Parameters

o IV_VBELN: SD Invoice Number


o IV_POSNR: SD Invoice Line Number
o IV_BUKRS: FI Invoice Number Key – Company Code
o IV_GJAHR: FI Invoice Number Key – Fiscal Year
o IV_BELNR: FI Invoice Number Key - Accounting Document Number
o IV_BUZEI: FI Invoice Line Number

Changing Parameters

o CV_TAX_CODE: This can be used for special cases where the item does not have an
explicit tax code yet it must still be considered as a non-revenue based tax.

Potrebbero piacerti anche