2) What is the difference between TYPE and DATA?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is generic buffering?

1041


What is the different between abap and ooabap? Why do we use ooabap?

872


What is sequence of event triggered in report?

789


What is locking ?

772


What are the functional modules used in sequence in bdc? : abap bdc

753






What is view? Explain the different types of view?

948


Can a posting run be deleted? : sap abap hr

777


What are Table control and tab strip control in dialog programming ?

5455


What are the table controls in bdc ? What is the difference between bdc and lsmw ?what is the difference between bdc and rfc ? : abap bdc

760


What is an abap data dictionary? : abap data dictionary

776


Mention what is alv programming in abap?

800


What are the different types of laws. What are they?

765


What do you understand by work area and internal tables in abap? Why do we use it?

830


What is the function of the correction system?

744


how to combine the transparent table with cluster table.

1343