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

Difference between internal table definitions

Former Member
0 Likes
651

What is the difference between the following table definition syntax?

(Def 1: Data: g_t_vbak type table of Vbak occurs 0.

Def 2: Data: begin of g_t_vbak occurs 0,

<Field1> type <Data type>,

End of g_t_vbak.)

a. Both are same

b. Def 1 and Def 2 create an internal with header line.

c. Def 1 creates an internal table without header line but Def 2 creates internal table with header line.

d. Def 1 creates an internal table with header line but Def 2 creates internal table without header line.

if possible explain

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
623

Answer : c

Def 1 creates an internal table without header line but Def 2 creates internal table with header line.

Edited by: Tushar Mundlik on Mar 4, 2008 8:39 AM

5 REPLIES 5
Read only

Former Member
0 Likes
624

Answer : c

Def 1 creates an internal table without header line but Def 2 creates internal table with header line.

Edited by: Tushar Mundlik on Mar 4, 2008 8:39 AM

Read only

Former Member
0 Likes
623

Def1:

Creates an internal table with the same structure as of table Vbak.

Where as in

Def2 : U can declare your own fields for the internal table ..

Read only

Former Member
0 Likes
623

Hi,

Both the definitions create an internal table with Header Line.

Reward if helpful.

Regards

Read only

Former Member
0 Likes
623

Hi,

A is the answer

Data: g_t_vbak type table of Vbak occurs 0.

Here, OCCURS statement is used to declare a structure as an internal table. The initial size of internal table ranges from 0 to 7.

Data: begin of g_t_vbak occurs 0,

<Field1> type <Data type>,

End of g_t_vbak.)

Any internal table created using BEGIN OF - END OF statements is called as structured internal table.

if it has Begin,then it is with header line – Creates work Area

Occurs n – Creates the body of the internal table

Hope this helps u,

Regards,

Arunsri

Read only

Former Member
0 Likes
623

Hi Type table of VBAK creates internal table with same structure like VBAK.

Begin of itab creates internal table with ur own fields.

In this u can define as many fields u want and with any type.

Regards,

Ajay