cancel
Showing results for 
Search instead for 
Did you mean: 

Passing reference/dynamic subtable through OData GET_EXPANDED_ENTITYSET

Missschaaa
Participant
0 Kudos

Hello guys,

I'm using the OData GET_EXPANDED_ENTITYSET method to pass data through OData to some frontend FIORI app. I did this several times so I'm known with the concept, but this time it's getting a bit tricky.

I have the following type definition which should be my final entityset at the end.

  TYPES:
    BEGIN OF ty_s_psp_data.
      INCLUDE TYPE ts_pspdetail.
    TYPES:
      pspbudget TYPE TABLE OF ts_pspbudget WITH NON-UNIQUE DEFAULT KEY,
      pspplan   TYPE REF TO data,
      pspobligo TYPE TABLE OF ts_pspobligo WITH NON-UNIQUE DEFAULT KEY,
      pspist    TYPE TABLE OF ts_pspist    WITH NON-UNIQUE DEFAULT KEY,
    END OF ty_s_psp_data .

The problem now is the pspplan subtable which is a data reference because I have to create this table at runtime. I'm using RTTS definitions to create and fill this data and it works fine at the end I have this table of type ty_s_psp_data with 4 subtables in it. The problem now is because of TYPE REF TO data pspplan is only a data reference. My method is working fine but outside of it I'm getting error in Gateway protocol:

It gives me exception of type CX_ST_SERIALIZATION_ERROR and says that I cant use reference type obviously because of my pspplan subtable. How can I fix this? I have to create this table at runtime. Is it possible to pass it through the OData Service or without using data reference?

Regards
Michael

Accepted Solutions (0)

Answers (0)