difference between TYPE and LIKE ?

Answer Posted / kishore

Usually for creating data object, that means for allocating
the memory for a particular type we use the following
statement
TYPES char(10) type c.

DATA var1 type char.

where C is ABAP predefined type.

IF we want another data object like the above.

DATA var2 like var1.

Here memory is directly allocating without going
to define type first and memory next.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can i Have Some Realtime Examples on Badi ?

8409


What is the difference between synchronous and asynchronous update? : abap bdc

727


How many types of data classes are there in sap abap? : abap data dictionary

664


Difference between sy-tabix and sy-index? Can you check sy-subrc after perform?

775


What are local objects?

702






How is conversion of data types done between abap/4 & db layer? : abap data dictionary

744


How would you suppress the display of a parameter on the selection screen?

663


What does the insert statement in extract datasets do?

712


Static and instance variable and method with live example. Why and when to use

1021


Under Data Transfer Portion of ABAP, what do you mean by DX Project

1938


What are clustered tables?

703


Search help exit details.

995


Suppose the client wants me the vacancy to be displayed on a website as well as ess. How should I do it? : sap abap hr

613


What is meant by hide area?

743


What is the difference between skip and reserve?

699