#3 – How To Implement Lightening Fast OData Services with Exchange Table
The following software components installed on the ABAP system, including the Syclo foundation framework:
- SAP Gateway 2.0, SP07 (IW_BEP 200 SP07)
- Syclo Agentry SAP Framework Integration Foundation (SMFND 600_700) (Requires minimum SAP NetWeaver 7.00, BASIS SP14)
How It Works
The goal of this H2G is to implement both Delta Tracking AND Delta Query in OData. The Delta Query will return the delta portion of data which is added via OData Create/Update/Delete operations.
In order to implement Delta Tracking, we need to go through 3 steps:
- Creating Exchange Table
- Adding Enhancement Framework Implementation in CUD logic
- Defining Exchange Object in the config panel
1 – Exchange Table is the ABAP persistent database table where information identifying the changed data is stored. Typically an exchange table uses a minimum standard structure which captures only minimum information about the data object that has been changed, such as mobile application (= configuration identifier), object key, last changed timestamp, change action (Insert/Update/Delete), and user name.
2 – Enhancement Framework Implementation (EFI) is ABAP program, which will be called by all the CUD operation – it simply capture the data change during the CUD events and update the Exchange Table info so that it can keep track of the Delta history.
3 – Once we have done with Exchange Table and EFI, we need to configure them altogether as a single Exchange Object in Syclo Config Panel, so that Syclo xChange Framework can understand they are related each other.
That’s all for Delta Tracking!
In order to implement Delta Query, we simply extend the existing OData Query operation so that it returns Delta data portion by making use of Exchange Table. As this delta calculation is very efficient, you’ll have a very fast OData Query operation with the deltatoken.
That’s all for Delta Query!
Yes, it is not that complicated.
Let’s implement Delta Tracking as we just learned above.