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

How to upload more than 2GB file from External Source to SAP?

1110


Hello All, Requesting to all user of this site. Please post your Questions in Proper sub Category of chosen category. Some users post the questions in common category whether sub category for that is available ..like some users still post the SAP Script & ALE Related questions in common ABAP Category. Due to this it becomes very difficult to find the topic wise Questions. Please cooperate with the site & to other users. Thanks & Regards Tamseel

1818


How can I make a differentiation between dependent and independent data? : abap hr

836


How do you differentiate tax for different countries? : sap abap hr

942


ABAP : Classical reports events name

1134


What are the differences between transparent tables, pooled tables & cluster tables? : abap data dictionary

993


In the `select' statement what is group by ?

1748


What are the function modules that are generated when you activate a lockobject? : sap abap data dictionary

805


What are the difference between pool tables and transparent tables?

886


Explain the differences between interactive and drill down reports?

782


What are the types of parameters in the function modules?

920


What is payroll driver ? : abap hr

872


Control Break statements- At new...endat.

1184


What is the difference between RETURNING and CHANGING parameters for a method?

1399


How you attach search help to data element? : sap abap data dictionary

947