Ansicht
Dokumentation

EDOC_MX_PDF_CHNG_HDR - BAdI: Changes to Header Fields in PDF Output

EDOC_MX_PDF_CHNG_HDR - BAdI: Changes to Header Fields in PDF Output

BAL Application Log Documentation   Addresses (Business Address Services)  
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 overwrite the values of some header fields in the PDF output of electronic documents. These field values include the following:

  • URL that a quick response code (QR code) points to
  • Value of the original input message (OIM) (field name in Spanish: Cadena Original)

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.

URLs of QR Codes in the Standard Mapping

In the standard mapping, the URL of the QR code in the header section consists of the following elements in this sequence:

Sequence Element Length Restriction (including the prefix, such as &re=)
1 URL of the service that provides data of electronic documents: https://verificacfdi.facturaelectronica.sat.gob.mx/default.aspx  
2 ?&id= Maximum: 40 characters
3 &re= Minimum: 16 characters, Maximum: 21 characters
4 &rr= Minimum: 16 characters, Maximum: 84 characters
5 &tt= Minimum: 7 characters, Maximum: 29 characters
  The maximum length of a total amount is 25 characters. It contains an integer part with a maximum of 18 digits, 1 decimal point (.), and a decimal part with a maximum of 6 digits.  
6 &fe=<last 8 characters of the digital seal of the issuer of the electronic document> Minimum: 12 characters, Maximum: 24 characters

Below is a sample URL:

https://verificacfdi.facturaelectronica.sat.gob.mx/default.aspx?&id=5803EB8D-81CD-4557-8719-26632D2FA434&re=XOCD720319T86&rr=CARR861127SB0&tt=0000014300.000000&fe=rH8/bw==

OIM in the Standard Mapping

In the standard mapping, the value of an OIM has the following pattern:

  • It both starts and ends with double vertical lines (||).
  • In between the starting and ending double vertical lines, it contains the following data in this sequence:
  1. version
  2. UUID
  3. FechaTimbrado
  4. selloCFD
  5. noCertificadoSAT
Each value is separated by a single vertical line (|).
  • It's in UTF-8 format.

Below is a sample OIM:

||1.1|6448E961-7E57-4D00-94A7-5429E7CA94C8|2020-0420T21:28:37|P7D7sIl4hvXIV9Nbs1r9Xtb6g2NVlRY7nDd XAgWd/ggzaLH992aMryO/roobxeLL1TBYGRGCNcqiUO1pNZ2tTOW4Uo3SqwbrXxICyhOYwatCqA4cICDI+FsK80BhHdSSn+k2dSv h+pQcMvKjKVEwlpAxMFOvryR7ms6jfK0ZBkao7P/aGXt+ljUvRgYf/R1bAbTYKbq3PQR3HfmAeMaEGp9L1lO0vjASmMRI4OxFXJ2 ii0NmUQycCDFVmYVf4LBU9vkmbQT6xd3wSjAfeZIaLKJSKJ54H88lMS7cQ5CvpYQD+TwZ5gFSOn8P34YyY6TIWXLziiOLdzy27nA+KXdmzQ==|20001000000300022323||

&fe=<last 8 characters of the digital seal of the issuer of the electronic document>

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 CS_CHANGE_HEADER_FIELDS is available, which is a structure. It contains the following parameters:

Parameter Description
oim Value of OIM
qrcode URL of QR Code






General Material Data   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 6303 Date: 20240523 Time: 154237     sap01-206 ( 48 ms )