Skip to Content

SAPUI5 - READ statement not triggered

Hi all!

i'm facing a little issue with my UI5 application.

A little premise: i'm developing the backend on SAP 731, and integrate the UI5 libreries in Angular 2 (ok, this part is up to my colleguees!) to develop a nice Angular App speaking with both SAP and a couple of other systems.

We choose the logic to read an entity and if exist update, otherwise create.

After some time, we noticed SAP is not aligned with the other systems and we found the following:

After deleting an entity, if i read it, create it again and read once more, the last read fails.

The POST payload, obviously is always the same (these calls are from a test page we created to cycle the operations and check the result).

Even more strange, if i put a break point on the GET method, SAP side, i see it's not triggered for the last GET.

It's a wanted behaviour i missed? Or i just found a bug?

To clean the field, we created a new model each single call (POST-DELETE-GET) we make and the test page is pure JS-HTML-UI5

1.png (40.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 14, 2017 at 09:13 PM

    after submitting changes to DB ...can you refresh() the model and then perform read operation

    Just a guess....if you are not performing refresh model then UI5 is getting the information from cache and hence no breakpoint is triggered for the last GET.(not sure if my statement is correct or not, experts in the forum can advise)

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 16, 2017 at 02:25 PM

    Ok, we identified the problem into cache management on Gateway server side.

    If we put some rubberish into the calling parameters, the server recognize it like a new calling and the read is succesful and the method "GET_ENTITY" is triggered, skipping the cache.

    For now we manage this workaround but we really want to find a more correct solution.

    Add comment
    10|10000 characters needed characters exceeded