‎2008 Nov 19 8:11 AM
Hi all,
what is the difference between the declarions:I'm getting confussion while declaring please clear me:
1.types:itab like mara. To types: itab type mara.
2.types:itab like mara-matnr To types:itab type mara-matnr.
3.types:itab1 type table of mara. To types:itab1 like table of mara.
As we know that:
TYPE : it will allocate memory during execution (object type).
LIKE : it will allocate memory immediately
Type will improve performance.
Thanks,
srii..
‎2008 Nov 19 8:15 AM
hi
we use like key word wen we want to refer to local types/variables
so in types u may use type to declare the variables as u may refer to global types
wen u declare data using data then u may use like to refer to local variables
shiva
‎2008 Nov 19 8:16 AM
Hi,
Actually LIKE and TYPE will depend on which object u are assigning..
For Ex:
Data: tab1 type structure1 means tab1 will act as Structure.
Data: tab1 type tabletype means tab1 will act as Internal table.
Regadrs,
Kalp.
‎2008 Nov 19 8:19 AM
As per my understanding..TYPE refers to data type and LIKE refers to data object. But SAP allows us to use TYPE and LIKE interchangeably with data type and with data object. Only diff. between these 2 is that from oops point of view only TYPE is allowed not LIKE..other than this I don't think there is any difference of using TYPE or LIKE.
‎2008 Nov 19 9:27 AM
Please refer this link
[Types|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/content.htm]
‎2008 Dec 05 6:07 AM