Get table Version 8 (Net)

Action group: SAP 


Description

The action returns data from a table-type element in the SAP application window.

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
SAP applicationSAP application instance that the action works on.Robin.Sap
Yes
ElementA table type element in the SAP application window. If the specified element is not an element of a table type, then the action will throw an error.Robin.WinElement
Yes
HeadingIf the value is «true», the row with the table header will be highlighted separately and will not be included in the row with the contents of the table.Robin.BooleantrueNo
Remove duplicate headerIf the value is «true», indexes will be added to the same column names in the header of the resulting table. Numbering starts from 1.Robin.BooleantrueNo
Results
ResultData TableRobin.DataTable

Special conditions of use

For the parameter "Heading" 

Get the spreadsheet:

With this parameter enabled, the log will show "Columns: 3; rows: 2" because the first row of the taken area has become a header with the column names "No.", "Title", and "Tests". These headers cannot be accessed as a row of data to read, but you can use the column names to access a specific cell or column (by actions from the "Tables" group). If the option is off, the log will show "Columns: 3; rows: 3", the column names in the header will be "1", "2" and "3".

Also, in all of the above actions, add the "Remove duplicate header" checkbox to the input parameters:

Example of use 

Task

You need to retrieve a table from SAP and save it in CSV format. 

 Solution

Use the actions "Connect to session", "Get table", "Save table to CSV". 

Implementation

  1. Assemble a robot scheme consisting of the following actions

  2. Set the parameters for the "Connect to session" action. 
  3. Set the parameters for the "Get table" action. The "Item" parameter must be retrieved via SAP Spy. 
  4. Set the parameters of the "Save table to CSV" action. 
  5. Launch the robot by clicking on the "Start" button in the top panel. 

Result

The program robot completed successfully. 


The table is saved in CSV format.