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

LIKE VS TYPE

Former Member
0 Likes
521

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
Read only

Former Member
0 Likes
504

Hi Shekar,

Take a look in this thread:

regards,

Lijo Joseph

*Reward if useful

Read only

Former Member
0 Likes
504

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.

Read only

Former Member
0 Likes
504

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

Read only

Former Member
0 Likes
504

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