Académique Documents
Professionnel Documents
Culture Documents
The R/3 Basis System is the platform for all applications (logistics, FI, HR
etc) in R/3 System
There are 3 parts :
A. Position of Basis System within R/3 System
• Logical View
• Software Oriented view
• User Oriented view
B. Application Server
• Structure of application server
• Dispatching dialog steps
• Dispatching and Programming models
C. Work Processes
• Structure of Work Processes
• Types of Work Processes
Data objects:
A data object is a part of the repository whose content can be addressed and interpreted by
the program
Physical units with which ABAP statements work at runtime.
Contents occupy memory space in a program
ABAP Statements access the contents by addressing the name of the data object
ABAP Statements can write the contents of Data object in report or in the database and also
pass/receive from routines and can be changed by assigning new values
Declare objects statically or dynamically
ABAP Data object has a set of technical attributes, defined at all times when the ABAP
program is running
Data Types
Data Types can be defined independently,
The definition of a user-defined data type is based on a set of predefined elementary data
types.
Define data types either locally in the declaration part of a program using TYPES Statement
or globally in the ABAP Dictionary.
Use own data types to declare data objects or to check the types of parameters in generic
operations.
Data types can be divided into Elementary, Reference and Complex types.
Elementary Types: are fixed or variable length that are not made up of other types.
The difference between variable length data types and fixed length data types is that the
length and the memory space required by data objects of variable length data types can
change dynamically during runtime, and that these data types cannot be defined irreversibly
while the data object is being declared
Control statements
1. Flow Control
2. Logical Expressions
3. Conditional Statements
Flow of Control
1. External Flow: Events triggered by user or the system
2. Internal Flow :Control of processing sequentially within a program at one event,
Logical conditions and loops
• Internal control is processing guided by branching (like IF and CASE) and Looping
(DO and WHILE) in a program.
• External control is processing guided by events such as user input.
• Logical Expressions include using NOT, AND, and OR Operators.
• Logical Expressions are similar to those in other computer languages and can be
specified by either alphabetic or symbolic relation operators such as EQ or =, NE or
<>, LT or <, LE or <=, GT or >, GE or >= etc.,
• IF/ELSEIF/ELSE/ENDIF Implement conditional logic for arbitrary conditions.
• CASE/WHEN/ENDCASE implement conditional logic according to fixed set of possible
values.
• A DO loop repeats processing either a fixed number of time or until an EXIT condition
is encountered.
• A WHILE Loop Repeats processing as long as a logic expression is true or until an
EXIT condition is encountered.
• An EXIT Statement is used to leave a loop or a current subroutine.
• Logical Expressions include using NOT, AND, and OR Operators.
• Logical Expressions are similar to those in other computer languages and can be
specified by either alphabetic or symbolic relation operators such as EQ or =, NE or
<>, LT or <, LE or <=, GT or >, GE or >= etc.,
• IF/ELSEIF/ELSE/ENDIF Implement conditional logic for arbitrary conditions.
• CASE/WHEN/ENDCASE implements conditional logic according to fixed set of possible
values.
• A DO loop repeats processing either a fixed number of time or until an EXIT condition
is encountered.
Internal Tables
• Internal table is a very important concept in ABAP/4 programming
• Internal Tables are local tables within a program containing a series of lines having
same data type
• ABAP Open SQL allows single field, range of fields, entire database table or view into
an Internal table
• Internal table is a dynamic sequential dataset in which all records have the same
data structure and a key
• Internal tables are used for fetching large volume of data from the database, storing
in ABAP working memory line-by-line and processing within a program
• Although Internal tables are declared with the other data objects, at runtime they
behave as dynamic objects
• Internal tables provide a means of taking data from a fixed structure and storing it in
working memory in ABAP
• Data is stored line by line in memory, and each line has the same structure
• A particularly important use for internal tables is for storing and formatting data from
a database table within a program
• The number of internal tables in a program must be kept minimum as possible .
• Creating an internal of standard type and going to process small amount of data its
better to declare a internal table directly using DATA statement
• Try to avoid using internal table with header line; declare a separate work area
compatible to the internal table line type .
• Always try to use the system fields when you processing the internal table entries
within the loop
• APPEND statement always adds to the last line of the internal table whereas MODIFY
changes entry that is already in the table.
• Using internal table within a loop that behaves differently at each pass make sure
that you have cleared the header line or work area
• Use the appropriate statements for Standard, Sorted and Hashed Tables
• SY-SUBRC – This is common to all the statements in ABAP. This system field is set to
0 when the statement is executed successfully else it is set to 4.
• SY-TABIX – This system field contain the current line of an internal table. The
internal table must of either Standard or Sorted table. For Hashed table this field is
not set. As this field is set only for Index tables SY-TABIX is set to the index for the
following operations- Append, Collect, loop at and Read.
• SY-TFILL – contains the number of lines in the internal table
• SY-TLENG – contains the length of the lines in the internal table
• SY-TOCCU – contains the initial amount of memory allocated to the internal table.
Modularization:
• improve program structure
• make the program easier to maintain and update
• improve readability
• reduce redundancy
• allow for component reuse
• event processing
ABAP is an event driven language. The processing associated with each event is
written in a program module
• Types of modules in an ABAP program
Subroutines : internal subroutines - source code is in the same ABAP program as
the calling procedure
External subroutines - source code of external subroutines is in an ABAP program
other than the calling procedure
Functions: stored in central library
offer a defined interface
Event handling code blocks