Beruflich Dokumente
Kultur Dokumente
Weitergabe und Vervielfltigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in
welcher Form auch immer, ohne die ausdrckliche schriftliche Genehmigung durch HCC TU Mnchen nicht
gestattet. In dieser Publikation enthaltene Informationen knnen ohne vorherige Ankndigung gendert werden.
Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint und SQL Server sind eingetragene Marken der
Microsoft Corporation.
IBM, DB2, OS/2, DB2/6000, Parallel Sysplex, MVS/ESA, RS/6000, AIX, S/390, AS/400,
OS/390 und OS/400 sind eingetragene Marken der IBM Corporation.
INFORMIX-OnLine for SAP und Informix Dynamic ServerTM sind eingetragene Marken der Informix Software
Incorporated.
UNIX, X/Open, OSF/1 und Motif sind eingetragene Marken der Open Group.
Citrix, das Citrix-Logo, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, MultiWin
und andere hier erwhnte Namen von Citrix-Produkten sind Marken von Citrix Systems, Inc.
HTML, DHTML, XML, XHTML sind Marken oder eingetragene Marken des W3C, World Wide Web Consortium,
Massachusetts Institute of Technology.
JAVASCRIPT ist eine eingetragene Marke der Sun Microsystems, Inc., verwendet unter der Lizenz der von
Netscape entwickelten und implementierten Technologie.
SAP, SAP Logo, R/2, RIVA, R/3, SAP ArchiveLink, SAP Business Workflow, WebFlow, SAP EarlyWatch, BAPI,
SAPPHIRE, Management Cockpit, mySAP, mySAP.com und weitere im Text erwhnte SAP-Produkte und
-Dienstleistungen sowie die entsprechenden Logos sind Marken oder eingetragene Marken der SAP AG in
Deutschland und anderen Lndern weltweit. MarketSet und Enterprise Buyer sind gemeinsame Marken von SAP
Markets und Commerce One.
Alle anderen Namen von Produkten und Dienstleistungen sind Marken der jeweiligen Firmen.
Die Verwendung der Screenshots wurde mit dem jeweiligen Eigner abgesprochen.
ABAP Course
Agenda
1.
2.
3.
4.
Authorizations
Lock objects
Logical units of work
Updater
ABAP Course
Authorizations
Before starting a program user authorizations should always be
checked
But: authorizations are not checked by the system
Every ABAP program has to check authorizations by itself
Different authorization levels: READ (01), CHANGE (02),
DELETE (03) for every data set
Transaction: SU03
ABAP Course
Locking concept
What happens when several users want to work on the same
data set? data inconsistency
Lock objects prevent simultaneous changes on data set
Beside the lock concept of the database, SAP implements its
own lock concept
SAP does not use the databases lock concept
Deadlock:
May occur when two programs wait for each other to lock data
set
Rare
ABAP Course
Locking concept
Modes:
1. Read lock = shared lock
Locks data set for reading
Several shared locks may exist on one data set at the
same time
Prevents the SAP system from creating an exclusive lock
on a data set
2. Write lock = exclusive lock
Locks data set for writing/changing
No shared locks, only one is allowed at the same time
First come, first serve
ABAP Course
Locking concept
Creation of a lock object:
Creation can be done in data
dictionary (SE11)
One lock object per database table
Lock objects are generated
automatically by using the
primary key
There is only one lock object
dealing with all lock modes
ABAP Course
ABAP Course
Activate
Function
Function
ENQUEUE_ESFLIGHT
DEQUEUE_ESFLIGHT
ABAP Course
ENQUEUE parameters
Parameter
Value
Meaning
mode_<tabname
>
S
X
_wait
SPACE
X
_collect
SPACE
X
ABAP Course
10
Process
after input
(PAI) 100
Commit
Dynpro
100
User input
Scenario:
Scenario:
What
Whathappens
happensififaabreakdown
breakdownofofthe
the
SAP
system
occurs
in
the
middle
of
SAP system occurs in the middle ofthe
the
transaction?
What
happens
to
the
data?
transaction? What happens to the data?
ABAP Course
Process
before
output
(PBO) 200
Process
after input
(PAI) 200
Dynpro
200
User input
11
Problem:
New data sets are transferred into the database
by each screen
Only if last screen of the program is reached and
all data sets are written to the database the data
are correct
Solution
Updates to database are written to the updater
process
Only when last screen of the program is reached,
the updater receives a trigger to write data to
database (commit) or to dismiss (rollback)
ensures data integrity
ABAP Course
12
Schema:
Protocoll table
Data
Data
Data
Data
Data
deletes
Work process
Program
Lock data set
Work process
Updater
4
Database
ABAP Course
13