Skip to Content
Business Trends
Author's profile photo Stuti Srivastava

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 after that  it opens VA01 transaction (creation of sales order) for data entry  post that 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 workbookIn 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.

 

References: Cloud Studio Guide

https://help.sap.com/viewer/8ecea00c1f854fd0a433c4aef5da1ea2/Cloud/en-US/d0b5637841a0449eba1ff4f45ebcfb91.html

SAP Intelligent Robotic Process Automation environment Topic page (https://community.sap.com/topics/intelligent-rpa),  (https://answers.sap.com/tags/73554900100800002142), (https://blogs.sap.com/tags/73554900100800002142/)

 

CONCLUSION:

In this blog post, we have gone through Designing of a Bot, Workflow Execution and Bot Deployment Process on SAP Intelligent RPA Cloud Factory. And conclude that how Systematize time-consuming bots can be developed that support error-free, scalable tasks and help you focus on high-value processes, we can use this Bot as a business purpose .

 

Stay curious for further blog post on SAP Intelligent RPA! Happy bot building!

 

 

 

Assigned Tags

      12 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Daniel Wroblewski
      Daniel Wroblewski

      Isn't SAP Build Process Automation, particular the automation bot part, really cool? Nice use case and implementation 😺

      Author's profile photo Stuti Srivastava
      Stuti Srivastava
      Blog Post Author

      Thankyou! Daniel Wroblewski that you liked the Blog .

      Author's profile photo Pierre COL
      Pierre COL

      Thanks for this blog post Stuti Srivastava 👍🏻

      As SAP Intelligent RPA is now part of SAP Build Process Automation, and not sold as a separate product anymore, could you please tag your blog post with SAP Build Process Automation ?

      It will make your post more visible for our process automation practitioners.

      Thanks

      Author's profile photo Stuti Srivastava
      Stuti Srivastava
      Blog Post Author

      Thankyou! Pierre COL

      Sure, will tag this Link so that it will get more visibility.

      Author's profile photo Shoeb Khan
      Shoeb Khan

      Thankyou Stuti for the blog post. Good read!

      Author's profile photo Stuti Srivastava
      Stuti Srivastava
      Blog Post Author

      Thankyou Shoeb Khan Sir.

      Author's profile photo Gaurav Sharma
      Gaurav Sharma

      Nice blog.

      Author's profile photo Stuti Srivastava
      Stuti Srivastava
      Blog Post Author

      Thankyou! Gaurav Sharma

      Author's profile photo Vatsal Gupta
      Vatsal Gupta

      BPA use case very well described Stuti. Excellent read !

       

      PS: Maybe can also add a video of above activities here showing the bot in action.

      Author's profile photo Stuti Srivastava
      Stuti Srivastava
      Blog Post Author

      Thankyou! Vatsal

      Will share the video also in this blog .

      Author's profile photo Shantanu Sharma
      Shantanu Sharma

      Outstanding blog post. Thanks for the detailed explanation as well the many screen shots.

      Author's profile photo Stuti Srivastava
      Stuti Srivastava
      Blog Post Author

      Thankyou so much Shantanu Sharma that you liked the blog.