Skip to Content

Kapsel DB and Delta Query Support

Howdy fellow SAPers, I've come yet again with a new question for you guys.

Currently I've got a question regarding the usage of expanded_entityset.

I'm aware that the usage of $expand and Delta is not supported according to this document: How to Implement Basic Delta Query Support in SAP NetWeaver Gateway

I'm not sure how does Kaspel works, but basically we're trying to understand if we have the option to insert our logic into the tool or we're stuck with the standar. We've have a few doubts on how does Kaspel and PouchDB work for Deltas since we're trying to find a work around to perform the delta tracking for our offline store.

Our first question is that if there's a restriction that Kaspel will recognize only the GET_DELTA_ENTITYSET method when the URI contains a deltatoken.or if it's possible to define the way the URI should be structured/used in case a deltatoken is sent.

The reason is, we use expanded EntitySet for our requirement since we need to fetch all the information from all the associated clients to a sales person in one go, if we pass a delta token in the request, we noticed that expand has a "higher" priority then the Delta Token, so it calls the GET_EXPANDED_ENTITYSET instead of DELTA_ENTITYSET. At this point, we have managed to generate a delta entityset for our colections, the issue comes when we have deleted entities, as far as we have noticed, Delta has a way to manage deleted sets fetching only the ID of such entries and expand lacks a way to do so since we can only have one exporting table. We don't know if the offline store will recognize our method EXPANDED as an information provider for Deltas or if its possible to set it up to use it. Or if by default Kaspel would only recognize or call Delta Entityset, therefore we would like to validate if it's possible to assign Kaspel to use a defined URI if a deltatoken is provided.

If none of these options is availeable I'd like to verify if there's any real solution in order to use Delta and complex entities for the query.

I'm well aware these questions are a bit more SMP oriented but we want to validate at least to a code level if we can use a work around to fullfil our requirement. If any of you guys would kindly give us a few light on this issue, it would be amazing.

Thank you all in advance.

Best regards.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 23, 2015 at 05:41 PM

    So update:

    We've tested the usage of DELTA ENTITYSET for our requirement and we found it it's not an option given the request that all Client data should be sent as part of the answer is not supported by the DELTA ENTITYSET response.

    Once we've fetched the modified registers from the collection and we fill the information for every created or updated register, copy_data_to_ref method fills the er_entityset, the response is only the customer "header" information, and it ignores the tables containing other info, such as Phone Numbers, Addresses and so.

    Right now we've emptied all the ideas we had in order to fullfil the requirement. We have this two paths so far.

    Using a "Delta" enabled Expanded EntitySet:

    Doing this allows us to fetch the changed registers and fetch their info fully. The issue here is that we lack the ER_DELETED_ENTITYSET which could be a problem for Kapsel when it comes to identify which registers it should deleted from the mobile DB. The next problem is that, we can code and implement the logic in order to Kapsel to recognize and use this method for the Delta Query,  and then find a way to deal with the problem with the deleted entitysets.

    Our other approach. Use the Standar DELTA ENTITYSET.

    Standar gives us both ER ENTITYSETS to work with and we assume Kapsel recognizes this method as a standar method to use when performing Delta Operations. The issue here is that we cannot fullfil the requirement of the Data being sent fully, sending a complex bussiness structure using the header and the tables for each changed register.

    Perhaps we're not giving this the correct approach or we're missing a simple step that would easily solve our requirement. If anyone has any idea will be highly appreciated.

    Thank you all for your time.

    Add comment
    10|10000 characters needed characters exceeded