cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with tree structure

GowthamRaja
Active Participant
0 Likes
309

Hi Experts,

I have created a SAPUI5 application which mock json data, the master page is in tree structure as shown in image, image1 which is working fine.

The excel sheet snapshot is my mock json representation, using this data only i am creating my mock json.

Now the same application has to be build using odata service as backend(without using mock json data). How could i able to give my master page view as a tree structure in a odata service. Please guide me and help me.

Accepted Solutions (1)

Accepted Solutions (1)

GowthamRaja
Active Participant
0 Likes

Hi Experts,

I am closing this post as i found that only one parent child root could be possible in odata. Though it could be done by creating many entity_sets with navigation and association property, my tree structure is dynamic as there is no fixed depth level of a tree structure.

Thanks for all your response.

Regards,

Gowtham

Answers (1)

Answers (1)

kammaje_cis
SAP Mentor
SAP Mentor
0 Likes

Gowtham,

I had a similar scenario and considered two options.

1- To create a SICF json service using regular REST classes and convert ABAP to json. (No Gateway here)

2- Send data to frontend as a regular OData query. In each row have a column to indicate the parent ID. Now at client side, write a piece of js code to convert this data into hierarchical json.

I went with the second option, as I was not too familiar with creating JSON from Internal table.

Regards

Krishna

GowthamRaja
Active Participant
0 Likes

Thanks Krishna,

Will discuss with front end developer reg this and come back to you.