Application Development 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: 

type assignment

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi vijai rajendran,

data : itab type mara - > acts as Work Area

itab1 type standard table of mara (ztable) -> Header + WA

Regards,

sg

Former Member
0 Kudos

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,

Former Member
0 Kudos

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