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

reg: internal table

prasanth_kasturi
Active Contributor
0 Likes
824

what is the need of header line(Work area)??? and what is "occurs 0" give its significance

Edited by: prasanth kasturi on Jan 11, 2008 7:12 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
801

Hi,

Header line creates work area

The OCCURS parameter n specifies how many table lines of storage is required. This storage reservation process does not happen until the first line is inserted in the table. The value n of the OCCURS specification has no effect on type checking, i.e. data objects which have types with different OCCURS specifications are type-compatible.

if are specifying 10 then initially 10 lines of storage is reserved. once 10 lines completed then again 10 lines will be reserved.

0 means no specific reservation of lines. depends on the requirement the storage will be reserved

Regards

8 REPLIES 8
Read only

Former Member
0 Likes
801

its obsolute don't use all those things.

use work area as header information

Madhavi

Read only

0 Likes
801

I know its obselete but can u give me the information i asked. what is the need of work area(header line) and what is occurs 0

Read only

Former Member
0 Likes
802

Hi,

Header line creates work area

The OCCURS parameter n specifies how many table lines of storage is required. This storage reservation process does not happen until the first line is inserted in the table. The value n of the OCCURS specification has no effect on type checking, i.e. data objects which have types with different OCCURS specifications are type-compatible.

if are specifying 10 then initially 10 lines of storage is reserved. once 10 lines completed then again 10 lines will be reserved.

0 means no specific reservation of lines. depends on the requirement the storage will be reserved

Regards

Read only

former_member188829
Active Contributor
0 Likes
801

Hi,

internal table with header line

http://sap.mis.cmich.edu/sap-abap/abap04/sld012.htm

Internal table without header line

http://sap.mis.cmich.edu/sap-abap/abap04/sld013.htm

Read only

Former Member
Read only

Former Member
0 Likes
801

Hi Prasanth,

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.

Example:

DATA t_line TYPE line OCCURS 10 with header line

If you look at the example, it becomes clear that an internal table t_line is created of the type LINE . The table can hold 10 records and also has an header line., where LINE could be another internal table or a transparent table.

Rreward if useful.

Thankyou,

Regards.

Read only

Former Member
0 Likes
801

Header Line : Similar To Workarea.

Occurs n : No.Of Records The Internal Table Can hold

awrd points if useful

Bhupal

Read only

Former Member
0 Likes
801

types of internal table:

With Header line

- System automatically creates a work area for the internal table.

- Work area has same data type as internal table.

- Work area is called the header line.

Here the system automatically creates the work area. The work area has the same data type as internal table. This work area is called the HEADER line. It is here that all the changes or any of the action on the contents of the table are done. As a result of this, records can be directly inserted into the table or accessed from the internal table directly.

Without Header line

- Internal tables without header line do not have a work area.

- Work area to be explicitly defined to access such internal tables.

reward if useful

thanks and regards

suma sailaja pvn