Difference between Work Area and Header Line

While adding or retrieving records to / from internal table we have to keep the record temporarily.

The area where this record is kept is called as work area for the internal table.  The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.

Header line is a implicit work area for the internal table.  It depends on how the internal table is declared that the itab will have the header line or not.

e.g.
data: begin of itab occurs 10,
           ab type c,
           cd type i,
        end of itab.  " this table will have the header line.

data: wa_itab like itab. " explicit work area for itab

data: itab1 like itab occurs 10. " table is without header line.

The header line is a field string with the same structure as a row of the body, but it can only hold a single row.

It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table.  It is the default work area for the internal table.

ABAP Tips by: Piyusha

Fast Links:
Get help for your ABAP problems
Do you have a ABAP Question?

SAP Books
SAP Certification, Functional, Basis Administration and ABAP Programming Reference Books

More ABAP Tips

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.