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

declaration: what do mean by TABLE OF

Former Member
0 Likes
458

Hi,

I have a basic question.

If there is a declaration:

DATA: a1 type TABLE OF table1.

What does it mean.

How it differs from this declaration:

DATA: a1 type table1.

Thanks.

- Deepan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
435

Hi

I suppose <TABLE1> is a dictionary table or staructure, there are several way to define an internal table, one is:

DATA: A1 TYPE TABLE OF <TABLE1>.

This declaration creates a standard table, so it's equal to:

DATA: A1 TYPE STANDARD TABLE OF <TABLE1>.

In both cases it creates an internal (standard) table without header line.

Probably u can use declaration like these:

DATA: BEGIN OF A1 OCCURS 0.

INCLUDE STRUCTURE <TABLE1>.

DATA: END OF A1.

or

DATA: A1 TYPE <TABLE1> OCCURS 0.

U can use one of those definitions to create an internal (standard) table structurated like TABLE1.

DATA: A1 TYPE <TABLE1>.

This creates a variable A1 structurated as <TABL1>, so it could be used as header line for a internal table declarated like above.

Max

Hi,

I have a basic question.

If there is a declaration:

DATA: a1 type TABLE OF table1.

What does it mean.

How it differs from this declaration:

DATA: a1 type table1.

Thanks.

- Deepan

2 REPLIES 2
Read only

Former Member
0 Likes
436

Hi

I suppose <TABLE1> is a dictionary table or staructure, there are several way to define an internal table, one is:

DATA: A1 TYPE TABLE OF <TABLE1>.

This declaration creates a standard table, so it's equal to:

DATA: A1 TYPE STANDARD TABLE OF <TABLE1>.

In both cases it creates an internal (standard) table without header line.

Probably u can use declaration like these:

DATA: BEGIN OF A1 OCCURS 0.

INCLUDE STRUCTURE <TABLE1>.

DATA: END OF A1.

or

DATA: A1 TYPE <TABLE1> OCCURS 0.

U can use one of those definitions to create an internal (standard) table structurated like TABLE1.

DATA: A1 TYPE <TABLE1>.

This creates a variable A1 structurated as <TABL1>, so it could be used as header line for a internal table declarated like above.

Max

Read only

Former Member
0 Likes
435

Hi,

DATA: a1 type TABLE OF table1.

Above statement declares an internal table without header line of type table, which may be a standard table.

DATA: a1 type table1.

Above statement creates a structure or workarea which of type table.

Thanks,

Sriram Ponna.