Ansicht
Dokumentation

EDOC_IT_XML_FILE - BAdI: XML File Filling

EDOC_IT_XML_FILE - BAdI: XML File Filling

Fill RESBD Structure from EBP Component Structure   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the eDocument Italy (CA-GTF-CSC-EDO-IT) component. The system calls this BAdI when it generates the XML file using the Italy eInvoice process in the eDocument Cockpit.

You use this BAdI to modify the content of the XML file in any way you need: it allows you to add, change or remove information from the whole file.

With regards to attachments, this BAdI supports attachments converted to xstring. If your attachments have been converted with Base64, you can use the Italy: Attachments to the XML File (EDOC_IT_ATTACHMENT) BAdI.

This BAdI uses the following parameters:

Importing Parameters (read-only)

The SOURCE_DATA parameter is a structure containing useful information about the source document. The source document could be an accounting document (source type FI_INVOICE) or a document related to the billing document (source type SD_INVOICE). The structure has specific fields for each of these cases.

The system uses the following fields to identify an accounting document:

  1. COMPANY_CODE: Contains the company of the accounting document.
  2. ACCOUNTING_DOCUMENT_NUMBER: Contains the accounting document number.
  3. FISCAL_YEAR: Contains the fiscal year of the accounting document.

The following field is used in case the source document is a billing document:

  1. BILLING_DOCUMENT_NUMBER: Contains the billing document number.

And the following field is valid for both billing and accounting documents:

  1. CUSTOMER_NUMBER: field contains the customer number from the source document.

The HOUSEBANK_ACCOUNTS table parameter contains bank account details for the corresponding company code.

The ITEM_NUMBER table parameter relates the number of the item of the source document to the NumeroLinea XML tag.

The HEADER_ITEM_TEXTS table parameter contains all header and item texts of all possible text IDs existing in the source document.

The entries can be identified by the following pattern:

  • SD header texts: tdobject = VBBK (Billing Document or related Sales Order)

  • SD item texts: tdobject = VBBP (Billing Document or related Sales Order)

  • FI header texts: tdobject = BELEG

  • FI item texts: tdobject = DOC_ITEM

If the parameter includes texts in different languages, use the tdspras field of the HEADER_ITEM_TEXTS table to identify the language you want to use.

The XML_FILE parameter (valid for XML version 1.2 until December 31, 2020) and the XML_FILE_121 parameter (valid for XML version 1.2.1 as of January 1, 2021) are structures containing the full XML file as it was built by the standard mapping.

You use the following parameters for contracts or assignments with public investments. They help the Italian government to track financial data:

  • The CODE_CUPparameter contains a string of 15 alphanumeric characters.

  • The CODE_CIGparameter contains a string of 10 alphanumeric characters.

Changing Parameter

The XML_FILE_MODIFIED parameter (valid for XML version 1.2 until December 31, 2020) and the XML_FILE_MODIFIED_121 parameter (valid for XML version 1.2.1 as of January 1, 2021) are structures containing the full XML file as it was after being enhanced by your BAdI implementation. Their content reflects the final version of the XML file for the eDocument.






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 4323 Date: 20240523 Time: 163829     sap01-206 ( 64 ms )