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

OCCURS

Former Member
0 Likes
739

HAI,

what is difference between occurs1 and occurs2?

in script can i print the back page of a paper

THANK YOU

ASHOK

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
717

Hi,

OCCURS 2 is like like providing initial size of 2 rows to your internal table.

Regards,

Sesh

7 REPLIES 7
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
717

Hi

Occurs 1 : will allocate 1* total memory size of the contents defined.

Occurs 2 : will allocate 2* total memory size of the contents defined.

Regards,

Sree

Read only

Former Member
0 Likes
717

Hi

Occurs is used to allot some memory for that internal tabl

So 1 means less memory and 2 means little more memory is allotted so it is always better not to give any number and best to give OCCURS 0 , beacause based on the data the itab will take the memory

YES you can print both sides of printing in SCRIPTS

set the PAGE print settings DUPLEX = x in script

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
718

Hi,

OCCURS 2 is like like providing initial size of 2 rows to your internal table.

Regards,

Sesh

Read only

Former Member
0 Likes
717

Hi

Occurs 1 memory will allocate some memory to the internal table, occurs 2 will allocate more memory as compared to 1. But there will be no difference in the output, bcoz based on the number of records in the database table the internal table size will be increased. Instead of giving numbers directly give occurs 0.

Regards

Haritha.

Read only

Former Member
0 Likes
717

Hi Ashok

Occurs is basically used to allocate memory for internal table.

Occurs 1 and occurs 2 means some memory is allocated to the internal table.

It is advicable to give OCCURS 0 , beacause then SAP itself allocates the memory to the table based on the number of records stored in the table and this reduces the wastage of memory too.

Yes, we can print both sides of the page in script by using print setting DUPLEX

Regards,

Suruchi

Read only

Former Member
0 Likes
717

Hi.

OCCURS means system allow 8kb memory space in virtual memory.

occurs1 means system allow 1*8kb memory space.

occurs2 means system allow 2*8kb memory space.

Regards,

Bhaskar

Read only

Former Member
0 Likes
717

hi ashok,

for internal tables initially no memory is allocated. memory allocation done at runtime it depends on OCCURS n........... n may be 1 or 2 or ..........n

occurs 1 -> initially one record space is allocated n if u place a record in that memory then it will automatically assign one more record space..........

occurs 2 -> initially two records space is allocated n if u place a record in that memory then it will automatically assign another two more record space..........

preferably give occurs 0 -> as we dont know no of records which we ll insert in internal tables and also it reduces any extra allocations.

if useful reward some points.

with regards,

suresh.