Sep 28, 2020

How SAP S/4 HANA calculates GL Balances with the New Simplified Data Model ?

SAP has been around for a lot of years now and it has seen its core ERP product evolve over the last 40+ years. With it, its Data Model has been evolving too. SAP, like any other ERP and traditional Finance system, has used Total Tables to be able to calculate and provide GL Balances in the FI - Finance Module since the beginning as there was no other way to achieve this without damaging performance with the Databases that we had. Other systems have been using that approach and are still using it nowadays. Up until S/4 and the utilization of the HANA Database, the only way to obtain GL Balances was by reading Total Tables that had summarized information.

These Total Tables would be updated every time a new GL Posting happens updating not only Line Items Tables (like BSEG or FAGLFLEXA) but also Total Tables (like GLT0 or FAGLFLEXT and others too) and recalculating the corresponding total for the specific GL and Object / Dimension (like Internal Order, Profit Center, Functional Area, Cost Center, etc. ).

Then once we would run a report that would require a GL Balance (Total), the system would go directly to those Total Tables and read them from there as they were already calculated.

For Classic GL these were the Total Tables:

  • GLT0 - General Ledger: Totals
  • GLPCT - EC-PCA: Totals Table

For New GL this was the Total Table: 

  • FAGLFLEXT - New General Ledger: Totals


On top of those Tables you would also have CO Total Tables like 
  • COSS - Cost Totals for Internal Postings
  • COSP - Cost Totals for External Postings

Now with the changes brought by S/4 HANA all those Tables have been eliminated.

A typical Business requirement that I have seen over and over in many projects, is to build and Interface or Custom Extraction program to Extract GL Balances at the end of the month and feed an external reporting and/or Consolidation System (Ex. Longview, Oracle Hyperion, Cognos and many more). In that case, we would build a custom program to go and extract GL Balances from the Classic or New GL Total Tables.

So, if the new Data Model introduced by S/4 HANA in Finance has eliminated these Total Tables, how is SAP providing GL Balances now ?
The 1st answer that somebody would say 
"... with the New and super performant HANA Database, it will read all the line items and calculate the Totals "on the fly ..."

Well that is not 100% accurate. It is true that SAP would read all the line items that now are part of the Universal Journal Table ACDOCA but it cannot read "all of them" ...

Imagine a system that has 5, 10 or more years worth of data. Each year could have millions of line items records. It would not be really efficient to read all those millions of line items since the beginning of time just to calculate a Total. This is something that could present as a challenge in the case of a Balance Sheet account, as their Balances are always an accumulated balance since the beginning of time. In the case of a P&L account, it is easy as their Balance are always made up of the current Fiscal Year postings only.

It is fair to say that in the case of a Balance Sheet account there is a Technical challenge in front of us as we should not be reading all line items since the beginning of time, but we still need to be able to obtain a balance without, reading all records, impacting the performance and doing it in an efficient way.

For this, SAP at year end writes initial Balance postings in the Universal Journal Table ACDOCA but with "Period 0 - zero (ACDOCA-POPER = 0)". Yes, it is a period that does not exists from an Accounting point of view, but S/4 HANA Finance uses this Period Zero as the starting point to have a "marker" to know where those balances start and not having to go back to the beginning of time to rebuild that balance every time. Period zero postings are done by the Balance Carry forward process (Tcode FAGLGVTR) when closing the Fiscal Year.

So with this Period zero being used as a starting point, then S/4 HANA Finance, reads all the current Fiscal Year line items and provides a GL Balance for those Balance Sheet accounts in an efficient way without the need to read all Balance Sheet postings since the beginning of time.

As mentioned already, any P&L balance is easy to obtain by just reading all lines items for the current Fiscal Year.



ACDOCA-POPER (Period) = 0 and
ACDOCA-BTTYPE (Business Transaction Type) = RFBC - Balance Carry Forward


If your Company and/or Project needs to implement this, or any of the functionalities described in my Blog, or advise about them, do not hesitate to reach out to me and I will be happy to provide you my services.

Sep 9, 2020

Payments Advice in S/4 HANA (On-premise)

In a recent post, I was talking about how to do physical checks payments the right way in S/4. Now in this one, I will show you how to generate Payment Advices in S/4 HANA. If you read my previous post, if not you should, you will know that the Tab "printout / data medium" has been removed and it just does not exists in the Fiori App "Manage Automatic Payments" which replaces Tcode F110. So another drawback of this, is the lack of possibility to select your Program Variant to issue your Payment Advice.

But ... there is no PMW (Payment Medium Workbench) solution for this as we have for Checks. In this case SAP has "hardcoded" it (literally) in the Fiori App "Manage Automatic Payments" to look for a specific Variant Name under program RFFOAVIS_FPAYM. If you do not have this Variant in your system, no matter what you do and try, your Payment Advices will not be generated.

Up until version 1809 FPS01, you needed to create this Program Variant manually. Now they woke up and they included it out-of-the-box. So if you are working on 1610, 1709 or initial 1809 chances are that you were (or are) missing this Variant. If you have it, it might mean that someone created it already.

Variant name required and "hardcoded" is: PAYM_LC
There is even an OSS Note (2690678 - Manage Automatic Payments: Cannot Print or Send Payment Advices) that SAP released that explains the issue and what you have to do.



Reference OSS Note:
2690678 - Manage Automatic Payments: Cannot Print or Send Payment Advices
https://launchpad.support.sap.com/#/notes/2690678


If your Company and/or Project needs to implement this, or any of the functionalities described in my Blog, or advise about them, do not hesitate to reach out to me and I will be happy to provide you my services.