Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing fields of a deep structure

Former Member
0 Kudos

Hi

I have a deep ( complex ) structure whose structure is as follows :

A ( Structure )

B ( A field of Structure A , B itself is a structure too )

C ( is a field of Structure B , contains two fields D & E )

D & E are fields of structure C and are table types

Now in the OO context, I am trying to implement a method - the above deep structure is an import parameter to the method and I am trying to access the fields of table types D& E .

To access the fields of D & E, I try to go like - A-B-C-D-fieldname - I get an error in the OO context - saying that D is not recognized...

Any idea how do I access the fields on the tabletype given above within this deep structure ? Is this something specific to the OO context ??

Thank you in advance for your time.

1 REPLY 1

Former Member
0 Kudos

Hi,

Let us represent the structure A in OO Context.

data:

begin of SC,

D type table of SD,

E type table of SE,

end of SC.

(or)

begin of SC,

D type TD, "TD is of table type with structure SD

E type TE, "TD is of table type with structure SE

end of SC.

data:

begin of SA,

SB,

C type table of SC, (or C type TC)

end of SA.

data: TA like table of SA.

Loop at A into SA.

(SA-C-D is a table now)

Loop at SA-C-D into SD.

Endloop.

(or)

TD = SA-C-D.

Loop at TD into SD.

Endloop.

Loop at SA-C-E into SE.

Endloop.

Endloop.

Hope this helps,

Bhanu