天天看点

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

In my previous blog Build Chart and Table representation via Analytics Path Framework

I introduced the step how to render the data coming from CDS view in various chart types via Analytics Path Framework, which are actually a set of Fiori application. In this blog, I will demonstrate the steps how to configure the modeled application into a Smart business KPI tile in S4/HANA system, so that customer can conveniently use the analytics application by clicking tile in Fiori launchpad.

The CDS views created in previous blog are reused here.

Approach1: consume OData service viaGeneric APF runtime application

With this approach, it is not necessary for you to create your own Fiori application. Instead, your modeled configuration is launched by APF generic runtime application.

(1) Create a new KPI definition:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

maintain the four mandatory attributes below. For Semantic Object/Action for KPI itself, keep them empty.

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Trouble shooting guide updated on 2016-05-26

This chapter is added for SCN question Issue with “Create KPI” (Fiori App) on CDS Views (S/4HANA 1511).

In case you didn’t see any value in field “Entity Set”, you can do trouble shooting by yourself.

In my case, when I first select F4 value help for “Entity Set”, I can see a series of CDS views listed, which are retrieved by the batch request observed in Chrome development tool.

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Since my CDS view “Z_C_PRODUCT” does not appear there, so I type it manually and click search icon. A second batch request is sent:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

I can see my typed CDS view name is included as filter operator in this request:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Now I select the value help for OData service. The response for this request contains OData service metadata url.

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

When you now select value help for the third field “Entity Set”, the metadata of this OData service is requested via the url fetched from the previous request. After a successful metadata request, you should see the entity set. If not, usually there is something wrong in the metadata retrieve. You should see detailed error message in Chrome development tool.

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

==Trouble shooting end ==

Then create a new evaluation based on this KPI:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Don’t forget to activate your evaluation. Once done, you should have the following artifacts: one KPI and one evaluation:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

(2) Select evaluation and click button “Configure Tile”:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Here you can create a new Smart Business tile:

For three mandatory attributes, you must specify the hard coded values as highlighted below:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Assign this tile to a given catalog. And for Application Parameter, choose parameter name as sap-apf-configuration-id and value as convention ..

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

How to get application guid and configuration guid? Just open your application in APF Configuration modeller:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

(3) Once tile creation is done, add the tile to catalog group via personalization:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Save the change, now you should see the Smart business tile in launchpad.

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Enter the tile, you can now see rendered chart as expected:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Approach2: Configure the tile navigation via Semantic object + action

For this approach, you should have a working UI5 application deployed on BSP repository. In my example it could be found in frontend system’s BSP repository with name DEMO_SD_SVA_S1 via tcode SE80.

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

(1) Open Fiori launchpad design, create a new target Mapping for a given catalog:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

(2) Specify Semantic Object + action as below.

For url, the format is /sap/bc/ui5_ui5/sap/

For Parameter, the name is sap-apf-configuration-id and the value is ..

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

(3) Create a new evaluation and click button “Configure Tile”:

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

Here in navigation property maintenance area, select Drill down as Others and specify Semantic object and action as the same value you have entered in step 2. Save this tile configuration.

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

(4) Now you should be able to search the tile created in step3 and add it to your launchpad via personalization.

使用S/4HANA里的Smart Business消费通过CDS view暴露的OData服务

继续阅读