ODATA_SERVICE
Data Description
The ODATA_SERVICE event in SAP is designed to flexibly extract data from an OData service endpoint within the managed system.
Potential Use Cases
This event can be utilized in various scenarios, such as:
Tracking updates on business documents like sales orders and analyzing trends.
Monitoring inventory levels and product availability across locations.
Validating and monitoring financial transactions.
Visualizing end-to-end business processes using the extracted data.
Metric Filters
To extract data from a particular OData service endpoint in your environment, follow the steps below:
Log into the managed system and execute the /BNWVS/MAIN transaction.
OData Service filter needs to be maintained in the menu Administrator->Metric filters->OData Service filter.
Create Service Group
Create an OData service group to group similar services for better organization.
Add Service
Double-click the service group name to open the right-side panel. Click Add Service to include a new OData service.
Choose OData service version (V2 or V4), then use the F4 help function to choose the Service Document Identifier. After that, use F4 help again to select the EntitySet Name.
Data Selection
Click the $filter, $orderby and others buttons to set the row selection criteria, define the sort order of the dataset, and specify the top/skip row limits respectively.
$filter
The format of a property's value is determined by its data type. Below are examples of property values for different data types.
Property Name | Property data type | Property Value |
---|---|---|
MessageTotalCount | Int32 | 10 |
NetPriceAmount | Decimal | 123.45 |
DeliveryDocumentType | String | ‘LF’ |
IsCompletelyDelivered | Boolean | false |
LastChangeDateTime | DateTimeOffset | datetimeoffset'2024-09-05T09:53:00Z' |
CreationDate | DateTime | datetime'2024-09-05T00:00:00' |
CreationTime | Time | time'PT14H30M' |
Additionally, ‘Property Value’ can also accept the following placeholders to extract data based on current or previous execution times.
Placeholder | Description |
---|---|
$now | Current execution time in system time zone |
$today | Current execution date in system time zone |
$timestamp | Current execution timestamp in UTC |
$timestamp_st | Current execution timestamp in system time zone |
$lastrun | Last execution timestamp in UTC |
$lastrun_st | Last execution timestamp in system time zone |
$lastrundate | Last execution date in system time zone |
$lastruntime | Last execution time in system time zone |
$orderby
others
Test Service
Test the OData service to ensure it returns the expected data. If the OData service returns large number of records, use $top and $skip to limit data volume and refine the selection criteria.
Delta Extraction
It is also possible to extract delta data by specifying a date or timestamp property from the OData service. For example, extract all deliveries created since the last run date.
To achieve this, fill in the Date or Timestamp Property column and use F4 help to select the appropriate property name.
SAP Navigation
Important Note: Data will only be extracted if the Metric Filters have been defined. Please see instructions above on how to define the metric filters.
OData v2
Log into the managed system and execute the /IWFND/MAINT_SERVICE transaction. Select the OData service and click SAP Gateway Client.
Specify the complete URI with all selection conditions and execute.
The data shown will match the data extracted and sent to Splunk. Take note of selection criteria, since this selection criteria will need to be used to define the Metric Filters.
OData v4
Log into the managed system and execute the /IWFND/V4_ADMIN transaction. Expand Service Groups in the left-side tree. Double-click the service group, select the desired service from the right-side table, and click Service Test.
Specify the complete URI with all selection conditions and execute.
The data shown will match the data extracted and sent to Splunk. Take note of selection criteria, since this selection criteria will need to be used to define the Metric Filters.