Application Development 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: 

table of initial size

Former Member
0 Kudos
933
DATA wa_zcitorderout TYPE zcitorderout OCCURS 0 WITH HEADER LINE.

This statement is obsolete. Need to use TABLE OF INITIAL SIZE

1 ACCEPTED SOLUTION

Former Member
0 Kudos
244

Hi,

<b>difference between OCCURS n and INITIAL SIZE n:</b>

OCCURS n is obsolete in OO Context and it is advisable to use INITIAL SIZE instead. The difference between the two is that OCCURS n allocates memory to store specified number of rows in the internal table and also creates a header line, whereas INITIAL SIZE allocates memory for the specified number of rows without creating the header line.

DATA wa_zcitorderout LIKE zcitorderout OCCURS 0 WITH HEADER LINE.

<b>or</b>

DATA: wa_zcitorderout  TYPE STANDARD TABLE OF zcitorderout INITIAL SIZE 0 WITH HEADER LINE.

Regards

SUdheer

6 REPLIES 6

Former Member
0 Kudos
244

HI Megan

Here with header line is Obsolete not initial size

you can use like this..

data:

fs_data type zcitorderout, " field string

t_data like standard table of fs_data initial size 0

if it helps reward with points..

Regards Rk

Former Member
0 Kudos
244

hi..,

Occurs 0 statement is obsolete... in latest versions.. u need to use TYPES.

data :

t_spfli type standard table of spfli with initial size 0.

regards,

sai ramesh

former_member181962
Active Contributor
0 Kudos
244

DATA wa_zcitorderout TYPE zcitorderout initials size 0.

Former Member
0 Kudos
245

Hi,

<b>difference between OCCURS n and INITIAL SIZE n:</b>

OCCURS n is obsolete in OO Context and it is advisable to use INITIAL SIZE instead. The difference between the two is that OCCURS n allocates memory to store specified number of rows in the internal table and also creates a header line, whereas INITIAL SIZE allocates memory for the specified number of rows without creating the header line.

DATA wa_zcitorderout LIKE zcitorderout OCCURS 0 WITH HEADER LINE.

<b>or</b>

DATA: wa_zcitorderout  TYPE STANDARD TABLE OF zcitorderout INITIAL SIZE 0 WITH HEADER LINE.

Regards

SUdheer

Former Member
0 Kudos
244

Hi,

Create an internal table without header line.

Ex.

  • Internal table

DATA itab_zcitorderout TYPE TABLE OF zcitorderout.

  • Work area

DATA: wa_zcitorderout TYPE zcitorderout.

  • Accessing the internal table.

LOOP AT itab_zcitorderout INTO wa_zcitorderout.

if wa_zcitorderout-field1..

endif.

ENDLOOP.

Thanks,

Naren

ferry_lianto
Active Contributor
0 Kudos
244

Hi Megan,

Please try this instead.


Data: itab type table of zcitorderout.    <--- internal table

Data: wa   type zcitorderout.             <---- work area

Regards,

Ferry Lianto