0% found this document useful (0 votes)
3 views

Chapter 02 - Introduction To ABAP Programming

Chapter 02_Introduction to ABAP Programming

Uploaded by

maher
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Chapter 02 - Introduction To ABAP Programming

Chapter 02_Introduction to ABAP Programming

Uploaded by

maher
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 30

IBM Global Services

Introduction to ABAP Programming

Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Objectives

 The participants will be able to :


 Remember basic terms in ABAP programming
 Identify ABAP development basics
 Examine ABAP programming environment and ABAP Editor
 Write basic ABAP program syntax

2 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Terms to Remember

Program
A series of ABAP statements

Report:
An ABAP program whose output is a list

Module Pool:
A dialog program which is a collection of
screens

List:
The output generated by an ABAP report
program

3 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Reporting and ABAP Development

Reporting(SE38),
Click

ABAP
Development
(SE80)

4 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Programming Environment - The ABAP Editor

Use SE80, create program and write


code into the ABAP Editor

5 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Demonstration

 Creation of a custom program using transaction SE80 and displaying it in ABAP


editor.

6 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Practice

 Creation of a custom program using transaction SE80 and displaying it in ABAP


editor

7 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Programming Environment - Online Debugging

Set the Break-point using


Click execute to enter into debug mode.

8 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Demonstration

 Setting Break-points, executing the program and displaying the debugging mode.

9 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Practice

 Setting Break-points, executing the program and displaying the debugging mode.

10 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Basic Functions of the ABAP Editor

ABAP Help

Standard
toolbar

Find and
Repeat Find

Syntax Check

Toggles from
Program source entry area
display to
change mode

11 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

The PROGRAM Menu Option

12 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

The EDIT Menu Option

13 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

The EDIT Menu Option (Contd.)

14 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

The GOTO Menu Option

15 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

The UTILITIES Menu Option

16 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

The BLOCK/BUFFER Menu Option

17 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

The SETTINGS Menu Option

18 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Demonstration

 Displaying basic functions and menu options of the ABAP editor.

19 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Practice

 Displaying basic functions and menu options of the ABAP editor.

20 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Basic ABAP Program Syntax

DATA COUNT TYPE I.


DATA TITLE(25).
MOVE 1 TO COUNT.
MOVE ‘President’ TO TITLE.
WRITE TITLE.
WRITE COUNT. ABAP Program

Statement

Word 1 Word 2 Word 3 Word 4

Key word Parameter, field, or constant

21 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Chaining Statements in ABAP

DATA COUNT TYPE I.


DATA TITLE(25).
MOVE 1 TO COUNT.
MOVE ‘President’ TO TITLE.
WRITE TITLE.
WRITE COUNT. DATA: COUNT TYPE I,
TITLE(25).

MOVE: 1 TO COUNT,
‘President’ TO TITLE.

WRITE: TITLE, COUNT.

22 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Comments in ABAP

A double quotation mark (“)


anywhere on a line makes
everything that follows a
comment.

An asterisk (*) in column


1 makes the entire line
a comment line.

23 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

ABAP Program Structure

Program Name Area


Use REPORT for listing programs
Use PROGRAM for online programs

Declaration Section
Used for defining tables, variables
and constants

Statement Section
Used for coding executable
ABAP statement

24 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

ABAP Program Attributes

Application

Status
Program Title is mandatory

Type

25 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Running an ABAP Program


From the ABAP Editor:
With the program
displayed,
Program®Execute

An Alternative Method:
From the System Menu,
choose Services® Reporting
 specify the program 
Execute

One Final Method:


From the ABAP Editor: Initial Screen, type
the program name, then click on the Execute
push-button

26 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Demonstration

 Writing a simple ABAP program and executing it.

27 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Practice

 Writing a simple ABAP program and executing it.

28 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Summary

 The ABAP Editor is used to create, maintain, and execute ABAP programs.
 Custom programs must start with a “Y” or a “Z” and can be up to 40 characters in
length.
 In an ABAP program :
 Each statement must end with a period. (full-stop)
 Key words are always the first word in a statement
 Words must be separated by at least one blank
 ABAP statements can be indented and extend over several lines
 ABAP programs must start with either the PROGRAM or REPORT statement.
 Comments can be written by placing an asterisk (*) in column 1 or placing a
double quotation mark (") within a line.

29 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation


IBM Global Services

Questions

 What are different types of ABAP programs?


 What are the steps to create a simple ABAP program?
 How to reach in debugging mode of an ABAP program?

30 Introduction to ABAP Programming | Dec-2008 © 2005 IBM Corporation

You might also like