Friday 10 November 2017

S/4 HANA F4 Help values, Key & Text display in ABAP CDS Views based reports

Overview:


F4 help values, Key & Text display is standard feature in SAP however in Embedded Analytics reports (Custom ABAP CDS views Development) these two functionalities will not come by default. This blog will help how to leverage these functionalities in custom developed reports in Embedded Analytics.

Version: S/4 HANA 1610

Problem Statement:


For custom developed ABAP CDS views based reports in Embedded Analytics F4 help values, Key & Text display was not appearing in reports by default as in ABAP reports or in BW reports.

Solution:


Follow the below steps to leverage these two standard functionalities in Embedded Analytics reports.

Prerequisite: In this blog we are using standard Basic Views to bring F4 help values, Key & Text usage in reports. By default highlighted annotations should be there in the standard ABAP CDS views if not add these two annotations to leverage F4 help values, Key & Text display in reports.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Scenario 1:


When dimension (Material) is inherited from custom/standard CDS view in the basic/composite CDS view. Report should show F4 help values, Key & Text display.

Step 1: In the basic CDS view Material should come from I_PurchasingDocumentItem hence association is created in the standard CDS view.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

I_PurchasingDocumentItem CDS view

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

In I_PurchasingDocumentItem CDS view I_Material is already associated hence it is not required to associate separately with I_Material in our CDS view, directly we can consume those associations in our views as mentioned below.

This is required because we are directly bringing the text in composite view hence the below code is mandatory.

_PurchaseItem._Material

Step 2: In the composite view mention the below highlighted annotations so that text can derive from the Basic view (Step 1).

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

In the above code we have to mention the Text associated view name next to the Key hence _Material is mentioned after _Purchase.Material

Step 3: In Consumption view mention the query display as Key and Text as mentioned below.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 4: Now run the report in RSRT or Analysis Office, highlighted (Yellow) is text for Material which wasn’t appearing earlier.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Scenario 2:


When dimension (GL Account) is coming from table, report should have F4 help values, Key & Text display.

Step 1: Here GL Account number is directly coming from EKKN table.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Mention the foreign key association as mentioned below.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 2: GL Account number is coming from table hence we need to separately associate GL Account to bring the F4 help value hence the standard CDS view I_GLAccount is used in our composite view.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Mention the foreign key association as mentioned below.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

GL Account F4 help value need to display Text as well hence in the composite view we have mentioned the association name 

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

No need to mention the association name next to GL Account Number as mentioned in Scenario 1 (Step2) because here we are explicitly associating GL Account basic view in the composite view hence it is not required.

Step 4: In Consumption view mention the query display as Key and Text.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 5: Run the report through RSRT or Analysis office, earlier F4 help for GL Account wasn’t appearing earlier.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

As GL account standard ABAP CDS view will bring text, we have enabled the text in our CDS view so report will display the text as well. Highlighted (Yellow) columns are text fields in report which wasn’t appearing earlier.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Scenario 3:


When dimension (Document Year) is coming from table, report should have F4 help values no need of Key & Text display.

Step 1: Here Material Document Year is directly coming from EKBE table in our basic view.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 2: Material Document Year is coming from table hence we need to separately associate Document Year in composite view to bring the F4 help value hence the standard ABAP CDS view I_CalendarYear is used.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Mention the foreign key association as mentioned below.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 3: In Consumption view mention your selection prompt annotations.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 4: Run the report through RSRT or Analysis office, earlier F4 help for Document Year wasn’t appearing earlier.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications
SAP Online Guides, Tutorials, Materials and Certifications.

Related Posts

0 comments:

Post a Comment