Download
abap basics i n.
Skip this Video
Loading SlideShow in 5 Seconds..
ABAP BASICS I PowerPoint Presentation
Download Presentation
ABAP BASICS I

ABAP BASICS I

166 Vues Download Presentation
Télécharger la présentation

ABAP BASICS I

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. ABAP BASICS I Northern Arizona University College of Business

  2. 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

  3. ABAP Statements • A single statement can be on multiple lines • Blank lines can be anywhere • One or more spaces can separate statement words

  4. 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

  5. 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

  6. 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.

  7. 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.

  8. Defining variables – Data Types C Character ‘Whatever’ I Integer 25 P Packed Decimal 19.95

  9. Data Statement Data D_num Type I value 1 .

  10. 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’ .

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

  12. Assigning Values to Variables Move P_ID to D_ID . Move: P_ID to D_ID , P_Name to D_Name .

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