Technical Articles
PAi Series Blog 1: Installation and Configuration of PAi Delivery Unit by Shekhar Chhabra
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:
- Install the PAi Delivery Unit (*Today*)
- Configure SAP NetWeaver to enable the Predictive Applications on the S/4HANA system
- SAP Predictive Factory configuration
Install the PAi Delivery Unit
Here we will describe steps on how to install the PAi Delivery Unit:
- Ensure the SAP HANA scriptserver is started on your S/4 HANA system
- APL is available on SAP Software Downloads/Software Center.
- Setup APL as per the SAP HANA Automated Predictive Library on the SAP Help Portal
- 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
-> PRED ANALYTICS APL 3 FOR HANA2
- -> Support Packages & Patches (TAB)-> By Alphabetical Index -> SAP S/4HANA-> SAP S/4HANA 1709
- Open the SAP HANA Application Lifecycle Management (e.g. http://<WebServerHost>:80<SAPHANAinstance>/sap/hana/xs/lm )
- Choose the PRODUCTS tab.
- Choose the Delivery Units tab
- Choose Import.
- Select the PAI DU for import.
- The Confirm Import of Delivery Unit screen appears containing the list of objects included in that DU.
- Confirm that this is the DU that you want to import.
- Choose Import to import the selected Delivery Unit.
- Once installed successfully, assign the sap.hana.pai::ExecutePAI role to the ABAP technical user
- 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.
- Log on to your S/4 HANA On Premise system via SAP Logon
- Launch the t-code: dbacockpit
- Expand out the diagnostics, choose SQL Editor
- Execute the following lines (separately):
select * from “_SYS_REPO”.”DELIVERY_UNITS” where DELIVERY_UNIT=‘HANA_UMML’;
select * from “_SYS_REPO”.”DELIVERY_UNITS” where DELIVERY_UNIT=‘HCO_PA_APL’;
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
on A.PLUGIN_NAME = B.PLUGIN_NAME and A.AREA_NAME = B.AREA_NAME
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
on A.SERVICE_NAME = B.SERVICE_NAME
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!!
Hi Orla,
thank you for the blog. It pointed us in the right direction.
We were working with 1809 and the requirements are slightly different, but we eventually made it.
I would recommend using the SAP Note 2631182 - Central Release Note Predictive Analytics integrator (PAi) to understand what's the relevant required version.
Also, the help can be found at: https://help.sap.com/viewer/7223667230cb471ea916200712a9c682/1807/en-US/86c8c78ae703419d8cfcbc8dc9367b63.html
All the best,
Andreu
Hi Orla,
My requirement is to use Machine Learning services in Focused Run. Could you please help me with steps to take it forward..
Thanks,
Hi Esha,
Can y elaborate on what you mean by Focused run?
Thanks,
Orla
Hi Orla,
In SAP focused run system standard machine learning R models exists on system anamoly prediction.As well can add custom model to the same. So I wanted to understand on data collection part , which data I need to consider to build the custom model. In the existing models what are the tables considered.
Thanks,
HI Esha,
We don't have the ability to run R Models in PAii just APL. I would suggest checking out the SAP Data Intelligence platform for R related models.
Thanks,
Orla
Hi Orla/Shekhar,
Can you please help to understand how to assign this role sap.hana.pai::ExecutePAI to ABAP Technical User.
Thanks,
Ashwin