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

How do you set up background jobs in sap? What are the steps?

538


What actually happens in real-time recruitment? : sap abap hr

577


What are the parameters in bdc_insert? : abap bdc

814


what are the important fields while preparing sales order,inquiry?

1907


Difference between sap script and report?

750






there are 2 selection screens. material num in screen 200 and plant in screen 300. so how can you write in INITIALISATION event?

1765


Explain the different types of screen keywords?

561


What is the difference between bdc_open_group and bdc_open_dataset. : abap bdc

616


What are the page headers for secondary lists?

610


What is open sql?

580


In the MM module for finding out the standard cost what is the view one has to look at?

618


What should be declared explicitly in the corresponding abap/4 statements to access internal tables without header lines & why?

596


Define abap/4 layer?

764


Can we handle two transaction codes in the same program using call transaction bdc input method? : abap bdc

650


if while coding power goes off , how to retrieve the codes?

1626