Skip to Content
Author's profile photo AJITAV MOHANTY

Installing AFL(Including SAP PAL) in SAP HANA 1.0.0.82

Purpose of document:

How to guide demonstrates the technical installation steps for AFL library in SAP HANA database version 1.0.0.82

Background:

For one of our requirement customer wanted to find the hidden trend of demand and supply for particular dealer against for particular material. As well as they want to forecast the trend of orders based on historical data.

Business Objective:

To increase business process efficiency by using SAP HANA in-memory technology

Technical Environment:

Existing SAP HANA hosted in AWS having version SAP HANA 1.0.82 (SPS08) and installation of SAP AFL version 82 revision. SAP HANA developer has created views based on business requirement and consumed it into SAP PAL. We have implemented single exponential smoothing algorithm in SAP PAL.

Prerequisites:

To use the PAL functions, you must:

  • Install SAP HANA SPS xx.
  • Install the Application Function Library (AFL), which includes the PAL.
  • Enable the Script Server in HANA instance. See SAP Note 1650957 for further information
  • The revision of the AFL must match the revision of SAP HANA


Checking PAL Installation To confirm that the PAL functions were installed successfully,

check the following three public views:

● sys.afl_areas

● sys.afl_packages

● sys.afl_functions


These views are granted to the PUBLIC role and can be accessed by anyone


PFB Installation step by step. Happy Reading!


1.Checking current SAP HANA Version on AWS
a) HANA version check from Command Line:
->Login to OS level as user “SIDadm
->Run the command “HDB version
1.JPG
b) HANA version check from HANA Studio:
->Login to Studio and check the “Version History” as below
->HANA Studio -> HANA system -> Right Click -> properties -> Version History.

Output: 1.00.82.00.394270 (Which means we are on SAP HANA 1.0, Version 82)


2. Downloading required corresponding patch level for AFL

  • We need to download version 82 patch level from SWDC as below:2.JPG
  • Download SAPCAR from SWDC

3. Transfer downloaded media on to JUMP off rdp(server)

4. Copy Downloaded files from JUMP off server to HDB to /hana/shared/HDB/HDB00 using FileZilla as below.

3.JPG

(Note: Drag & drop selecting location from Jump off to HDB (Remote Site))          

                                                             

Installation Phase

  • Login to HANA Server using HDBADM as user & xxxx as password using Putty.
  • Uncar the files using SAPCAR –xvf IMDB_AFL100_82_3-10012328.SAR in location /usr/sap/HDB/HDB00

4.JPG

5.JPG

Files Uncarred as above.

  • Login using root into HANA Database for Installation of AFL.

6.JPG

  • Provide appropriate rwx 777 permissions to SAP_HANA_AFL created using command

chmod –R 777 SAP_HANA_AFL as shown below

7.JPG

  • Execute ./hdbinst for SAP AFL Installation

8.JPG

Installation Done!!!

Add AFL Roles to user profile for required users to use & verify afl schema in place.

Errors/Issues:

We faced issues wherein we didn’t find the AFL Area views.

Analysis: AFL Lib version installed is of version 85.

Resolution : AFL Lib version should match the SAP HANA DB version which is 82.



Thanks

Ajitav

Assigned Tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      useful info..let me try once.. 😀

      Author's profile photo Former Member
      Former Member

      Hi Ajitav,

      nice document very useful... thanks for sharing .. 🙂

      Author's profile photo Former Member
      Former Member

      The document was very clear Thanks for sharing 🙂

      Author's profile photo Former Member
      Former Member

      very nice..

      Author's profile photo Former Member
      Former Member

      This is very helpfull.

      Thanks,

      Author's profile photo Antoine CHABERT
      Antoine CHABERT

      this document looks quite helpful to the community - it would be fantastic if it gets refreshed on the latest revisions of SAP HANA!

      Author's profile photo Solution Manager SPL
      Solution Manager SPL

      HI All,

       

      how to  install Application Function Library (AFL), which includes the PAL in a particular  tenant..

       

      Regards,

      Ramesh

      Author's profile photo Former Member
      Former Member

      Excellent. Should be part of the official documentation!

      I appreciate it.

      Thanks!

      Author's profile photo NAVEEN CHEPURI
      NAVEEN CHEPURI

      Hi Mohanty,

      Excellent document, much needed one.

      I tried the same approach to install AFL components in HANA Express 2.0 on Google cloud.

      When I tried to access HDB folder I am getting the following error in Filezilla.

      Error: Directory /hana/shared/HXE/HDB90: permission denied

      I installed with admin user ID, I suppose I will have autorization to access this folder.

      Can you please help me with this?

      Author's profile photo Stitsey Alexey
      Stitsey Alexey

      To check DB version is also possible from application server, to use SAP GUI --> System --> Status / Database data --> Release
      or
      DBACOCKPIT --> Current status --> Overview --> General system information --> Version

      Also, in DBACOCKPIT you can see plug-ins list (AFL-s)

      Author's profile photo Manoj Somkuwar
      Manoj Somkuwar

      Hi,

      I installed AFL version 57 Patch level 2 on SAP HANA DB 2.0 SP05 rev 57 and DB was restarted.

       

      root@DBSERVER>:/sapmedia/software/SAP_HANA_AFL_rev57/SAP_HANA_AFL # ./hdbinst
      SAP Application Function Libraries installation kit detected.

      SAP HANA Lifecycle Management - SAP AFL Installation 2.00.057.0002.1639753672
      *****************************************************************************

       

      Enter SAP HANA System ID: <DBSID> as mentioned in (/hana/shared/<DBSID>)
      Checking installation...
      Preparing package 'AFL'...
      Installing SAP Application Function Libraries to /hana/shared/<DBSID>/exe/linuxx86_64/plugins/afl_2.00.057.0002.1639753672_9b9773554cfab3762484ba7eab5373c2dcd80870...
      Installing package 'AFL'...
      Stopping system...
      Stopping 13 processes on host 'DBSERVER' (worker):
      Stopping on 'DBSERVER' (worker): hdbdaemon, hdbcompileserver, hdbdiserver (HDB), hdbdocstore (HDB), hdbdpserver (HDB), hdbindexserver (HDB), hdbindexserver (<DBSID>), hdbnameserver, hdbpreprocessor, hdbscriptserver (HDB), hdbwebdispatcher, hdbxsengine (HDB), hdbxsengine (<DBSID>)
      All server processes stopped on host 'DBSERVER' (worker).
      Activating plugin...
      Starting system...
      Starting 13 processes on host 'DBSERVER' (worker):
      Starting on 'DBSERVER' (worker): hdbdaemon, hdbcompileserver, hdbdiserver (HDB), hdbdocstore (HDB), hdbdpserver (HDB), hdbindexserver (HDB), hdbindexserver (<DBSID>), hdbnameserver, hdbpreprocessor, hdbscriptserver (HDB), hdbwebdispatcher, hdbxsengine (HDB), hdbxsengine (<DBSID>)
      Starting on 'DBSERVER' (worker): hdbdaemon, hdbdiserver (HDB), hdbdocstore (HDB), hdbdpserver (HDB), hdbindexserver (HDB), hdbindexserver (<DBSID>), hdbscriptserver (HDB), hdbwebdispatcher, hdbxsengine (HDB), hdbxsengine (<DBSID>)
      Starting on 'DBSERVER' (worker): hdbdaemon, hdbdiserver (HDB), hdbdocstore (HDB), hdbdpserver (HDB), hdbindexserver (HDB), hdbscriptserver (BHDB1), hdbwebdispatcher, hdbxsengine (HDB), hdbxsengine (<DBSID>)
      Starting on 'DBSERVER' (worker): hdbdaemon, hdbdiserver (HDB), hdbdocstore (HDB), hdbdpserver (HDB), hdbindexserver (HDB), hdbscriptserver (HDB), hdbwebdispatcher, hdbxsengine (HDB)
      Starting on 'DBSERVER' (worker): hdbdaemon, hdbdiserver (HDB), hdbdocstore (HDB), hdbdpserver (HDB), hdbwebdispatcher, hdbxsengine (HDB)
      Starting on 'DBSERVER' (worker): hdbdaemon, hdbdiserver (HDB), hdbdocstore (HDB), hdbwebdispatcher
      Starting on 'DBSERVER' (worker): hdbdaemon, hdbdiserver (HDB), hdbwebdispatcher
      All server processes started on host 'DBSERVER' (worker).
      Installation done
      Log file written to '/var/tmp/hdb_afl_2022-02-02_20.21.39_12843/hdbinst_afl.log' on host 'DBSERVER'.
      root@DBSERVER:/sapmedia/software/SAP_HANA_AFL_rev57/SAP_HANA_AFL #