SAP Intelligent Robotic Process Automation, SAP Build Process Automation

Sales Order Creation with SAP Intelligent RPA| Integrating SAP with Excel

Overview

Bot opens the excel file in order to get the data and then Bot is opening SAP system and then it opens VA01 transaction (creation of sales order) for data entry and then bot enters the data into the system from excel and saving data.

This blog post will make your manual work easy and will automatically create sales orders. This is very useful in business purpose.

What BOT is doing:

The Structure of a Sales Order:

  • An inquiry from a customer consists of one or more items that contains the quantity of a material or service entered in the order. The quantity in a sales order is further divided into business lines and comprises of various subsets and delivering dates. All the valid conditions on these items are mentioned in item conditions. These conditions for an item can be derived via a full condition and can be valid for the entire sales order.
  • T-Code − VA01 Create a Sales Order
  • A new window will open, then you can enter the below details −
  • Enter the Order Type, below order types are available. Enter the sales organization, distribution channel and division.
  • It will open a new window. Enter the following details −
    1. Enter Ship-To-Party, Purchase Order and Date.
    2. Enter the Required Delivery Date.
    3. Enter the item details.
  • After this you can click on the save icon at the top. You will get a confirmation message −

INTEGRATING EXCEL WITH SAP:

First thing is fetching all the data from excel and creating Sales order.

secondly, we create our and IRPA Bot in Cloud studio by capturing screens, creating workflows, generating scripts and defining context variables as per requirement and finally it should look like below :

SAP Intelligent RPA Bot Details:

In this application we are capturing all the screens which all are needed for this automation.

WORKFLOW:

How BOT is fetching data from excel:

In the below workflow from Activity 1 to Activity 14.

Open Excel Instance Mandatory activity to drop when using MS Excel : opens an instance of MS EXCEL. Once you open an Excel Instance, you can use other MS Excel activities.

Open Workbook Open a workbook referenced by a workbook path. Once opened, use the Activate workbook activity for further usage.

Activate Worksheet Set the ACTIVE worksheet of the ACTIVE workbook. Once activated, further operations might be possible such as Get Values or Set Values which require an active workbook defined.

Get Values cell Return(read) the values of a specified cell range in the ACTIVE worksheet.

Range Definition: You need to define the range of a cell from the excel Like A1, A2 etc.

From Activity 4 to Activity 14 you need to define cell range from the Excel.

Custom Script: In Activity 15 we are using custom script it Inserts a step defined by custom JavaScript Code. We are adding custom script for opening SAP by giving the credentials.

JavaScript Code for defining the Input Parameters:

irpa_core.core.shellexec(‘sapshcut.exe’, ‘-system=’ + System + ‘ -client=’ + Client + ‘ -user=’ + UserName + ‘ -pw=’ + Password);

WAIT: Activity 16 It is used for a given delay (expressed in ms) between two activities for example for example. It can be useful if some User Interface elements cannot be detected or if some User Interface interactions are too fast . By adding wait , the overall automation duration may increase.

From Activity 17 to Activity 19:

In this we are defining the screen activities by capturing all the screens from SAP application .

Maximize Window (GUI Frame): In Activity 17 we are defining maximize a frame window in the background.

Set Element: In Activity 18 Set the value of a User Interface Element

Click: In Activity 19 execute a ‘click’ action on a button.

From Activity 20 to Activity 25:

Wait(Screen): In Activity 20 we are using wait screen wait until a screen is present and then call a callback. If the screen already exists, the callback is called immediately.

From Activity 21 to Activity 24–

We are setting the element of a User Interface Element from the excel by using this expression Step4.returnedValues (From Step 4 we need the data from excel). Same we are doing for other set elements

Activity 25: We are using ‘CLICK’ activity.

Activity 26 to Activity 33:

In Activity 26 we are using Wait(Screen) and then we are Setting elements from Activity 27 to 33 accordingly from the Excel and then we are using click (defined activity in the application) as SAVE.

Activity 35: In this Pop up screen of SAP we are using CLICK as an Activity.

Activity 36: In this pop up screen we are using again CLICK activity to save the document.

Close workbook – In Activity 37 we are using Close Workbook (Closing the active workbook).

Release Excel Instance – In Activity 38 we are using this activity release an instance without closing an application.

Rating: 0 / 5 (0 votes)