SAP ODATA Query entity set function

The SAP ODATA Query entity set function in RPA.

Help CentreFunctions & 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:

  1. Navigate to the process where you would like to add the function
  2. Click on the green button’s drop-down (right side of the green button labelled “Process”)
  3. On the menu that appears, click on the “+ Activity” item
  4. From here you can select the SAP ODATA Query entity set option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
ConnectorYesSelect-Select the SAP OData connector to use
ServiceYesText-OData service name (e.g. API_BUSINESS_PARTNER)
Entity SetYesText-Entity set name (e.g. A_BusinessPartner)
$filterNoText-OData filter expression (e.g. Country eq 'US')
$selectNoText-Comma-separated fields to return
$expandNoText-Navigation properties to expand
$orderbyNoText-Sort order (e.g. Name asc)
$topNoText-Max results to return
$skipNoText-Number of results to skip
VariableYesText-Variable to store the results

Output variables

VariableTypeDescription
VariableArrayArray 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

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.