Skip to Content
Author's profile photo Tobias Trapp

Analysis Path Framework – Installation

When you want to create cool Analytical Fiori-like Apps then APF is the way to go. I blogged about it here: http://scn.sap.com/community/developer-center/front-end/blog/2015/04/01/analysis-path-framework-a-hidden-gem-for-creating-awesome-analytical-apps. So it is about advanced charting in analytical Fiori Apps. You can use APF when you have SAP UI5 resp. Fiori, you need HANA SPS08 or higher and „SAP HANA Analytics Foundation“ (SHAF)” which is part of SAP Suite-on-HANA.

If you don’t know what I mean I recommend to play around with the demo app: https://www.sapfioritrial.com/sap/hana/uis/clients/ushell-app/shells/fiori/FioriLaunchpad.html?helpset=trial&sap-client=001#DaysSalesOutstanding-analyzeDSO or an application in exploratory data analysis which is shown here:


In this blog entry I will describe how to get APF started. And I want to thank everyone at SAP who helped me: you get a free beer when we meet at Markstube in Walldorf 😆

Prerequisites

You need the following for APF:

  • AS ABAP – in the blog I describe a scenario for an AS ABAP 7.40 which is a Fiori Frontend Server.
  • HANA – of course with XS Engine running
  • Web Dispatcher

This is the easy task – you need following skills:

  • HANA administration: skills of HANA Lifecycle Manager and granting roles and analytical privileges – SSO enablement is necessary if you want to avoid loggin screens which is of course necessary for production
  • Web Dispatcher: an analytical app or the APF configuration modeler are JavaScript apps that also consume XSOData services.
  • ABAP administration: installation of a software component and implementing the Fiori Launchpad and can grant ABAP Roles

I also recommend Google Chrome because of the developer tools.

The installation is described here: http://help.sap.com/saphelp_uiaddon10/helpdata/en/ec/f70adefd71445586b2fbe264306fdd/content.htm?frameset=/en/ec/699e0817fb46a0817b0fa276a249f8/frameset.htm&node_id=699

In the following I will describe some details at the installation process which might be interesting for you. At first check that XS Engine is running. Usually it is on port 80<instance number> of your HANA and you should see something like the following on your browser:

xs.PNG

APF on FES and Fiori Lanchpad

After software component UISAFND1 is installed you need two roles on the Frontend Server: SAP_APF_DT_TCR_A (and later you also need  SAP_APF_RT_TCR_A). Then you should see the following tile on your Launchpad:

1_FLP.PNG

Please remark that according to note 2183947 – Smart Business for SoH (Suite on Hana) delivery current SP of software component UISAFND1 also includes the Smart Business Content that was before in software component UISKPI01 which is now obsolete.

HANA Content

You need also HANA Content: HANA CONTENT HBA APF CORE 100 (technical name: HCO_HBA_R_APF_CORE). The installation is described in OSS note: 2183947 – Smart Business for SoH (Suite on Hana) delivery. You find a new software component for the frontend server here for Smart Business which is useful in the future. On the HANA system you can find two software packages:

  • HANA CONTENT HBA AF CORE 100 (HCOHBARSBCORE03P_1-20012110.ZIP)
  • HANA CONTENT HBA AF TRANSP 100 (HCOHBARSBTP00_0-70000744.ZIP)

I am describing the installation using HANA Application Lifecycle Manager (HALM) which is described here: https://help.sap.com/saphelp_hanaplatform/helpdata/en/bd/b7a459c3144fcab1c5641c72c1158d/frameset.htm. Put the zip file on the database server and execute a command like the following:

/sapmnt/<system>/hdbclient/hdbalm -h sh021 -p 8066 -u <adminuser> install /SAPINST/HANA/HANA_AddOns/SAP_ANALYTICS_FOUNDATION/HCOHBARSBTP00_0-70000744.zip


The administration user need sufficent authorizations which are describes in the following knowledge base articels:


Two roles are important for installation: sap.hana.xs.admin.roles:Administrator and sap.hana.xs.admin.roles:HTTPDestAdministrator.


After that execute SQL-Statements described in OSS note 2118742 – Analyzing HANA Live content package deployment problems to control the installation.

As developer you should see the following content in HANA studio now:

systems_content.PNG

On older HANA revisions you need the Application Lifecycle Manager but I won’t describe the details here.


OSS note 2183947 – Smart Business for SoH (Suite on Hana) delivery also describes how to install the SmartBusiness Content:

“Smart Business Hana contents can be found within the download object titled “SAP ANALYTICS FOUNDATION 1.0″ within the same link above. Within this download object, HCOHBARSBCORE03_0.ZIP and HCOHBARSBTP00_0.ZIP are the zip files that contain the two Smart Business Hana Delivery Units (DUs) – HCO_HBA_R_SB_CORE and HCO_HBA_R_SB_TP”

You should also install this content since you will start APD installations from Smart Business KPI/OPI tiles. In fact there is another possibility but at least for testing reasons you will definitely need this content.

Web Dispatcher

Since APF Configuration Modeler as well as analytical apps consume resources both from the Frontend Server (Gateway Hub) but also from the HANA so you need the web dispatcher to overcome the cross origin policy restrictions.

There are many good documents that explain how a web dispatcher works:

It is possible to install more than one web dispatcher. As developer you start the Launchpad and use a different HTTP port. This could be necessary in scenarios when there a more or different systems involved.

I describe a typical configuration with (frontend server fes.acme.com), a backend (be.acme.com) and a HANA XS (hana.acme.com).

wdisp/system_0 = MSHOST= https://fes.acme.com, MSPORT=????, SID=COT, NR=??, CLIENT=???, SRCSRV=*:*, SRCURL=/sap/opu;/sap/bc;/sap/public

wdisp/system_1 = MSHOST= https://be.acme.com, MSPORT=????, SID=CCT, NR=??, CLIENT=???, SRCSRV=*:*, SRCURL=/sap/es

wdisp/system_2 = SID=EXT, EXTSRV= https://hana.acme.com:?, SRCSRV=*:*, SRCURL=/sap/hba;/sap/hana

Also useful are the following parameters:

wdisp/system_conflict_resolution = 1

wdisp/add_clientprotocol_header = 1

wdisp/handle_webdisp_ap_header = 1

wdisp/add_xforwardedfor_header = true

I don’t want to discuss rewriteitign files and integration of Enterprise Search (/sap/es) which is necessary for Fiori factsheets. Please also note that this configuration has to be changed if you develop own XSOData services in own HANA packages.


If the web dispatcher has a wrong configuration then the configuration modeler won’t react if you start to develop a configuration and you will get messages like the one here with Chrome developer tools: “APF message (1): 10005 – Bad HTTP request returned status 404 with text Not found” and “APF message (2): 5101 – Unexpected internal error: No XSRF Token availanble. Contact SAP” and “APF message (3): 9000 – Unknown exception Uncaught Type Error: Cannot read property ‘setAndSave’”

3_wrong_disp.PNG

By the way, you will get similar messages if you don’t have SSO and the HANA DB will require a password change. Then you should try to access the problematic resource with the browser and you will see a message like this:

Password change required to complete authentication. Please change your password here: http://…/sap/hana/xs/formLogin/login.html

Changing the password solves the issue.


Fight for your Rights!

You need HANA privileges that can be granted by your administrator. Then check them in HANA studio you should see at least the first two here:

/wp-content/uploads/2015/11/system_users_826158.png


You need also analytical privileges which is describe in the installation documentation mentioned above. But in a test scenario you should convince your administration to give you a kind of SAP_ALL for accessing all information views which is reasonable in test systems (only):

sap_all.PNG

By the way, you see all your privileges in detail with an SQL statement:

2_grant.PNG

If you don’t have enough privileges you will get the following messages in Chrome developer tools:

“APF message (1): 5001  Request /sap/hba/r/apf/core&odata/modeler/AnalyticalConfiguration.xsodata/$batch to server failed with http status code 403…”

FLP and GW Authorizations

You need additional  authorizations on the Fiori Frontend Server:

  • access of GW Services: authorization object S_SERVICE with SRV_NAME * is strong but reasonable for an APF developer
  • page builder: authorization objects S_PB_CHIP and /UI2/CHIP

As usual transaction SU53 will be your best friend.


For APF modeling you neer these roles:

  • SAP_APF_DT_TCR_A
  • SAP_APF_RT_TCR_A


For Smart Business you need the following roles:

  • /UI2/SAP_KPIFRW5_TCR_S
  • /UI2/SAP_KPIMOD_TCR_S


Smoketest

Now you perform a smoketest. Enter the configuration modeler, and press “+”. Now create a new application and after pressing “Save” it will be saved in the HANA database. When there is a problem then “Save” will not work. In this case open Chrome tools and check the error messages. The description of the errors above will help you to indentify the problem.

smoke.PNG

Since you will start your first APF applications using the KPI modeler you should see on your lauchpad as well tiles from the KPI modeler. If your web dispatcher doesn’t point the the HANA system or the Smart Business HANA content isn’t installed, you will see on your launchpad error messages for the KPI modeler tool instead. The error messages on the tiles say that tiles couldn’t be loaded:

kpi-blog.PNG

Summary

It’s not that difficult to install APF if you know how to do it. But you should have a sixpack of cold beer or some sparkling wine to captivate and win the hearts of your administrators. They deserve it.

Assigned tags

      20 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jochen Saterdag
      Jochen Saterdag

      Hi Tobias, great work. Thanks a lot for sharing!

      Author's profile photo Tobias Trapp
      Tobias Trapp
      Blog Post Author

      And thanks yor your help 🙂

      Author's profile photo Fabio Pagoti
      Fabio Pagoti

      Hello Tobias Trapp,


      This seems to be an obvious question as you showed HANA so much but, is it possible to reuse APF without HANA or Fiori?


      I have to build some custom UI5 apps (so no standard Fiori apps involved) and some of them require features to analyse KPIs. There is no HANA in the landscape neither Fiori Launchpad is used. UI5 version is 1.28.19.


      By the APF architecture presented in the official documentation it seems that APF consumes oData. So I am in doubt if I could create some services in SAP Gateway in replace of HANA xsodata artifacts to expose graph data. Of course I would have no worry about performance as I have no HANA views but I wonder if I could reuse at least some APF functions as it seems a great tools to analyse KPIs.


      Thanks!

      Author's profile photo Tobias Trapp
      Tobias Trapp
      Blog Post Author

      Hi Fabio,

      as far as I know and from documentation HANA is a necessary prerequsite for APF.

      BTW: data exploration without HANA is no fun since the SELECTs take too much time.

      Best Regards,

      Tobias

      Author's profile photo Fabio Pagoti
      Fabio Pagoti

      Thank you for the fast answer Tobias.

      Yeah.. I will have to live with that... at least the KPIs I need won't work with tables with huge amount of data. It seems I will have to create charts using sap.viz.

      Thank you!

      Author's profile photo Wolfgang Schaper
      Wolfgang Schaper

      Hi,

      As Tobias said, HANA is a prerequisite of APF. But HANA XS is not. So you can use APF with HANA Calculation Views (HANA XS). But you also can use it with BW on HANA or SAP NetWeaver Gateway. And there are more platforms to come, which we will announce when they will be available.

      Best regards,

      Wolfgang

      Author's profile photo Fabio Pagoti
      Fabio Pagoti

      Thanks. Unfortunaty I have no HANA system in this landscape.

      Author's profile photo Tobias Trapp
      Tobias Trapp
      Blog Post Author

      @ Wolfgang Schaper, could you clarify this statement? You described in Analysis Path Framework for BW on HANA | SCN that you can also consume OData exposed from BW Easy Query. But as far as I understand the architecture you also need some HANA content for Smart Business and probably also APF HANA content which is exposed using XS Engine. So I think XS Engine is also needed. Am I correct?

      Cheers,

      Tobias

      Author's profile photo Wolfgang Schaper
      Wolfgang Schaper

      It is about BW on HANA. So yes, you need a HANA DB. But an XS Engine is not needed in this scenario.

      Best regards,

      Wolfgang

      Author's profile photo Former Member
      Former Member

      hi Tobias,

      I was trying to configure APF, but I was unable to install UISAFND1, our backend server is S/4 HANA premise 1511, the error is "doen't match the current software component", our SAP-Basis is 750, can you help me out?

      Thanks,

      Anni

      Author's profile photo Tobias Trapp
      Tobias Trapp
      Blog Post Author

      Hi Anni,

      my blog described the installation on a Fiori Frontend Server NW 7.40 and we have SAP_UI 750 installed.

      The shipment for S/4HANA is different - see OSS note  2018360 (Release Information Note for SAP SMART BUSINESS). This note points to note 2189824 which is not released at the moment. You should open an OSS note no open it.

      Best Regards,

      Tobias

      Author's profile photo Naga Prakash
      Naga Prakash

      Hi Tobias,

      When i am launching APF Configuration Modeler from FLP i got this error on chrome console "Cannot read property ‘setAndSave’" . What i infer from this blog is Web Dispatcher to be configure to resolve this error. Even after configuring the web dispatcher i am still getting the error. Could you please me. Is there any trouble shooting document for APF

      Thanks,

      Naga

      Author's profile photo Tobias Trapp
      Tobias Trapp
      Blog Post Author

      Sorry, I don't no such document.

      Author's profile photo Bernd Steinhauer
      Bernd Steinhauer

      Hello Tobias, we have the requirement to implement some analytical apps in the fincial area. For this I'd like to try out APF. Is it necessary to buy any additional components or can I download all I need from the Marketplace? We have a SAP-installation based on NW 7.40 and HANA Thanks, Bernd

      Author's profile photo Tobias Trapp
      Tobias Trapp
      Blog Post Author

      I'm not working für SAP and I am no license guy, so I can't give you an answer. So you should ask,

      But if I remember correctly is included in SAP Business Suite on HANA license. But there are also good chances if you have license for HANA Live - this was the former SHAF SAP HANA Analytical Foundation), But license topics have become so difficult that you should ask SAP.

      Author's profile photo Bernd Steinhauer
      Bernd Steinhauer

      Thank you

      Author's profile photo Robert Bienert
      Robert Bienert

      The link to the demo app in sapfioritrial is outdated, maybe the successor is https://www.sapfioritrial.com/sites?helpset=trial&sap-client=001#BalanceAmountInDisplayCrcy_E-analyzeSBKPIDetails?chipId=6ddb79cf-26ec-0f37-ba5c-c11b4903abee-135f4a64b9707&dimension=BusinessArea&evaluationId=E.1441016956687&tileType=TT&/viewId=V.1441017236538 (?)

      Author's profile photo Robert Bienert
      Robert Bienert

      One more thing: The correct link to the knowledge base artikel 2086725 – HANA HALM is not working with error- 403 Forbidden

      Author's profile photo Former Member
      Former Member

      Hello Tobias,

      I need to configure SSO to avoid the authentication of backend HANA, when I access the APF modeler on Fiori Launchpad.

      Can you help me on the way SSO can be setup for this scenario.

      Thanks in advance.

      Regards,
      Lakshman.

      Author's profile photo Ralf Markus
      Ralf Markus

      The above blog is quite old. To get newer information please have a look at the following documents:

      The documentation (as of July 2017 with UI5 Version 1.46 the newest at that time) https://sapui5.hana.ondemand.com/sdk/#docs/guide/1c457c53595a6655e10000000a423f68.html

      is intended to support you for setting up the APF. You can find for the same toolkit also two APF Demo Apps: https://sapui5.hana.ondemand.com/1.46.9/#demoapps.html

       

      If you want to operate the S4 Version of APF look at this guide: https://sapui5.hana.ondemand.com/sdk/#docs/guide/57ae108454d643f6b6e1e364144b1433.html

      In the mentioned catalog you find the tile for the S4 Version of the APF Modeler.

       

      If you want to operate the S4 Version Cloud of APF look at this guide:

      https://sapui5.hana.ondemand.com/sdk/#docs/guide/b098fd8d11b344dbb43bcdbff6ff80b2.html

       

      If you want to use the Business Suite powered by HANA XS Approach, you can consult these documents:

      In General: https://sapui5.hana.ondemand.com/sdk/#docs/guide/ecf70adefd71445586b2fbe264306fdd.html

       

      In order to run analytical Fiori apps your system landscape has to be prepared:

      http://help.sap.com/saphelp_ssb_sfin_200/helpdata/en/52/a33d53a5256757e10000000a44538d/frameset.htm

      More information about analytical apps using HANA live content can be found here:

      http://help.sap.com/saphelp_ssb_sfin_200/helpdata/en/f1/6e7e548af58e4ce10000000a4450e5/frameset.htm