cancel
Showing results for 
Search instead for 
Did you mean: 

SAP OData Creation with deep structure

rahul_pathak78
Explorer
0 Kudos

Hello All,

I wanted to create Odata as below sequence. Please help me how to do this.

"companyCodes":[

{

"CompanyCode":"ABCD",

"Country":"USA",

"Decription":"XXXX -CMPP-US",

"Function":[

                {"FunName":"Function_1","Count":16},

                {"FunName":"Function_2","Count":13},

                {"FunName":"Function_3","Count":0},

                {"FunName":"Function_4","Count":4},

                {"FunName":"Function_5","Count":8},

               {"FunName":"Function_6","Count":0},

                {"FunName":"Function_7","Count":0}

                  ]

   },

I guess I can achieve it by using deep structure but RFC is not allowing to use deep structure .

Accepted Solutions (0)

Answers (2)

Answers (2)

kammaje_cis
Active Contributor
0 Kudos

Rahul, I would suggest using a code based approach. 

First model your entity is SEGW (manually creating entities, associations, navigation), then implement the deep_entity method. (As Venu suggested).

former_member206574
Active Participant
0 Kudos

Hi Rahul,

You have to redefine the Create_deep_entity method in *_dpc_ext class.

Read the payload using io_data_provider->read_entry_data( IMPORTING es_data = **).



U can check the above link how to implement Create Deep entity method.



Regards,

Venu