Professional Documents
Culture Documents
Day 1
Introduction to SAP
SAP R/3 General Architecture
Work Processes
Dialog Step
Introduction to ABAP
Introduction to SAPGUI
Introduction to SAP
SAP Systems Applications and Products
ABAP Advanced Business Application Programming
Modules
SD, FI, MM, PP
SAP R/3
SAP 4/HANA
Naming convention
Y* and Z*
User
Ctx
Roll Area
Dialog Step
Press Enter
Press a function key
Click on any button on the
screen
Choose
menu
Roll In &aRoll
Outitem
Roll In begins at the start
of the dialog step
In Roll In user context
and roll area are loaded
into work process
Once done with
processing all data rolled
out of work process
Roll Area
Values of variables
Dynamic Memory Allocation
Current program pointer
Day 2
Client
ABAP Program Types
Data Types
Programming Constructs
Data Declaration
Module Pools
Function Groups
Include Programs
Data types
Numeric Types
Integer (I)
Float (F)
Packed (P)
Character Types
Char (C)
Numeric text (N)
Date (D)
Time (T)
Hexadecimal (X)
Programming Constructs
IF(expression).
....
ELSEIF(expression).
...
ENDIF.
CASE(operand).
WHEN(operand1).
[StatementBlock]
WHENOTHERS.
[StatementBlock]
ENDCASE.
DO [n times].
[Statement Block]
END DO.
WHILE (expression).
[Statement Block].
END WHILE.
Data Declaration
Day 3
PBO/PAI
Selection Screen Events
Push buttons
Function keys
Loop at Screen
PBO/PAI
PBO(Process before Output):
Event triggers before the screen will displayed in the screen.
Day 4
Memory Organization
Data Dictionary
Data Elements
Domains
Conversion Exits
Check Tables/Value Tables
Tables
Data Class
Size Category
Delivery Class
Buffering
Indexes
Structures
Memory Organization
SAP Memory: Memory area to which all main sessions
within a SAPgui have access.
SET PARAMETER ID 'MEM' FIELD TEXT1.
GET PARAMETER ID 'MEM' FIELD TEXT2.
Data Element
Data element is
semantic attribute of a
field
Domain is used to
Data element
define data type, field determines how field
length etc.
is displayed to the
user.
Domain can be reused Data elements can
by any number of data make use of only one
elements
domain
Conversion Exits
Conversion exits are the method by which SAP uses to
normalise the data held in the various tables.
Conversion_exit<name>_input
Conversion_exit<name>_output
Data Class
Data class corresponds to a physical area in which all the tables
assigned to this data class are stored.
There are the following data classes:
APPL0(master data):
Data that is seldom changed.
APPL1(transaction data):
Data that is frequently changed.
APPL2(organizational data):
Customizing data that is defined when the system is installed and seldom
changed.
Size Category
Size category is used to define the expected space
required for the table in the database.
It can be chosen from 0 to 4 for any-table.
Delivery Class
Delivery class is used to control the transport of table data for an installation,
upgrade, or client copy and transports between customer systems.
A: Application table (master and transaction data).
C: Customer table, data is maintained by the customer only.
L: Table for storing temporary data.
G: Customer table, SAP may insert new data records, but may not overwrite or
delete existing data records.
E: System table with its own namespaces for customer entries.
S: System table, data changes have the same status as program changes.
W: System table (e.g. table of the development environment) whose data is
transported with its own transport objects (e.g. R3TR PROG, R3TR TABL, etc.).
Buffering
Single-record buffering
With this kind of buffering, only the records of a table which
are actually accessed are loaded into the buffer.
Generic buffering
In a read access to a record of a generically buffered table, all
the records whose left-justified part of the key (generic area)
corresponds are loaded into the buffer.
Full buffering
With full buffering, either the complete table or none of the
table is in the buffer. If a read access is made to a record, all
records of the table are transferred to the buffer.
Indexes
Primary Index
Theprimary indexcontains the key fields of the table and a
pointer to the non-key fields of the table.
The primary index is created automatically when the table is
created in the database.
Secondary Index
The secondary index is created by developer.
This is necessary if the table is frequently accessed in a way
that does not take advantage of the sorting of the primary
index for the access.
Structures
Logical Elements
Do not exist at Database layer
Append
Creates a new structure
Include
Imports an existing structure
Day 5
Types of tables
Views
Search Helps
Lock Objects
Types of Tables
Transparent Table : Exists with the same structure both in
dictionary as well as
data and fields.
the
database
in which all
records from the pooled tables assigned
Field
Data type
Description
to
the table CHAR(10)
pool are stored.
Tabname
Name of pooled table
Varkey
CHAR (n)
Contains the entries from all key fields of the pooled table record as a
string. The maximum length for n is 110.
Dataln
INT2(5)
Vardata
RAW (n)
Contains the entries from all data fields of the pooled table record as a
string. The maximum length n depends on the database system used.
Field
Data type
Description
CLKEY1
CLKEY2
...
...
...
CLKEYn
Pageno
INT2(5)
Timestamp
CHAR(14)
Time stamps
Pagelg
INT2(5)
Vardata
RAW (n)
Contains the entries from the data fields of the assigned cluster tables as a
string. The maximum length n depends on the database system used.
Views
Its a virtual table containing the fields from one or more tables.
Types
Database views They are implemented with an equivalent view on
the database.
Projection views Projection views are used to suppress or mask
certain fields in a table (projection), thus minimizing the number of
interfaces.
Help views They can be used as a selection method in search helps.
Maintenance view It permits you to maintain the data distributed on
several tables for one application object at one time.
Database views implement aninner join. The other view types
implement anouter join
Search Helps
Search helps are objects to assign input help (F4 Help)
to screen fields.
It displays the list of all possible input values for a
screen field using input help.
Simple and Collective Helps
Lock Objects
Lock objects are use in SAP to avoid the inconsistency at the time
of data is being insert/change into database.
Types of lock objects
Read Lock(Shared Locked) - It protects read access to an
object. The read lock allows othertransactions read access but
not write access tothe locked area of the table.
Write Lock(exclusive lock) - It protects write access to an
object. The write lock allows othertransactions neither read
nor write access to the locked area of the table.
Enhanced write lock (exclusive lock without cumulating) It
works like a write lock except that the enhanced write lock
also protects from further accesses from thesame transaction.
Day 6
Open SQL
Joins
Bypassing Buffer
Loops
Looping on Internal Tables
Nested Loops
Better practices to looping
Cautions to be exercised when looping (mxn)
Day 7
Control Break Processing
Include program
Subroutines
Function Modules
Include Program
Aninclude programis a program in which the contents
are designed to be used by another program.
It is not usually complete all by itself. Instead, other
programs use the code the include program contains by
copying the lines of code from the include program into
themselves.
The copy is performed at runtime via
theincludestatement.
Include Program
The following is the syntax for theincludestatement.
INCLUDE ipgm.
where ipgmis a typeiprogram.
Subroutines
Subroutines are procedures that we define in an ABAP program and
can be called from any program.
Subroutines are normally called internally, i.e. called from the same
program in which it is defined. But it is also possible to call a
subroutine from an external program.
A subroutine can be defined using FORM and ENDFORM statements.
FORM <subroutine name>
...
ENDFORM.
Function Modules
Function modules have a special screen used for
defining parameters-parameters are not defined via
ABAP/4 statements.
Passing Parameters to FM
Import parameters: Variables or field strings that
contain values passed into the function module from the
calling program. These values originate outside of the
function module and they are imported into it.
Export parameters:Variables or field strings that
contain values returned from the function module.
These values originate within the function module and
they are exported out of it.
Passing Parameters to FM
Changing parameters:Variables or field strings that
contain values that are passed into the function module,
changed by the code within the function module, and
then returned. These values originate outside the
function module. They are passed into it, changed, and
passed back.
Table parameters: Internal tables that are passed to the
function module, changed within it, and returned. The
internal tables must be defined in the calling program.
Day 8
Change Request
Authorization
Change Request
Customizing request
Workbench request
Checks before releasing the CR
Consistency Check
Inactive objects check
Authorization
Authorization objects are used check whether the user
is having an authorization to runa particular
transaction.
We assign authorization objects to a role with specific
ACTVT type.
AUTHORITY-CHECK is the statement used in an ABAP
Program to perform an authorization check against an
authorization object.
PFCG - ROLE MAINTENANCE
Tcode to manage roles and authorization data