TYPE : It will allocate memory during execution (object type).
TYPE will improve performance.It is used when userdefined object link with SAP system data type.
TYPE refers to the user defined data types
TYPE,assign datatype directly to the data object while declaring.
LIKE : Tt will allocate memory immediatly.
It is when data object link with the other data object.
LIKE refers to existing data type of data object
LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.
DATA : name TYPE char10. (Here the variable ‘name’ takes the property or character length 10 ).
DATA : myname LIKE name (myname refers to the property of name and thus gets assigned with character length 10).
Note: char10 here is data type not data object.
DATA : myname LIKE name (myname refers to the property of name and thus gets assigned with character length 10).
Note: char10 here is data type not data object.
No comments:
Post a Comment