Thursday, April 25, 2013

0 Variables in SAP ABAP

Variables in  SAP ABAP :



Variables are named data objects, you can declare variables statically using declarative statements, or dynamically while a program is running. They allow you to store changeable data under a particular name within the memory area of a program.


DATA is a keyword which is used to declare the variables in SAP ABAP

Syntax :
DATA < Variable Name> Type <Data Type>
                           (Or)
DATA <Variable Name> Like <Data Type>
Ex: DATA V1 Type I.
       DATA V2 Like I.

Type is abap keyword for reference
Fields :
         Elementary
        DATA vendor_code(10) TYPE C.
         Reference to Non Elementary
        TYPES vend_code(10)  TYPE C,
        DATA  vendor_code TYPE vend_code.
         Reference to existing fields
        DATA : vend_code(10) TYPE C,
                                   vendor_code LIKE Vend_code.



 

SAP-ABAP Copyright © 2011 - |- Template created by Vishnu - |- Powered by Blogger Templates