‎2008 Aug 12 6:54 AM
Hi,
While declaring variables we make use of TYPES,DATA,LIKE,TYPE.Whats the purpose and difference between types and data and in the same way for like and type.
‎2008 Aug 12 7:02 AM
Hi
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fb2358411d1829f0000e829fbfe/content.htm
TYPES :
BEGIN OF type_s_tab,
a TYPE i,
b TYPE i,
END OF type_s_tab.
TYPES :
t_c(50) TYPE c.
the above declaration does not have any memory assigned to it
DATA :
itab TYPE
STANDARD TABLE OF type_s_tab.
DATA :
w_c TYPE t_c.
The above declarations are objects of TYPE type_S_tab and t_c
and memory is assigned to it
DATA :
w_char LIKE w_c.
The above declaration of the object is referring to the type of w_c which is occupying 50 characters.
Regards
Pavan
‎2008 Aug 12 7:01 AM
hI
Type: It is used when userdefined object link with SAP
system data type.
Like: It is when data object link with the other data
object.
‎2008 Aug 12 7:02 AM
Hi
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fb2358411d1829f0000e829fbfe/content.htm
TYPES :
BEGIN OF type_s_tab,
a TYPE i,
b TYPE i,
END OF type_s_tab.
TYPES :
t_c(50) TYPE c.
the above declaration does not have any memory assigned to it
DATA :
itab TYPE
STANDARD TABLE OF type_s_tab.
DATA :
w_c TYPE t_c.
The above declarations are objects of TYPE type_S_tab and t_c
and memory is assigned to it
DATA :
w_char LIKE w_c.
The above declaration of the object is referring to the type of w_c which is occupying 50 characters.
Regards
Pavan
‎2008 Aug 12 7:08 AM
Hi
Types: It is the statement used to define our own local data types in the program. Types won't occupy
any memory at run time.
Data: It is the statement to declare a local variable in the program. Data objects occupy memory at
runtime.
Hope it helps.
Murthy