cancel
Showing results for 
Search instead for 
Did you mean: 

How to display 2 Entity set data at once.

Former Member
0 Kudos

Hi Experts,

I need to display Material Internal Table and BAPI return Table at one go. How do we achieve this gateway OData.

        [

             "Materialno" : "",

             "MaterialDesc" : "",

             "Plant" : "",

             "Unit" : "",

             "results" :

         ]

     ........


         [

              "Type" : "W",

              "Id" : "MM",

              "Number" : "354",

              "Message" : "XXXXXXXXXXXXXXXXXXXXXXXX",

              "LogNo" : "",

              "LogMsgNo" : "000000",

              "MessageV1" : "",

              "MessageV2" : "",

              "MessageV3" : "",

              "MessageV4" : "",

              "Parameter" : "",

              "Row" : 0,

              "Field" : "",

              "System" : ""

         ]

          ......


Thanks,

Madhu M V

Accepted Solutions (0)

Answers (1)

Answers (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Madhu,

you have to adapt your data model so that all the information is contained in one entity type. (for example the header) and the items in a separate entity type. Here you can use $expand to retrieve all values. See also the following discussions. Help generating NW Gateway OData service for Z ... | SCN and  Call mutiple tables data in single OData servic... | SCN

Best Regards,

Andre

Former Member
0 Kudos

Hi Andre,

Thanks for your response.

I agree, we can have one header and create association with Item and use GET_EXPANDED_ENTITYSET , But If you notice, I have two Internal table (one for Materials and one for Return table). Return and Materials tables should not have any association, but need to be outputed in one go.

How to achieve this?

Thanks,

Madhu M V

AshwinDutt
Active Contributor
0 Kudos

Hello Madhu,

What is the operation which you would like to do with kind of data model ? Sharing that information may help.

Regards,

Ashwin

EkanshCapgemini
Active Contributor
0 Kudos

Hi Madhusudhan,

You can create the association with any common key i.e. with out any referential constraint. Once you are defining the relationship, select the proposed row in the referential constraint screen and delete it and proceed.

Use data provider expand and send both the entities in one expand call.

Regards,

Ekansh