8/3/2019 44232071 ABAP Overview 2hrs
1/48
Beyond the ObviousBeyond the Obvious
SAP R/3 System Overview&
ABAP/4 Programming
8/3/2019 44232071 ABAP Overview 2hrs
2/48
SAPR/3 System
Overview of R/3 System
8/3/2019 44232071 ABAP Overview 2hrs
3/48
Logical View of R/3 System
8/3/2019 44232071 ABAP Overview 2hrs
4/48
ABAP/4 -SAPR/3 PROGRAMMING
LANGUAGE
Advanced Business
Application Programming
8/3/2019 44232071 ABAP Overview 2hrs
5/48
ABAP/4
Fourth generation language
Event driven
All SAP R/3 applications and parts of Basis are
developed in ABAP
Verbose language
8/3/2019 44232071 ABAP Overview 2hrs
6/48
Topics of Discussion
ABAP Development Workbench
Data Dictionary
Reports
BDC
SAP Script
Module Pool
8/3/2019 44232071 ABAP Overview 2hrs
7/48
ABAP Development Workbench
8/3/2019 44232071 ABAP Overview 2hrs
8/48
ABAPDevelopment Workbench
ABAP Development Workbench is a graphical
programming environment which enables us to createnew ABAP applications and change existing SAP
applications.
8/3/2019 44232071 ABAP Overview 2hrs
9/48
ABAPWorkbench -Transaction code -S001
Tools -> ABAP Workbench
8/3/2019 44232071 ABAP Overview 2hrs
10/48
Repository Browser -Transaction code -SE80
8/3/2019 44232071 ABAP Overview 2hrs
11/48
Data Dictionary -SE11
8/3/2019 44232071 ABAP Overview 2hrs
12/48
Function Builder -SE37
8/3/2019 44232071 ABAP Overview 2hrs
13/48
Screen Painter -SE51
8/3/2019 44232071 ABAP Overview 2hrs
14/48
Creating a Program
Click the button ABAP Editor in the Workbench
8/3/2019 44232071 ABAP Overview 2hrs
15/48
Creating a program
The program attributes screen looks like this
8/3/2019 44232071 ABAP Overview 2hrs
16/48
... Debugging
8/3/2019 44232071 ABAP Overview 2hrs
17/48
Runtime Analysis
Tells us how long do specific operations take during
the run
Gives the trace list of subroutines that have been
processed
SQL trace helps to trace database calls to find out
the tables used by the application
8/3/2019 44232071 ABAP Overview 2hrs
18/48
Development class
A set of logically related development environmentobjects.
A development class together with its objects istransportable.
Each development class is under the administration
of one user.
8/3/2019 44232071 ABAP Overview 2hrs
19/48
Creating development class
8/3/2019 44232071 ABAP Overview 2hrs
20/48
Data Dictionary
8/3/2019 44232071 ABAP Overview 2hrs
21/48
Data Dictionary
ABAP Development workbench tool
Stores system wide data definition
Completely integrated with ABAP Workbench
8/3/2019 44232071 ABAP Overview 2hrs
22/48
Data Dictionary objects
Data Elements
Domains
Tables
Structures
Views
8/3/2019 44232071 ABAP Overview 2hrs
23/48
REPORTS
8/3/2019 44232071 ABAP Overview 2hrs
24/48
ABAP/4 Reporting
Objectives
Understand data declarations, commands, system
fields used in reports
Understand the selection screens Understand the program level events, conditions &
loops
Understand the data retrieval from the tables and
Internal tables
Understand the modularization techniques,
field symbols and logical databases
8/3/2019 44232071 ABAP Overview 2hrs
25/48
Types ofprograms
Type 1
run on its own
Can be started it in the R/3 system without a
transaction code
Can be executed in background
Type M ( Module pool)
Program cannot run on its own and can be called via
a transaction code
Type I( Include )
8/3/2019 44232071 ABAP Overview 2hrs
26/48
Program Selections
SELECT-O
PTION
S StatementSELECT-OPTIONS FOR
NO EXTENSION
OBLIGATORY
LOWER CASE
SELECT-OPTIONS allows specification of multiplevalues and ranges. This can only be declared forfields within tables defined in the TABLES statement.
ExampleSELECTSELECT--OPTIONS: S_KUNNR FOR KNA1OPTIONS: S_KUNNR FOR KNA1--
KUNNRKUNNR.
8/3/2019 44232071 ABAP Overview 2hrs
27/48
Program Selections
PARAMETERS StatementPARAMETERS TYPE
LIKE
OBLIGATORY
AS CHECKBOX
DEFAULT
This statement allows entry of a single value on theselection screen.
Example :PARAMETERPARAMETER : P_KUNNR LIKE KNA1P_KUNNR LIKE KNA1--KUNNRKUNNR.
8/3/2019 44232071 ABAP Overview 2hrs
28/48
Blocking Selection Screen
A sample screen
SELECTION-SCREEN BEGIN OF BLOCK RAD1
WITH FRAME TITLE TEXT-002.
PARAMETERS R1 RADIOBUTTON GROUP GR1.
PARAMETERS R2 RADIOBUTTON GROUP GR1.
PARAMETERS R3 RADIOBUTTON GROUP GR1.SELECTION-SCREEN END OF BLOCK RAD1.
8/3/2019 44232071 ABAP Overview 2hrs
29/48
DATA Definitions
TYPES StatementTYPES TYPE or LIKE
DECIMALS
SAP allows the creation of new user defined data types.
And this does not create a variable, just a new typethat can be used in creating a variable.
Example :
TYPES : CC LIKE BKPFTYPES : CC LIKE BKPF--BUKRSBUKRS
DATA : NEW_CCTYPE CC.DATA : NEW_CCTYPE CC.
8/3/2019 44232071 ABAP Overview 2hrs
30/48
Data Definitions
InternalT
ablesDATA : BEGIN OF OCCURS x,
(variable definitions)
END OF .
Internal Tables are defined as an extension of astructure, with the addition of an OCCURS clause.
Example
DATA : BEGIN OF T_WRK,DATA : BEGIN OF T_WRK,
T_KUNNR LIKE KNA1T_KUNNR LIKE KNA1--KUNNR,KUNNR,
SW TYPE C,SW TYPE C,END OF T_WRK.END OF T_WRK.
8/3/2019 44232071 ABAP Overview 2hrs
31/48
Program Level Events
INIT
IALIZAT
ION. AT SELECTION-SCREEN
AT SELECTION-SCREEN OUTPUT
START-OF-SELECTION
END-OF-SELECTION TOP-OF-PAGE
END-OF-PAGE
AT LINE-SELECTION
AT USER-COMMAND
8/3/2019 44232071 ABAP Overview 2hrs
32/48
IF StatementCASE Statement
8/3/2019 44232071 ABAP Overview 2hrs
33/48
Modularization techniques
Defining Macros
Include program
Subroutines
Function Module
8/3/2019 44232071 ABAP Overview 2hrs
34/48
BDC
8/3/2019 44232071 ABAP Overview 2hrs
35/48
BDC - Batch Data Communication
To transfer data from non-SAP systems ( ie.already available in electronic form )
Suitable for entering large amounts of data as it
executes the transactions automatically
Similar to entering the data in the transactionsmanually
8/3/2019 44232071 ABAP Overview 2hrs
36/48
BDC Methods
Classical Method
Call Transaction
Call Dialog
8/3/2019 44232071 ABAP Overview 2hrs
37/48
Preparing a BDCTable
The BDC table should have five fields viz.,
1) Program name2) Screen number
3) Screen begin
4) Field name
5) Field value
8/3/2019 44232071 ABAP Overview 2hrs
38/48
Preparing a BDCTable
For eg.
Prog Screen Scrn Field Field
name No begin name value
SAPMMO3M 0060 X
RM03M- MATNR mat.no
RM03M-MBRSH indu. sec
.
.
SAPMM03M 0080 X
RM03M-WERKS target pla
.
.
8/3/2019 44232071 ABAP Overview 2hrs
39/48
SAP Script
8/3/2019 44232071 ABAP Overview 2hrs
40/48
SAP Script
Objectives
Understand Forms, various components of forms
such as windows, pages, character format,paragraph format etc.
Understand the control commands, symbols and
function modules in SAP Script.
8/3/2019 44232071 ABAP Overview 2hrs
41/48
Forms
Controls the page layout and text formatting
A form of the graphical Form Painter consists of
Header data
Page layout
Paragraph format
Character format Documentation
8/3/2019 44232071 ABAP Overview 2hrs
42/48
SAP Script - Control commands
PERFORM Command
To Call an ABAP subroutine (form) from any program
Syntax
/: PERFORM IN PROGRAM
/: USING &VAR1&
/: CHANGING &VAR2&
/: ENDPERFORM
8/3/2019 44232071 ABAP Overview 2hrs
43/48
Function Modules in SAP Script
Form functions
OPEN_FORM Opens the form output.
WRITE_FORM Calls a form element
CLOSE_FORM Ends the form output.
START_FORM Starts a new form.
Database
READ_TEXT Reads a text module andpasses
it to the specified work areas.
8/3/2019 44232071 ABAP Overview 2hrs
44/48
Module Pool
8/3/2019 44232071 ABAP Overview 2hrs
45/48
Creating Screens
Clickscreen painterbutton in Workbench
8/3/2019 44232071 ABAP Overview 2hrs
46/48
Structure of program
8/3/2019 44232071 ABAP Overview 2hrs
47/48
Flow logic
The flow logic of a screen drives the processing
sequence for that particular screen. Flow logic
describes how the program reacts to the user actions.
The events used for this purpose are,
Process before output (PBO)
Process after input (PAI)
Process on value request (POV)
Process on help request (POH)
8/3/2019 44232071 ABAP Overview 2hrs
48/48