2) What is the difference between TYPE and DATA?
Answers were Sorted based on User's Feedback
Answer / bharath
TYPE: is used to define new data types and will not occupy
any memory space.
DATA: is used to define the variables representing the
exisitng data types. and will hold the memory space.
Type: var1 type c.
DATA: def type var1.
Is This Answer Correct ? | 14 Yes | 1 No |
Answer / chaitra
Types are definitions, i.e they do not hold memory space.
They cannot be used directly as variables, they have to be
declared before using in the code.
Data are declaration, i.e they hold memory space. They can
be used directly as variables in the code.
Ex :
Type : a type C.
DATA : b type C.
now, b can be directly used in the code directly eg:
IF b is initial .
...
ENDIF.
But 'a' cannot be used, as it is just a definition, it has
to be declared before being used.
DATA: x type a.
Now x is of type a and occupies memory space and can now be
used in the program.
Regards
Is This Answer Correct ? | 8 Yes | 0 No |
what are SPA and GPA parameters?What the Purpose?Examples? under ABAP Memory.
What type of reports (ALV, Interactive, Classic) we can generate in SAP ABAP?
when we create a simple report with input field as S_VBELN (as select-options)..for any range of values it is displaying the output...i dont want like that..only the existing ranges it must be displayed...for ex. in sales ranges from 4969...but in input from 1 to z also displaying..please send me the solution
What abap statement will trigger list generation?
how to run bdc program in background?
What are the different types of parameters? How can you distinguish between different kinds of parameters?
What is the difference between synchronous and asynchronous update?
Where can you find error log for call transaction? : abap bdc
Can we have more than one selection-screen . And how ?
where is security relevent information such as Password for ITS are stored?
what is the meaning of movement type and how do we find this .....
Prepare a Report for last month Last Date- First Date?