Skip to Content
Technical Articles

SAP BusinessObjects and SAP Intelligent RPA – Simple PoC

The goal of this Proof of Concept is to get a first impression, how you can automate manual steps in SAP BusinessObjects using SAP Intelligent Robotic Process Automation.

For general information regarding SAP Intelligent RPA (videos, blogs, openSAP courses) please read the blog SAP Intelligent RPA – enablement and getting started  there is also a free trial, try out now

The Story

  • Validate the actual result displayed in a Web Intelligence document and compare with the expected value of 2014 Total Sales
  • Send a notification Mail with the validation result

Manual Steps to Automate

  • Open BI Launchpad
  • Enter the logon information for a user
  • Select Documents Tab
  • Select Folders
  • Browse to a specific Folder
  • Select and open a Web Intelligence Document from the list
  • Change to another report tab in the document
  • Validate the value of a cell in a table

Demo Video

 

Create the Automation Project

A tutorial that helps to create your first automation project with Desktop Studio can be found here: Getting Started with the Desktop Studio.

We will go through the main steps of the PoC project:

1) Launch the Studio

2) Create a project

3) Add Application

4) Add Workflow

5) Capture the Pages needed for the application / workflow

Logon, Home, My Documents, …

6) Define the Criteria to identify the application

Good practice is to use the Domain for the application criteria.
Here the server name: Part(DOMAIN) = server42
(the url of my deployment is: http://server42:8080/BOE/BI)
You can define several criterias to allow different Domain values, they will be combined with OR.

7) Define the Criteria to identify the pages

The tricky part is to find a unique criteria for each of the pages used in your workflow.
Here the criteria for the Logon page: Part(URL) = logon.faces

8) Define the items on the pages, which should be used during the automation (input fields, buttons …)

You can click on the item in the screen capture, very often you need to navigate in the Subtree of the HTML nodes to find and select the correct item in the tree.

9) Define the sequence of the workflow Activities / Pages

Start the workflow –> Activity: Start Application –> Page: pLogon –> Page: pHome …

The execution sequence is a combination of Activities and Page Activities (see next topic).

10) Define Page Activities

In addition to Workflow Activities, you must define Activities on your Pages.
Here an example for the activities defined for the Logon Page:

  • Set Username
  • Set Password
  • Delay (just for the Demo of the workflow, so you can see the values and follow the flow)
  • Click Logon

11) Modify the JavaScript of the Workflow

After designing the steps with the Workflow Canvas, I have modified the generated scripts with some additional functionality.

Below is the code to check the value on the report page, create the mail, attach the screenshot when the value is different and send the mail.

Details for the Microsoft Outlook Extension library can be found in the SDK Reference Guide.

// ----------------------------------------------------------------
//   Step: pReportTable
// ----------------------------------------------------------------
appBILaunchpad.step({ pReportTable: function(ev, sc, st) {
	var rootData = sc.data;
	ctx.workflow('wfDemoBOE', 'bc6363f3-cb46-4eef-a93c-f2cbc3f0e00f') ;
	// Wait until the Page loads
	appBILaunchpad.pReportTable.wait(function(ev) {
		appBILaunchpad.pReportTable.oTotalSales2014.wait(function(ev) {
			// Check the value in the report
			var value = appBILaunchpad.pReportTable.oTotalSales2014.get(true).replace("2014 Total Sales : ", "");
			var pattern = new RegExp('[$]8[.,]095[.,]814');
			var found = pattern.test(value);
            ctx.outlook.init();
			ctx.outlook.mail.create({
			  To: 't.jentsch@sap.com',
			  Subject: 'IRPA[WebI]: ' + (found ? 'ok' : 'error')
			});
			ctx.outlook.mail.setBodyHtml(0, 'expected: $8.095.814 or $8,095,814 \nfound: <span style="color:' + (found ? 'green' : 'red') + ';">' + value + '</span>' );
			if (!found) {
			  var filename = ctx.options.path.log + "\\invalidValue.png";
		 	  appBILaunchpad.pReportTable.screenshot(filename);
		  	  ctx.outlook.mail.attach(0, filename);
			}
			ctx.outlook.mail.send(0);
			ctx.outlook.end();
			sc.endStep(); // end Scenario
			return;
		});
	});
}});

Test the Scenario

Prerequisite

To test your scenario, you first need to perform the Desktop Agent Tenant Registration.

Procedure

Activate the Debug mode from your Desktop Studio

Click on the Agent icon in the system tray and click Test wfDemoBOE

Conclusion

I could get a lot of insights, how automation using SAP IRPA could look like. A good understanding of the different IRPA features is of course a must, the available material on the help portal and openSAP courses are very useful to get this knowledge.

  • Screen capture was the most challenging part for me, as it was not always easy to identify the page criterias
  • Based on my experience, at least basic Javascript knowledge is needed to build more than basic workflows

This was just a simple PoC, hopefully inspiring for further scenarios also in other areas. There is a lot more you can get from SAP Intelligent RPA which I have not used to a large extend yet (Cloud Factory, unattended Bots, scheduled, …).

Stay tuned.

 

Updates

Sample package for SAP Business Objects now available in SAP Intelligent RPA Store:

 

5 Comments
You must be Logged on to comment or reply to a post.