Thursday 21 May 2020

SAP Intelligent Robotic Process Automation & SAP Conversational AI & SAP Cloud Application Programming Model- Part 1

Introduction:


I had a chance to explore SAP Cloud Application Programming Model, SAP Intelligent Robotic Process Automation, SAP Conversational AI, SAP Cloud Platform OData Provisioning, SAP HANA Graph on ABAP Platform for SAP S/4HANA 1909 and Amazon Alexa and to tie all together.

I have attempted to build a prototype with Step Zero learnings of different concepts. An absolute ease of using different languages, programming models, libraries, tools and technologies.

A non-technical aspect of this prototype is to try an Audio-Driven Chatbot, a click free, type free application for differently abled people.

Details about Prototype:


◉ SAP Cloud Application Programming Model to build a simple Draft Enabled SAP UI5 application.

◉ SAP Intelligent Robotic Process Automation bot to automate the process of creating a record for this UI App.

◉ SAP Conversation AI which can trigger this SAP Intelligent Robotic Process Automation bot and added few additional skills to reads data from SAP S/4HANA on-premise systems.

◉ Simple SAP HANA Graph, built using CDS and AMDP, read data by calling Graph Algorithms and Publishing it by OData.

◉ SAP Cloud Platform OData Provisioning will help to consume these OData services in SAP Conversation AI.

◉ Adding voice with Amazon Alexa, super quick Integration of SAP Intelligent Robotic Process Automation, SAP CAI with Amazon Alexa.

Flow:

SAP HANA Tutorial and Material, SAP HANA Guides, SAP HANA Learning, SAP HANA Exam Prep

Demo:


Index for Development Details:


Details of Technical Implementation of SAP Intelligent Robotic Process Automation, SAP HANA Graph on ABAP Platform for SAP S/4HANA 1909 and SAP Conversational AI are mentioned in the following Blog Posts.

I will update the below index with the blog post links, once they are published.

In this Blog Post 1:

Section 0: Introduction and Prototype briefing

Section 1: Building SAP UI5 application using SAP Cloud Application Programming Model

Section 2: Adding SAP Conversational AI Chatbot to the SAP UI5 Application

Blog Post 2: 

Section 3: Building a SAP Intelligent Robotic Process Automation Project and Debug

Section 4: Deploying SAP Intelligent Robotic Process Automation Project on Cloud and Execute

Blog Post 3: 

Section 5: Exploring SAP HANA Graph, built using CDS and AMDP

Section 6: SAP Cloud Platform OData Provisioning

Blog Post 4: 

Section 7: Triggering SAP Intelligent Robotic Process Automation bot using SAP Conversation AI Chatbot

Section 8: Reading data from  SAP S/4HANA on-premise systems using SAP Conversation AI Chatbot

Section 9: Integrating SAP Conversation AI Chatbot to Amazon Alexa

Section 10: Output

Development:


Section 1: Building SAP UI5 application using SAP Cloud Application Programming Model

Create a SAP UI5 application using annotations, make it draft enabled to the service.

Please refer to the GitHub link for code.

Service Definition:

using { ns as empns  } from '../db/datamodel';

service empservice @(_requires:'admin'){ 
 entity GetEmpMain as projection on empns.EmpMain;
 entity GetEmpInfo as projection on empns.EmpInfo;
}
annotate empservice.GetEmpMain with @odata.draft.enabled;

Project Structure: 

SAP HANA Tutorial and Material, SAP HANA Guides, SAP HANA Learning, SAP HANA Exam Prep


Section 2: Adding SAP Conversational AI Chatbot to the SAP UI5 Application

Now we have an UI ready, add your SAP Conversation AI Chatbot to it.


◉ Go to your bot and select webchat channel and create

◉ Copy CHANNEL ID and TOKEN

◉ Add the below code in Component.js in your project

SAP HANA Tutorial and Material, SAP HANA Guides, SAP HANA Learning, SAP HANA Exam Prep

sap.ui.define(["sap/fe/core/AppComponent"], capm =>
capm.extend("employeeDetails.Component", {
    metadata: { manifest: "json" },
    onAfterRendering:function(){
      this.getbot();      
      },
      getbot: function(){
        if (! document.getElementById("chatbotint")){
          var oElement = document.createElement("script");
          oElement.setAttribute("id","chatbotint");
          oElement.setAttribute("src","https://cdn.cai.tools.sap/webchat/webchat.js");
          oElement.setAttribute("channelId","XXXXXXXX-4382-4bd8-9819-2e16df1dbbb8");
          oElement.setAttribute("token","XXXXXX113556510e2102a256089e0c3");
          document.body.appendChild(oElement);
        }
      }
  })
);

Run your project: You should be able to see Chatbot on your application page.

SAP HANA Tutorial and Material, SAP HANA Guides, SAP HANA Learning, SAP HANA Exam Prep

Note: Highlighted UI elements are used for building a SAP Intelligent Robotic Process Automation project.

No comments:

Post a Comment