Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
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'.

As we have a table for the 'Material' and the 'Quantity' we have to declare this fields as a collection. We click on the field and declare the element even if the status shows that the element cannot be uniquely identified.

The result is an entry in the 'Declared Elements' section which shows an error and the red marked 'Material' column on the screen.

By clicking on the 'Is a collection' button in the 'Declare Elements' section the element is now uniquely identified.

After we declared all necessary elements the screen shows the following status.

The 'For each' Loop

As we have normally more than one position in a sales order we use the 'For each' control to loop on the results of the data extraction of the 'Excel Cloud Link'. How we can bild this is the topic of another blog post which will be published during March.

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.

The other activities are relevant for the full scenario which I will publish in another blog post during March.


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