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: 

Internal Table ????

Former Member
0 Kudos

Hi Experts,

Some of you have told that OCCURS has become obsolete now. Then how an internal table should be declared now? there are many ways. But how to declare an internal table with selected fields with out using OCCURS statement.

Thanks in advance,

Ramana

1 ACCEPTED SOLUTION

dani_mn
Active Contributor
0 Kudos

HI,

declare like following.

TYPES: begin of itab_type,
       a(10),
       b(20),
       end of itab_type.
       
       
DATA: itab type standard table of itab_type initial size 0.    

REgards,

4 REPLIES 4

dani_mn
Active Contributor
0 Kudos

HI,

declare like following.

TYPES: begin of itab_type,
       a(10),
       b(20),
       end of itab_type.
       
       
DATA: itab type standard table of itab_type initial size 0.    

REgards,

Former Member
0 Kudos

Hi venkat,

U can declare an internal table like this also,

TYPES: BEGIN OF t_ekpo,

ebeln TYPE ekpo-ebeln,

ebelp TYPE ekpo-ebelp,

END OF t_ekpo.

DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo .

Former Member
0 Kudos

Hi,

Please declare like this

  • Types declaration

TYPES : BEGIN OF t_pernr ,

pernr TYPE pa0000-pernr,

END OF t_pernr.

  • Internal table declaration

DATA : gt_pernr TYPE STANDARD TABLE OF t_pernr,

  • Header line declaration

DATA : gw_pernr type t_pernr.

Thanks,

Sutapa.

former_member632991
Active Contributor
0 Kudos

Hi,

declare a type with the required fields,

then declare an internal table using this type.

types:begin of x_test,

a type i,

b type c,

end of x_test.

data : i_test type standard table of x_test.

this the one way of decalring internal table.

i think u need to go through some basics concept of internal table so as to clearur doubts.

Regards,

Sonika