Skip to Content

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.

20 Comments
You must be Logged on to comment or reply to a post.