‎2006 Jul 24 10:58 AM
Hi Experts,
See the followinf code:
1.DATA: BEGIN OF line,
col1(1) TYPE c,
col2(1) TYPE c,
END OF line.
DATA: etab LIKE TABLE OF line WITH HEADER LINE.
2.DATA: BEGIN OF ETAB OCCURS 0,
col1(1) TYPE c,
col2(1) TYPE c,
END OF ETAB.
WHAT IS THE DIFFERENCE BETWEEN 1 AND 2 DECALRATIONS..
ANY PERFORMANCE ISSUE DELACRING ITAB LIKE IN 2.?
REGARDS
‎2006 Jul 24 11:00 AM
it is just declaration i don't think it impact on performance issue.
‎2006 Jul 24 11:03 AM
Hi
It's the same, I don't believe there's a performance difference.
Anyway if you declare a work are you can use it as header line, so you should write:
1.DATA: BEGIN OF line,
col1(1) TYPE c,
col2(1) TYPE c,
END OF line.
DATA: etab LIKE TABLE OF line.
In this case:
LOOP AT ETAB INTO LINE.
ENDLOOP.
The declarations of internal table without header line have to be used in OO
Max
‎2006 Jul 24 11:03 AM
Hi ravi,
Practically No Difference.
1. Finally we are going to use the internal table
ETAB.
2. After final declaration,
the SKELETON of the internal table,
is SAME
(whether we declare by option 1, or option 2)
3. There is NO PERFROMANCE issue related,
while declarating an object.
(the issue comes only when we LOOP
and use the data inside the internal table)
4.
WHAT IS THE DIFFERENCE BETWEEN 1 AND 2 DECALRATIONS..
1. First u have declared a strucutre (LINE)
then u have declared an internal table, using LINE.
2. U have declared directly.
regards,
amit m.