Technical Articles
SAP Intelligent Robotic Process Automation 2.0: SAP GUI Table Control (1/2)
In this blog post you will learn how to fill data in a table based on SAP GUI Table Control. These controls are used in transactions like ‘Create Sales Order’ or ‘Create Purchase Order’. I will show you to capture such a page and which items you have to declare.
The final automation will use data which I get from an Excel file with the activity ‘Excel Cloud Link’. In another blog post I will describe how to the activity with dynamic Excel sheets.
To learn how to extract data from a GUI table control read this blog post SAP Intelligent Robotic Process Automation 2.0: SAP GUI Table Control (2/2)
This blog post is based on the 2103 release of SAP Intelligent RPA.
Capture the Screen
To build the example we capture the screen ‘Create Standard Order: Overview’.
To execute the following activities on this screen we declare the elements Sold-to-Party, Reference, Material, Quantity, Enter button and the Save button.
We set the the header data Sold-to-Party and Reference, then we have a loop on the output parameter of the ‘Excel Cloud Link’ setting the Material ID and the Quantity. In the next step we click on the Enter button followed by a wait for the table control and a ‘Scroll Down’ by one row.
After we have used each row of the Excel sheet we save the sales order, get the status from the status bar and show this status in the log.
Declare Elements
To declare an element we click on the field, give the element a name and click on the button ‘Declare Element’.
The ‘For each’ Loop
Important in this use case is the loop parameter ‘currentMember’ which contains the content of actual row. This parameter will be used define the input value for the set activity. To create this expression we use the expression editor.
As we work on a table the target definition of the activity contains also an index which we set to 0 as the index in the SAP GUI table control starts with 0.
Now you can ask why do we set a fix index as we expect to work with more than one position? The answer is simple and based on the behaviour of the SAP system itself. We do not know how many rows are visible in the table control. With fullscreen mode and my desktop resolution I get 13 rows. If I have more than 13 positions I have to add rows which results in an index which starts with 0 again and we cannot use the loop index from the ‘For each’ control to define the row in the table.
To overcome this issue we click the enter button after filling the data for each position and use the scroll down activity to scroll down one row. With this action every position will be filled in a table row with the index 0. The target parameter of the scroll down activity is the complete table.
Conclusion
Now we have learned how to insert data in a SAP GUI table control without knowing how many rows we will have. This example will be useful in many scenarios we have when we implement automations with SAP Intelligent RPA.
For more information on SAP Intelligent RPA
- Exchange knowledge: SAP Community | Q&A | Blog
- Learn more: Webinars | Help Portal | openSAP |
- Explore: Product Information | Successful Use Cases
- Try SAP Intelligent RPA for Free: Trial Version | Pre-built Bots
- Follow us on: LinkedIn, Twitter and YouTube
Hi Peter
Thx for above explanation. This you have documented in a fairly logical way and easy to understand - so thx for that. Looking ahead for new blogs for this topic.
I have no doubt about that RPA (AI and ML) is topics that will create value for many, many companies many years ahead.
If all compies had the newest IT it would be an easy go - maybe.
The reality is that companies run the ECC/ERP on-premises, cloud or hybrid solutions.
Talking 2103 release of SAP Intelligent RPA.. - I would like to figure out which limmitations/possibilities exist upon Intelligent RPA release 2103.
Question:
Are you able to place a link where I can get an overview of RPA release 2103 compared to ECC/ERP version - like ECC 6,0 EHP8 for instance?
Best Regards
Jacob von Wildenradt
Hi Peter
I might have found it ?
https://store.irpa.cfapps.eu10.hana.ondemand.com/#/explore/order=asc/type=business_content/applications/flavors=
Here an overview can be found based on filtering ERP, S4HANA etc
/Jacob
Hi Jacob,
thanks for your positive feedback.
There is only one restriction to automate ECC with SAP Intelligent RPA and that is you need SAP GUI 740 or higher.
Having said that SAP Intelligent RPA is the best option also to infuse AI/ML into existing landscapes without any major changes in the landscape itself.
Br,
Peter
Thx Peter
Your answer was just the one I was hoping for,
BR
Jacob
Hello gents.
I have spent a couple of minutes in SAP iRPA SDK ver. 1.30.69 to find out Scroll Down (GUI Table) activity. One has to click inside of a green rectangle representing ALV table, then select its name from pop-up menu. The activity list is populated within GUITableControls in SAP GUI tree node.
Enjoy it.
Now, can somebody post a hint, how to deal with many line items? Using Scroll Down works until line 23, then it's reset to existing one. Get Scroll Max followed by Scroll to works a few rows more.
Thanx. JV
You Save my whole day... Awesome