Below document is based on delta sync configuration in SAP CPI system. Many times we need to fetch data at regular intervals from the source system. In such cases we don’t want to retrieve all records during every run. Whenever there is new record or data change only that data needs to be fetched from the source system. Using timestamp we can design query of delta data retrieval.
Below is the IFlow designed for demo purpose :-
As we don’t need transactional handling, select not required to keep the other DB resources available for other processes.
The trigger of Iflow is timer based. I have used CPI Odata (MessageProcessingLogs) entity to retrieve failed message details and send this as a daily report via mail.
Now first run will be based on the default value provided while deploying Iflow. However, for next subsequent runs I should be able to get only new failed records report on my mail. For this purpose we need to perform delta sync.
Content Modifier – getLastTimeStamp :-
lastSync is a local variable which will run with default value in the first run of Iflow.
Later this will fetch value from the write variable which is timestamp_DS_DateNow.
Below is the Odata Query used for fetching data :-
Below variable values are coming from the content modifier (getLastTimeStamp)
The response from the OData is moving into XSLT mapping to generate XML to Table format and followed by Write Variable where we need to store the last execution time which will be used in subsequent calls.
Write Variable :-
Use exact same name as what you want to pass to the property variable in content modifier. This value will be used in OData query.
Once the interface is triggered, this will send message failure report to configured mail ID –
Reference :- https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/012be7e9eb114a528ac58a93bce73de4.html