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 and like

Former Member
0 Likes
635

what is the difference between type and like

wa_itab1 like itab1

wa_itab1 type itab1

are they the same

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
611

Refer

LIKE means the datatype of the variable is similar to the referenced variable.

TYPE means it is a predefined data type.

Eg:

DATA int TYPE i.

Here int is of integer data type.

DATA var LIKE int.

var is a variable having same data type of int. which in turn is integer.

Regards,

Santosh

Message was edited by:

Santosh Kumar Patha

4 REPLIES 4
Read only

Former Member
0 Likes
612

Refer

LIKE means the datatype of the variable is similar to the referenced variable.

TYPE means it is a predefined data type.

Eg:

DATA int TYPE i.

Here int is of integer data type.

DATA var LIKE int.

var is a variable having same data type of int. which in turn is integer.

Regards,

Santosh

Message was edited by:

Santosh Kumar Patha

Read only

Former Member
0 Likes
611

Hi,

TYPE - Refer to data type (may be user defined using types)

LIKE - Refer to data object/database fields.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
611
Read only

Former Member
0 Likes
611

Iam satisfied with u r answer. thank u very much.</b>