cancel
Showing results for 
Search instead for 
Did you mean: 

Using nested tables

michael_fallenbchel
Active Participant
0 Kudos

Hi experts,

is there a way of using nested tables, for example:

Field1

---value1-1

------example1-1

------example1-2

------example1-3

---value1-2

------example2-1

------example2-2

------example2-3

------example2-4

------example2-5

---value1-3

------example3-1

------example3-2

Field2

---value2-1

------example1-1

------example1-2

...

Or isn't it possible?

Thanks

Michael

Accepted Solutions (0)

Answers (1)

Answers (1)

ChandraMahajan
Active Contributor
0 Kudos

Hi,

Nested table is not allowed but if it is property structure like address etc which can be included in more than one entities then you can use complex type Complex Types - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library

you can refer this and Netweaver Gateway : Multiple Output Tables : Odata | SCN

Regards,

Chandra

michael_fallenbchel
Active Participant
0 Kudos

I'm already using complex structures...but would like to have "real" nested tables.

Not working? Damn, okay, thanks for your help!

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Michael,

you can use nested tables if you create an appropriate OData model with two entity types that are connected via an association on which you will create a navigation property that points from outer table that points to the table which is contained in the first table.

Using $expand you would be able to read the content while using deep insert you could perform updates .

Best Regards,

Andre

michael_fallenbchel
Active Participant
0 Kudos

Hi Andre,

sure, expand would be possible, but I don't want to use as my goal is to reduce the "overhead".

With the expand-query there will be much more overhead as if it would be possible to use nested tables...

Don't mind - I think I will now split my services in a few smaller ones to reduce filesize of the XML 🙂

Thanks for the update

Michael

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Michael,

do you mean reducing the payload ? then why not use JSON?

The ABAP Web AS even supports the compression of the payload using gzip.

Best Regards,

Andre

michael_fallenbchel
Active Participant
0 Kudos

Can't use JSON as the external application can't handle...

How can I use GZIP with the NetWeaver Gateway? Zipping the XML and send as stream?

Thanks

Michael

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

The HTTP client simply has to send  via Header-Field "accept-encoding" with the value "gzip".

The client has to support to unzip the content.

kammaje_cis
Active Contributor
0 Kudos

Michael,

If Entities and Associations do not meet your requirement, you may think outside oData as well. Check this document on generic rest enablement.

You may think outside Gateway as well, but yes, in both above cases, you have to use XML libraries and handle on your own.

regards

Krishna