Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert

Welcome to the first installment in the SAP S/4HANA and SAP Predictive Analytics integrator Blog Series written by shekhar.chhabra

The idea of this section is to get the pieces of PAi installed, configured, connected before we can start creating, publishing, integrating predictive models into the world of PAi.

Over the next few weeks we are going to detail the following:

  1. Install the PAi Delivery Unit (*Today*)

  2. Configure SAP NetWeaver to enable the Predictive Applications on the S/4HANA system

  3. SAP Predictive Factory configuration

Install the PAi Delivery Unit

Here we will describe steps on how to install the PAi Delivery Unit:

  1. Ensure the SAP HANA scriptserver is started on your S/4 HANA system

  2. APL is available on SAP Software Downloads/Software Center.

    • Setup APL as per the SAP HANA Automated Predictive Library on the SAP Help Portal

  3. Download the PAi Delivery Unit from SAP Software Downloads/Software Center.

    • -> Support Packages & Patches (TAB)-> By Alphabetical Index  -> SAP S/4HANA-> SAP S/4HANA 1709

      -> UMML4HANA 1 


  4. Open the SAP HANA Application Lifecycle Management (e.g. http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/lm )

  5. Choose the PRODUCTS tab.

  6. Choose the Delivery Units tab

  7. Choose Import.

  8. Select the PAI DU for import.

  9. The Confirm Import of Delivery Unit screen appears containing the list of objects included in that DU.

  10. Confirm that this is the DU that you want to import.

  11. Choose Import to import the selected Delivery Unit.

  12. Once installed successfully, assign the sap.hana.pai::ExecutePAI role to the ABAP technical user

  13. Predictive Analytics integrator (PAi) is now ready to use.


PAi Delivery Unit Installation Validation

Here are a couple of tips and tricks to check that the PAi Delivery Unit was installed successfully and, that your SAP HANA is configured correctly for PAi.
This set of steps involve executing some SQL. The SQL provided is from the PAi Team.

  1. Log on to your S/4 HANA On Premise system via SAP Logon

  2. Launch the t-code: dbacockpit

  3. Expand out the diagnostics, choose SQL Editor

  4. Execute the following lines (separately):




Each Delivery Unit should be returned when the SQL is executed successfully. For example, see this screenshot:

Here is more SQL to execute:

SELECT ifnull(A.PLUGIN_NAME, B.PLUGIN_NAME)||'.'||ifnull(A.AREA_NAME, B.AREA_NAME)||'.enabled' as "Key", map(PACKAGE_STATUS, 'REGISTRATION SUCCESSFUL', 'true', 'false') as "Value" FROM "SYS"."M_PLUGIN_STATUS" as A

full outer join (

select 'sap_afl_sdk_apl' as PLUGIN_NAME, 'APL_AREA' as AREA_NAME FROM dummy

union all

select 'afl' as PLUGIN_NAME, 'AFLPAL' as AREA_NAME FROM dummy) as B


union all

SELECT lower(PLUGIN_NAME || '.' || replace(KEY, ' ', '.')) as "Key", VALUE as "Value" FROM "SYS"."M_PLUGIN_MANIFESTS"

union all

select 'hana.version' as "Key", VERSION as "Value" from SYS.M_DATABASE

union all

select 'hana.scriptserver.enabled' as "Key", map(ACTIVE_STATUS, 'YES', 'true', 'false') as "Value" from

(select 'scriptserver' as SERVICE_NAME from dummy) as A

left join M_SERVICES as B


The above lets you know if the SAP HANA ScriptServer is started, what version of APL is installed on the system. Scroll down to the bottom of the result.



Finally, we can use this SQL to check if the ABAP technical user has the PAi role needed to execute and consume predictive models.

SELECT * FROM "PUBLIC"."EFFECTIVE_ROLES" where USER_NAME = '<ABAP technical user>' and ROLE_NAME = 'sap.hana.pai::ExecutePAI';

All the above SQL can also be run via HANA studio connected to the HANA DB, provided your user has all the necessary roles and authorizations.

In the next installment I will walk you through the configuration steps required on the SAP Netweaver. Stay Tuned!!