adspace


what is difference b/w like and type statements?give
example? when to use like and when to use type?

Answer Posted / guest

when refering to type-pool you need to use TYPE
declaration, and LIKE is used to refer your already
declared variable. And for declaring native types 'N' 'C'
you cannot use LIKE there.

data: matnr like mara-matnr,
matnr1 type mara-matnr.

will not make any difference in the program. however

data: matnr type mara-matnr,
matnr1 like matnr. when the attribute of matnr
changes will affect matnr1 also.

and LIKE statement become obselete in Object programming.
you can use TYPE statements only there.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is your current client number?

1139


How can we handle table control in bdc? : abap bdc

1189


what comes in Timkein written test I hope some body can tell me at this id plz tell it before 9 pm 19 march

2233


Hi every one ! You people are doing a great job here , Im going to attend Tata Technologies interivew on this sunday,Can anyone who has already attended this company interivew or other companies interivews in abap pls share ur experience with me and help me to get into job my id ushareddyabap@gmail.com. Thankyou verymcuh

2008


1/ How do u apprach if error occur in sending idocs ? 2/ where u assigned process code ?

2070


What is the project you are currently working and work that you are doing

1606


please give the remaining answers.

2307


Did you create secondary index?

1239


How do you get the number of lines in an internal table? How to use a specific number occurs statement?

1026


What work you have done in HR module

1455