10-06-2008 10:08 AM
hi,
what is the difference b/w the below;\
data : itab type mara
itab1 type standard table of mara (ztable)
whats the use of TABLE OF
THANKS
10-06-2008 10:10 AM
Hi Vijay,
When you decare
DATA: itab TYPE mara.
itab holds the structure of mara and works only as a structure/work area.
but when you declare,
DATA: itab1 TYPE STANDARD TABLE OF mara.
Now itab1 is created as an internal table.
This internal table can hold multiple records of the structure type mara.
Regards,
Kiran
10-06-2008 10:10 AM
Hi Vijay,
When you decare
DATA: itab TYPE mara.
itab holds the structure of mara and works only as a structure/work area.
but when you declare,
DATA: itab1 TYPE STANDARD TABLE OF mara.
Now itab1 is created as an internal table.
This internal table can hold multiple records of the structure type mara.
Regards,
Kiran
10-06-2008 10:11 AM
Hi,
The keyword 'TABLE OF' used to declare an internal table.
itab type mara -
> here itab is a structure with type MARA, it holds single recod values
itab type standard table of mara -
>is a standard internal table, it holds multiple records
Regards
Sri
10-06-2008 10:11 AM
Hi
data : itab type mara - itab will be like structure mara, can be used like work area
itab1 type standard table of mara (ztable) - Itab1 is internal table with structure mara and can store multiple values
Regards
MD
10-06-2008 10:12 AM
Hi vijai rajendran,
data : itab type mara - > acts as Work Area
itab1 type standard table of mara (ztable) -> Header + WA
Regards,
sg
10-06-2008 10:14 AM
Hi..
Itab type mara means only structure of table mara means you can not store data in this.
itab type standard table of mara.. its behave like a internal table means table with body here you can pass data in this.
regds,
10-06-2008 10:18 AM
Hi
There are severals to declare an internal table (standard) based on a dictionary structure or a type defined in the program.
The classic ways is:
DATA: BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE BKPF.
END OF ITAB.
DATA: ITAB LIKE BKPF OCCURS 0.
The different is the first declaration creates the headerline, the second one is without header line.
Other ways to declare an internal table is to use the statament TABLE OF
DATA: ITAB TYPE TABLE OF BKPF.
or
DATA: ITAB TYPE STANDARD TABLE OF BKPF.
These ways are the same, i.e they define a standard intenal table without header line.
These ways are very usefull in OO Abap where it can use TYPE only in the daclarations.
Max