When we define a data element in our program we use keywords like or type. But why is there no strict rule regarding this.. I know that if the reference is a data object (local or in dictionary or database) we should use like and if the reference is a type (local or global).
but there seems to be places where we can write either of the two and there is no syntax error. e.g.:
DATA notype value 'y'. DATA notypeagain(8) value 'possible'. DATA notypebutinteger value 69. DATA : IT_BDCDATA like BDCDATA OCCURS 0 WITH HEADER LINE, IT_BDCMSGCOLL type BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
In the above code we can put type (instead of like) for the variable BDCDATA and like (instead of type) for the variable BDCMSGCOLL and no error occurs...
Also if you read the code's starting lines... it shows that the words type and like are not even required...
Please explain or refer to some pdf dealing with the rules in such cases..