cancel
Showing results for 
Search instead for 
Did you mean: 

multi level implementation for get_expanded_entityset, item data not appearing

kjyothiraditya
Participant
0 Kudos

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 ).

maheshpalavalli
Active Contributor
0 Kudos

What is the value of this lc_expand_tech_clause

and is the expand entity method getting triggered?

maheshpalavalli
Active Contributor
0 Kudos

BTW what is "scarrtospfli" navigation property name or association proerty name?

kjyothiraditya
Participant
0 Kudos

Hi, scarrtospfli is both the association name and the variable lc_expand_tech_clause value . Also it is the navigation name as well from scarr->spfli.

Yes the get_expand_entityset method is getting triggered. Also I see this method getting triggered like in a loop which overwrites the final data. Not sure if I am following correct sequence or missing any part.

Regards,

Aditya

Accepted Solutions (0)

Answers (2)

Answers (2)

maheshpalavalli
Active Contributor

I think the issue is due to entity field FLTIME which has the sdura conversion exit. Try changing the data type for that to char or if you are just testing, just remove that field from the entity and test it.

Thanks,

Mahesh

mvaibhav
Contributor
0 Kudos

hi jyothir aditya k,

Try converting the value of lc_expand_tech_clause to upper case before inserting.

Thanks,

Vaibhav

kjyothiraditya
Participant
0 Kudos

Yes, tried with that also. Still giving "In the context of Data Services an unknown internal server error occurred". where in the error log contains message "The function call of CONVERSION_EXIT_SDURA_OUTPUT failed; a field may have been assigned to the parameter OUTPUT whose type is n".

Apparently the system was raising exception during copying the data to output as there is some data type problem in the model for Date/time fields. I have changed all to String and it worked fine for testing.

Regards