cancel
Showing results for 
Search instead for 
Did you mean: 

Implement READ value from backend and retreive it!

Former Member
0 Kudos

Hi everyone,

I’m starting to feel a little discouraged. I’m trying to send some data to the backend, make a selection and send results back to SAPUI5. For that I’ve redefined methods in the backend to achieve this.

I’ve redefined method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITY so I can call method HEADERPOINTS_GET_ANTITY. Everything seems to be fine since I’m able to debug my code and check my READ statement goes through both methods (selects all the data I need and puts it in ER_ENTITY) and go back to SAPUI5.

My problem comes at this point. There must be something wrong with my code since I cannot read any result. I’ve used basically the same code I used for a GET_ENTITYSET (which worked!) but something is not working properly in this GET_ENTITY case. Here’s a screenshot of my SAPUI5 routine:

Can anybody help me?

junwu
Active Contributor
0 Kudos

what you have in the odata in the success function callback?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

First of all, I'd like to thank you both for your help!

I've finally come out with “something” which works and retrieves my values. In fact, it does the same as before (runs through all methods in backend) but now when I go back to SAPUI5 I can see my values. Now I just need to show them in my controller view: one in a “Label” and the other in a “Text”. Let’s how I figure it out.

Thanks again for your patience!

Ryan-Crosby
Active Contributor
0 Kudos

Hi,

If you are now getting data back in your success callback then it's just a matter of how you are binding the data to the view. Looks like your label and your text simply need to be bound to "{/TEXTO}" and "{/VALOR}" (not sure which is which) and once the model is updated then it should reflect in the view.

Regards,

Ryan Crosby

Former Member
0 Kudos

I finally came out with this:

Make data available in view:

this.getView().setModel(oHeaderCheckboxModel, "HeaderCheckbox");

Show data in view:

text="{HeaderPoints>/TEXTO}"

text="{HeaderPoints>/VALOR}"

Many thanks for your help!

🙂

Ryan-Crosby
Active Contributor
0 Kudos

Hi,

Have you tried setting debug points for the success and error functions? Would be curious to know what exists for either oData or oError depending on what happens with the service call. Also, instead of constructing the URL yourself you can set the base URL for the "/HeaderPointsSet" and then add filters for the other values.

Regards,

Ryan Crosby