Ansicht
Dokumentation

EDOC_MX_PDF_HDR_FLDS - BAdI: Additional Header Fields in PDF Output

EDOC_MX_PDF_HDR_FLDS - BAdI: Additional Header Fields in PDF Output

CL_GUI_FRONTEND_SERVICES - Frontend Services   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the eDocument Mexico (CA-GTF-CSC-EDO-MX) component. You can use this BAdI to do the following:

  • Add header fields to the standard PDF output of electronic documents, such as Sales Area and Contact Person in Customer's Company
  • Specify mappings for additional header fields

Note:

  • Only if the additional header field that you want to add isn't included in the standard XML mappings, do you need to implement this BAdI.
  • The data that can be accessed by this BAdI is restricted. Therefore, we identified some commonly used, additional fields whose data can't be accessed by this BAdI and prepopulated these fields for you.

This BAdI applies to the following processes:

  • Mexico eInvoice
  • Mexico ePayments
  • Mexico Consolidated ePayment
  • Mexico Delivery Note

The system calls the BAdI when you display a PDF file in the eDocument Cockpit.

A structured, importing parameter is_source is available, providing information about a source document. It contains the following parameters:

Parameter Description
companycode Company Code
salesdocumentnum Billing Document Number
accountingdocumentnum Accounting Document Number
deliverydocumentnum Delivery Document Number
fiscalyear Fiscal Year
edoctype eDocument Type

edoctype

A changing parameter CT_ADDITIONAL_HEADER_FIELDS is available, which is a table. It contains the following parameters:

Parameter Description
nodename Name of Additional Header Field
nodevalue Value of Additional Header Field

Note:

A nodename is a string without spaces. For example, if you want to add Sales Area into the header section, use SalesArea as the nodename.

nodevalue

In addition to BAdI implementation, there are other steps that you need to perform to customize your PDF output. For a complete procedure, see the documentation for Document Compliance for Mexico on SAP Help Portal. Go to https://help.sap.com/viewer/s4h_ce_mexico. Then select General Functions -> Document and Reporting Compliance ->