In my project we recently implemented a method to retrieve a complex table for an odata service. In short, the service consists of 7 entities, let's call them M (master or uppermost parent), C1 and C2 (children of M, first level of two) and D1 - D5, which are children of C2 (second level).
The nested itab is already working as intended, consisting of the complex structure of all the entities and their relations.
However, only calling the Service with an URL that causes the framework to just retrieve the Main data and first level nested data works correctly. Trying to retrieve second level data as well results in an infinite loop where the framework is trying to loop over nested entities.
The oData URI looks like this:
/sap/opu/odata/sap/zsrv_data_srv/MSet?$expand=MToC1List,MToC2List/C2ToD1List,MToC2List/C2ToD2List,...,MToC2List/C2ToD5List
We also did implement the expanded_tech_clause itab for each navigation property of the entity model, which to my knowledge is supposed to mark entities as "already done", preventing the method from being called again for that entity.
what could be the issue here?