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

header

Former Member
0 Likes
910

hi experts,

what is the deference bw with header line and withuot header line. some body says without header line can give better forfomence.how?.

please give me detail functionality for both .

thanks in advance.

radhakrishna.

6 REPLIES 6
Read only

Former Member
0 Likes
884

Hi

No need of declaring work area when you use internal table with header line .

for more information on Using Header Lines as Work Areas

please refer the below link it will help you

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb36a1358411d1829f0000e829fbfe/content.htm

For internal table with header line please check out the link below it will give you full information which you want

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

For internal table without header line please check out the link below it will give you full information which you want

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

*********please reward points if the information is helpful to you*********

Read only

Former Member
0 Likes
884

Hi,

When you create an internal table you can also declare a header line with the same name. You can use the header line as a work area when you process the internal table. The ABAP statements that you use with internal tables have short forms that you can use if your internal table has a header line. These statements automatically assume the header line as an implicit work area. The following table shows the statements that you must use for internal tables without a header line, and the equivalent statements that you can use for internal tables with a header line:

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.

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb36a1358411d1829f0000e829fbfe/content.htm

The header line is a built in structure to your internal table. So if you say:

Data: itab like mara occurs 0 with header line.

then when you loop at the table

loop at itab.

endloop.

you can reference itab-matnr etc.

If you don't use a header line you have to declare a structure to move the values into when reading from the table like:

data itab type table of mara.

data wtab type mara.

loop at itab into wtab.

endloop.

and then you reference wtab instead of itab directly.

If you want to see it in action declare both types of table in a test program then debug and look at both your different tables and you'll see the one with a header line has a hat in the first column of the debugger referencing the values of the loop that are currently being pointed at.

Regards,

Priyanka.

Read only

Former Member
0 Likes
884

HI,

an internal table without header line's performance is good than the

internal table with header line

as itab with header line occupies more memeory and with out headerline

occupies less memory..

we can use the same work area which is common to more than one

internal table also if the structures are common...

thanks & regards,

venkatesh

Read only

Former Member
0 Likes
884

Hi,

A header line is similar to a work area for a database table. A work area is used as temporary storage for one entry of a database table. In a similar way, a header line is used to hold one line of an internal table.

An internal table with header line is a tuple from a work area (header line) and the bulk of the table itself. Both are addressed using the same name, the interpretation of the name is context-sensitive. Hence it would stand for the header line in a MOVE statement, but would stand for the bulk of the table in a SEARCH statement.

When you create an internal table WITH a header line, a work area is created automatically with the same data type as the rows of the internal table. The header line and the internal table have the same name. Then, the system uses this work area implicitly.

In ABAP/4 statements for accessing internal tables, you can specify the work area to be used. For internal tables with header lines, you can leave out this specification. Then, the system uses the table work area implicitly.

Regards,

Padmam.

Read only

Former Member
0 Likes
884

hi

<b>Types of Internal Tables</b>

<b>With Header line</b>

- 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.

<b>WORK AREAS</b>

- Work areas are single rows of data.

- It should have the same format as any of the internal tables.

- It is used to process the data in an internal table one line at a time.

<b>Without Header line</b>

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

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

<b>

Example:

DATA t_line TYPE line OCCURS 10 with header line.

</b>

, 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.

regards

ravish

<b>plz dont forget to reward points if useful</b>

Read only

Former Member
0 Likes
884

hi,

header line will not be supported while working with OO(object oriented)ABAP.

sap suggests header line effects the performance.

rgds,

bharat.