1 / 13

ABAP BASICS I

ABAP BASICS I. Northern Arizona University College of Business. 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. ABAP Statements.

dai
Download Presentation

ABAP BASICS I

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

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 .

More Related