cancel
Showing results for 
Search instead for 
Did you mean: 

RAP OData service - Issues with 3-Tier Entity Hierarchy in managed scenario.

FranciscoAcuña
Explorer
0 Kudos

Hello experts,

My team and I are working on some custom developments involving UI5 freestyle apps and a RAP based OData service for the backend. Our main requirement revolves around a three-levels entity hierarchy consisting of FormHeader -> FormItems -> ItemImputations as you can see in the following service definition:

FranciscoAcua_0-1708701576275.png

All the navigation properties are present in the service metadata and are working fine when navigating from FormHeader to FormItems, but the problem arose when trying to navigate from FromItems to Imputations (bottom entity in the 3-tier hierarchy). When fetching data using the to_Imputations navigation property we receive a 404 Resource not found type error:

FranciscoAcua_2-1708702107687.png

In the RAP behavior definition, the FormHeader entity is declared as lock and authorization master, and its children entities (Attachments and Items) are lock dependent to its parent. However, we cannot define the lock dependency for the bottom hierarchy (ItemImputations). When trying to declare its lock dependency to the FormHeader entity, we get an error saying there's no navigation between ItemImputations and FormHeader; and when trying to declare the lock dependency to its actual parent (FormItems) we get another error saying that FormItems is not the lock master:

FranciscoAcua_3-1708702758687.png

FranciscoAcua_4-1708702770980.png

Here are some additional screenshots of the servicedefinitions that might prove useful:

Form Header.

FranciscoAcua_5-1708703004481.pngFranciscoAcua_6-1708703012523.png

FormItems.

FranciscoAcua_7-1708703037952.pngFranciscoAcua_8-1708703043602.png

ItemImputations.

FranciscoAcua_9-1708703077492.png

Behavior Definition:

FranciscoAcua_10-1708703125377.png

Please ignore any errors in naming conventions, as this is the first time using RAP for the backend team, we are aware of them and are planning to correct them ASAP.

Any guidance that could help our ABAP developers in finding where the service errors are would be greatly appreciated!



 




 

Accepted Solutions (0)

Answers (1)

Answers (1)

Ramjee_korada
Active Contributor
0 Kudos

Hi,

The first error is correct and you have to specify association to header ( grand parent ).

Association Header;

Best wishes,

Ramjee Korada