cancel
Showing results for 
Search instead for 
Did you mean: 

multi-level associations using deep structure for get_expanded_entity

Former Member
0 Kudos

Hi experts,

I am redefining the get_expanded_entity for a service with multi-level associations.

I have an association SalesOrderHeader->SalesOrderItem->ScheduleLines.

I have created a deep structure ls_header which has-

     1. include type for header properties.

     2. table for item data.

     3. another deep structure ls_item, which has-

          1. include type for item properties.

          2. work area for schedule lines.

The debugger shows all the data for header, item and schedulelines filled in the deep structure correctly.

But the output at the gateway client shows only the header and item data; doesnt show scheduleline data. (URL- /sap/opu/odata/SAP/ZSO_TEST_SRV/SOHeaderSet('100006')?$expand=SOItemSet/SOScheduleSet).

This is the code for expanded clauses for the navigation properties-

        ls_expanded_clause1  = 'SOItemSet/SOScheduleSet'.

        APPEND ls_expanded_clause1 TO et_expanded_tech_clauses.


Where am I going wrong?


Thank you in advance,

-Nimish Kate

Accepted Solutions (0)

Answers (1)

Answers (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Nimish,

SOItemSet & SOScheduleSet are Navigation Properties defined in GW Model ?


If yes,

Use the below ->

        ls_expanded_clause1  = 'SOITEMSET/SOSCHEDULESET'.

        APPEND ls_expanded_clause1 TO et_expanded_tech_clauses.


Navigation properties has to be added to the Expand Clause in caps as above.


Regards,

Ashwin

Former Member
0 Kudos

Hello Ashwin,

Thanks for the prompt reply.

My apologies, i solved it right after asking the question here

I was appending the data in the 2nd deep structure before the execution of the schedulelines table.

And I considered your solution, but i believe the navigation properties are in standard abap, so they must be case-insensitive. When it comes to the gateway client, then the question of case sensitivity arises.

What are your thoughts on this?

Regards,

-NK

AshwinDutt
Active Contributor
0 Kudos

Hello Nimish,

Properties defined in SEGW are always case sensitive while using those in URL's and in request Body.

In back-end code level in GW we need to append Navigation Properties always in upper case to the Expand Clause.

Regards,

Ashwin