You are on page 1of 25

ABAP Programming Language

Advanced Business Application Programming

Slide 1 © Copyright IBM Corporation 2003


Major Category of ABAP Programming

1. Reports.
2. Module Pool .
3. SAPScript and Smart forms.
4. Interface Programs – BDC programs , LSMW , ALE/IDOC
5. HR Programming – Infotypes , Logical Database , Cluster Database
6. Customizations and Personalization – Exits , BADI , GuiXT etc.
7. Object Oriented Programming.
8. Workflow .
9. Programming BSP Applications.

Slide 2 © Copyright IBM Corporation 2003


Day 1

Get introduced to various ABAP tools and tcodes.


Know your program editor – write your first ABAP program!
Get Used to various Data types.
Produce your ABAP list – know how to publish what you want.
Learn how to implement logic in your code – ABAP control
statements.
The most important topic in ABAP – learn about Internal table.
Be professional – learn to modularize your code.

Slide 3 © Copyright IBM Corporation 2003


Tools and Transaction
Codes for Development

Learn them , as you are going to earn from them

© Copyright IBM Corporation 2003


ABAP Programs
Type Description Tcode
Report An ABAP program whose output is a list SE38
Module Pool A dialog program which is a collection of screens SE51

Function An independent program which can be called SE37


module from any other program. Can accept inputs and
produce outputs
Include An entity which cannot run independently, but is SE38
program effective when incorporated inside an
independent program
Subroutine A program which contains a list of procedures , SE38
Pool which are called by other program.
Interface Helps to upload information into SAP from SE38
Program external source
BSP HTML rich code with ABAP which builds internet- SE80
Applications enabled programs

Slide 5 © Copyright IBM Corporation 2003


Commonly Used Tools and Transaction Codes for ABAP
Development
Tcode Description
SE80 ABAP Repository Information System
SE38 Program Editor
SE51 Screen editor
SE11,12,16,17 Data Dictionary
SM30 Call View Maintenance
SE41 Menu Painter
SE37 Function Builder
SE93 Transaction Code Builder
SLIN Extended program check
SE71,72,73 SAPScript and accessories builder
SQ01, SQ02, SQ03 ABAP Query

SE24 Global Class Builder

Slide 6 © Copyright IBM Corporation 2003


Commonly Used Tools and Transaction Codes for ABAP
Development
Tcode Description
SA38 Executing report with variant
SM37 Batch Input sessions
SCD0 Building transaction variant
CMOD Building project for User exits
SE18 BADI definition
SE19 BADI implementation
SMARTFORMS Smartforms
SHDB Batch Input Recording
SM35 Batch Input Monitoring
SE91 Message Maintenance
SE09,SE10 Transport Organizer
SM36 Schedule Background job
SE43 Area Menu
LSMW Tool for Uploading Information from External files

Slide 7 © Copyright IBM Corporation 2003


Examples , Tutorials and Demos

Transaction Code Description

LIBS Demo on Lists


BIBS Demo on screens
DWDM Demo on ABAP Controls
ABAPDOCU ABAP Examples
ABAP_DOCU_SHOW Call ABAP keyword Documentation

Slide 8 © Copyright IBM Corporation 2003


You cannot live without it !!!

© Copyright IBM Corporation 2003


Creating New Program

ABAP custom programs should start with ‘Y’ or ‘Z’.


Transaction code is : SE38.

Slide 10 © Copyright IBM Corporation 2003


ABAP Program Attributes

Program title is required

Type:
1 - Executable Program
I - Include Program
M - Module Pool
F - Function Group
S - Subroutine Pool
Application:
S - Basis
U - EDM (Enterprise Data Model)
V - Sales and Distribution
Y - Customer Head Office
Z - Customer Branch
* - For all Applications
Slide 11 © Copyright IBM Corporation 2003
Programming Environment -
The ABAP Editor

Slide 12 © Copyright IBM Corporation 2003


Basic Functions of the ABAP Editor

Find and
Repeat Find Standard toolbar
Syntax Check

Undo

ABAP Help

Toggles from
display to
change mode
Cut, copy and paste
to and from a buffer

Program source entry area

Slide 13 © Copyright IBM Corporation 2003


The PROGRAM Menu Option

Options under Utility


Program
I
Other Object Enables the programmer to immediately load another
program
Display<- Toggles between Display and Change Mode
>Change
Check->Syntax Performs syntax check of the program

Save Saves the program

Activate Saves the active version of the program in ABAP


Repository
Test Executes the program
Slide 14 © Copyright IBM Corporation 2003
The EDIT Menu Option

Options under Utility


Edit
Pretty Printer Formats the contents of the editor in terms of
indentation and spacing. Helps to maintain the
readability of the program.
Search/replace Helps to find occurrence of some string inside the
current program or the chain of programs associated
Find next Continues the search operation forward

Slide 15 © Copyright IBM Corporation 2003


The GOTO Menu Option

Options under Utility


GoTo
Attributes Opens the attributes section of the program where one
decides the description of the program , its type, status,
application to which the program belongs to etc.
Text elements Used to maintain Heading of the Output list , labels for the
parameters and select-options , text symbols etc.
Messages Navigates to message maintenance, where new messages
can be inserted and old messages can be displayed and
changed for a particular message class
Variants Used to display , change and create variants for the
program
Object Directory User can display/change the development package used
Entry for the program.
Slide 16 © Copyright IBM Corporation 2003
The GOTO Menu Option..continued

Options under Utility


GoTo
Documentation SAP Script Editor opens up where the developer maintains
online documentation for the program, which is available at
the runtime execution for the program.
Translation All the selection texts , used as labels for different screen
components, can be translated from one language to
another – where the developer enters the translated
version of each selection-texts for the translated language
Online Manual Opens the SAP help site : help.sap.com and opens the
documentation node for ABAP Workbench : Tools.

Slide 17 © Copyright IBM Corporation 2003


The UTILITIES Menu Option

Slide 18 © Copyright IBM Corporation 2003


The Go ToSETTINGS Menu Option

To set Editor mode,


use the menu path
Settings-> Editor
mode

Preferred settings:
 PC mode with line
numbering
 With compression
logic
 Key word large

Slide 19 © Copyright IBM Corporation 2003


The Go To -> Display Object List Menu Option

Opens the program in ABAP Repository – shows all the components in a tree
mode in the left hand side of the screen.

Slide 20 © Copyright IBM Corporation 2003


The Go To ->BLOCK/BUFFER Menu Option

Slide 21 © Copyright IBM Corporation 2003


The Environment Menu
Option

Options under Utility


Environment
Data Browser Navigates o transaction SE16 , where the developer can
view the contants of any Database object
Inactive Objects Shows a list of inactive objects

Examples Shows huge collection of examples maintained by SAP on


List Design, Screen Design , Custom Controls,
performance topics etc.

Slide 22 © Copyright IBM Corporation 2003


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

Slide 23 © Copyright IBM Corporation 2003


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.

Slide 24 © Copyright IBM Corporation 2003


Running an ABAP Program

An Alternative
Method:
From the System
Menu, choose
From the ABAP Editor: Services
With the program Reporting to
displayed, launch
ProgramExecute the program
One Final Method:
From the ABAP Editor: Initial Screen, type
the program name, then click on the Execute
push-button
Slide 25 © Copyright IBM Corporation 2003

You might also like