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

Explain the data types of internal tables?

631


Under Data Transfer Portion of ABAP, what do you mean by DX Project

1855


Lock objects and what are parameters of ENQUEUE FM?

1252


What statement will be found in an sap application program that implements a function module exit?

554


Mention what is alv programming in abap?

589






Kindly help me to Know the process of mapping in EDI from R/3 to a convertor(third party which translates IDoc flatfile to EDIFACT /XML / FTP /HTTP ) ?

1554


What are the difference between call screen and leave screen?

607


What does the insert statement in extract datasets do? : abap modularization

586


If I forgot some command in sap script e.g.: Suppress zero display – how to do find it?

567


In which cluster time results are stored? : abap hr

591


How to display if the value entered contains records or not?

591


What are the objects of the abap dictionary or what types of objects can be created in the abap dictionary? : abap data dictionary

539


Mention the various databases integrities?

618


What is the function of the transport system and workbench organiser? : abap data dictionary

620


What is the difference between a substructure and an append structure?

629