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

type ref to

Former Member
0 Likes
610

data : r type in_table-name.

data : r type ref to in_table-name.

what is the difference b/w them

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
587

Hi Prajwal,

REF TO is mostly used with ABAP OO.

It is used to create the reference objects for classes and methods.

Regards,

Atish

4 REPLIES 4
Read only

Former Member
0 Likes
588

Hi Prajwal,

REF TO is mostly used with ABAP OO.

It is used to create the reference objects for classes and methods.

Regards,

Atish

Read only

Former Member
0 Likes
587

Hi

type ref to used mostly for declaring classes.

You can not declare

DATA: l_grid type cl_gui_alv_grid.

you need to give it as

DATA: l_grid type ref to cl_gui_alv_grid.

Regards

Navneet

Read only

0 Likes
587

thanks, thanks a lot .

Read only

Former Member
0 Likes
587

Hi Prajawal,

type ref to is to create a instance variable of a class. its into Object oriented terms.

type is used in normal abal code to declare a variable of the specified type.

regards,

Navneeth K.