Smart Business Service IoT AE KPI’s & Drilldown views in Web IDE UI5 App’s
In my previous blog I showed you how to generate an IoT UI5 Application from template and how to deploy this application to the NEO Environment.
In this blog I will explain how you can create KPI tiles with evaluations and Drill-down views in the SAP Smart Business Service. I will continue with using this KPI’s and Drill-down views in a Freestyle IoT Application in the Web IDE.
Setup Smart Business Service
The Smart Business Integration with IoT Services using WebID is possible by setting up the Smart Business Services and Controls.
This can be done by creating the following destinations in a NEO account where Web IDE is used. This with a Business System between 01 – 10 of your choice
The required destinations are listed in the following SAP Help page:
In case of having problems with the destinations the SAP Blog Post of Fabian Lehmann will help you a lot.
Setup the Business System in SBS
For this part I point back to the SAP Blog Post of Fabian Lehmann he described very clear how to setup the Business System as he did for Smart Business Service.
Create a KPI
The first thing we want to do in the Smart Business Service is creating a KPI.
This can be done by selecting the “Cretae KPI” tile.
In the next screen provide values for the following fields:
- ID is an automatic generated KPI id
- Title is a mandatory field by your choice
- Source System is the source system you set up in the destinations in previous steps
- Service Discovery Mechanism should be provided with IoT Discoverer Based
- Thing Type needs the value of the Thing Type you created in the Thing Modeler
- Property Set Type holds the value for your created property set in the Thing Modeler
- OData URL is generated
- Entity Set should be aggregated
- Value Measure is provided with your chosen aggregation. AVG in this case.
Next save you KPI. You will be redirected to the homepage.
Next when want to activate our KPI. This can be done by navigating to the “KPI Workspace”.
In here search for your created KPI and activate it by pressing the “Activate” button on the bottom of the view.
Now our KPI is activated and we can add an evaluation to our KPI.
Create an Evaluation
Creating an Evaluation is now possible by pressing the “Add Evaluation” button on the bottom of the view.
When you select this button you will be provided with the following view.
First of all enable the “Advanced” button.
Provide values for the following fields:
- Selected KPI or OPI this is automatically selected cause you add an evaluation on the selected KPI
- Evaluation ID is an automatic generated Evaluation id
- Evaluation Title as name for your evaluation
- Leave the “Data Source” section as it as. This has been inherit from your KPI.
- Add an optional filter of your choice. Not mandatory.
- Add some threshold values. Not mandatory.
End this step by saving your Evaluation. You will be redirected to the “KPI Workspace”.
Your KPI with its related Evaluation will look like this.
The last step is activating this Evaluation with the “Activate” button.
Now our Evaluation is activated and we can add a Drill-down view to our Evaluation.
Create a Drill-down View
In the right upper corner we see that the Evaluation is activated.
Creating a Drill-down view can be done by selecting the “Configure Drilldown” button on the bottom of the view.
By pressing this button you will be provided with the following screen.
Here we select the “Configure” button on the bottom of the screen.
The following view will open with a list box for the dimensions and the measures.
Selected your preferred dimensions and Measures.
In this blog we will select:
- “time” as dimension
- “Degrees_AVG(KPI Measure)” as a measure
- “Degrees_MAX” as a measure
- “Degrees_MIN” as a measure
Next provide a “View Title” for your Drill-down view.
The select the “Actual Backend Data” option in the Data field.
This to get your actual IoT data instead of dummy data.
Finish this step with pressing the “Save View” button. Or make some design changes as you prefer.
After saving the view you will get the following screen.
Here you save the configuration with the “Save Configuration” button on the bottom of the screen.
Note: The data is shown with dummy data in this preview. You can ignore this. In the end you will be provided with your actual backend data.
With saving this configuration you finished all the steps in the Smart Business Service.
Now you are ready to create your Freestyle IoT App in the Web IDE.
Create a Freestyle IoT App in the Web IDE
To create a Freestyle IoT Application be sure you activated the “IoT Application Enablement” feature.
Next generate a Freestyle IoT Application.
Select “Freestyle IoT Application“.
Provide the following values for your project
- Project Name
In the “Data Source” tab you select your “Things OData Service” and your “Property Sets“.
The last step is selecting your “Page Layout‘. Finish these steps with the “Finish” button.
As you can see your project has been generated and is ready to use.
In the next step we will place our created KPI and Drill-down in our IoT UI5 Application.
Use SBS KPI’s & Drill-down views in IoT App’s
To place our created KPI and Drill-down in our IoT UI5 Application we open the “Main.view.xml” file with the Layout Editor.
This by selecting the “Main.view.xml” file -> Right Click -> Open With > Layout Editor.
This provides you the “Main.view.xml” file in the Layout Editor like this.
To place your KPI onto the view drag and drop the preferred KPI onto the screen.
In this example we will use the “NumericTile“.
Next select your created Evaluation by its “Evaluation ID” on the right from the drop-down menu.
You will see that your KPI has been updated with the value of your evaluation.
To place your Drill-down View onto the screen, you drag and drop the “Analytical Chart” into the view.
Again you provide the “Evaluation ID” and this time you select also the “View Id“.
The chart will be updated with your Drill-down view.
At this point you successfully created your KPI and Drill-down View and placed it into your View.
So now let’s RUN our Freestyle IoT Application.
The application works just fine with the aggregated measures in your Smart Business Service!
What did we learn?
So what did we do and learn in this blog:
- Setup you Smart Business Service
- Setup you Business System
- Create your own KPI
- Create your own Evaluation
- Create your own Drill-down View
- Create a Freestyle IoT Application
- Use your SBS KPI, Evaluation and Drill-down View in your Freestyle IoT Application
Also a big thanks to Fabian Lehmann with his very clear blog about:
For the moment I’m still investigating SAP Edge Services:
- Streaming Service
- Business Essential Functions
This to aggregate filter and trigger events or work orders in SAP S4.
I will be pleased to share my knowledge about Edges Services in future posts.
Good luck and enjoy!