Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
himanshupensia
Participant
Scenario:

We will be learning how to build APF based applications with APF configuration modeler.

This is blog is Part 2 in series of Analytics Path Framework (APF). You can learn about Analytics path framework, its Behavior and Interactions in my previous blog https://blogs.sap.com/2018/07/05/analytics-path-framework-apf-part-1-introduction-behavior-and-inter... .

Prerequisites:

The following products are required:

  • SAP Smart Business foundation component 1.0 (SAP ANALYTICS FOUNDATION 1.0)

  • The following software component versions that are relevant for APF are included in this product and installed automatically:

    • HANA CONTENT HBA APF CORE 100 (technical name: HCO_HBA_R_APF_CORE)

    • UISAFND1 100 SP01 (technical name: UISAFND1).



  • SAP HANA appliance software SPS08 or higher.


Note :This product is also included in all SAP Smart Business products.

APF and the APF Configuration Modeler only support the consumption of OData Version 2.0 services provided on SAP HANA extended application services (SAP HANA XS).All required OData services must exist and must fulfill the following requirements:

  • The service definition must contain
    annotations {
    enable OData4SAP;
    }​


  • For each entity set you must specify the key words “aggregates always”.In addition, for each entity set that corresponds to an analytical query view, the statement “keys generate local” must be included.Example :
    service  {
    "sap.hba.ecc/YearMonthQuery.calculationview" as "YearMonthQueryResults"
    keys generate local "GenID"
    aggregates always;
    }​



The following catalog, group, and role are relevant for the APF Configuration Modeler:

  • Catalog SAP_APF_DT_TC_A

  • Group SAP_APF_DT_TCG_A

  • Role SAP_APF_DT_TCR_A


UI Overview of APF Configuration Modeler:

Application overview page

Here you create a node under which you can define several different configurations.

  • Open APF Configuration molder app from FIORI launchpad.

  • On Application overview page you can get list of all the applications you have to find. For each application you can configure several versions.

  • Mark 1 area shows Application description which is like structuring nodes that helps to organize the relation configurations.

  • Mark 2 shows the footer bar. There are two buttons edit and import in the footer bar .On click of Edit you can change or delete the description and the semantic object. We will discuss functionality of Import button in next blog.

  • Mark 3 shows the create button with + icon.From here you can create your own application.


Application Configuration page

Click on the application you want to configure,then you will be redirected to object configuration page of the application.

  • An application can have several configuration, often these configuration are different version of same app. For example here we have three different version of same application APF Standard Demo, APF Hierarchy Demo, APF Smart Filter Bar Demo.

  • App configuration under one application share a common text pool. That is, one text file that contains the texts for all configurations belonging to an application node

  • A configuration is made up of Filters, Categories, Representation and Navigation target. We can describe those terms as follows

    • Category :-The categories you define here are displayed on the first level of the analysis step gallery. They help to clearly arrange the analysis steps, for example, by drill-down dimensions or by KPIs.

    • Filters:-Using facet filters, the user can set global filter values that apply to an entire analysis path.

    • Representation :-Representations define how the data of an analysis step is visualized on the UI, that is, which chart type is used. You can define several representations for each step so that the user can then select the required one in the analysis step gallery. At runtime, the user can switch between the different representations of a step.

    • Navigation Target:-Navigation targets are applications the user can navigate to from an APF-based app.




Procedure to Build APF application:

We will go through below steps to build an APF based analytical application.

  1. Adding a Configuration.

  2. Configuring an analysis category.

  3. Configuring an analysis step.

  4. Configuring a representation.

  5. Configuring filters.

  6. Configuring Navigation(Insight to action).


1.Adding a Configuration:

You can define several configurations under one application. At run time, only one configuration is used at a time.

  • Press on Add button and choose "New Configuration" from the options.

  • Give name to the configuration in field "Configuration Title" and press Save button. For example : My Configuration.

  • In Filter type Chose "Individually Configured Filter" to customize filters in Configuration.


2.Configuring an analysis category

Categories help to group analysis steps and organize the analysis step gallery. At runtime, the categories are displayed in the same order as they appear here.




  • To create a category, Select the Configuration, click Add button and choose "New Category" option.

  • Give name to category in field "Category Title" and press save button. For example "My Category".


3.Configuring an analysis step

Here, you define the steps that a user can choose from in the analysis step gallery and that make up the actual analysis in an APF-based application. Analysis steps have a request assigned that retrieves the data to be analyzed, and one or more representations that determine the chart types.

  • Choose the category in which the step will appear in runtime, then press Add button and choose "Step->new step" option.

  • Enter title for the step as shown at Mark 1, this title will be displayed in analysis step gallery and below the thumbnail at runtime. For example "My step".

  • Using Mark 2 you can enter one or more that one categories in which the step will appear in runtime.

  • In Mark 3 under field Service, enter Odata service name with path, you can choose the service name using Value Help.For Example i have used Standard Odata service "/sap/opu/odata/sap/C_SALESVOLUMEANALYSISQUERY_CDS".

  • In Mark 4 field select the entity set which you want to get data from. For example Here we have chosen entity set "C_SALESVOLUMEANALYSISQUERY" from above Odata.

  • In Mark 5 you can select the properties which you want to show in representation.

  • By using selectable property in Mark 6 area, user can select this property in chart. For example if we enter "Material" as a selectable property here, user can select Materials in chart.

  • Mark 7 shows fields for Corner Text For Thumbnail. Here you can define the text which will be visible on four corners of thumbnail at runtime. Whatever you define here is copied to each representation of the step. For example here i have maintained text in each field to check visibility of these texts for demo purpose.  

  • Press Save Button to save the configuration.


4.Configuring a representation

Representations define how the data of an analysis step is visualized on the UI, that is, which chart type is used. You can define several representations for each step so that the user can then select the required one in the analysis step gallery. At runtime, the user can switch between the different representations of a step.

  • Select the Step in which the representation will appear in runtime, then press Add button and choose "New Representation" option. You can also copy an existing representation and modify it.

  • In Visualization as shown in Mark 1, you can choose the Chart type or Table type. Set of fields can be different each chart. For example we will choose "Column Chart" for representation.

  • In area Mark 2, Select Measure and Dimensions as per requirement.

  • You can also change Labels used for UI from area Mark 3.

  • In Mark 4, You can maintain Fields for Sorting. The Chart or table will be sorted according to this field and its sorting direction "Ascending or Descending".

  • Mark 5 shows fields for Corner Text For Thumbnail. Here you can define the text which will be visible on four corners of thumbnail at runtime.

  • Press Save Button to save the configuration.


5.Configuring filters

Using facet filters, the user can set global filter values that apply to an entire analysis path.

  • Select the configuration and press the Add button, choose the option "New Filter" to add a new filter.

  • In Mark 1 area enter the title to the filter.

  • In Mark 2 area choose the property by which you you want to filter the data.

  • If the field name of the property is different in Value Help request, then you need to maintain alias.

  • In Mark 3 area choose value help mode as "Value Help Request".

  • In Mark 4 areaenter Odata service name with root, you can choose the service name using Value Help.For Example i have used Standard Odata service "/sap/opu/odata/sap/C_SALESVOLUMEANALYSISQUERY_CDS".

  • In Mark 5 area maintain entity set name for applying Filter.

  • in Mark 6 area select the properties which want to display in value help of the filter.

  • In Mark 7 area for context resolution choose option Use Value Help Request as selected.


6.Configuring Navigation(Insight to action)

We use Navigation targets to easily jump off to another application. To do so use Open In menu in the footer bar of APF based application, which contains all navigation targets available in context of a certain analysis step.

  • There are navigation target which appear with all steps of an analysis path, Step specific navigation target appears for a certain step.

  • Step specific Navigation targets listed at the top and common navigation targets listed at the bottom.

  • When you navigate to another app the context is handed over to other app including start filters of current analysis path, selections made in the step and additional properties.

  • The target app may not necessarily need the entire context but only use the relevant parts of it.

  • When you navigate back to APF based app the analysis path is reloaded exactly the same way it was before you navigated away to the another app.

  • To Configure the Navigation targets in APF modeler, select the configuration and press the add button, choose option "New Navigation Target" to add an new navigation target.

  • In Mark 1 maintain the semantic object to the target application.

  • In Mark 2 area enter the action. Both semantic object and action together form an intent which determines the navigation target.

  • The title is filled automatically from description of the intent.

  • In area Mark 3 "Assignment Type" Section you can decide whether a navigation target is available for all the steps or for a particular step. If you choose option "Assignment to Specific Steps" then maintain the name of steps in which you want see the navigation target.

  • In area Mark 4 You can configure context mapping to map additional properties which are required by the navigation target.

  • Press save button to save the navigation target.


In the next blog we will learn How to Integrate and Launch APF application from Smart Business Applications. Stay Tuned !!!

References :

https://wiki.scn.sap.com/wiki/display/NWTech/Analysis+Path+Framework%3A+Turning+Data+into+Insight

https://sapui5.hana.ondemand.com/sdk/#/topic/1c457c53595a6655e10000000a423f68

https://www.sap.com/documents/2017/08/a47207e0-cf7c-0010-82c7-eda71af511fa.html

 
1 Comment
Labels in this area