Monday, 21 October 2019

BEx Query based Fiori App

We all know BEx queries have been the traditional Sap BW reporting method to analyze the dataset of the BI system. Info Objects are combined in a query and data is evaluated in a tabular report.

Now Enterprise Reporting can be taken to the next level with the advent of Fiori and SAP UI5. Here are a few points why you should consider creating a custom SAPUI5 app to analyse BI data.

◈ Single query can yield multiple reports
◈ Attractive graphical representations of BI data
◈ On the go slicing and dicing and much more…

Steps to consume Bex queries in Fiori Analytical applications


1. Create an ODATA compatible BEx Query.
2. Activate ODATA service for the Query. This ODATA service will expose the BI data.
3. Develop a custom UI5 app consuming query ODATA Service

And the final output will look something like this :

First chart represents Preventive Maintenance Count by District.

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

Second chart represents PM Count ACTUAL and PLAN values with respect to district.

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

Step 1 : Create ODATA compatible BEx Query


There are a few points to remember when creating a query in query designer with the motive of generating an ODATA for the same

◈ Key Figures can go only in the columns section.
◈ Characteristics have to be in rows section.
◈ At least one characteristic in rows.
◈ No additional structures are allowed.
◈ To keep it simple, we are not  going to add any filters in query level, rather implement all filter related details (like filter defaults, select options etc) at the app level

– To get the above output, we need to create a query ZFIORI_SAMPLE with

◈ PM Count in  Column
◈ District and Value Type in Rows

and then save the query as seen below.

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

◈ Now go to extended tab of query and select By OData option and hit SAVE again. You can see a message that Gateway service has been generated.

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

◈ Now change the technical name of PM Count and save.

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

Step 2 : Activate ODATA service for Query ZFIORI_SAMPLE

◈ Login to SAP GUI and go to tcode /n/iwfnd/maint_service and Follow the instructions as seen in the screenshots.

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

◈ Now to see the metadata, replace ?$format=xml with $metadata

BW SAP HANA Data Warehousing, SAPUI5, SAP HANA Study Materials, SAP HANA Learning, SAP HANA Guide, SAP HANA Online Exam

Query ODATA Service is ready to be consumed in Fiori App!

No comments:

Post a Comment