Financial Management Blogs by SAP
Get financial management insights from blog posts by SAP experts. Find and share tips on how to increase efficiency, reduce risk, and optimize working capital.
cancel
Showing results for 
Search instead for 
Did you mean: 
carolinahefler
Participant


Como já abordamos em posts anteriores, estamos com algumas iniciativas para reduzir o consumo de memória e, com isso, exigir menos infraestrutura no uso do TDF. Neste blog post, vamos falar um pouco sobre a recém-entregue unificação dos buffers de ECD e ECF.

A geração era baseada em períodos mais longos, o que demandava um consumo alto de memória a cada rodada destes relatórios. Além disso, era necessária a execução e geração do saldo contábil para cada registro que dependia destas informações, aumentando o consumo de memória e tempo de execução.

Agora, os relatórios do ECD e do ECF foram modificados para trabalhar com a geração de um buffer de saldo contábil. Estes dados serão consumidos durante a execução de todos os registros que utilizam estas informações. Com isso, você perceberá uma redução no volume de memória consumido e no tempo de processamento dos registros dentro dos relatórios.

Esta solução foi entregue na nota: 2974956 - [TDF SP15] Note 008: ECD and ECF - Memory and Performance Improvement, e consiste em gerar o saldo contábil através de código ABAP, ao invés de utilizar uma Calculation View para este objetivo. Esta abordagem possui diversas vantagens:

  • Menor consumo de memória durante a geração do saldo contábil

  • Redução do número de execuções para gerar o saldo contábil apenas uma vez

  • Leitura de um período de cada vez, ao invés de todos os períodos de uma vez só


Já existiam views para consumir o buffer de saldo contábil gerado durante a execução do ECF, e são estas views que leem o buffer que alimenta a execução agora dos relatórios de ECD e de ECF, não somente de ECF. Na figura abaixo, é possível ver as views que realizam sua execução baseada em buffer (SALDO_CONTABIL_BUF*) e as views que executam lendo direto do banco de dados (SALDO_CONTABIL_DIARIO*):


Figura 1 - Views para consumo do buffer

 

Veja abaixo alguns pontos de atenção neste desenvolvimento da geração do buffer de saldo contábil.

  • O parâmetro "Use Account Buffer" (flag) foi removido do ECD. Agora, o buffer é gerado em todas as execuções, sendo transparente ao usuário. Portanto, para recarregar os dados do buffer, basta gerar o relatório novamente

  • O parâmetro para ECF "/TMF/ECF_KEEP_BUFFER", mantido na transação STVARV, agora está obsoleto. O buffer de saldo contábil sempre será mantido em memória após cada execução (ECD ou ECF), sendo renovado apenas numa execução posterior

  • Os registros que dependem de Saldo Contábil vão gerar dados apenas se o buffer estiver preenchido

  • A classe /TMF/CL_ACCOUNT_BALANCE_BUFFER foi desenvolvida para calcular o saldo contábil de modo mais eficiente, substituindo a Calculation View sap.glo.tmflocbr.ctr/SALDO_CONTABIL_DIARIO

  • É esperada uma grande diminuição no consumo de memória nos SPEDs, já que agora o saldo contábil é gerado período a período, ao invés de todos os períodos do ano de uma só vez


Gostaríamos muito de saber o seu feedback. Deixe seu comentário abaixo caso tenha alguma dúvida ou sugestão para um próximo post. E não esqueça de seguir a tag SAP Tax Declaration Framework for Brazil aqui na SAP Community para ficar ligado nas últimas notícias sobre o Tax Declaration Framework (TDF).

Até a próxima!

 

TDF: Less memory consumption with the buffer for ECD and ECF

 

As we have mentioned in previous posts, we have some initiatives to reduce memory consumption and, thus, demand less infrastructure on the usage of TDF. In this blog post, we will talk about the recently delivered unification of the ECD and ECF buffers.

The generation was based on longer periods, which demanded a high memory consumption for every round of reports. Also, executing and generating the accounting balance was necessary for every register that depended on this information. This increased memory consumption and execution time.

Now, the ECD and the ECF reports were changed to work with the generation of an accounting balance buffer. This data will be consumed during the execution of all the registers that use this information. Consequently, you will notice the reduction in the volume of memory consumption as well as in the processing time of the registers within the reports.

This solution was delivered on SAP Note 2974956 - [TDF SP15] Note 008: ECD and ECF - Memory and Performance Improvement. It consists of the generation of the accounting balance through ABAP coding instead of using a Calculation View for that purpose. This approach bears several advantages:

  • Less memory consumption during the generation of the accounting balance.

  • The number of executions necessary to generate the accounting balance was reduced to one.

  • Reading of one period at a time instead of all periods at once.


Previously, there were views to consume the accounting balance buffer generated during the execution of ECF. These are the views that read the buffer that now feeds the execution of the ECD and the ECF reports, not only the ECF ones. In the image below, you will see the views that carry out the buffer-based execution (SALDO_CONTABIL_BUF*) and the views that execute reading straight from the databases (SALDO_CONTABIL_DIARIO*):


Figura 1 - Views for buffer consumption

 

Find below some points that deserve attention on the development of the generation of the accounting balance buffer.

  • The parameter "Use Account Buffer" (flag) was removed from ECD. Now, the buffer is generated in all the executions, becoming transparent to the user. Thus, in order to reload the data from the buffer, you just need to generate the report again.

  • The parameter for ECF, "/TMF/ECF_KEEP_BUFFER", which was preserved in the STVARV transaction, is now obsolete. The accounting balance buffer will always be kept in the memory after each execution (ECD or ECF), only being refreshed in an upcoming execution.

  • Registers that depend on the accounting balance will only generate data if the buffer is filled in.

  • The /TMF/CL_ACCOUNT_BALANCE_BUFFER class was developed to calculate the accounting balance in a more efficient manner, replacing Calculation View sap.glo.tmflocbr.ctr/SALDO_CONTABIL_DIARIO.

  • A great reduction in the consumption of memory for SPED reports is expected, since the accounting balance is now generated for every period, instead of its generation for all periods at once.


We would like to have your feedback. Feel free to leave your comment below if you have questions or suggestions for a next post. And do not forget to follow the SAP Tax Declaration Framework for Brazil tag here on SAP Community to stay tuned on Tax Declaration Framework (TDF) latest news.

 

See you next time!

 

Carolina Hefler

TDF Development Team

 

#SAPGoGlobal #SAPLocalization #TDF #taxdeclarationframework