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

why standard programs uses the OCCURS statement

Former Member
0 Likes
671

Hi Experts,

instead of occurs we usually use STANDARD TABLE OF due to performance issue ,

but i noticed that stadard programs are using OCCURS statement only.

could u plz tell me why stadard programs are using OCCURS only.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
652

Hi,

Occurs Statement created the internal table with header line. But Header Line is not supported in Oop's Concept. So it is better practice to create the table with TYPE/LIKE STANDARD TABLE OF statement without specifying Header line option in declaration.

Yes in most of the standard Programs OCCURS statement are used. This is because these are SAP standard and developed in older version of sap.

5 REPLIES 5
Read only

Former Member
0 Likes
653

Hi,

Occurs Statement created the internal table with header line. But Header Line is not supported in Oop's Concept. So it is better practice to create the table with TYPE/LIKE STANDARD TABLE OF statement without specifying Header line option in declaration.

Yes in most of the standard Programs OCCURS statement are used. This is because these are SAP standard and developed in older version of sap.

Read only

0 Likes
652

Thanks Avinash

since SAP versions has been changing , why OCCURS are being not removed from the code.

Read only

Former Member
0 Likes
652

>

> Hi Experts,

>

> instead of occurs we usually use STANDARD TABLE OF due to performance issue ,

>

> Thanks.

It's not a performance issue. It's an OOPS issue.

Rob

Read only

0 Likes
652

Because a lot of coding comes directly from old SAP systems where this way of programming was preferabble - for example in old 3.6 SAP / 4.0.

Read only

Former Member
0 Likes
652

slved