1
votes

I am trying to extract data from a SAP's Basic Sample Service via OData, I registered. It is working fine in 'normal mode' and is returning like 302 records. What I am failing to get is data in delta mode with like 20 records, instead it is still returning 302 records.

I am hitting this URL. To get data in delta mode I am sending this header Prefer: odata.maxpagesize=20,odata.track-changes

I am very new to this, so please pardon me if I have missed something. Any kind of help would be very appreaciated. Thanks

1

1 Answers

1
votes

I believe this annotation is not implemented in SAP implementation of Odata, so you are out of the luck. It is supported though in ODP, but not in Gateway OData.

To enable delta tracking in OData service SAP has its own guidelines:

  1. Generating delta token

  2. Extend GET_ENTITYSET_DELTA method

  3. First OData query on entity set will return a delta token

  4. Which you then use to query delta

    /sap/opu/odata/sap/ZGW_PRODUCT_SRV/Products_DQ?!deltatoken=’005056A2025C1EE2BFE687AFDC2FAAF4_20130807073741′
    

Read this official guide for more info

https://blogs.sap.com/2013/09/30/how-to-implement-basic-delta-query-support-in-sap-netweaver-gateway/

Minimum GW required version: Netweaver 740, SAP_GWFND SP04