Background and future situation
Background
In version 1.2 of TBAI, the process of creating the electronic register and sending it to the tax authorities is done directly.
SAP document creation: The document is generated in SAP.
The product has an extension implemented so that, once the invoice has been created, the process of creating the TBAI record is started.
Creation of the electronic record: The record is created and the process continues step by step, as defined in the product parameterisation.
Signing and obtaining the QR code: This is the step in which it is necessary to obtain the previously signed electronic register in order to generate the signature and the QR code.
Sending to the tax authorities: Sending the XML file to the tax authorities.
Future situation (version 1.3)
With this situation in version 1.2, it may happen that, if accounting documents are generated en masse in SAP, the electronic invoicing process is started in parallel and, as a result, the correct number of the previous electronic record is not obtained, as it is not yet stored in the database.
To prevent TBAI's electronic records from being processed in parallel and not one at a time, as required by the tax authorities, the decision was taken not to launch the processing of records directly, at least not the conflictive step, which in this case is obtaining the signature and QR code.
To do this, what is done is to continue creating electronic records through TBAI's BTE, but leaving them in an initial state, which prevents them from continuing until the QR code/signature is created. The continuity of each record will be carried out by a program that will obtain all the electronic records that have entered the monitor and process them 1 by 1 and not in parallel.
In this way, the flow of each electronic record will continue to be the same as the one that has been parameterised, except that when the TBAI records are created and enter the monitor, they will be waiting to be processed by a report.
As can be seen in the image above, the steps of the flow are the same, except that the steps in orange can be launched in bulk or in parallel, but the steps in blue will always be processed 1 by 1 to maintain the integrity of the previous record number or chaining number.
Finally, it should be noted that from the product it has been possible to determine the type of flow to be followed, direct or semi-direct. For this purpose, a BADI is enabled from which the flow to be followed can be determined, discriminating by SAP invoice, interpreter, or any other logic considered by the client.
In the following section, the operation of the continuity report is described in more detail.
Related content
Avvale 2024