Professional Documents
Culture Documents
1) ERP
Enterprise Resource Planning
It's purpose is to manage any company functions.
2) SAP
SAP - system application and products for data processing.
SAP - system application and products in data processing.
3) History of SAP
SAP introduced by SAP AG in 1972 at Walldorf.( Germany)
SAP is a german based product.
4) Features of SAP
a)It is an integration of all functions in to one common software.
b)It is a Multi-lingal software.
C)It is a user-based license aggrement.( requires user name and password)
6) ABAP/4 ->
Advanced business application programming language.
It is a 4th generation language.
ABAP lies on application Layer.
7) Modules of SAP->
Functional Modules
Technical Modules
Techical Modules->
SAP BASIS
SAP ABAP
SAP BIBO( Business Intelligence , Business Objects) -> Reporting tool
Data Dictionary
6) Data Class -> Tells us in which portion of database the data will get store.
7) Size Category -> A table can store how many number of records.
( Data/Record/Row/Tuple will be always in the primary key table, It may or may not
in the foreign key table)
Cardinality -> Number of records in key table, correponds to how many number of
records in to secondary/foreign key table.
Structures
Structures -> Is a collection of fields/columns of different data type or similar
data type.
Differnce between table & Structure -> Table has data , Structure does not have any
data.
1) Transparent table - Thers is 1:1 relationship between the ABAP dictionary and
the database.( One table in ABAP dictionary corresponds to one table in database)
2) Pooled table - There is N:1 relationship between the ABAP dictionary and the
database.( Many tables in ABAP dictionary corresponds to one table in database)
3) Cluster table - There is N:1 relationship between the ABAP dictionary and the
database.( Many tables in ABAP dictionary corresponds to one table in database )
Structure of a Pooled table at the database layer - Tabname Varkey Dataln vardata
Structure of a cluster table at the database layer - Key Pageno Vardata
Types of Buffering
Advantage -> Number of Iterations between Application and database layer will be
significantly reduced
Disadvangate -> It will occupy more memory on the application Layer.
A table which stores transaction data should not be opted for Full buffering.
The numbers of key field for a generic area buffering is less than the primary keys
of the table.
INDEX
Types of Index -> 1) Primary Index -> Primary Key Will act as a Primary Index.
2) Secondary Index -> Based upon the requirement , We will
create secondary Indexes.
Index will store like this - Table name~Index name( Example - ZEMPTABLE~ABC , Where
ZEMPTABLE is table name , ABC is Index name).
Index for all database systems-> Index will be created on all the databases.
Index for Selected database systems-> We can choose database, where we want to
create the index.
No database Index-> Index will remove from the database, It's definition will be
there.
Views
Differece b/w table and View -> Table has data. View does not have any data.
Q-2 : What is the difference between Database View and Help View?
Answer : We can display the contents of Database View. We can not display the
contents of Help View.
Search Help
Search help -> It is also called as F4 help. It's purpose is to display the various
Types of Search Help -> a) Elementary Search help-> Single search help.
b) Collective search help-> It is a combination of
elementary search helps.
Selection Method -> It is the name of he table of name of the view from where we
are fetcing the data.
SDI's -> It's purpose is to make any field in the read only mode.
Exporting -> To Export the values from the list position to the screen fields.
ABAP Programming
Pretty Printer -> for Proper Indentation. Makes the code easy to read.
Q-2 : If we are passing only a low value in Select-option, what is the relational
operator?
Answer : EQ
Q-3 : If we are passing only a low value and High value in Select-option, what is
the relational operator?
Answer : BT
Internal Table - Temperory storage on the application Layer.( Can store any number
of records at run time)
Work area - Temperory storage on the application Layer.( Only one record at
run time)
1) Standard Internal table -> Simplest Internal table(based upon Linear Search -
Sequential Search).
2) Sorted Internal table -> Binary Search( It will search for middle element, in
the upper half the values will be less than the middle element,
In the lower half the values will be
greater than the middle element).
3) Hashed Internal table -> Hash function( Hashing- It will directly return the
address of the record)
Categories of Internal
table
1) Internal table with header line -> Implicit(Internal) work area. SAP will
automatically create the work area.
Work area name is same as that of internal
table.
Obsolete now
As work area name is same as that of internal table, So clear and REFRESH have
differnet meaning in Internal table with HEADER LINE.
As work area name is differnet from Intenal table name, so both CLEAR and REFRESH
is used to clear the contents of Intenal table.
SY-TABIX -> It is a system variable . It retruns the current line index inside a
loop.
If and Case
Statments( Conditional statements)
Case is always much more efficent ....because while you are using ELSEIF
condtion ...it will check all the condition ...untill it will get get a true
condtion ...
while you are using case...it will only go to the true condtion
1) Never Use * , Make a structure of those columns which are required in the
output.
2) Fetching sequence should be same as that of structure sequence, otherwise type
mismatch or wrong output will be there.
3) Fetching sequence should be same as that of Data Dictionary sequence.
4) Where condition sequence should be same as that of Data Dictionary sequence.
5) Never use corresponding keyword.
6) Use Binary Search in Read table.
7) For Fetching data from Foreign key tables/depenedent tables - check for SY-SUBRC
condition.
8) Use Paraller cursor in Nested loops.
Paraller Cursor -> It's purpose is to achieve performance in case of nested loops.
INCLUDE PROGRAM
INCLUDE Program -> We can create with the help of SE38 transaction code. It is not
an executeable program. We can reuse Include program.
Function Module
Function Module -> It is a reuseable component. We will create only once and we can
use at several places. It is an example of Modularization technique.
Attributes - It provides the generic infomation about the Function Module.( Date,
User name, Function group name , Package name).
Import - Input
Export - Output
Changing - Input/ Output.
Exceptions - It's purpose is to raise the exception/Error.
Source Code - It's purpose it to write the logic.
SUBROUTINES
We can not change the sequence of TABLES USING CHANGING, but If one is not required
, We can skip it.
PERFORM ( PERFORM NAME) IN PROGRAM ( PROGRAM NAME) TABLES USING CHANGING IF FOUND.
Answer : Include Program does not have any Interface( No Input/Output Provison),
But the Function module has a Interface.( Input/ output provison with
Answer : Include Program does not have any Interface( No Input/Output Provison),
But the Subroutine has a Interface.( Tables, Using, Changing)
Function MOdule : We can check the output of Function module using F8.( We
can independently run a Function module to check the output)
Subroutines : We can not run a subroutine independently.
LOOP -> To read the records one by one from the Internal table.
READ TABLE-> It will read the first matching record from the Internal Table.
APPEND -> Which Inserts data to internal table.
DESCRIBE TABLE -> It will retrun the number of records in the internal table.
Syntax : DESCRIBE TABLE (name of the internal table) LINES ( varibale name ) .
COLLECT -> It will make sum of amount values, based upon unique character values.
Example :
Company name Department Amount
Capgemini HR 10000
Capgemini Admin 20000
Capgemini Training 10000
Capgemini Admin 10000
Capgemini HR 20000
AT FIRST -> It will trigger for the first iteration of the Internal table.
AT LAST -> It will trigger for the last ireration of Internal table.
AT NEW <FIELDNAME> -> Statements will execute for a group of records, having the
same value for field name, but for the first time.
AT END OF <FIELDNAME> -> Statements will execute for a group of records, having the
same value for field name, but for the last time.
Transaction Code
Message class
Syntax :
MESSAGE E000(ZMSG_88).
Where
Message = Pre-defined keyword.
E = Message Type
000 = Message Number
ZMSG_88 = Message Class.
Answer : & -> Operator which is used to pass values to a message number.
Answer : 4.
Debugging
Debugging - 1) Debugging is a technique by which we can find the error, Correct the
error and detect the error.
2) SAP Debugger is a part of ABAP workbench only.
Ways of Debugging - 1) Put the breakpoint on any executeable statement and program
will automtically stop at that point.
2) We can debug the code with the help of transaction code /h.
Various Features in Debugging Mode -> 1) Change the contents of selected rows.
2) Delete Selected rows.
3) Delete all rows( Delete complete table)
4) Append Row
Put the Breakpoint on Keywords in Debugging Mode- Example - SELECT, CALL FUNCTION ,
MESSAGE
Deleting and deactivating breakpoints -> Deleting - Permanently deleting the
breakpoints
Deactivating - Temerory deleting the
break-points in that particular session.
When the program again
runs, the breakpoints will be there.
Break-points limit = 30
Watch point limit = 10
Syntax : BREAK-POINT
String Operations
4) CONDENSE NO-GAPS -> Used to remove the leading space , trailing space and spaces
between the individual strings also.
5) FIND -> FIND statement is used for finding occurrences of a pattern within a
string.
7) TRANSLATE -> The TRANSLATE statement converts characters into upper or lower
case.
8) SHIFT -> This command is used to shift the contents of a string. It shifts a
string by a given number of places.
Syntax : shift s_field [ by n places ] <mode>( By default mode is LEFT)
Example : SHIFT lv_data BY 5 places LEFT/RIGHT/CIRCULAR.
Lock Objects
Locking -> If mutiple users want to change the data at the same time , then at a
time only one user can change the data.
Lock Modes : 1) Read Lock( Shared Lock , S) - Others user can view the data, but
can not changed the data.
2) Write Lock( Exclusive lock , E) - Others user can not view the data
and can not changed the data.
3) Enhanced Write Lock( Exclusive lock without cumulation) - Others
user can not view the data and can not changed the data +
It
protect the further access for the same transaction.
1) SAP SD -> Sales Order - VBAK( Sales Document Header) , VBAK( Sales document
Item)
Invoice - VBRK(Invoice Header), VBRK( Invoice Item)
2) SAP MM -> Material Master -> MARA( Material data) , MAKT( Material Description)
The program in which we are displaying the output with the help of WRITE statement
is called as classical report.
2) AT Selection Screen -> This events calls when user performs some action( Enter,
F4 etc) on to the selection screen.
It's purpose is to validate the Input.
3) START-OF-SELECTION -> This events calls when user clicks execute button on the
selection screen.
The selection logic is the part of this event.
4) END-OF-SELECTION -> This Event calls when selection process ends.( Call after
End of data/Records).
6) END-OF-PAGE -> The pupose of this event is to provide footer or some information
at the end of a page.
Pre-requisite : We need to provide LINE-COUNT.
Example - LINE-COUNT 5(2) -> It means end of page event will trigger after 3
lines of data and 2 lines are reserved for the footer.( Total : 3+2 = 5).
The syntax to create own personal function( PF-STATUS) -> SET PF-STATUS 'STAT'.
( STAT is the name of PF-status)
1) AT USER-COMMAND -> When user clicks on the button created by PF-status, at that
time AT USER-COMMAND Event is triggering.
system variable for User command -> SY-UCOMM.
2) AT LINE-SELECTION-> When user double clicks on the line or select a line and
press F2, at that time AT LINE-SELECTION event will trigger.
Q-1 : If we are not specifying any event, then by default which event is calling?
Answer : START-OF-SELECTION.
Q-5: Will AT USER COMMAND and AT LINE SELECTION can work simultaneously in one
program?
Answer : Yes, You need to Put - PICK for F2, in Recommended Function key settings.