cancel
Showing results for 
Search instead for 
Did you mean: 

Workarea Vs Headerline !!

Former Member
0 Kudos

hi..Should we proceed with declarations of internal tables with "header line or Workarea" ?

what i heard is, it is good practice to use the workarea.!

Pls tell the solutions with reason.!!

any answer wil ne rewarded.!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

It is better to declare a workarea. Because in the types declarations we have to declare a work area externally. In case of internal tables declarations with occurs parameter or with header line, ther is no need to declare work area externally. The system automatically creates a workarea.

Reward if helpful.

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks..

Former Member
0 Kudos

Hi,

First is in ECC 6.0 Internal table with header line is an obselete statement.

work area is always the best option bcause it does not create the confusion with the table name and work area name.

Header line usage causes unnecessary usage of memory.

You can declare work area as :

data : it_mara type standard table of mara, " Internal table declaration.

wa_mara type mara. " Work area declaration.

Thanks.

Swati.

former_member387317
Active Contributor
0 Kudos

Hi Padmashree,

It's obsolete to use internal tables with header line...

you should use work area to deal with internal tables...

Reason : In Object Oriented ABAP Programming internal Tables with header line will not work... so it's better to use Work Area insted of using header line..

Hope it will solve your problem...

Thanks & Regards

ilesh 24x7

Former Member
0 Kudos

Hi,

Proceeding with workarea is always advisable and good as Using the header line as a work area means that you can use shorter statements; however, they are not necessarily easier to understand, since you cannot immediately recognize the origin and target of the assignment. Furthermore, the fact that the table and its header line have the same name can cause confusion in operations with entire internal tables. To avoid confusion, you should use internal tables with differently-named work areas.

The header line allocates unnecessary storage whether used or not.

The bottom line is we do confuse when we go with internal table with header line... the motto of our program is to make others understand and if the client have a look into our code with his development team then he should understand...

Hope this would help you in understanding..

Regards

Narin Nandivada