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 synchronous update?

564


It is not possible to create an abap/4 program, which contains only subroutines. State true or false. : abap modularization

703


Is it possible to pass data to and from include programs explicitly? : abap modularization

738


What is the syntex used to call a screen as dialog box (pop up)?

720


What are the types of parameters in the function modules?

660






What is an abap instance?

604


How do you execute the payroll

2097


What is page window?

573


What happens if we use leave to list-processing without using suppress-dialog?

691


What are the Synchronous and asynchronous methods in bdc ?

609


How many types of size categories and data classes are there?

616


Does every abap/4 have a modular structure?

550


what are the 2 other types of views, which are not allowed in release 3.0? : abap data dictionary

606


What are the components of selection table?

608


How to read files and process BDC's automatically ?

1628