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 debug a sapscript?

829


What is a match code? : abap data dictionary

871


how to create module pool program using table controls based on selection criteria specified for sales document item in the first screen and item details in the second screen. plz mention the detail coding Tahnks, Rahul

3653


What is an interactive report?

848


What is IMG in SAP?

959


What is the Process to transfer IDOC from Outbound System to Inbound system.

1901


hi I am in training of functional module, i am unable to understand what exactly use of IDOC,BAPI,DIM and BIM. As LSMW and BDC methods are used for data conversion from legacy to sap. Might be it is silly question. please explain me

2001


Is it possible to pass data to and from include programs explicitly?

792


What are Tickets in Realtime ?

1966


What are the functional areas? User groups? and how does ABAP query work in relation to these?

925


What is payroll area

2022


What is difference between float and packed data type?

867


What are the disadvantages of using explicit enhancement?

1711


How many types of tables exists and what are they in data dictionary?

1370


What are different abap/4 editors?

843