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

Data Dictionary Question

Former Member
0 Likes
334

1. Technical Settings we are five occurs 0 and occurs 1 , if i give occurs 0 what happen in database or if i give occurs 1 what effect in data base ? i give occurs 1 how many records in database if i extend ed that how it is extended ? pls give me answer ?

2 REPLIES 2
Read only

Former Member
0 Likes
313

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,

...

f1...,

f2...,

...

END OF itab.

This statement declared an internal table itabwith 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.

kindly reward if this helps

regards

Niharika

Read only

vinod_vemuru2
Active Contributor
0 Likes
313

Hi Srinu,

OCCURS 0 is used to define the internal table with header line with default INITIAL SIZE of 8KB.

OCCURS n: Here n represents the Initial memory to be allocated for 'n' number of records.

If the number of records exceeds by n then ABAP runtime will allocate memory for again n records. In case of OCCURS 0 the memory allocated will be always in chunks of 8KB.

EG: U defined an internal table with OCCURS 10.

When the first record is INSERTED/APPENDED a memory for 10 records will be allocated. When the 11th record is added then again memory for 10 records will be allocated.

In case of OCCURS 0 it will always allocate memory of 8KB. If the internal table is filled with 8KB then system will allocate again 8KB memory.

Important point is when u define the internal table memory will not be allocated immediately. When u append/Insert the first record to it then the memory will be allocated.

It is advisable to not to use OCCURS addition in order to effectively utilize memory. In the above example if u have 11 records then total memory allocated is for 20 records but we are using only for 11 records. memory for 9 records is wasted.

I dont understand what do u mean by technical settings in this post.This will come to picture only in case of data base tables but not internal tables.

Thanks,

Vinod.