‎2007 Jul 12 1:57 AM
When is it convenient to use internal tables without header line?
Example:
DATA: i_table TYPE STANDARD TABLE OF table,
wa_table TYPE table.
LOOP AT i_table INTO wa_table.
...
ENDLOOP.
‎2007 Jul 12 8:41 AM
Hi
Internal tables with header lines has the following limitations.
1. We cannot use them as components while declaring Nested internal tables.
2. ABAP Objects does not support Internal table with header line.
3. Processing internal tables in a loop using field symbol gives better performance bcoz it does not involve copying the data from body to workarea/header line.
<b>Reward if helpful.</b>
‎2007 Jul 12 2:01 AM
Hi,
Performance wise Workarea is faster in a loop
if you need better performance then
field-symbols : <fs> type any.
loop at itab assigning <fs>.
endloop
aRs
‎2007 Jul 12 2:30 AM
Its always better performance wise to use internal table without header lines and using a work area to move data.
‎2007 Jul 12 2:30 AM
I have one simple what i understand with internal table header line and without header line.
1. performance point of view - without header line is good than with header line.
2. you can't use with header line in oo ABAP.
See the simple example to calculate the time taken by each query
Internal table with header line :
data : begin of itab occurs 0 ,
matnr like mara-matnr,
end of itab.
data : a type i,
b type i,
c type i.
start-of-selection.
get run time field a.
select matnr from mara into table itab.
loop at itab.
write:/ itab-matnr.
endloop.
get run time field b.
c = b - a.
write c. -> look at C value ( Micro seconds)
Internal table without header line.
types : begin of ty_itab,
matnr type mara-matnr,
end of ty_itab.
data itab type standard table of ty_itab.
data wa_itab like line of itab.
data : a type i,
b type i,
c type i.
start-of-selection.
get run time field a.
select matnr from mara into table itab.
loop at itab into wa_itab.
write:/ wa_itab-matnr.
endloop.
get run time field b.
c = b - a.
write c. -> see the C value
now compare first query time and second query time.
Thanks
Seshu
‎2007 Jul 12 3:25 AM
Actually if you "Extended Check" the program (Program > Check > Extended Program Check) , you will find that tables with header line is obsolete. So its better to use working area or field symbols.
‎2007 Jul 12 3:31 AM
Hi,
In OOPS environment it is not possible to use internal table with header lines.
‎2007 Jul 12 8:28 AM
Internal tables with header line are obsolete now..
functionality of itabs with header line will be removed in future version..
Regards
Prax
‎2007 Jul 12 8:41 AM
Hi
Internal tables with header lines has the following limitations.
1. We cannot use them as components while declaring Nested internal tables.
2. ABAP Objects does not support Internal table with header line.
3. Processing internal tables in a loop using field symbol gives better performance bcoz it does not involve copying the data from body to workarea/header line.
<b>Reward if helpful.</b>