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

deep structure.

Former Member
0 Likes
863

Hi all ,

What is deep structure ,how to creeat .

Reg,

Krish.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
714

hi,

deep structure is a internal table with header line. for accesssing data from internal table we will create a explicit header line and use it. these internal tables can be nested in another internal tables, the process is called as deep structures.

just create two internal tables with out implicit header lines can create explicit work areas for those two tables when u want.

if helpful reward some points.

with regards,

suresh.

4 REPLIES 4
Read only

Former Member
0 Likes
714

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.

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
714

Hi,

A nested structure is a structure that contains one or more other structures as components. Flat structures contain only elementary data types with a fixed length (no internal tables, reference types, or strings). The term deep structure can apply regardless of whether the structure is nested or not. Nested structures are flat so long as none of the above types is contained in any nesting level.

<b>Any structure that contains at least one internal table, reference type, or string as a component (regardless of nesting) is a deep structure.</b> Accordingly, internal tables, references, and strings are also known as deep data types. The technical difference between deep structures and all others is as follows. When you create a deep structure, the system creates a pointer in memory that points to the real field contents or other administrative information. When you create a flat data type, the actual field contents are stored with the type in memory. 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
715

hi,

deep structure is a internal table with header line. for accesssing data from internal table we will create a explicit header line and use it. these internal tables can be nested in another internal tables, the process is called as deep structures.

just create two internal tables with out implicit header lines can create explicit work areas for those two tables when u want.

if helpful reward some points.

with regards,

suresh.

Read only

former_member404244
Active Contributor
0 Likes
714