Interview Questions

What is the difference between Type and Like?

SAP ABAP questions and answers


(Continued from previous question...)

What is the difference between Type and Like?

Answer1:
TYPE, you assign datatype directly to the data object while declaring.
LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.

Answer2:
Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.

Answer3:
type refers the existing data type
like refers the existing data object

(Continued on next question...)

Other Interview Questions