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: 

LIKE VS TYPE

Former Member
0 Kudos
63

hi every body,i am not clear about where to use like or type in a structure,and what is importance of each keyword........

4 REPLIES 4

Former Member
0 Kudos
46

Hi Shekar,

Take a look in this thread:

regards,

Lijo Joseph

*Reward if useful

Former Member
0 Kudos
46

When u declare as like that time it allocate the memory for that varible. but when u declare as type that time that time it give the refference of that varible.

Former Member
0 Kudos
46

Hi Sekhar..

when you declare TYPE it means the variable you declared with TYPE wont get memory, it resembles the data type of the object only.

if you declare a variable with LIKE keyword, then your variable will get memory from the system as well as the domain properties of the reffered data object.

<b>Reward points if Useful</b>

Cheers,

Chandra

Former Member
0 Kudos
46

note

var like vbap-matnr

is correct

but

types var type p decimals 5.

data var1 like var -


is incorrect

write

data var1 type var.

reward if helps