cancel
Showing results for 
Search instead for 
Did you mean: 

EML - Read entities: missing fields from consumption view

ChrisTh
Explorer
2,432

Hello experts,


I have a question concerning read entities statement. I was able to reproduce my problem with the ‘Demo Flight Reference Scenario (TX managed)’ on ABAP trial account.

I focused on CDS-Consumption view /DMO/C_TRAVEL_PROCESSOR_M which has some fields of associated views (e.g. AgencyName read from CDS-View /DMO/I_Agency)

The above-mentioned Consumption-View is exposed via Service-Definition /DMO/UI_TRAVEL_Processor_M. The preview of the corresponding Service-Binding gives me the ability to display the attribute AgencyName:

Now I try to read the data of the Consumption-View (better of the corresponding behavior ‘/DMO/C_Travel_Processor_M’) via EML:

READ ENTITIES OF /DMO/C_Travel_Processor_M

ENTITY TravelProcessor

ALL FIELDS WITH VALUE #( ( %pky-TravelID = '00000001' ) ( %pky-TravelID = '00000002' ) )

RESULT DATA(gt_result).

I am quite surprised to find only the exposed attributes of the projected Interface-View ‘/DMO/I_Travel_M’ inside the derived type. The additional field AgencyName is not part of the derived type.

Am I doing something wrong or is my expectation of having the additional fields inside the derived type wrong?

Could someone please shed some light on this problem?

Many thanks in advance.

Best regards

Chris

View Entire Topic
Ramjee_korada
Active Contributor
0 Kudos

Better to go with option #1.
I see SAP Demo Apps also using same solution.

please see below documentation.
https://help.sap.com/viewer/923180ddb98240829d935862025004d6/Cloud/en-US/fed023a4ed9d4d7494e5c853b11...

    READ ENTITIES OF /DMO/I_Travel_M IN LOCAL MODE
      ENTITY travel
       ALL FIELDS WITH CORRESPONDING #( keys )
    RESULT DATA(travel_read_result)
    FAILED failed.

    READ ENTITIES OF /DMO/I_Travel_M IN LOCAL MODE
      ENTITY travel BY \_booking
       ALL FIELDS WITH CORRESPONDING #( travel_read_result )
     RESULT DATA(book_read_result).

    READ ENTITIES OF /DMO/I_Travel_M IN LOCAL MODE
      ENTITY booking BY \_booksupplement
       ALL FIELDS WITH CORRESPONDING #( book_read_result )
    RESULT DATA(booksuppl_read_result).
ChrisTh
Explorer
0 Kudos

Ok, thank you. In that case I will try to avoid using consumptoin behaviours with EML and go with interface behaviours instead.

Thanks for your time and support.

Best regards,

Chris