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
How can I make a differentiation between dependent and independent data? : abap hr
What are the page windows?
What are the differences between structure and table in data dictionary in abap? : sap abap data dictionary
What functions does a data dictionary perform? : abap data dictionary
Explain open dataset in sap abap?
Performance tuning techniques
What are the field and chain statements?
What is the modification assistant?
Can a domain, assigned to a data element be changed? : abap data dictionary
What kind of deliverables you have on a day to day basis?
Explain the difference between cluster tables and pool table?
Specify the types of data dictionary objects.
How to debug a script in abap?
State the system field for the current date?
Give 3 scenario of reporting due to which you require reporting help of ABAP consultant?