HOW MANY WAYS TO DEFINE INTERNAL TABLES.

Answer Posted / sudhir kumar

Basically there are 3 methods of creating the internal table which are used frequently, are as following:

1) for ex.

data: it_mara type table of mara.

note: after type table of, always a structure is used.
hence, here we call it structure mara not table mara.
and one thing more, here we can use like table of . but
it is not recommend. it is mostly used method.

2) for ex.

data: it_mara type mara occurs 0.

it means it_mara is a internal table of type mara.if we
write:

data: it_mara type mara occurs o with headerline.

it means there will be a internal table and a workarea
with the same name i.e. it_mara. hence it will little
confusing.

3) tables mara.
data: it_mara like mara occurs 0.

here, with the help of first statement, a workarea will be created with the name of mara and second statement will crate internal table with the name of it_mara. This is also little confusing because we mara is also of database table name and here it is also name of work area.

for exe.

select *
from mara
into mara.

hence, first method is most suitable and it should be used.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is match code? : sap abap hr

642


how can we use the text randomly or circularly in smartforms.... means... suppose i have 'abap' horizantally... but i want it in vertically... how can... plz any body tell me this....

1577


Explain the table, which contain the details of all the name of the programs and forms?

526


Differentiate between report and dialog program

600


What are field symbols?

640






How do you write a function module in sap?

622


Sy index and sy tabix

968


When you prefer lsmw?

590


What is the max no of match code id’s that can be defined for one match code object?

687


How do we handle multiple line items in BDC's.

6386


Difference between open sql and native sql? : abap data dictionary

612


How will you link form with the event driven in sap scripts?

535


What are the differences between the table and the structure in the data dictionary in the sap abap?

592


State the system field for the current date?

634


What are the rules to create a BAPI?

1167