on 07-05-2008 11:42 AM
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.!!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.