Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PERFORMANCE

Former Member
0 Likes
467

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

3 REPLIES 3
Read only

Former Member
0 Likes
443

it is just declaration i don't think it impact on performance issue.

Read only

Former Member
0 Likes
443

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

Read only

Former Member
0 Likes
443

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.