Skip to Content
Author's profile photo AJITAV MOHANTY

Installing AFL(Including SAP PAL) in SAP HANA

Purpose of document:

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


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.


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
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: (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.


(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



Files Uncarred as above.

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


  • Provide appropriate rwx 777 permissions to SAP_HANA_AFL created using command

chmod –R 777 SAP_HANA_AFL as shown below


  • Execute ./hdbinst for SAP AFL Installation


Installation Done!!!

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


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.



Assigned Tags

      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.


      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..




      Author's profile photo Former Member
      Former Member

      Excellent. Should be part of the official documentation!

      I appreciate it.


      Author's profile photo Naveen Kumar Chepuri
      Naveen Kumar 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?