‎2007 Oct 02 4:36 PM
What is the difference between Types and data declarations
Thanks
Durga Prasad
‎2007 Oct 02 4:45 PM
Hi Durga Prasad,
Types is actually used to create a user-defined type of data type and Type is used to refer existing data type.
Data Declarations is used to refer a variable or constant using a data type.
Hope this helps.
Please reward if useful.
Thanks,
Srinivasa
‎2007 Oct 02 4:38 PM
‎2007 Oct 02 4:45 PM
Hi Durga Prasad,
Types is actually used to create a user-defined type of data type and Type is used to refer existing data type.
Data Declarations is used to refer a variable or constant using a data type.
Hope this helps.
Please reward if useful.
Thanks,
Srinivasa
‎2007 Oct 02 4:46 PM
Hi,
TYPES just gives you the prototype and will not assign any memory for the data. Whereas DATA will assign memory for the variables. Using TYPES you can create user defined data types.
For example:
TYPES: T1(10) TYPE c.
DATA: S1 TYPE T1.
S1 = 'ABCDEFG'.
WRITE: S1.
Here T1' is just an user defined data type of string length 10 and does not occupy any memory since it is a prototype. However S1 is occupies 10 bytes of memory.
Regards,
Ferry Lianto
‎2007 Oct 02 5:14 PM
Hi,
The functionality is almost same for Types and Data.
Types is used to declare a variable of predefined data type which is declared in data dictionary.
Like is used to refer to the data which has been already defined. For example, in implementing enhancements, u will be need to do some customization to the exising code. so you will declared using like statment.
example: data: ls_likp like xlikp.
Regards,
Niyaz