Search this site

Sunday, December 26, 2010

DATA Definitions

  • DATA Statement
DATA TYPE or LIKE VALUE DECIMALS
- All variables used within the ABAP/4 program must be declared with DATA
statements
- up to 30 characters in length, containing any characters other than
(, ), +, ., :
- Indicates the variable type

Example:
DATA: p_bukrs LIKE bkpf-bukrs.
DATA i_val TYPE i VALUE '99'.

  • TYPES Statement
TYPES TYPE or LIKE DECIMALS
SAP allows the creation of new user defined data types. And this does not
create a variable, BUT just a new type that can be used in creating a variable.

Example :
TYPES : cc LIKE bkpf-bukrs
DATA : c_cc TYPE cc.

No comments:

Post a Comment