2006 Dec 06 5:15 PM
hi friends,
could you pls clarify for me what is meant by " <b>occurs 0 with header line</b>" as in
" Data: l_variable like xyz occurs 0 with header line".
What has occured?
Why occur 0? What does 0 imply or indicate?
What is a header line?
Would very much appreciate your help.
Regards
Sri
hi friends,
could you pls clarify for me what is meant by " <b>occurs 0 with header line</b>" as in
" Data: l_variable like xyz occurs 0 with header line".
What has occured?
Why occur 0? What does 0 imply or indicate?
What is a header line?
Would very much appreciate your help.
Regards
Sri
2006 Dec 06 5:16 PM
Hi,
Occurs n, n indicates the approximate no. of rows in the internal table.
Header line, is a work area for the table for processing the data of the table.
Regards,
Ravi
Note - Please mark all the helpful answers
2006 Dec 06 5:20 PM
Hi SriReddy,
OCCURS 0 by default have with out header line.
If you specified clause WITH HEADER LINE then internal table operations are performed through implicit work areas.
If you did not specify clause WITH HEADER LINE then internal table operations are performed through explicit work areas.
OCCURS clause will specify the initial size of internal table ie how many entries can be accomadated.
OCCURS 0 will create a page of 8kb where as OCCURS 100 allows maximum 100 entries.
Thanks,
Vinay
2006 Dec 06 5:40 PM
Vinay,
I do not agree with this - "where as OCCURS 100 allows maximum 100 entries."
The internal table will START with 100 blank entries... but an APPEND to the table will generate lines 101, 102, etc
2006 Dec 06 5:43 PM
Also - OCCURS 0 by default HAS a header line when it created with a BEGIN OF.
2006 Dec 06 8:39 PM
HI,
Unlike sorted tables, hashed tables, and key access to internal tables, which were only introduced in Release 4.0, standard tables already existed several releases previously. Defining a line type, table type, and tables without a header line have only been possible since Release 3.0. For this reason, there are certain features of standard tables that still exist for compatibility reasons.
Standard Tables Before Release 3.0
Before Release 3.0, internal tables all had header lines and a flat-structured line type. There were no independent table types. You could only create a table object using the OCCURS addition in the DATA statement, followed by a declaration of a flat structure:
DATA: BEGIN OF <itab> OCCURS <n>,
...
<fi> ...,
...
END OF <itab>.
This statement declared an internal table <itab> with the line type defined following the OCCURS addition. Furthermore, all internal tables had header lines.
The number <n> in the OCCURS addition had the same meaning as in the INITIAL SIZE addition from Release 4.0. Entering 0 had the same effect as omitting the INITIAL SIZE addition. In this case, the initial size of the table is determined by the system.
The above statement is still possible in Release 4.0, and has roughly the same function as the following statements:
TYPES: BEGIN OF <itab>,
...
<fi> ...,
...
END OF <itab>.
DATA <itab> TYPE STANDARD TABLE OF <itab>
WITH NON-UNIQUE DEFAULT KEY
INITIAL SIZE <n>
WITH HEADER LINE.
In the original statement, no independent data type <itab> is created. Instead, the line type only exists as an attribute of the data object <itab>.
Click the below link for more details.
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3646358411d1829f0000e829fbfe/content.htm
Regards,
Vara
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |