ABAP

Document Sample
ABAP Powered By Docstoc
					   ABAP BASICS I

Northern Arizona University
    College of Business




            1
               ABAP Statements

 The ABAP editor converts all statements to uppercase,
  except string constants
 A statement can begin anywhere on a line
 Multiple statements can be on a line




                            2
             ABAP Statements

 A single statement can be on multiple lines
 Blank lines can be anywhere
 One or more spaces can separate statement
 words




                       3
                     Comments
 An asterisk (*) in the first position of a line, makes the
  entire line a comment
   * This is a comment
 A double quote (“) after a statement creates a partial
  line comment
   Write ‘Hi’ . “ This is a comment




                             4
           Defining a program

 REPORT program name .
   REPORT Z34_LMF_list_spfli .
 PROGRAM program name .
   PROGRAM Z34_LMF_list_spfli .
   3 = Year 2003 and 4 = CIS 435




                        5
            Defining variables

 Variables must be defines before they are
 used.
 Variables can be placed anywhere in the
 program.
 Normally all variables should be defined
 together at the top of a module.




                       6
              Defining variables
 Variables can be up to 30 characters in length.
 Begin a variable name with a letter.
 Numbers are allowed in variable names.
 The underscore (_) is allowed in a variable name.




                           7
    Defining variables – Data Types

C   Character        ‘Whatever’
I   Integer                  25
P   Packed Decimal   19.95




                       8
             Data Statement

Data D_num   Type I value 1 .




                    9
   Data Statement – Colon Notation

Data:
        D_num1       Type I value 1 ,
        D_num2 Type P Decimals 2
        value ’19.95’ ,
        D_name(20)
        value ‘Whatever’ .




                             10
          Runtime Parameters

Parameters:
 P_ID          Type I Obligatory ,
 P_Name(20) Type C Obligatory Lower Case .




                     11
     Assigning Values to Variables

MoveP_ID to D_ID .


Move:
     P_ID to D_ID ,
     P_Name to D_Name .




                      12
                  Writing

Write D_ID .
Write:
     /,
     P_ID to D_ID ,
     P_Name to D_Name .




                      13

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:7
posted:3/12/2012
language:English
pages:13