Jan 26, 2020

S/4 HANA Profitability Report creation (COPA)

For COPA - Profitability Analysis purposes, in S/4 HANA the series of "Market Segment" Fiori Apps have replaced the good old fashion Report / Tcode KE30 where we used to build custom reports based on Report Painter technology. Now this is part of the past and we need to use these new "Market Segment" Fiori Apps in order to do Profitability COPA reporting.

Note: This is all based on the assumption that you are running "Account Based Profitability" as it is the recommended approach today for S/4 HANA. Also my preffered one as per many years of experience running both. (Account vs. Costing based).

Now, on an Account Based model COPA, you run all your Profitability Analysis based on GL Accounts postings. For that, in order to do Profitability reporting / reports, you have to build a Financial Statement Version (FSV) (Hierarchy Type FSVN, in Tcode HRRP_REP).

Once you built your Profitability FSV, you just need to run Tcode HRRP_REP (Step #2 from my previous Blog post) to replicate it.

In order to create your FSV, you need to follow this IMG Path.


Then you will and create you own custom FSV for Profitability Purposes. Ex: YPA2



You will enter a description, a Maintenance Language and an applicable Chart of Accounts for this FSV. All the same as if you were configuring any other FSV as you did in the past for FI purposes.
Then you will click in "Financial Statement Items" to start building your Hierarchies and GL groupings.


This is the Standard SAP Best Practices Contribution Margin report (Profitability). I suggest you take a copy of it and create your own "Z / Y" one as per your specific business requirements.


Once created and saved, you will replicate it with Tcode HRRP_REP (as explained in Step #2 from my previous Blog post).


Note: 

Please do not confuse this FSV for COPA / Profitability with your other FSV that you might have created (or not) for FI purposes (I mean your Financial Statements). These are 2 different things / concepts.
One is for Management and Internal reporting (FSV COPA) and the other for External Financial reporting (FSV FI).
They both use the same config tool, as SAP decided to use this concept for both things; but they are definitively not the same and should not be confused with one another.
Another thing that you might have noticed, is that when you define your FSV options; Functional Area is not flagged in this YPA2 Contribution Margin Report as you do not use Functional Area for Profitability Reporting. In my opinion, Functional Area should only be used for External reporting and not for Management reporting.


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.

Build and use Hierarchies like GL or Cost Center for Profitability (COPA) or other reporting in S/4 HANA Fiori Apps

Now a days in S/4 HANA we have a series of Fiori Apps available for reporting that are replacing the good old fashion S_ALR_xxx reports that we used to use to report on Cost Center, Internal Order, Profit Center and others on actuals/plan. The old reports are still working fine, but they are good for GUI, not for Fiori. (Unless you call the Tcode through Fiori GUI tile)
So now you have Fiori App reports like "Cost Center - Plan/Actual YTD" or COPA "Market Segments" (replacing old fashion KE30) among others that in order for you to use the Cost Center Hierarchy or Profit Center Hierarchy on them, you first need to run a couple of programs to make them available in those Fiori Apps.
These Hierarchies are stored in the back-end as SETs like any other SETs that we used to use in Finance for all sort of needs. In order to be able to have them available for these Fiori Apps, you need to convert them into BW Hierarchies as the Fiori Apps are based on BW Queries and those don't know anything about SETs, they run with Hierarchies.

This is a 2-step process that you need to run every time you do a modification in any of those Hierarchies, so then the changes become available in the Fiori Apps.

Step #1
Tcode: HRY_REPRELEV - Set Report Relevancy for Hierarchies


As you can see in the screen capture, you can use the following Hierarchies 
  • Cost Center Group
  • Cost Element Group
  • Order (Ex Internal Order) Group
  • Profit Center Group
  • Account Group
  • WBS Element Group
  • Functional Area Group 


Once you select the Hierarchy (Set Class) that you want to use, you execute and you get the list of the available ones. In this case "Organizational Unit" is my SAP Best Practices Controlling Area "A000" and all the Groups that come with it. Depending on the Set Class you select, it could mean something different.
Then you activate the "Report Relevant" flag of the lines/lines that you want and SAVE.

Step #2
Tcode: HRRP_REP - FIN Runtime Hierarchy Replicator

This step is required to be able to replicate those previous elements as hierarchies so then the Fiori Apps will be able to use them. Without entering into to many technical details, the Fiori Apps use / show/ consume this as a kind of BW Hierarchies, and this process is required to expose them as such.

You will go, select your Hierarchy ID that you want to replicate, enter a valid from date, and select the "Run settings" for background or foreground. It does not take long to execute, so foreground should not be an issue.


This means that every time you do a change in any of the Hierarchies (GL, Cost Center, Profit Center, Internal Ordes, WBS, etc.) you need to run these 2-Step process so you will have the latest changes available for the Fiori Apps. Without this execution, you will not see the new changes.
This process can also be scheduled to run periodically, but this should only be in a context were you have constant changes.

An small example of an App that would use these hierarchies, "Cost Centers Plan/Actual YTD"


Click in "Cost Center Hierarchy", click "Go"


And you will get the list of Hierarchies that were replicated. (For confidentiality reasons, I am masking the names)


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.

Jan 2, 2020

SAP AP / AR standard Aging reports - out of the box easy

For the ones that have been around in the SAP world for quite some years like me, there has been a constant ask from customers to get an Aging report out of ECC or even S/4 like other systems have. One that would show you Customer / Vendor one-by-one with their total AP/AR and a break it down by due dates for 0-30 days, 31-60, 61-90 and so on ... Many legacy systems have this type of report and it is a must have for any AP or AR Manager to have one. Somehow this has never been the case for SAP to have it out of the box.
You can do something "similar" by using FBL1N for Vendor Line items and FBL5N for Customer line items where you will get document by document with the corresponding due Date or Arrears. But you cannot get buckets like 0,30,60,90, etc. out of it.
In the past, I have seen projects even building these reports in BW (BI later and in today's language Analytics). Another way also, was to have Custom built drill-down report (with Report Painter) to achieve this too, using AP and AR libraries.
But since SAP ECC6.0 EHP5 (and higher of course), the answer to this requirement comes out of the box. It is part of a package of reports and transactions that have been delivered to meet certain legal requirements for China. But who says that you cannot use them for any other country ? They work just fine, have no restrictions and of course they are not written in Chinese (otherwise I would not be able to read them).
The AP/AR Aging report Transaction Codes are IDCNAP and IDCNAR respectively. They are 2 separate Tcodes, but they are almost identical one another. Their principle is just the same. One of the main differences is in the selection screen of the AR Aging report, you can choose / filter by certain SD criteria like Sales Org., Distribution Channel, Division, Sales District and Sales Document.

AP Aging report (IDCNAP)

The report selection screen allows you to run the report by CoCode, Vendor, Profit Center (which for many Companies is important for AR/AP splitting thanks to Document Splitting) and some other indicators. The most important thing, you will find it at the bottom under "Due Date Sorter List". This options are the ones that will allow you to build your own Aging buckets (Ex 0-30, 31-60, 61-90 and so on ...). There is the option of building up to 8 buckets, which is way more than what any normal company would ever need. Once you setup those buckets, you execute it and you will get the data Aging built and split that way.
If you close the Transaction and come back, those bucket will not stay; so that is why I recommend you to build a Selection Variant so you do not have to enter the buckets every time.

AR Aging report (IDCNAR)

This is the AR Aging report with the added option of entering SD Data filtering by SD Organizational Structure criteria.

If you need, you also have "Dynamic Selection" criteria which gives you more selection capabilities.
Once you execute the reports, your output will look like this.

For confidentiality reasons, I am masking the Client Names and other Customer specific data.
Standard, right after execution, it comes with quite a few different subtotals (way to many for me), but it is just a matter of clicking in "Subtotal On/Off" Icon to remove it.
Once done your report will look a lot better.

As you can see you get CoCode, Credit Segment, Profit Center, of course Customer, Reconciliation Account, Total Open item, Amount Not due and then your Aging buckets as per your selection criteria. You also get a percentage calculation of that "bucket" in regards to the grand total, which you can easily remove if you don't like by changing the column layout.

As per extra columns that you can get in the layout, you already get pretty much everything, but you can also add Company Code Name and Credit Control Area.

Once the report out, you can sort up/down, filter anyway you want as with any other SAP report that has an ALV output. You can also do drill-down by double-clicking on any AR/AP bucket and you will get the exact line items that make up that amount.

So as you can see, this is the Aging report that many Customers have been asking for many years and for an unknown reason (at least to me ...), it was never built in SAP out of the box.

As I mentioned, both reports AP/AR are pretty much identical and behave the same. Different program names, but for what I could see in the code, similar program structures underneath.

The reports mention China, but there is nothing specific that will not make them applicable or usable for any other country. I have personally use them already in Canadian and US clients without any issues or limitations.

Where can you find these reports in the SAP Menu ?
They are buried inside the Country specific functions / reports for China in Accounts Payable and Accounts Receivable Menu area.

Accounts Payable Menu


Accounts Receivable Menu


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.