Ansicht
Dokumentation

EDOC_MX_FILL_CUSD_V4 - BAdI: Custom Data Filling V4.0

EDOC_MX_FILL_CUSD_V4 - BAdI: Custom Data Filling V4.0

PERFORM Short Reference   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the Document Compliance Mexico (CA-GTF-CSC-EDO-MX) component. You can use this BAdI to fill some fields in XML files for invoices, payment receipt complements, and delivery notes. The fields that can be filled by the BAdI include:

  • Usage of CFDI
  • Addenda (field for additional data)
  • CFDI-Related Document Data (Document type and UUID)
  • Exportation(field indicating whether it's an export invoice or not)

The system calls the BAdI during XML mapping, which is triggered when you submit an eDocument from the eDocument Cockpit.

The BAdI uses the method Fill Custom Data (FILL_CUSTOM_DATA_V4). You can find some information about the method parameters below:

  • Importing parameters
The parameter IS_MAPPING_SOURCE contains source document data.
  • Changing parameters
  • The parameter CS_CUSTOM_DATA has the TY_CUSTOM_DATA structure as the associated type, which contains the fields USE_OF_CFDI (Usage of CFDI) and ADDENDA (Addenda). There is a standard logic to fill the Usage of CFDI field, which you can modify as required. There is no standard logic to fill the Addenda (additional information) field, you can set up your own logic if required.

  • The parameter CT_RELATED_DOC_DATA has the TT_RELATED_DOC_DATA structure as the associated type, which refers to the fields RELATED_DOC_TYPE (SAT Related Document Type Code) and RELATED_DOC_UUID (SAT Related Document UUID). There is a standard logic to fill these fields, which you can modify as required.

  • The parameter CV_EXPORTACION contains the value of the Exportation field, whichindicates whether it's an export invoice or not. The possible values include 01 (Non-Export Invoice) and 02 (Export Invoice).

By default, the system judges whether an invoice is an export invoice or not based on the Ship-to Party Purchase Order Type field in the sales order. If this field is filled, then the invoice is considered as an export invoice and the value is set to 02. Otherwise, the value is set to 01. You can use this BAdI to override this default logic.

The Custom Data Filling V4.0 BAdI accommodates new version 4.0 of Annex 20 and has one more parameter CV_EXPORTACION. The Custom Data FillingBAdI accommodates lower versions only.






BAL Application Log Documentation   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 4159 Date: 20240523 Time: 152458     sap01-206 ( 93 ms )