You are on page 1of 34

ABAP Progamming Overview

MOVE DATA ...

IF ...
WHILE... SEARCH ... SELECT ... LOOP AT ...

WRITE ...

*Comment...
DO ...

R/3 System

R/3 is an integrated suite of applications designed to handle the data processing for large corporations

SAP System : 3 Tier Client/Server


SAP GUI SAP GUI SAP GUI

Presentation Server

SAP Application Server

DB Server

Presentation server

The presentation server is actually SAP GUI. When started presentation server displays R/3 menus within a window This window is known as SAP GUI or user interface. The interface accepts inputs from the user

Sends User Input Data to the Application Server for processing and receives data for display from it

Application Layer
An application server is a set of executables that interpret an ABAP program and manage input and output for them. The number of processes that start up when you bring up the Application Server is defined in application server profile.
If your ABAP program request information from database, the Application server will format the request and send it to database.

Application Scenario
First User logs on using Log on utility Windows are generated by presentation layer of R/3 system Presentation layer is active when user inputs data After input,control passes to Application layer The program connects to message server and obtains address of most lightly loaded server SAP GUI is active again after application server calls a new screen Program logic between two screens is called a Dialogue Step

Database Layer
The database layer is a set of executables that accepts database request from application server which is then passed on to RDBMS

The RDBMS sends the data back to database server which passes the information to application server

SAP SYSTEM (3 Tier Architecture)


SAP GUI SAP GUI

Presentation Layer
(Windows based)

SAP Instance

Application Layer
(Windows Server/UNIX)
Request Queue

Dispatcher

M
SAP Buffer (Shared Mem)

E G

Database Layer
(Windows Server/UNIX)

Oracle Informix DB2 MS SQL Server MaxDB

Database Server

Dispatcher

All request come in from presentation servers are directed to the dispatcher which writes them to the dispatcher queue The dispatcher pulls the request from the queue on a First-in, First-out basis Each request is then allocated to work process.

Work Process
Work process handles one request at a time to perform any processing for a users request Work process need to address two special memory areas - the user context and program roll area User context is memory allocated for user characteristics Roll Area is memory holds information needed by R/3 about program execution

Components of Work Process

Task Handler Screen Processor ABAP Processor

Database Interface

Task Handler

All request pass thru the task handler, which then distribute the request to the appropriate part of work process The interpreters interpret the ABAP code. There are two interpreters. ABAP interpreters and Screen interpreters

Screen Processor

User Interactions are controlled by Screens

Apart from Screen mask,Screen contains flow logic


Screen Processor controls Screen Flow Logic

Ensures that screen contents are transferred to screen flow logic

ABAP Processor

Executes the processing logic of the Application program and communicates with Database interface

Database Interface

Establishing and terminating connections between work processes & database Access to Database tables Access to ABAP Dictionary

ABAP

Advanced Business Application Programming

ABAP

Operating/Database system-independent programming ABAP contains a subset of SQL called Open SQL for comfortable database access for various database

ABAP Workbench

ABAP program editor to create and modify source code and other program components Data dictionary to create tables, structures and views Function library where you can create global function modules Screen and Menu painters where you can create user interface for your program

Structure of an ABAP Program


Textual and Event driven language with text and graphical objects. Declaration of Global Data Dialog modules Event Blocks Procedures (Sub-routines, Function Modules, Methods)

ABAP Programming

ABAP Report Dialog Programming (Transaction)

ABAP Program : Report

Report Program
: attribute type 1 (executable)

Reading
Data

Database

Reading data

Types of ABAP Report

1 3

1. Report Listing

2. Drill-down Report 3. Control-break Report 4. ALV Report

ABAP Program : Dialog Program

Dialog Program
: attribute type M (Module Pool)

Reading
Data

Writing

Database

Reading and changing data

Dialog Program : Transaction

How to create ABAP program

Transaction Code : SE38

Transaction : SE38

Program Attribute

ABAP Editor

The Structure of the Language


Each statement must end with a period

DATA tmp TYPE I. WRITE Hello World. WRITE OK.

ABAP Error
ABAP Error

Syntax Error

Runtime Error

User Runtime Error

System Runtime Error

Cannot Allocate Space

Time Exceed (10 Minutes)

User Runtime Error

DATA result TYPE i. result = 10 / 0.

System Runtime Error : Space Allocation

System Runtime Error : Time Exceed

Thank you

You might also like