Help Centre › Functions & Formulas
This article describes the RPA SAP OData connector function to query an entity set.
For a full list of available functions, please read SAP ODATA functions.
Description
The Query entity set function retrieves entities from an SAP OData service using standard OData query options including $filter, $select, $expand, $orderby, $top, and $skip. Results are auto-paginated.
Setting it up
{{popups:rpas/add:action=sap-odata-query}}
Once on a process map:
- Navigate to the process where you would like to add the function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the SAP ODATA Query entity set option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Connector | Yes | Select | - | Select the SAP OData connector to use |
| Service | Yes | Text | - | OData service name (e.g. API_BUSINESS_PARTNER) |
| Entity Set | Yes | Text | - | Entity set name (e.g. A_BusinessPartner) |
| $filter | No | Text | - | OData filter expression (e.g. Country eq 'US') |
| $select | No | Text | - | Comma-separated fields to return |
| $expand | No | Text | - | Navigation properties to expand |
| $orderby | No | Text | - | Sort order (e.g. Name asc) |
| $top | No | Text | - | Max results to return |
| $skip | No | Text | - | Number of results to skip |
| Variable | Yes | Text | - | Variable to store the results |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Array | Array of entity records matching the query |
Errors
- Service not found – the OData service name is invalid
- Entity set not found – the entity set does not exist in the service
- Invalid filter – the $filter expression syntax is incorrect
Tips
- Use Get metadata to discover available entity sets and their properties
- Use $select to limit returned fields and improve performance
- Use $expand to include related entities in a single request
- Variables can be used in filter expressions: $filter=CustomerID eq '{customer_id}'
Related functions
- Get entity – Get a single entity by key
- Get metadata – Discover service schema
- Count entities – Get total count