pfx-odata2:update

Updates a single entity in the external system. Requires an ID defined in an exchange header or as the URI option.

Properties

Option

Type

Default

Description

Option

Type

Default

Description

connection

String

 

Defines a connection to the target system. Another way to define the connection is to specify the serviceUrl, username and password options (see below).

serviceUrl

String

 

Defines the URL of the target system. Use if the connection is not specified.

username

String

 

Defines the username for authentication. Use if the connection is not specified.

password

String

 

Defines the password for authentication. Use if the connection is not specified.

entity

String

 

Defines the entity type.

id

String

 

Defines the entity identifier. Mandatory for the update/delete methods. Optional for the read method.

$select

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. $select=Id,ProductName,NetPrice

$filter

String

 

A predicate expression that selects only entities which match the expression. E.g. $filter=NetPrice le 200 and NetPrice gt 3.5

  • Logical operators: eq, ne, gt, ge, lt, le, and, or, not

  • Arithmetic operators: add, sub, mul, div, mod

  • Grouping operators: ()

$orderby

String

 

Determines what values are used to order a collection of selected entities. E.g. $orderby=NetPrice asc,ProductName desc

$skip

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.

$top

Integer

 

Defines the number of records to include (from the beginning). If defined, just the first N entities from the selected collection are selected.

$inlinecount

String

none

Supported values are:

  • allpages – The response must contain the count of all selected entities after applying the $filter option. The count is returned as a header with the key PfxOpenData2.$inlinecount.

  • none – The response must not contain the count in the response. 

Examples

Update TotalNetAmount of entity 'A_CreditMemoRequest' with ID 60000001:

<route id="sap4hana-update" autoStartup="false"> <from uri="timer:in?repeatCount=1&delay=5000"/> <setHeader headerName="PfxOpenData2.id"><constant>60000001</constant></setHeader> <setBody> <groovy> [ "CreditMemoRequest":"60000002", "TotalNetAmount":new BigDecimal("1500.00") ] </groovy> </setBody> <to uri="pfx-odata2://update?entity=A_CreditMemoRequest&connection=cognitus"/> <log message="Created ${body}"/> </route>

IntegrationManager version 5.8.0