REINF Preprocessing Program Adjustments
In this post we will share with you the improvements that have been made to the REINF pre-processing program.
BAdI /TMF/BADI_REINF_PRE_PROC with new importing parameters.
Due to the complexity of the EFD-Reinf scenarios of the R-4000 series, we have extended the parameters of the MODIFY_LANC_REND_PAG_RETENCOES method in the /TMF/BADI_REINF_PRE_PROC BAdI to the customers. The idea is to provide additional information that may assist customers in their implementations in filling in the shadow table.
The new parameters provided are:
- IT_R_NATREND where you can find the income nature data from /TMF/D_LCTORENRT.
- IT_LANCAMENTO_CONTABIL where you can find the data of the journal entries such as item code, clearing date, and so on.
- IT_PURCHASE_DOCUMENT where you can find the data of the purchasing documents such as purchase order number, item number, and G/L account.
- IT_PARTICIPANT where you can find the data of the participants, such as CNPJ, CPF, among others.
- IT_NF_ITEM where you can find the data of nota fiscal items such as NBS, Nota Fiscal NCM and others.
- IT_REND_PAG_RETENCOES where you can find the data of income payments with retentions such as tax values, tax base, and so on.
Disregard reversed documents in preprocessing.
For improvement in the preprocessing process, documents that have been reversed will not be selected. To check whether the document was reversed, we activated the reference key in the preprocessing program, we separated this information into two: document and year. With the document and the year, we go to the header table of the incoming invoice document where we select the Reversal Document Number field. If the field is filled, the document has been reversed and the accounting document must be disregarded in the preprocessing program.
Note: Note that in case the document is of distinct period (entry by MIRO in one month and reversal of the document in later period) will be the procedure of the user to rectify the data from the previous period if it has already reported to EFD-REINF for that period.
Disregard Documents WITHOUT Base Value in Preprocessing.
For improvement in the preprocessing process, documents with no base value will also be taken. In setting up the determination of the nature of throughput, in addition to material/service data, we include the vendor code option, and during the preprocessing run, we will consider only those documents where Materials/Services and Suppliers are completed.
|Document||Invoice Posting Date||Is IR based at invoice time?||Is it based on PP/PASEP and/or COFINS and/or CSLL at invoice time?||Document Clearing Date|
With the new logic we will have the following situations for the above documents:
|Document||Date of Generating Event||Remark|
|5100000849||17/10/2023||For this document, as there is no withholding tax at the time of invoice, on 08/11/2023 we will not have data to be generated.|
|5100000878||Not Applicable||Since the document has no tax base filled, no data will be generated in preprocessing.|
|5100000889||09/11/2023||As for this document the IR is not based and we are only based on the withholding taxes configured at the time of payment, only in the period of November will EFD-REINF data be generated.|
|5100000902||10/18/2023||For this document as we have withholding tax at invoice time then data will be reported in EFD-REINF for the document in October period.|
|5100000902||20/10/2023||For this document as we have withholding tax at time of payment, then data will be reported in EFD-REINF for the document in the period of November.|
Note: Note that if you need to report a document with only the <vlrGross> you should use some artifact to create the entry in /TMF/D_LCTORENRT, since the document will no longer be considered in the preprocessing.
Determine Income Nature per Service Master and Material Code
To determine the nature of the income of the documents that are processed in the preprocessing program, we now get the item code of these documents, which can originate from both the invoice and the journal entry. We prioritize obtaining the item code through the nota fiscal using the reference key. If it is not possible to obtain the item code from the invoice, we then search for the journal entry that already contains the item code available. With the item code, in processing time, we start to use it in the rules and combinations to fill in the nature of the income and also the observation of the nature of the income. The rule is made from the crossing of the data from the customization table /TMF/D_R_NATREND (Nature of Income) and the journal entry data using the fields COMPANY (Company Code), COD_PART (Vendor/Customer Code), TIPO_DOC (Document Type), COD_ITEM (Item Code), and COD_CTA_DESP (Expense Accounts found in Purchase Order) including the purchase accounts. The following priorities are addressed in the search for determination of the fields Nature of Income and Observation of the Nature of Income, namely:
- Priority 1 Rule: We select the NAT_REND and NAT_REND_OBS fields from the /TMF/D_R_NATREND table by comparing the COMPANY, COD_PART, and COD_ITEM fields (with TIPO_DOC and COD_CTA_DESP empty).
- Priority Rule 2: If it is not possible to identify the nature of income and the observation of the nature of income by Priority Rule 1. We then select the NAT_REND and NAT_REND_OBS fields from the /TMF/D_R_NATREND table by comparing the COMPANY, TIPO_DOC, and COD_ITEM fields, with DOC-TYPE, COD_PART, and COD_CTA_DESP
- Priority Rule 3: In case it is not possible to identify the nature of income and the observation of the nature of income by Priority 1 and 2 rules. We then select the NAT_REND and NAT_REND_OBS fields from the /TMF/D_R_NATREND table by comparing the COMPANY, TIPO_DOC, COD_PART, and COD_PART_DESP fields, with COD_ITEM
- Priority 4 rule: If it is not possible to identify the nature of income and the observation of the nature of income by priority rules 1, 2 and 3. We then select the NAT_REND and NAT_REND_OBS fields from the /TMF/D_R_NATREND table by comparing the COMPANY, TIPO_DOC, and COD_PART_DESP fields, with COD_PART and COD_ITEM
Note: Note that in the document it would even be possible to have more than one line with the same COD_ITEM or, could have two distinct COD_ITEM as long as they have the same nature of income and the same observation text. Further details of the scenarios covered by this enhancement can be found in the customer influence comments https://influence.sap.com/sap/ino/#/idea/305466
The mentioned improvements were made available through note 3382684 – [TDF SP18] Note 006: EFD-Reinf – Preprocessing – Adjustments to Accounting Document, Income Payments with Withholdings and Income Nature mapping.
We would like to know about your feedback. Please leave your comment below if you have any questions or suggestions for a next post. And don’t forget to follow the tag SAP Tax Declaration Framework for Brazil here in the SAP Community to be linked in the latest news about the Tax Declaration Framework (TDF).
See you next time!
TDF Development Team
If you’d prefer to read this blog in Portuguese, go here (Ajustes no Programa de Pré-processamento do REINF | SAP Blogs).
Se você gostaria de ler esse blog em potuguês, clique aqui (Ajustes no Programa de Pré-processamento do REINF | SAP Blogs).