Application Development and Automation 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: 
Read only

How to Create a deep structure?

Former Member
0 Likes
1,104

Can any one of you please give me a fair idea about creating a deep structure..?

I want to use it in an RFC which will be called from XI..?

Please let me know the method of accessing the data too ..!

Helpfull answers are rewarded ....!!

Thanks and regards,

Veerendranath Maddula.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
847

Hi,

Any structure that contains at least one internal table, reference type, or string as a component (regardless of nesting) is known accordingly as a deep structure.

Only in the case of flat structures is the data content of the structure actually within the memory of the structure itself, while deep structures contain pointers to the data at the position of the deepest components. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures.

Regards

Sudheer

3 REPLIES 3
Read only

Former Member
0 Likes
848

Hi,

Any structure that contains at least one internal table, reference type, or string as a component (regardless of nesting) is known accordingly as a deep structure.

Only in the case of flat structures is the data content of the structure actually within the memory of the structure itself, while deep structures contain pointers to the data at the position of the deepest components. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures.

Regards

Sudheer

Read only

Former Member
0 Likes
847

Hi

structures containing internal tables as components or

Internal table containing Structure as components are called Deep Internal table.

Please check this link for reading a deep structure.

Example:

TYPES: BEGIN OF TYPE_DEEP,

MATNR TYPE MATNR,

T_MARC TYPE MARC OCCURS 0,

END OF TYPE_DEEP.

DATA: T_DEEP TYPE STANDARD TABLE OF TYPE_DEEP.

DATA: WA_DEEP TYPE TYPE_DEEP.

DATA: T_MARC TYPE TABLE OF MARC.

DATA: S_MARC TYPE MARC.

  • Populating data.

WA_DEEP-MATNR = 'TEST'.

S_MARC-MATNR = 'TEST'.

S_MARC-WERKS = '9090'.

APPEND S_MARC TO T_MARC.

  • Append second level internal table.

WA_DEEP-T_MARC[] = T_MARC[].

  • Append.

APPEND WA_DEEP TO T_DEEP.

  • Process the internal table.

LOOP AT T_DEEP INTO WA_DEEP.

WRITE: / WA_DEEP-MATNR.

  • PROCESS the second level internal table.

LOOP AT WA_DEEP-T_MARC INTO S_MARC.

WRITE: S_MARC-WERKS.

ENDLOOP.

ENDLOOP.

Regards

Read only

0 Likes
847

Thanks for your answers, but I want to create a deep structure which can be used in RFC ..? Please let me know about this ..!

Thanks and regards,

Veerendranath maddula.