pfx-odata2:read
Gets/lists entities from the external system.
Properties
Option | Type | Default | Description |
---|---|---|---|
| String | Â | Defines a connection to the target system. Another way to define the connection is to specify the |
| String | Â | Defines the URL of the target system. Use if the connection is not specified. |
| String |  | Defines the username for authentication. Use if the connection is not specified. |
| String |  | Defines the password for authentication. Use if the connection is not specified. |
| String | Â | Defines the entity type. |
| String | Â | Defines the entity identifier. Mandatory for the update/delete methods. Optional for the read method. |
| String | * | Specifies a subset of the entity properties that should be returned back. If not specified, all properties are selected. It is a comma-separated list. E.g. |
| String | Â | A predicate expression that selects only entities which match the expression. E.g.Â
|
| String |  | Determines what values are used to order a collection of selected entities. E.g. |
| Integer | Â | Defines the number of records to skip (from the beginning). If defined, the selected collection skips the first N entities and returns just the remaining subset. |
| Integer | Â | Defines the number of records to include (from the beginning). If defined, just the first N entities from the selected collection are selected. |
| String | none | Supported values are:
|
Examples
Search for entities and load them into Pricefx:
<route id="sap4hana-list-with-connection">
    <from uri="timer:in?repeatCount=1&delay=5000"/>
    <to uri="pfx-odata2://read?entity=A_CreditMemoRequest&$select=CreditMemoRequest,TransactionCurrency,TotalNetAmount,CreditMemoRequestType,PricingDate,CreditMemoRequestDate&$filter=TransactionCurrency eq 'USD' and OverallSDProcessStatus eq 'A'&$orderby=CreditMemoRequest desc&$top=1&$skip=0&connection=cognitus"/>
    <to uri="pfx-api:loaddata?objectType=P&connection=aperture-labs&mapper=pfimcore354"/>
</route>
Â
Authenticate using serviceUrl
and credentials
in URI:
<route id="sap4hana-list-with-properties-connection-details">
    <from uri="timer:in?repeatCount=1&delay=5000"/>
    <to uri="pfx-odata2://read?entity=A_CreditMemoRequest&$select=CreditMemoRequest,TransactionCurrency,TotalNetAmount,CreditMemoRequestType,PricingDate,CreditMemoRequestDate&$filter=TransactionCurrency eq 'USD' and OverallSDProcessStatus eq 'A'&$orderby=CreditMemoRequest desc&$top=1&$skip=0&serviceUrl={{sap.url}}&username={{sap.username}}&password={{sap.password}}"/>
    <to uri="pfx-api:loaddata?objectType=P&connection=aperture-labs&mapper=pfimcore354"/>
</route>
Â
Search for an entity defined by a single ID:
<route id="sap4hana-get">
    <from uri="timer:in?repeatCount=1&delay=5000"/>
    <setHeader headerName="PfxOpenData2.id"><constant>60000001</constant></setHeader>
    <to uri="pfx-odata2://read?entity=A_CreditMemoRequest&connection=cognitus"/>
    <to uri="pfx-api:loaddata?objectType=P&connection=aperture-labs&mapper=pfimcore354"/>
</route>
Â
Search for an entity defined by a composite ID:
Â
Batch read and upload to Pricefx:
IntegrationManager version 5.8.0