Hi melly,
Basically the effect of LIKE and TYPE is the same. The rule is when referring to a data dictionary object, use type; when referring to data storage already allocated, use like. If you need 2 identical itabs, define the first one using types (pointing to table fields defined in the dictionary), and define the second itab by one statement: Data: itab2 like itab1. To meet the SAP guideline, take an older ABAP program and mass replace all the LIKEs with TYPE. Typically only a couple of statements will need to remain as LIKEs. TYPE becomes more important when implmenting ABAP classes (OOP).
Mike
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.