Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member40251
Participant
10,542
Introduction:

On my previous blog post, I explained the logic to map CDS views and its VDM’s and gave an example of how to extend a CDS based Fiori app (Journal Entry Analyzer) with CO-PA fields.

Now, I will show you another extension of a Virtual Data Model that uses Plan and Actual information and is the base for several analytical reports and KPI’s.

The example is on an SAP S/4Hana 1909 on premise edition, and extension in Eclipse.

More detailed steps to map the VDM, create DataDefinition on Eclipse, find Consumption view from Fiori App, you can see on my post:

https://blogs.sap.com/2020/06/09/extending-cds-view-with-copa-field-including-key-and-text/.

 

Extension of C_ProfitAndLossPlanActQ2903

 

The Fiori app “P&L – Plan/Actual” (CDS Based) uses the Consumption view C_ProfitAndLossPlanActQ2903.

 


Mapping the Virtual Data Model (you can map via app “Query views”), I found the following structure:


 

As I mentioned in my previous post, you need to extend the CDS views bottom-up.

So first, extend the Extension Views. The VDM has two Extension views, one for Actual and another for Plan.

E_JournalEntryItem (Actual line Item):


Note: Different to what I showed in my previous post, you do not need to make associations to get the field texts on the extension views, only in the Composite View.

E_FinancialPlanningEntryItem:

 


After activating the Extension views, you will be able to extend the Composite view.

With the Composite view, you can use tcode SCFD_REGISTRY to check the underlying views and ALIAS to use in the extensions. In tab “Extensible CDS Views”, filter the Composite view and double click to get the details:


In the tab “Support for Custom Fields”, you will find relevant information to be used on the extension, like the ALIAS, the Extension views, and in the bellow case, the condition fields to be used in the extension:


 

Extending the Composite view:

Previously, “TEXT” CDS views need to be created to associate the COPA fields with their text fields.


These "Text" views will be associated to the Composite View.

In the Composite view I_ActualPlanJrnlEntryItemCube, the field “ActualPlanCode” is used to differentiate Plan from Actual. So, a CASE statement needs to be used to extend the COPA fields.

This is how the Composite view will be extended:


We can create our own reports based on this Composite view. But we can also extend the consumption view of an existing App.

 

Extending the Consumption view C_ProfitAndLossPlanActQ2903:

 

You need to add the bellow annotations to display the field texts on the report:


Result: fields are available in Fiori Report “P&L Plan/Actual” with Key and Text:


 

Conclusion:

Account-based CO-PA (now called Margin Analysis), has a lot of new features, and with SAP S4/Hana, reports are a lot better than in ECC. Once you understand the logic behind the Fiori apps, you will be able to work with these reports and enhance them with your customers definitions more effectively.

In the next post I will show a creation of a KPI report.

Thanks!
8 Comments
Labels in this area