Skip to Content
0

How to loop through each record of Odata service dataset in SAPUI5

Jul 12, 2017 at 09:07 AM

1.2k

avatar image
Former Member

I have an Odata service with one dataset. I want to fetch all record and loop through each row which contains 5 column, to form a customized string in SAPUI5.

How can i fetch each row in a loop from model. Kindly help.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sharath M G Jul 12, 2017 at 09:36 AM
0

Get var yourData = oData.getData() -> list of objects or rows of data.

For loop through the yourData array and get each row.

You can also use .forEach() function and then operate on each row/object in the variable.

Regards,

Sharath

Share
10 |10000 characters needed characters left characters exceeded
Akhilesh Upadhyay Jul 13, 2017 at 12:54 PM
0

take data from model (oModel.getData()), and do for loop, or use $.map(oData, function(obj, index) { })

any issue you are getting ?

Share
10 |10000 characters needed characters left characters exceeded