Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Navigating among reports and apps


 

As announced in SAP   2997228 - Deprecation of Design Studio Apps in SAP S/4HANA Cloud 2102, most SAP Design Studio apps are no longer supported and will be deleted from the system as of SAP S/4HANA Cloud 2108. In contrast, the Web Dynpro data grid (WDG) is the default reporting tool for all drill-down reporting. Regarding S/4HANA On-Premise version, as of S/4HANA2020, WDG is positioned as the prime apps for multidimensional reporting. See the top of this blog for further detail.

While you are exploring the features of the successor - WDG, you might be interested in learning how to enable Intent-based Navigation (IBN) for reporting based on WDG.

If you are not familiar with the concept of IBN, please check the official help and Jocelyn’s blog: SAP Fiori for SAP S/4HANA – Adding Custom Content to Business Roles -  section Understanding Intents.

An example from a standard app


 

A typical example could be the Web Dynpro Grid based app - F0996 Trial Balance. (You might be aware of another app F0996A Trial Balance (Design Studio) that is based on Design Studio on SAP S/4HANA 2020.) if you run the app and fill out all the parameters, you could see a multi-dimensional report. You will notice a “jump to…” button on the context menu of each cell, for instance, when you right click on the cell of the G/L account 11001000.


Jump-to button on the context menu


After clicking on the “jump to…” button, a pop up allows you to choose which app you would like to jump to.  All the available navigation links within this app can be also found via the “jump-to” button in the Grid's or Chart's toolbar on the top right.


Links of target apps


After choosing the app, for example, ‘Display Line Item Entry’, you are led to it and the parameters applied in the previous app are passed here including the value of G/L account you click on. This enables the navigation from analytical reports to other Fiori apps. What a nice feature!


Navigation with parameters


But how is this navigation achieved?  This is the so-called Dynamic Links based on the semantic object.  You will see them in lots of places in SAP Fiori, such as in the enterprise search results, in the smart link dialogs or in related apps buttons. It is also described in the blog: SAP Fiori for SAP S/4HANA – Creating custom content for Business Roles - section Choosing your Semantic Object and action for your custom content. In the case above, in the context menu or “Jump to”, the jump targets includes “Display G/L Balance”, “Display Line Item Entry”, “Display Line Item in General Ledger”, etc.. The semantic object of those apps is “GLAccount”. One missing puzzle piece might be how the system knows which semantic object should be bound to which field in the report. When looking at the source code of the CDS view (C_TRIALBALANCEQ0001) which provides the data for this app as an analytical query (2CCFITRIALBALQ0001), we cannot find any definition related to the semantic objects (no annotation consumption.semanticObject defined) for the columns.

How it works


 

According to SAP Note 2404704 - Analytics Component and Navigation within Fiori Launchpad, when applications using the WDG are executed inside Fiori Launchpad (FLP), the WDG uses IBN. IBN however works completely different compared to the report-report interface (RRI, based on transaction RSBBS), which is used outside FLP. In WDG, normally the field name of the CDS View is used as “Semantic Object”. In the case above, the apps whose Semantic Object is “GLAccount” are listed because the mouse points to G/L Account and whose technical name in the CDS View is “GLAccount”. Besides, the WDG is a user interface for analytical queries or BW queries which are based on BW objects (see more explanation later), not on semantic objects. Therefore, a mapping between BW objects and semantic objects is necessary to enable IBN. This mapping is done by a BAdI (Enhancement Spot FPM_BICS_NAVIGATION).

Here I use some simple custom CDS views to test this behavior.  The CDS view ZC_MR_FlightByAirport_Q is exposed as an analytical query. It has multiple fields defined as rows, such as Airline, FlightConnection, FlightDate, AirportFrom, AirportTo, Currency, AircraftType.


Custom Analytical Query ZC_MR_FlightByAirport_Q


When I run this query in the WDG (please refer to Masa’s blog: How to create custom Fiori Multidimensional Reporting Application in S/4HANA on-premise), I set a breakpoint in the method IF_FPM_BICS_NAVIGATION~GET_SEMANTIC_OBJECT_MAP which is part of the standard implementation for the Enhancement Spot FPM_BICS_NAVIGATION.


Standard Implementation of FPM_BICS_NAVIGATION



Method GET_SEMANTIC_OBJECT_MAP


It can be observed that the technical column names defined in the query view are automatically bound to the semantic objects with the same names and meanwhile the corresponding BW objects (internal field name of the analytic query) are included in the column BW_OBJECT_LIST of the mapping table ct_semantic_object_map.


Mapping table ct_semantic_object_map


For instance, for the “semantic object” - Airline, the BW object mapped is .


BW object 2CZIAIRLINE mapped to semantic object Airline


You might wonder why BW objects are relevant here. Because CDS views use the analytic engine in SAP S/4HANA, which leverages some of BW technologies. A CDS view can generate a transient provider. With the transaction code RSRTS_ODP_DIS, you should be able to find the respective “BW object” name for each field.  For more details, please refer to the wiki page: TransientProviders on CDS Views.


Transient provider generated by CDS view


Because there are no defined semantic objects or target mappings yet in the system (For instance, there is no semantic object ‘Airline’ defined.), the navigation does not work as expected when I click on the cells of Airline and try to navigate.


Context Menu of Airline



No navigation available


Since we have noticed the BADI automatically maps the technical name of field into a semantic object, I rename the field Airline into SalesDocument in the query CDS view just for test purpose.  (Although the flight scenario has nothing to do with SalesDocument, but I feel this example is good enough to show the mechanism behind.)


Rename column name


Because “SalesDocument” is a predefined semantic object in the system, its related navigations now are available in the context menu of Airline. The semantic objects released by SAP can be found by the transaction code /UI2/SEMOBJ_SAP.


Available target links for Airline



1:n mapping


 

One question might follow: what if there are multiple columns in the report which should be mapped to the same semantic object, but it is not allowed to have the same technical names for them in the same query.

Per SAP Note 2404704 - Analytics Component and Navigation within Fiori Launchpad, a 1:n mapping between semantic objects and BW characteristics can be realized by leveraging the Enhancement Spot  FPM_BICS_NAVIGATION.

To implement this, please define a custom implementation for this enhancement spot.


Custom Implementation for FPM_BICS_NAVIGATION



Custom Method GET_SEMANTIC_OBJECT_MAP


For instance, just for test purpose, let us map the field FlightConnection also to the semantic object SalesDocument. When selecting “Jump to” on the field Flight Connection, the same jump targets are listed as the field SalesDocument. The following sample code is used in the custom method ZFINS_FIS_BICS_NAVIGATION_IMPL-IF_FPM_BICS_NAVIGATION~GET_SEMANTIC_OBJECT_MAP to bind the second BW object ‘2CZIFLIGHTCONN’ (Internal field name of the field FlightConnection) to the semantic object SalesDocument. This BW object ‘2CZIFLIGHTCONN’ belongs to the column FlightConnection in the query. It is inserted to the mapping table ct_semantic_object_map.

Please also be aware that the BW object ‘2CZIFLIGHTCONN’ is already automatically bound to the semantic object ‘FlightConnection’ before this custom implementation is executed. Therefore this entry needs to be deleted from the mapping table ct_semantic_object_map .
  METHOD if_fpm_bics_navigation~get_semantic_object_map.

DATA ls_semantic_object_map LIKE LINE OF ct_semantic_object_map.
DATA ld_semantic_object TYPE /ui2/semantic_object.

FIELD-SYMBOLS <ls_semantic_object_map> LIKE LINE OF ct_semantic_object_map.

ld_semantic_object = 'SalesDocument'.
READ TABLE ct_semantic_object_map ASSIGNING <ls_semantic_object_map> WITH KEY semantic_object = ld_semantic_object. "#EC NOTEXT

IF sy-subrc EQ 0.

INSERT `2CZIFLIGHTCONN` INTO TABLE <ls_semantic_object_map>-bw_object_list. "#EC NOTEXT
ENDIF.

DELETE ct_semantic_object_map WHERE semantic_object = 'FlightConnection'.

IF sy-subrc eq 0.

ENDIF.


ENDMETHOD.

After activation, you will see now we can also navigate to the SalesDocument related app from the cells of FlightConnections.


Available target links of FlightConnection


The approach above could be also needed especially when a BW Query based on BW InfoObject is used in WDG, as it is always the case that BW InfoObject technical name cannot be the same as Semantic Object name.

Additionally, in the standard implementation of this BADI, there are already some default mappings defined. For instance, BW objects 2O0COMP_CODE and /ERP/COMPCODE are mapped to the semantic object CompanyCode. 2O0COMP_CODE is the field name of Company Code in BW standard Transient Provider, and /ERP/COMPCODE is the InfoObject name of Company Code in BPC Optimized for S/4HANA.


Default Mapping



Some tips


 

So based on the exercises above, here are some useful tips in my opinion.

  • Different from other types of SAP Fiori apps, in WDG, normally the same field name should be used for the same business entity in the queries to enable IBN crossing different apps.  The field name is automatically treated as a (custom or standard) semantic object, e.g. the field name CompanyCode enables navigation to the apps related to the semantic object CompanyCode. No custom implementation for the BADI would be needed.

  • If the field name in the query cannot be the same as the semantic object name and it is not covered in the default mappings in the standard implementation of BADI FPM_BICS_NAVIGATION, a custom implementation should be used to maintain the mapping. Typical cases could be multiple fields/ BW objects need to be mapped to the same semantic object or using BW queries in WDG.


 

Thanks for reading! I hope this blog post was helpful for you. If so, click on "like" or "share". I'm looking forward to your feedback and thoughts or clarification questions you may have in the comment section below.

You’ll find much more on our SAP Fiori for SAP S/4HANA wiki

Other helpful links:

Also many thanks to masaaki.arai, jocelyn.dart, leiguo for helping me with this blog post.

Brought to you by the SAP S/4HANA RIG and Customer Care team. 

 
8 Comments