Professional Documents
Culture Documents
ABAP For SD Consultants
ABAP For SD Consultants
ABAP For SD Consultants
V 1.0
It was originally used by SAP developers to develop the SAP R/3 platform. It is
also used by SAP customers to enhance SAP applications – add custom reports
and interfaces, and enhance user experience.
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
©India SAP CoE, Slide 3
ABAP for SD Consultants
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
©India SAP CoE, Slide 4
Purpose
1. Comprehensive: ERP software supports an organizations all the
business transactions and links them together using real-time
integration.
Processing
Routines, Methods
Logic Programs,
Includes
Adaptability Utilities
Reports,
Interfaces,
Conversions,
Enhancements Debug, Tracer,
and Forms Notes, Patches
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
©India SAP CoE, Slide 10
R/3 Architecture
The presentation layer contains the software components that make up the
SAPgui (graphical user interface). This layer is the interface between the R/3
System and its users. The R/3 System uses the SAPgui to provide an intuitive
graphical user interface for entering and displaying data.
Application Layer
The application layer consists of one or more application servers and a message
server. Each application server contains a set of services used to run the R/3
System
Database Layer
The database layer consists of a central database system containing all of the
data in the R/3 System. The database system has two components - the
database management system (DBMS), and the database itself.
All ABAP programs are modular in structure and made up of processing blocks.
There are two kinds of processing blocks, those that are called from outside a
program by the ABAP runtime system, and those that can be called by ABAP
statements in ABAP programs
• Reports are Executable Programs that read data from the database,
processes the data and display the data to the required format.
• You can either display the output of a report on the screen, print it
or send it to a file. You can also save it, so that it can be displayed
as often as you like. It is important to be able to do this, because
reading large volumes of original data can impair system
performance.
Benefits of EDI-ALE:
• Reduced Data Entry Errors
• Reduced Processing Cycle time
• Availability of Data in electronic form
• Reduced Paperwork
• Reduced Cost
• Standard means of communication
Purchase Sales
Order Order
GUI_UPLOAD
Batch Input
Direct Input
Legacy SAP
AL11
Application Application OPEN DATA SET Application
data server file READ DATASET data
CLOSE DATASET
Advantages.
Printer
Application
Program
Web Browser
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
©India SAP CoE, Slide 19
Modularization
Program Structure
ABAP programs are responsible for data processing within the individual dialog
steps of an application program. This means that the program cannot be
constructed as a single sequential unit but must be divided into sections that
can be assigned to the individual dialog steps.
To meet this requirement, ABAP programs have a modular structure. Each
module is called a processing block. A processing block consists of a set of
ABAP statements. When you run a program, you effectively call a series of
processing blocks. They cannot be nested.
The following diagram shows the structure of an ABAP program:
• Subroutines
• Subroutines are procedures that you can define in any ABAP
program and also call from any program.
• Function modules
• Function modules are procedures that are defined in function
groups and can be called from any ABAP program.
• Include
• If you want to use the same sequence of statements in several
programs, you can code them once in an include program.
T Code - SE37
Creating Include.
Use Transaction SE38 to create a include program.
Using Include
Include <incl>
This inserts the source code <incl> into the ABAP/4 program during the
syntax check and during generation. The INCLUDE statement performs
the same function as if you were to copy the source code of <incl> to
the position of the statement in the calling program.
• These tables are tied to each other through established relationships. This
connection of multiple tables through relationships creates what is known
as a Relational Database Management System (RDBMS).
• Foreign Key - You use the primary key field in one table to link it to another.
The common link field in the other table is usually not the primary key in the
other table: It is called a foreign key. MATNR is primary key in MARA table
and foreign key in VBAP.
Search Help 1
DOMAIN
Summation/Total
Graphical display
processing block
internal control
…...
AT SELECTION-SCREEN
START-OF-SELECTION
END-OF-SELECTION
} TOP-OF-PAGE
END-OF-PAGE
TOP-OF-PAGE DURING
LINE-SELECTION
AT LINE-SELECTION
Interactive Events AT USER-COMMAND
AT PF<nn>
• EDI (Electronic Data Interchange) is a technology in itself with its own set of
standards and used mostly for communication between any 2 systems on
different networks
BATCH INPUT
Data
BATCH SAP
INPUT DATABASE
SESSION TABLE
DIRECT INPUT
METHOD #3 SAP function modules execute the consistency checks
Function Modules
©India SAP CoE, Slide 38
Processing Batch Input sessions
When you create a batch input session, it remains in the batch
input queue until it is explicitly started. Session processing can be
started in two ways:
An on-line user can start the session using the batch input menu
options. (To access the batch input options, choose System ®
Services ® Batch Input.) Transaction code - SM35
Features:
You can use the recording to create
Research Transaction
• User exits are routine which SAP allows you to add in additional customized programs
process without affecting the standard SAP programs.
• User exits allow developers to access and modify program components and data
objects in the standard SAP System.
• On upgrade, each user exit must be checked to ensure that it conforms to the standard
system.
form userexit_xxx
........................
endform
Read Data
Output Form
S
SAP Layout set
Program
Doocuument
Sales order, Billing
Layouts of Sales
document etc
order, Billing
document etc
1. Application Data is
fetched by the Print
Program from the
database depending
upon the selection
screen parameter.
2. Function module of a
Layout Set is called in
a program for
placement of the
data.
3. The output of
application document
is sent to printer or
mail or fax.
Major Features
Major Functions.
• Gives Tips & Tricks for coding
• Setting the measurement
restrictions
• Start the runtime analysis in the
current
session
• Start the runtime analysis in a
parallel session
• Display and process
performance files
• Display database, system and
ABAP execution time
Major Features
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
©India SAP CoE, Slide 62
LetMe
In debug mode let the participant(s) find a Z message in a particular Txn
Let the participant(s) find out a table where F1→F9 will reach a structure
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
©India SAP CoE, Slide 64
Tips and Tricks
• <Kopf> is a German word for Head. This generally all Header tables have a
<K> in their name which distinguishes them from the Position tables with a <P>
in them. for example VBAK/P or VBRK/P
• Use table TSTC to find out all „Z‟ Programs and Transaction Codes existing in a
system.
• By pressing F1 → F9 will normally show you the field & table. If you reach the
structure then to find a table check where-used-list ............ More details?
• To find out a User Exit, check in IMG for system modifications. To find
enhancement, go to SMOD and check with the help of application area and
development class
• In debug mode you can change the values in a table and test
Background Processing
When a program takes a long time to execute then one can execute the
program in background so that a job is set up for that program.
The job can be seen in transaction SM37.
The job log gives the exact start time and the end time for the job
Comments
Commented lines in the program start with asterisk (*)
To comment a part of line use double codes (“).
©India SAP CoE, Slide 66
Additional Info
• Unlike most IMG configuration, all program except SAP-scripts are
necessarily client independent. Thus a program developed in one client in
a server is also automatically available in all other clients in the same
server.
•Table document.