Skip to Content
0
Nov 23, 2019 at 06:46 PM

multi level implementation for get_expanded_entityset, item data not appearing

272 Views Last edit Nov 24, 2019 at 07:32 AM 2 rev

Hi experts,

i am exploring the $expand command for SCARR[0..1]-SPFLI[0..n] association/navigation using GET_EXPANDED_ENTITYSET joined using Carrid. I am able to get the scarr details using "ZTEST_SFLIGHT_SRV/scarrSet?$expand=scarrtospfli&$format=json", however the SPFLI details are not coming. I have written the logic to fill these details also in this method.

i am following these below links

link1

Could please help me in how to fetch both the details in single call.

 

       LOOP AT it_scarr INTO wa_scarr.

          MOVE-CORRESPONDING wa_scarr TO ls_output.

          LOOP AT it_spfli INTO wa_spfli WHERE carrid = wa_scarr-carrid.

            APPEND wa_spfli TO ls_output-scarrtospfli.

          ENDLOOP.

          APPEND ls_output TO lt_output.

          CLEAR ls_output.

        ENDLOOP.



        INSERT lc_expand_tech_clause INTO TABLE et_expanded_tech_clauses.



        copy_data_to_ref(

           EXPORTING

             is_data = lt_output

           CHANGING

             cr_data = er_entityset ).