‎2008 Mar 04 7:30 AM
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
‎2008 Mar 04 7:33 AM
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
‎2008 Mar 04 7:33 AM
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
‎2008 Mar 04 7:34 AM
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 ..
‎2008 Mar 04 7:35 AM
Hi,
Both the definitions create an internal table with Header Line.
Reward if helpful.
Regards
‎2008 Mar 04 7:37 AM
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
‎2008 Mar 04 7:37 AM
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