0% found this document useful (0 votes)
52 views49 pages

1.what Is Sap?

jd

Uploaded by

praveenan9611
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views49 pages

1.what Is Sap?

jd

Uploaded by

praveenan9611
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

1.WHAT IS SAP?

Sap stands for system, application and products.

Sap is a German based multinational s/w company developed in 1972.

Erp s/w developed or maintained by sap application, sap is a s/w supplier.

Sap deals with public sector, banking sector, education, healthcare etc.

2.what is ERP?

Erp stands for enterprise resource planning, ERP is the business management s/w developed in many
business houses for increase their productivity and performance . It is the business tool used for collect,
store, manage and interpret the data to many business activities like product planning, cost ,
manufacturing ,shipping or payment etc.

3.what is domain?

Domain is one of the object of DDIC, it specifies the technical attributes like data type ,data length and
instead of that sign and naming convention and value range.

4.what is datatype?

Datatype is one of the object in ddic, it specifies the semantic information like field level(short, medium,
heading or long) or field description for a field.

5.what is data class?

Data class specifies the physical area of the table inside the database. and we have required option

APPL0:=MASTER DATA (TRANSPARENT TABLE)

APPL1:-TRANSACTION DATA(TRANSPARENT TABLE)

APPL2:=ORGANIZING AND CUSTOMIZING

6.what is ddic?

Ddic stands for data dictionary, it contains all the metadata of the data of sap system, and it used for
logon the sap system.IT IS GLOBAL REPOSITIRY

Objects of ddic:-

1.database table:=database table stores the data in the form of rows and column, rows we basically
called record and column we called field.

2.view:-view is one of the object in ddic, using view we can see the data of multiple tables in one place,
view does not contain any physical memory it holds the data at run time, and it’s a virtual table there
are 4 types of view.
projection Database help maintenance
We use a single table in Database view is the Help view is specifically Maintenance view
projection view, we can general view for one or used for search help used for maintain the
see the particular field more tables. object and we cant table and we use tmg
and rest we can filtered execute help view. for that.
out.
In projection view we We only read the data We only read the data We can read or also
can read or also in database view, we in help view, we can’t maintain the data in
maintain the data. can’t maintain. maintain. maintenance view.
There is single table, so We use inner join for We use outer join for We use LEFT outer join
no need of joins. database view. help view. for maintenance view.
TMG:-

TMG stands for table maintenance generator.

The main purpose of tmg to maintain the table without writing any code.

For maintenance view we use tmg.

Tcode for tmg is SM30.

3.Data type: -data type means the type of variable.

There are 3 parts of datatype: -

1.Data element:-data element specifies the semantic information like field description, field level etc.

There are two ways we can create data element.

1.elementary type

2.reference type
2.Structure: - structure is the collection of fields and structure stores one value at a time, structure is
like a table but it does not have primary key or technical characteristics.
Structure is composed of data elements, table types and tables, and the composed components are
elementary type, structure type, table type or reference type.

Include append
We can insert the field in between the fields In append structure we can insert the field will
using the included structure. always be in last.
We use custom tables for include structure. We use standard tables for append structure.
Just give the field name as. include and data Click the append structure option to create a
element name as structure name. structure to add a field.
These are reusuable and we can include multiple These are not reusuable and we cant append
no. Of custom tables.IT IS GLOBAL. more than one standard database table.IT IS
LOCAL.
3.Table type: -it is like a global internal table and it provides global visibility.
A table type is a type that describes the structure and functions of an internal table in
the ABAP program.
A table type is a type that describes the structure and functions of an internal table
in the ABAP program
4.Type group:- type group is a container.

There are several type groups available in SAP. For example ‘ABAP’ and ’SLIS’ etc. To
use them in program we use key word ‘TYPE-POOLS’. It allows us to define non-
predefined types. Combination of all such non-predefined types is knows as type-pool
or type-group. In simple terms, if we want to use some custom types in various
programs then we need not define them separately, we can simply create a type group
in ABAP dictionary and use that in our programs.
5.Domain: -domain specify the technical attributes for a field data type and data length.

And signs, naming convention, value range and fixed values.

6.search help:- search help is another object of data dictionary, it gives all the possible value for the
field in the form if list. And it contains a popup window which have all the related data according to your
search. It have f4 help

There are two types of search help:-

1.elementary search help:- elementary search is a search path and it gives input help
We can give elementary search help for only single fields of a single table , it have selection method.
2.collective search help:= collective help search is the collection of elementary search help, and we use
more than one fields from various table. when we want data from multiple selection criteria.

Selection method:-it is one of the structure of elementary search help and we can give elementary
search help name as database table name and view name.

Hot key:-it is also another structure of elementary search help, we use hot key for specify that
elementary search help in collective search help.

Any alphabetical letter we can give for hot key.

Search help exit:- A search help exit is a function module that has a predefined interface. A
search help exit is called at certain times by the help processor. The administrative data of the
help processor is passed to the search help exit using the interface.
7.lock object:- lock object is the last object of ddic, we use lock object primarily for synchronization
tasks. When more than one program tries to access the same data there is need one lock for the data.
So that there is no inconsistency found in our saved data.

There are two types of lock present in lock object.

1.table level lock:- we will lock the entire table in table level lock.
2.row level mode:- we will lock a particular row of the table in row level lock, other rows are free and
being used in other applications.

There are several modes present in lock object.

1.shared lock mode:- in this lock one user can edit but multiple user can read the data and it is
represented by ‘S’.

2.write/exclusive lock mode:-in this lock only one user can edit as well only one user can read the data,
it is represented by ‘E’.

3.Optimistic lock mode:-in this only the user have access only for first time to read and edit the data.

After that there is restriction to the user, it is represented by ‘O’.

4.Exclusive but not cumulative: - in this lock multiple user can read as well as multiple user can edit the
data, it is represented by ‘X’.

Functional module in lock object: - there is two types of functional module for lock object.

1.enqueue: -enqueue used for setting or insert the lock in the object.

2.dequeue: -dequeue we used for release the lock from the object.

For table level we have inbuilt call function for inserting or releasing the lock “ENQUEUE_E_TABLE” or
“DEQUEUE_E_TABLE”.

But for row level we have to give the module name like “ENQUEUE_<LOCK OBJECT NAME> OR
“DEQUEUE_<LOCK OBJECT NAME>.

7.Difference between all the tables:-

Transparent tables Pooled tables Cluster tables


1.transparent tables have one- 1.pooled tables have many-to- 1.cluster tables have many-to-
to-one relationship. one relationship. one relationship.
2.secondary index can be 2.secondary index can't be 2.secondary index can’t be
created. created in pooled table. created in cluster table.
3.it stores master data. 3.it stores system data. 3.it stores system data.
4.it contains a single table. 4.it holds large no. Of table with 4.it holds less tables with more
less information. information.
5. it have only one table. 5.it contains more table than 5.it contains less table than
table cluster. table pool.

8.What Is SNRO?

SNRO is a transaction code for giving the number range object, it is used for maintaining the number
range for business objects like controlling documents(co) , accounting document (Fi) and sales order etc.
Whenever we enter that code SAPMSNRO is a sap standard program present in SZN package will
automatically generated in the background, we use snro for automatically generated the value.

9.what is index?

Index in the database table helps to speed up the selection of rows.

We can consider an index as copy of database table that used to reduce the certain fields.

That copy is generated at the time of index creation and it is generated in sorting order that makes our
selection process faster.

There are two types of index present:-

1.primary index:- primary index are collection of primary key fields means the values are unique and
duplicates are not allowed.

Primary index generated automatically at the time of table creation.

2.secondary index:-we use secondary index for non key fields that means it may have duplicates.

Secondary index will do sorting then binary search for compare and fetching the values.

index Extension index


We can modify the standard We cant modify the standard
tables. tables.
When the version is changed When the version is changed
our data will be lost. our data will be present.

10. What is delivery class?

Delivery class controls the flow of data from one server to another server, and delivery class decides
what type of data stores in the table, that data can be business data means application data( master
data and transaction data). There are several options like

A ---- Application table( master data, transaction data)

C ----Customizing table

L --- Table stores the data temporarily

11.what is foreign key?

Foreign key are used to establish the relation between various table in ABAP dictionary. Foreign key
links two tables by assigning foreign key field of one table to primary key field of another table. Foreign
key connects two or more different tables for doing table validation and for avoid redundancy.

Requirements:- the field of check table used for validation must be the primary key field.

And that primary key field and foreign key field must have same data type and same data length.

Check table Value table


1.it contains all the valid entries for field. 1.it contains all the valid entries for a domain.
2.it is a field level validation. 2.it is a domain level validation.
3.it uses foreign key relationship. 3.it uses proposal for a check table when foreign
key relationship is generated
4.foreign key relationship is not automatic. we 4.foreign key relationship is automatic means
must have to give the check table name. when we maintain the value table foreign key
relationship is automatically generated.
5.it does not have f4 help. 5.it have f4 help.
12.What is landscape?

Landscape is a system server or application server or we may call it architecture of server and landscape
arranging the sap server for the company.

Development :-A server where all the sap consultants will be developing the real time objects for the
business requirements I.e. called development server, once the development is done we should do a
sample testing called unit testing.

Quality:-=A server where the functional consultants or testing consultants testing the developed objects
I.e. called testing server or quality server.

Production:-A server where all the developing objects will be used in the live business market for the
maintenance of business I.e. called production server.

Q.13 What is conversion routines?

Conversion routines are also called as conversion exits.


It is used to convert the field to either in display format to sap internal format or sap internal format to
display format.

------------------------------------------------------------------------------------------------------

**************************************************************

--------------------------------------------------------------------------------------------------------

->WHAT IS INTERNAL TABLE ?


Internal table is a temporary table that is created and used during the program
execution and deleted before the program terminated. Internal tables are used to store
the dynamic data that sets from a fixed structure in the main/working memory in ABAP.
The life time of the table is until end of the program execution.
There are two types of internal tables.

1.index---------1. standard internal table

2.sorted internal table

2.hased
1.standard internal table: -
Standard table have duplicate also ,we cant declare standard table as unique and it will do
linear search and it will not in sorted order .
2.sorted internal table:-

It may have duplicate records or it may not have and we have to declare key field and fill the
data using insert keyword ,it will do sorting and binary search .

3.hased internal table:-


It can't have duplicate records and we have to specify unique key and it will do hashing.
Internal tables − Internal tables are a means of storing data in the fixed format in working memory
of ABAP. The data is stored line by line. So it is necessary for the data to be in a fixed format.
Generally, they are used to store data in database tables to be used in ABAP programs.

Structures− Structures are basically data objects consisting of various components or fields of
any data type. It differs from the tables in a way that it simulates the format of the table and is used
to hold one row of data whereas table has multiple rows of data.
Work-Areas − Work area is basically variables used to store a single row of data. It is similar to
structure apart from the fact that it can only be used at program level whereas structure can be used
at data dictionary level as well.

Q .1 What is debugging and types of debugging ?


Debugging is a tool used to analyze the flow of a program and it used for identifying the bug and find
out the source of errors so using debugging we can rectify the error or make our program error free .

There are 2 types :-

1.New debugger

2.classical debugger

 The new ABAP Debugger runs separately from the main application. This means
that the limitations of the old debugger no longer apply. Running in a different
process, it thus eliminates any side interactions between the debugger and the
debugged application, and also enables debugging for all ABAP coding. An improved
UI and personalization capabilities, in addition, increases the efficiency of the
debugger.

 Classical Debugger (old version)


 Classical debugger open in the same section, it does not support user customized
tabs, it's not supporting comparison of two tables, it is not possible to convert ABAP
scripting of ABAP source code, but it's possible to display SAP memory and ABAP
memory.
 Whereas in New debugger we have to customize user in order to define tabs like
desktop 1,2,3 remaining are standards.
Classical debugger New debugger
1.there are no separate window for debug 1.there are separate window present in new
screen in classical debugger . debug for debugging.

2.advanced techniques like debugging scripting 2.advanced techniques like debugging scripting,
and external scripting are not available in external scripting are available in new debugger
classical debugger . .
3.there is no specific way to add breakpoints 3.we can add breakpoint and watchpoint in new
and watchpoint . debugger .
4. we can’t compare two fields . 4. we can compare two fields .
5.there is no desktop in classical debugger . 5) there is desktop 1 , desktop 2 and desktop 3 .
6. in this it won’t show local and global variable 7.it will provide global and local variable for
for program . program .

2.BREAKPOINT:- A Breakpoint is a signal in a specific line of the ABAP program


that interrupts the normal execution of the program and the control is transferred
to the debugger.
A breakpoint can be active or passive at runtime.
And it tells ABAP run time processing to stop the processing.
Watchpoint is used to watch/monitor variable value during program execution.
Whenever the variable is changed in program, debugger will stop.
DO_SUM:- It is used for finding the grand total of a numeric field .
Object: Display/change objects and classes.
Table: Display/change internal tables.
Structure: Display/change structures.
Single Field: Display/change variables with simple data types, such as C, N, D,
T,STRING,… etc.
Data Explorer: Display very complex data structures in a tree-like fashion.

Session breakpoint External breakpoint


Session breakpoints are therefore no External breakpoints are valid for all user
longer available for implicit new logons. logons to the current server (ECC)of the
current server. And it has the time limit of 2
hours.
A session breakpoint is attached to a
user's session, which exists from the
point in time where the user logs into SAP
until they close their last SAP dialog
window.

breakpoint watchpoint
1. Break-point pauses the program execution at 1. Watch-point indicates the position of a
the point of location where it is marked by the variable with a value as requested by developer
developer. during the program execution.

2. we can use 30 breakpoints. 2. we can use 5 watchpoints in a program.


3. we can create breakpoint before debugging in 3. we can create watchpoint as many we want
report program as well as at current debug session according to our requirement .
.
4. external breakpoints stays at 2 hour but 4.automatically deleted when the
session breakpoint ends at the end of current debug session end .
session .

static dynamic
1. These are not normally user specific; but can be set 1. These are user specific.
for specific users.
2. These cannot be set when the program is 2. These can be set even if the program is locked
locked by another user. by another user.
3. They can be set using the statement “BREAK-POINT” 3. They can be set in ABAP editor and in
and “BREAK <USERNAME>” in ABAP code. debugging mode.
4. These needs to be deleted manually. 4. These are deleted automatically when you log-
off from SAP.

Parallel Cursor in ABAP is a way to modify the conventional nested loop in such a way that the overall
performance of the ABAP program gets improved .

FOR ALL ENTRIES:-


'FOR ALL ENTRIES' is the addition of a select statement. It allows comparing header(parent) internal
table When selecting the item(child) data with internal table-filed in the where condition. Then Data is
retrieved from the item table equal based on the where condition internal table key field.
Left outer join:- The left join causes joins two or more tables and returns all rows from the left table and
matched records from the right table or returns null if it does not find any matching record. It is also known as Left
Outer Join. So, Outer is the optional keyword to use with Left Join.

Syntax:-
SELECT COLUMN-LIST FROM TABLE1 LEFT OUTER JOIN TABLE2 ON
COMMON_COL1 = COMMON_COL2 INTO TABLE <INTERNAL TABLE> .

vt

Right outer join: - The right outer join causes two or more tables to join and returns all rows from
the right-hand table, and only those results from the other table that fulfilled the specified join condition. If
it finds unmatched records from the left side table, it returns Null value. It is also known as Right Outer
Join. So, Outer is the optional clause to use with Right Join.

Syntax:-
SELECT COLUMN-LIST FROM TABLE1 LEFT OUTER JOIN TABLE2 ON
COMMON_COL1 = COMMON_COL2 INTO TABLE <INTERNAL TABLE> .

Inner join For all entries


Use inner join when you join Use FOR ALL ENTRIES when
two DATABASE tables with a you use an internal table as a
common field. selection criterion for
populating data into another
Itab. But before using FOR
ALL ENTRIES check if ITAB1
is not initial.
You will have to use Primary FOR ALL ENTRIES does not
key - Foreign Key relation have this restriction as you
when you want to use a join. pass some internal table and
not a db table.
Join will fetch the records FOR ALL ENTRIES will fetch
based on the equality of keys. the records on the equality of
any fields (key as well as non-
key).

Selection screen:-
Selection screens are special Dynapro's that are not created in
Screen Painter, but rather are generated from ABAP statements. You use
them whenever you want the user to enter either a single value for a field or
fields, or to enter selection criteria.
 PARAMETERS for single fields
 SELECT-OPTIONS for complex selections
 SELECTION-SCREEN for formatting the selection screen and
defining user-specific selection screens.
SELECT-OPTION: -
Select option we used to take user input in range and when we declare select option a standard
selection table with header line and standard key will be generated and that table have 4 fields
SIGN, OPTION, LOW and HIGH.
SIGN: - The data type of SIGN is C with length 1. The contents of SIGN determine for each row whether
the result of the row condition is to be included in or excluded from the resulting set of all rows.
Possible values are I and E.`

I stand for "inclusive" (inclusion criterion - operators are not inverted)

E stands for "exclusive" (exclusion criterion - operators are inverted)

OPTION: -The data type of OPTION is C with length 2. OPTION contains the selection operator.
The operators are EQ, BT,LT,GT, CP,NP etc .
LOW: - The data type of LOW is the same as the column type of the database table, to which the
selection criterion is linked.

HIGH:- The data type of HIGH is the same as the column type of the database table, to which the
selection criterion is linked.

PARAMETERS: -

Parameters we used for take user input for single record.

Q. DIFFERENCE BETWEEN SELECT OPTION AND PARAMETERS?


SELECT-OPTION PARAMETERS
Select-options we used to take user input in Parameters is used to take user input for
range. single record.
Select options gives us a range for selection Only single record we can fetch using
,so we can fetch multiple record or single parameter.
record also .
We can’t specify checkbox and radio button We can specify checkbox and radio button
using select-option. using parameter.
Select-options statement creates a selection The parameter statements does not creates a
table with 4 fields . selection table.
Select-option acts as a internal table with a Parameter acts as a variable .
predefined structure.
If the selection screen field is left blank, then If the selection screen field is left blank, then
all the data from DB is selected. no data is selected.

2.Difference between checkbox and radio button?


CHECKBOX RADIOBUTTON
It is used only when we have one It is used only when we have one option to
or many options to be selected, for be selected from several available options,
for Example, gender, etc.
Example, Hobby.

It is represented as a small square It is represented as small circle


box on the screen. buttons on the screen.
There are three states in the Checkbox. There are two states in the Radio
These areas are Checked, unchecked & button. It can be either true or false.
indeterminate.
We can create only one checkbox also . Arrange radio button as group and we
have to put at least 2 radio buttons in
one group.
Syntax:- parameters: <checkbox_ Syntax:- parameters:
name> as checkbox. <radiobutton_name> RADIOBUTTON
GROUP <group_name>,
<radiobutton_name2> RADIOBUTTON
GROUP <group_name>.
Parallel Cursor:-
 Parallel cursor is a technique to increase the performance of the program when there are nested
loops.
 When there are nested loops, you would need to use the WHERE clause to find the matching
entries from the inner LOOP. The typical WHERE clause would scan entire table to find the
matching key. The cost of finding the one key would remain same for each row in the outer
LOOP. With more entries in the Outer LOOP, the total processing time for scanning the inner
table would add up very fast.
 That’s when you want to use the Parallel Cursor – Read the Key of the inner table, Loop
from that key when entry is found, exit the table when keys are not same anymore.
DIFFERENCE BETWEEN SELECT SINGLE AND SELECT UP TO 1 ROW ?
ZSRN_SEL_SINGLE--->table name

SELECT SINGLE SELECT UP TO 1 ROW


Select Single * will pick up only one Select upto 1 rows will pick up all the records
matching record from the database into the matching the condition into the buffer, but
buffer, and return the same to the internal return the top record to the internal table.
table.
If we know how much no. Of key field If we don’t know how much no. Of key field
present inside the DB table we go for select present inside the DB table we go for select
single. up to 1 row.

It take more time for fetching the record as It take less time for fetching the record as
compare to select up to 1 rows. compared to select single.
Select single will not generate any result set In select up to 1 rows System will generate
and it will hit the database table only one time one result set for storing the matched record
. and it will hit the database table more than
one times even we want only single record .
So performance wise select up to 1 row is better than select single because here we are not using
all the primary key .
In select up to 1 row if we are using work area instead of internal table we have to give endselect
for that select statement.
What is Filed symbol ?types of field symbols?
 Field symbols are placeholders or symbolic names for existing data objects (or parts of existing data
objects), declared by the statement FIELD-SYMBOLS or by the declaration operator FIELD-SYMBOL.
 A field symbol in ABAP is a dereferencing pointer that is mainly used to point specific lines of Internal
table. It can be used to point either a table, a field or a dynamic structure. It is used as an alternative to work
area to reduce the memory consumption and increase the performance of a program.

There are 2 way we declare field symbol:-

1.typed way

SPECIFY WITH ANY DATA TYPE ,STRUCTURE AND TABLE FOR TYPED .

2.generic way

SPECIFY WITH ANY OR ANY TABLE .

2) Difference between Work area and field symbols?


Work area Field symbol
1. Work area is slow because it refers to variable 1. Field symbol acts like a pointer so it is pretty
and it holds single row of record at runtime . fast than WA.
2. if we want to change something using work 2. Field-symbol is assigned directly to the record,
area we have to use modify statement. so u don't need to do a MODIFY statement to
change something.
3. With work are you have to copy the content of the 3. With the field symbol no copy is necessary, it
internal table row to the work area, which can take will only a reference to that line within the
some time if you have long structure. internal table.
4.we don’t have to assign work area it wont 4.we have to assign field-symbol otherwise it will
through error . through run time error .
5.work area allocates memory because we 5.field symbol is only going to allocates
declare work area with data so it allocates memory if there is a record in it.
memory whether it has record or not.
6.it works as pass by value. 6.it works as pass by reference.

Steps for parallel cursor :-


Step 01: Sort both the tables

Step 02: Write the first loop, like the previous way itself.

Step 03: Read the second table with the key that was required to search the data. This would give the first value regarding the

key and also its position in the table [SY-TABIX].

Step 04: If the above step executed successfully, it means data is there in the second table associated with the key. Hence the SY-

SUBRC will be set to zero. In this step we will check the value of SY-SUBRC. If it is zero, than we will proceed.

Step 05: Assign the SY-TABIX value into a local variable. We do this step to preserve the SY-TABIX value as it changes with

the loop.’

Step 06: Now it’s the time to write the second loop. This time we don’t write the WHERE condition. This
time we will write FROM condition with the local variable we initialized above.

Step 07: In this step we check if the key of first table is equal to the key of second table or not. If not,
then exit the loop. This stops the loop from reading non required data.

Step 08: In this step we write our actual logic or print statements. And then close both the loops.

1. What is control break statement & what are the statements we can use
inside loop explain them?
Control Break statements in SAP ABAP are the statements enclosed between AT and ENDAT. These statements
help us to control a loop according to our requirement.
There are several ty pes statements present in sap abap :=

1.AT FIRST - ENDAT


2.AT NEW - ENDAT
3.AT END OF - ENDAT
4.AT LAST - ENDAT
5.ON CHANGE OF-ENDON

1.AT FIRST- ENDAT:-

 At First Will trigger at the first run of the loop.


 it means At First triggers at the first loop iteration
 The main purpose of this control break is to write some header information.
 We can write some header info by using AT FIRST statement

2. AT NEW – ENDAT:-

 At New is one of a control break statements.


 It works inside the LOOP – ENDLOOP.
When we use At new for a field, it will trigger whenever there is any change of fields’ data.
 This statement triggers at the new occurrence of that value.
SYNTAX:- AT NEW<field_name> END AT .

3.AT END OF – ENDAT:-


 At End OF statement always triggers when there is any change of fields’ data.
 This statement triggers at the last occurrence of that value.

SYNTAX:=AT END OF<field_name>END AT.

4.AT LAST – ENDAT:-


 At Last triggers at the last loop iteration.
it means At Last will trigger at the last run of the loop.
 The main purpose of this control break is to write some footer information.
 We can write some footer info by using AT LAST statement.

SYNTAX:- AT LAST …......... END AT .

5.ON CHANGE OF-ENDON:-


 On change of it triggers only when there is any change in the particular field.
 On change of can be used outside the loop too.
 it actually works like AT NEW statement.
 If there is any change of the value of the mentioned field then ON CHANGE OF will trigger.

SYNTAX:- ON CHANGE OF<field_name>….END ON .

2.Diff b/w At new & On change.


AT NEW ON CHANGE OF
1.can only be used with in loop...end 1.can be used in any kind of loop or
loop statements . outside the loop also.
2.we can’t use where expression or 2.we can use where expression or
logical expression in at new . logical(AND , OR) expression.
3.in between (at new....end at) we 3.we can use else clause in between
cant use else clause . on change of ….end on.
4.default value of char= * or for int= 0 . 4.No default value .
5. it will trigger whenever there is any 5.it triggers when there is any
change in all the fields from the left to that
of the particular field.
change in the particular field.

All the operations:-


1.INSERT:- We use insert for insert the value in Wark area to internal
table .
Syntax:- INSERT <work area> INTO TABLE <internal table>.

2.APPEND:- The append statement adds a single row/line in a existing


internal table at last .
Syntax:- APPEND <work area>TO <internal table>.
3.COLLECT:- A collect statement is one that can be used to summarize
datasets or create new ones. A collect statement will sum up work area
details or components into an internal table or to the existing row values if
the key used is the same.
Syntax:- COLLECT<work area> INTO <internal table>.

4.CLEAR:- we clear the work area and internal table records using clear
statement, clear used for internal table and work area also .
Syntax:- CLEAR<work area> .
CLEAR<internal table>.
5.READ:- Read statement will read only single record at a time and not more
than that. Read statement will return Sy-subrc value.
Syntax:- READ TABLE <internal table>INTO<work area> WITH KEY <field
name>= VALUE .
6.MODIFY:- modify used for modify the data of internal table .
Syntax:- MODIFY <internal table>FROM<work area> TRANSPORTING <field name>
WHERE <field name> = value .
7.DELETE:-We can delete one or more records with delete using logical operators .
Syntax:-DELETE <internal table> where <conditions> .
8.DELETE WITH KEY:-

Delete table <internal table name> with table key <key field
Syntax:-
name = ‘___’ >.
9.UPDATE:-
Syntax:- UPDATE <database table> SET<field name> = ‘___’ WHERE <fieldname> =
‘____’.

9.REFRESH:- Refresh will delete all the rows of a internal table. this free up
the allocated memory for internal table .
Syntax:- REFRESH<internal table>.
10.FREE:- The statement FREE deletes all rows from an internal table and releases the
memory area that the rows occupied.
Syntax:- FREE<internal table>
11.DELETE ADJECENT DUPLICATE: - compare values of a column of any table/
internal table and delete the duplicates.
Syntax:-DELETE ADJECENT DUPLICATE FROM <internal table> COMPARING <field
name> .
12.SORT:- we can sort the the internal table using sort keyword .
Syntax:- SORT <internal table> .
13.LOOP:- A loop statement allows us to execute a statement or group of statements
multiple times.
Syntax:- LOOP AT <itab> INTO <wa> .
WRITE:/__________________ .
ENDLOOP .

14.DESCRIBE STATEMENT:-
We use this statement to know how many records present in
our internal table .
Syntax:-Describe table <internal table> lines <fieldname> .
Write :/ fieldname .
15. Difference between free, refresh, clear and delete ?
FREE REFRESH CLEAR DELETE
It will free the It will delete the It will clear the delete the
memory of the records but header of the internal
Internal table and memory will be table records will be required
delete the there. there in internal table. records.
records.

16. Difference between read and loop ?


LOOP READ
We can get multiple entries using loop. We will get only single entries.
loop will read each and every record in the Read statement will read only single record at
internal table. a time and not more than that.
INNER JOINs only look at the intersection of the results that meet the WHERE clause.
FOR ALL ENTRIES eliminates duplicates from the results.

1.What are reports in sap?


Reports in SAP ABAP are used to display the data in a systematic manner or it is used to display bulk
amount of data in a predefined format.

Apap is a event driven programming language means it executes event after event not line after line.

There are 3 types of report :=

1.classical reports

2.interactive reports

3.ALV reports

1.Classical Reports: -

Classical reports are such a report in which we display the entire details in single list or single screen,
means there is single selection-screen and output screen.

Classical report events: -

1.Load-of-program:-
This event is used to load the program to memory for execution .

2.initialization: -

This event is used to initialize the variable means to give some default values.

3.selection-screen output: -

Using this event, we can dynamically change or modify the selection screen.

4.At selection screen on field: -

This event is used to validate the single selection screen input parameter or field .

5.at selection screen value request:-

We can provide value help or search help facilities to a input help .

F4 help.

We have one functional module F4IF_INT_TABLE_VALUE_REQUEST.

6.At selection screen help request: -

To prepare documents for any particular field or for f1 help we have one functional module
“DSYS_SHOW_FOR_F1HELP”.

7.At selection screen: -

It is used to validate multiple selection screen input parameters.

8.start-of-selection: -

This event is used for writing some actual business logic or here we can write all types of select query.

It is also indicating the start of selection screen and it is the default screen.

9.End-of-selection: -

This event indicates the end of the selection screen and here we can display the output .

10.top-of-page: -

It is used to give some header information in classical reports, it won't show header info in interactive, it
is a PBO event.

11.end-of-page: -

It is used to give the footer information in classical reports.

Interactive reports: -

Interactive reports in sap abap are used to interact with the output page and in the list we can double
click and get the detailed information.
And in interactive reports we have an overview list or basis list for the basic information and the number
is 0 and we have sub lists or secondary list for detailed description about data and the number starts
from 1 to 20 so we have total 21 lists.

And these list numbers are stored in sy-lsind system variable if we select line the value will be stored in
sy-lisel .

Interactive report events: -

1.at line selection: -

If we want to trigger secondary list based on basic list we use that event .

When user double click on any list line then at line selection event will be trigger .

There are two ways we can achieve

1.hide technique

2.get cursor technique


HIDE: - It is a keyword which is used to hide the data into a temporary memory called as hide area for further processing. We
use the hide statement within the loop…. end loop, so that the HIDE keyword will hide the values into hide area.

Functionality of hide: - Whenever the user double clicks on any list line, the event at line selection will be triggered.

The system automatically identifies the line nowhere the user has double clicked and reads the corresponding record into hide
variable.

Get cursor:- GET CURSOR is a key word, which is used to get cursor position with field name and value, by using this key work we can get value
and field name at cursor .

Get cursor Hide


In get cursor no need to store the data to temporary In hide we store the data in temporary memory called hide
memory. area.
We can generate interactive with field name or field value in Interactive report can not generated using field name and
get cursor technique. field value .

It is used to store the value of the selected field name. It is used to store the line with line number.

In get cursor we go to multiple pages for the same line In hide technique we go to the same page when
according to the fields. we double click on anywhere in the line .
It responds for a particular field . It responds for a line .
2.top-of-page during line selection: -

This event is used to give the constant heading for all the secondary list.

3.at user command: - This event is triggered whenever the user clicks on custom GUI buttons.

4.at pf <function key>: - This event is used or triggered whenever the user clicks on
function keys (f1, f2, etc. ).
ALV REPORTS:- ALV stands for ABAP List Viewer. ALV gives us a standard List format and user interface to all
our ABAP reports. ALV is created by a set of standard function modules provided by SAP.

REPORTS:-
Generally, Reports are nothing but "Extracting Data from the Database and Displaying extracted
data on the Screen".

Reports are used to display the data in a organized manner or it is used to display
bulk amount of data in predefined format or systematic way .
Abap is a event driven programming language means it executes event after
event not line after line .
There are 3 types of reports .
1.classical reports
2.interactive reports
3.alv reports .

1.classical reports:-
Classical report is such a report here we display the data in single screen or single
list .
It does not have sub reports .
Classical report events:-
1.load of program :- load the program into memory for execution
2.initialization :-it is used to give some default values .
3.at selection screen output :-it is used for some dynamic modification of the
selection screen at run time .
4.at selection screen on field :- it is used to validate the single input field .
5.at selection screen on value request :- it is used to provide the search help
facilities to a particular field .
F4 help .
Fm:-f4if_int_table_value_request
6.at selection screen on help request :-using this event we can prepare
documentation for a field .
F1 help .
Fm-dsys_show_for_f1help
7.at selection screen :-it is used to validate multiple input field of the selection
screen .
8.start-of-selection :- it is the default event .
Here we write the actual business logic and it also indicates the start of selection
screen .
9.end-of-selection :- this event indicates the end of selection screen .
10.top-of-page:- this event we use to give some constant heading .
11.end-of-page :- this event is used for some constant footer .
2.Interactive reports:-
In Interactive reports we can directly interact with output page , there are two
types of list .
1.basic list .
2.secondary list

The basic information displayed in the basic list or overview list and the
detail information displayed in secondary list called interactive reports .
The basic list number is 0 and the secondary list number is 1 to 20 so
total we have 21 secondary list .
The number of that list are stored in the system variable sy-lsind .
Using interactive reports we can control the retrival of data .
Interactive report events:-
Instead of all the events of classical reports there are 4 more event is
there in classical reports .
1.at line selection :- this event will trigger when user double click on
any list line . There are 2 technique is there for at line selection event .
1.HIDE TECHNIQUE:- hide is a keyword used to hide the data into a
temporary memory called hide area for further processing we use this
keyword inside loop after write statement.
Whenever user double click on any list line then system automatically
identifies the line where user double clicked and read the
corresponding record to hide area.
2.GET CURSOR field technique :- this technique is used to read or get
the selected line content I.e. field name or field value into the variables
. Here no need of hide area Using this technique we can generate
interactive reports based on field name or field value
2.at user command :- this event get trigger when user clicks any GUI
buttons .
3.at pf status :- this event get trigger when user press any function keys
(f1,f2 …).
4.top of page during line selection :- this event is used to provide the
heading for secondary list , top of page does not work for secondary list
.

3.ALV reports: -
Alv stands for abap list viewer , alv give us standard list format and user interface
to all our abap reports, alv is created using some standard function modules
given by sap.
Alv provide some inbuilt functions:-
1.filtering the records.
2.sort the records .
3.download the report output in excel/html .
4.total / subtotal .
5. hiding the unwanted column

6.changing the order of the column


Function modules in alv:-
Reuse_alv_list_display
Reuse_alv_grid_display
Reuse_alv_fieldcatalog_merge
REUSE_ALV_HIERSEQ_LIST_DISPLAY
REUSE_ALV_COMMENTRY_WRITE:- we can provide logo and headings .
REUSE_ALV_EVENTS_GET: - Returns table of possible events for a list type.
REUSE_ALV_VARIANT_DEFAULT_GET: - To provide default variant

Field catalog: - Field catalog means u are preparing one internal table with all
the fields u want to display in the alv grid.
In this field catalog u can specify the color width length so many options u can
assign based on how u want to see the output of u r field.
Declare an internal table of type SLIS_T_FIELDCAT_ALV.
Call function module REUSE_ALV_FIELDCATALOG_MERGE.
Using field catalog, we can change the properties of each field.

Field catalog merge: -


Reuse_alv_fieldcatalog_merge
This is used to create field catalog for an ALV automatically, you do not need to write any code
to create the catalog.
Once you call this FM, you can make changes to the catalog by looping at the internal table if
required.
Using this function module, you can get the Field catalog for a given Internal table or DD
Structure. Once you get the Field catalog, you can change the properties of each field.

Types of alv:-
Hierarchy alv:-
REUSE_ALV_HIERSEQ_LIST_DISPLAY
Displaying the data in the form of hierarchy i.e. Parent-to-Child Relation is called
Hierarchical ALV Report.

Blocked alv:-
REUSE_ALV_BLOCK_LIST_INIT
REUSE_ALV_BLOCK_LIST_APPEND
REUSE_ALV_BLOCK_LIST_DISPLAY
Blocked alv means in one output screen multiple internal table can display.

Interactive alv:- Interactive reports are reports where users can interact more means if we
click on some field it will display one more list.

WHAT IS SLIS ?
SLIS is the type library for ALV grid.

If you'll use the ALV you have to add TYPE-POOLS : SLIS. command at the beginning of your code.

SLIS_LAYOUT_ALV,

SLIS_T_FIELDCAT_ALV

SLIS_T_LISTHEADER,

SLIS_T_EVENT,

SLIS_SELFIELD.

ALV REPORT EVENTS:- there are 17 events but we use only 6 :-


1.top of list.
2.end of list.
3.top of page
4.end of page
5.at user command
6. at pf status

Variant: - variant means saving set of parameter field input


with a particular name for further use of the the same input
value.
MODURALIZATION TECHNIQUE: -
Modularization technique means dividing the main programs to sub
programs for better readability or reusability.
There are different types of modularization techniques: -
1.include
2.function modules
3.sub-routines
Include programs: -
Include program is a set of reusuable code that we can’t execute
directly. We have to embedded the include program for execution.
These programs do not declare input parameters, interfaces, importing
and exporting parameters.
Function modules:-
These are sub-programs which contain a set of reusuable and readable
code .
Fm can contain parameter interfaces, importing and exporting
parameter and FM has exception to handle the errors .
Fm can execute independently .
tcode to create FM is sm37 .
There are 3 types of FM .
1. Normal :-
2. Rfc :-
3. Update :-
1.NORMAL / REGULAR FM:-
These FM are default FM , these are executed immediately and
synchronous to our current abap program .
2. RFC FM :-
Remote enable function call :-these fms can be called from any sap or
non-sap system , for that we have tcode sm59 to create the connection
between two server .
Types:-
 Synchronous rfc:- In this type of RFC communication, the calling
program waits until the requested processing step on the remote
system has ended and then continues to work locally.
 In other words, both the systems involved must be available at the
time the call is made.
 Asynchronous rfc:- In this type of RFC communication, the calling program
gives the request to the remote system and immediately continues to work
locally. The requested processing step is executed on the remote system in
isolation.
 If the remote system cannot be reached at the time of the call, the asynchronous
calls of the RFC client are lost .

Transaction rfc:- Unlike asynchronous RFC, in Transactional RFC the remote system
does not have to be available at the moment the RFC client program start the call. The
data is held in the source system until the target system is available.
 Queued rfc:- This RFC communication is an extension to the transactional RFC.
In this method, all the requests are queued up(inbound queue and outbound
queue) and are processed in a sequence only if it is certain that all preceding calls
are processed correctly.
 This method guarantees that all the requests are processed in the sequence in
which they are received.

Why pass by value for rfc ?


When ever we are using RFC enabled FM's we should pass pass any values by pass by value only. because RFC
may be used by other different systems. if we pass by reference that system may have that pass by value so
that system gets confuse to which value have to take. so that why's we should pass by value only.

3. update FM :- update fms are not executed immediately , they are


scheduled in update work process for execution . When commit work
statement triggers it will execute .
Rollback deletes all the update FM registration .
Using call function ….. in update task we can bundle all the database
changes to one database luw , it is also beneficial for performance
since the update happens asynchronously.
V1(high priority)- 1. start immed
2. Immed start (not updatable)
V1 modules describe critical or primary changes; these affect objects that have a
controlling fun n the SAP system, for example, creation of orders and changes to
material stock.

V2(less priority) -- 3.start delayed


4. Collective run
V2 modules describe less critical secondary changes. These are pure
statistical updates, for example, such as result calculations.
28) commit work and commit work and wait ?
Commit work Commit work and wait
It is asynchronous . It is synchronous .
Your program does not wait for any acknowledgement. it the system waits for the acknowledgment, and then moves
just start executing the next statement after COMMIT to the next statement.
WORK.

This is the standard form, which specifies This form specifies synchronous processing. The
asynchronous processing. Your program does not wait commit statement waits for the requested functions
for the requested functions to finish processing. to finish processing. Control returns to your program
after all high priority (V1) function modules have run
successfully.

Sub-routines:-
subroutines are also a set of reusuable code.
We define the sub routine codes inside form and end form .
We call the subroutine using perform statement.
There are two types of sub routine: -
1.internal sub-routine
2.external sub-routine
Internal subroutine means inside the same program only define and call
the subroutine .
External subroutine means we can reuse the subroutine outside the
program also .
Luw :- logical unit of work.
Database LUW:- database luw means in one screen whatever changes
we made will store in db luw . Db luw is the mechanism used in
database to ensure that its data is always consistent and which are
executed entirely or not at all .
SAP LUW:- sap luw is the collection of db luw , if any error occurs in any
one of the screen it won't work .
MPP:- A module pool is collection of screens , flow logic , menu bars
and abap code where we can build an application .
It is a special type of programming where we can create our own
custom screens as per our business requirements.
We need to create tcode for mpp , that transaction code will refer the
module pool and the initial screen number .
Events in mpp:-
Pbo:- this event will trigger before the selection screen displays .we can
give default values to screen .
Here we can
Pai:- here we implement all the logical code . When user give input this
event will trigger .
Pov:-we can give f4 help using this event , and it will trigger when user
click f4 .
Poh :- we can prepare documentation (f1) , and it will trigger when user
click f1 .
Components of the screen are: -
Attributes: - properties of screen
Element list :- list of UI /LIBRARY elements
Flow logic :- we can write logic code
Layout: - screen design area
Types of screen:-
1.screen :- it’s a normal visible layout displayed in output .
2.subscreen :- for subscreen we have to create subscreen area , Sub
screens normally used to do all the task in a single screen without
navigating to other screens. Sub Screen normally used in the main
screen. The main screen declares a dedicated sub screen area in its
screen where sub screen is called and displayed in the run time.
3.modal dialog box :-it is a pup up window displayed in the top of the
screen . While calling the screen specify co-ordinate of top left corner
and bottom right corner so that the system calculates the height and
width of the screen .
4. selection dynpro:-
CHAIN AND ENDCHAIN :-
Chain and endchain is used in flow logic block while creating screen .
While validating multiple fields if we enter one wrong input then all
other fields also go for display/non-editable mode to overcome this
problem we use chain and endchain .
Set screen :- if we call a screen with set screen keyword then the
control goes to the next screen finishes the work and come back to the
previous screen again .
Call screen / leave screen : - if we call a screen with call screen or leave
screen then the control immediately goes to the next screen finishes
the work and does not return back .
TABSTRIP:- it is a screen object which consist of two or more pages and each
pages have tab title and page area , tabs trip allows us to place a series of screen
on a single screen , to create tabstrip we must have to
1) Define tab title and page area for the screen.
2) For all the tab we have to place one sub screen area or we can place
separate subscreen area also
3) Write the code screen for flow logic
4) Write the abap processing logic (we have to activate the tab title)
5) We have to control the tabstrip .
Table control:- table control is used for displaying large amount of data in a table ,
we create table control in screen painter and in that table control we can specify
input/output parameter , radio buttons , check box , radio button groups , and
pushbuttons . We can have 255 columns and each column we have to give
heading .
Pre-requisites:-
1)we have to declare the control
2)we have to make use of looping.

BDC: - BDC stands for batch data communication. It is the automated procedure
to transfring the external data or legacy data into a sap system using batch input
programming.
There are two ways we can implement bdc .
1) Call transaction
2) Session method
Data is populated automatically through screen by running the transaction into
the internal table BDCDATA.
When we go for call transaction :-
When we have small amount of data to be transfer and multiple transactions
required , and asynchronous processing and we wants to handle the errors
explicitly.
When we go for session method :-
When we want to transfer large amount of data and only one transaction , and
synchronous updation and the error handle implicitly by log table .
BDCDATA:- bdcdata is a structure type with 5 fields ( program , dynpro , dynbegin
, fval , fname ) of the bdc internal table which is used for the processing of
transaction (that happenes in shdb ) .
Shdb:- recording of transaction .
Outbound and inbound technology:- outbound means transferring and inbound
means processing the data non-sap to sap and sap to sap also .
Session method:- session method means transfer the data from internal table to
database table through session .
Abap/4 reads the external data that is to be entered in sap system and stores the
data in session .
We use 3 function modules in session method .
1> bdc_open_group :- to start the session
2>bds_insert :- for transferring the data
3>bdc_close_group :- for closing the session
Call transaction:- call transaction statement call the transaction whose
transaction code is contained in the data object , using call transaction we can
update the database synchronously / asynchronously .
Open dataset (name ) intext mode for output encoding default .
<transfer the data to application server )
Close dataset (name) .
Open dataset (name ) intext mode for input encoding default .
<read the data in application server )
Close dataset (name) .
Ok code:- command field is identified by ok code ; we can find the ok code in
bdcdata structure in the field name fval .

Bapi: - bapi stands for business application programming interface. Bapi is the rfc
enabled function module used to communicate with sap to non-sap system sap to
sap system. Bapi are stored in BOR( business object repository ) as methods in the
sap business object which carry out some business functions .
1)standard Bapi :- the Bapi's are developed by sap labs .
Bapi_material_savedata
Bapi_material_getdata
2)custom bapi :- the Bapi's are developed by abap developers .
Prerequisites to create custom bapi :- we have to create structure and rfc
function module .
Structure name , fm name and bapi name must starts with zbapi .
Each fm has its own function group .
Bapiret2 we have to declare in exporting parameter with passbyvalue to get the
messages .
BOR (BUSINESS OBJECT REPOSITORY) :- it is like a container ., it is the object
oriented bussiness repository In r/3 architecture where all the sap business object
and sap interface types as well as its components , attributes and events are there
bapi’s are stored in bor in the form of methods .
Swo1 :-
Swo1 is the tcode for business object builder where we create the business
objects. Swo1 is present in swo package .
How to find bapi ?
IN TCODE =’bapi’ .
Or in any transaction code like (va01 , mm01) we can go for system -> status then double click on
program name and there go for Goto->attributes and copy there the package name.
Now enter se80 and select package and there in business object type and select BUSSINESS
OBJECT THEN go for methods and select any method with green color checkbox then go for
abap there you can find your bapi .
Bapi extension:- bapi extension is used to add or retrieve the data to a custom fields .

We have bapiparex structure with 4 fields valuepart1 , valuepart2 , valuepart3 and valuepart3
with length 960 . Two types of bapi extension :-

1)Extension in :- it is used to add the data to custom fields .


2)Extension out :- it is used to retrive data to custom field .
Background jobs: - background job is a non-interactive process which runs
parallelly in the background without affecting normal (foreground) operations.
Benefits:- it reduces the manual effort and automates the task .
It can be scheduled as per user choice .
It reduces the interaction and can run seamlessly in the background .
Se36 is the tcode to schedule the background job and se37 is the tcode for
monitor the background job .
JOB CLASS :-
There are 3 types of job class
A :- HIGH PRIORITY :- Some tasks are very critical and urgent and we can schedule
it with class A .
B :- MEDIUM PRIORITY :- class B job will start executing after class A job tasks are
completed .
C :- LOW PRIORITY = class c will start executing after class A and class B tasks are
completed .
Job status:-
Scheduled:- all the steps are required to made up a job is reedy but start
condition is not yet specified .
Released:- this means all the steps with start condition also specified .
Ready :- it’s kept in queue for the execution .
Active:- the job is in active state , means now no one can delete or modify .
Finished:- the execution of the job is completed successfully .
Canceled: - the job got aborted or canceled.
Job log :- when we execute a program in background task all the error messages
are written in job log, A separate job log is created for each job .
Smartforms :- smartforms are the graphical user interface that helps us to create
and maintain the layout or logic form of the form.
Windows in smartforms :- there are 4 types of window :-
1) MAIN WINDOW :- it is for the contineous output like table output .
2) SECONDARY WINDOW :- for output with fixed length.
3) FINAL WINDOW:- it is the type of secondary window which will process in
the end of the from processing .
4) COPIED WINDOW :- it is also a special type of secondary window which for
making pages for copy or original .
How to debug smartforms ?
First enter the tcode ‘smart forms’ and give your program name that you wants to debug .
Then go for environment -> function module , now copy the function module name and go to
se37 tcode and paste that function module now go for goto-> master program and then click on
search(find) option and there copy the line of code where you wants to put breakpoint then go to
your driver program and controls stops at the break point . Now we can analyze the Smart forms
.

ENHANCEMENT:- Enhancement in sap used to adding or modifying more


functionality to the sap standard code without modifying it .
1) User exit :- user exits are works like customer exits but its only work for sd modules .
2) Customer exit :- Customer Exits are like hooks provided by SAP to Enhanced STD program or
Transaction to add Custom functionality to meet business requirement .
3.how to find user exit?
Enter tcode va01 then go for setting->status then double click on program name then click on search
button and write user exit , then click enter there we can find all the user exits and as per our requirement
we can use the user exit subroutines .
4.how to find customer Exit?
Enter tcode va01 then go for setting->status then double click on program name then click on search
button and write call customer-function .
Then click enter there you can find all customer exit function modules .

Cmod:- create project for customer exit .

Smod:-see the details of transaction .


a)menu exit :- it allows customer to add item in pulldown menu in a sap standard
program .
b)field exit :- Field exit is used to write your custom logic against field, it is no longer used by
SAP .

c)function module exit :- it allows customer to add code to sap standard program via
function module .

d)screen exit :- it allows customer to add fields to screen via subscreen and we called
the subscreen in screens flow logic .

3) BADI’S

Enhancement frameworks: - enhancement framework in sap abap is the new


enhancement concept that helps the customers, consultants and third parties by
giving the option of enhance the standard code base with custom code that they
want to add .
There are two types of enhancement framework .
1) Implicit enhancement
2) Explicit enhancement
a) Enhancement point
b) Enhancement section
Enhancement spot :- it is a containers stores explicit enhancement options .
Badi :- badi stands for business add in , badi is a new sap object oriented
enhancement technique used to add our custom functionalities to the sap
standard functionalities .
Badi is available in the new release of sap 4.6c .
Why badi ?
As compared to that earlier enhancement badi follows object oriented to make
our code reusuable and we can use badi for multiple times , but in standard
enhancement we can use that only once .
For example if we assign one enhancement for one custom project then again we
cant use that same enhancement for any other custom project to achieve that
drawback sap provide us new enhancement technique called badi .
Are there two types of badi :-
1)classical badi
2)kernel badi
Single implementation badi :- we use only one implementation.
Multiple implementation badi :- with that option , any number of active
implementation we can use for single badi definition , by default this option is
checked in badi .
All implementation executed we can not able to know the sequence .
Filter badi :- using this option we can define the Badi's according to filter values to
control the adds-in implementation for specific criteria .
In between multiple implementation we execute only one implementation based
on filter value .
Fallback class:- when there is no active implementation is present in the badi then
fallback class code will executed . If there is an active implementation then
fallback class will no longer executed .

1.difference between initialization and at selection screen.

Initialization At selection screen


1.this event is used to give the default values to 1.this event is used for validation the multiple
the input field . fields on the selection screen .
2.this event trigger only once before selection 2.this event trigger when we change anything in
screen displays. the selection screen .
3.this event triggers after load of program . 3.this event triggers when selection screen
displayed .
2.difference between at selection screen or at selection screen output?

AT SELECTION SCREEN AT SELECTION SCREEN OUTPUT


1. it is a PAI event . 1.it is the PBO event .
2.validation purpose . 2.screen modification purpose , whenever any
screen properties need to change this event is
required .
3.when we take any action on the selection 3.just before displaying the selection screen this
screen this event get trigger. event get trigger .
3.get cursor and hide technique?
GET CURSOR HIDE TECHNIQUE
1. get cursor will get the exact field 1.interactive reports can’t generate using
name and field value with which we this .
can generate various interactive Using hide keyword we store the line in
reports based on filed names. hide area without knowing the field
name .
2.it is responsible for particular field . 2.it is responsible for particular line .
3.it is used to stores the value of the field 3.it is used to store the line with line
. nmumber .
4.

Reuse_alv_list_display Reuse_alv_grid_display
in list display we have only basic and normal display Grid display is more Userfriendly and has options to
of the selection criteria. calculate consolidations like sums and grand totals.
We can
even modify the width of the column .
ALV LIST Can be coded using only FMs ALV GRID Can be coded using FMs and object
oriented concepts
ALV LIST is Display Only. ALV Grid Can Be made EDITABLE for entry purpose.
5. difference between classical , interactive and alv ?

classical Interactive alv


Classical report is used to Interactive report is used to ALV reports are used to
display the entire information displayed the summarized display the output with
in a single list. Eg: sales order information in a basic list and predefined functionalities like
header details, item details detailed information in sorting the list in ascending
are displayed in a single list. secondary list. We have only order, descending order,
one basic list and 9 secondary down the list, excel sheet,
lists are there totals etc.
Eg: college name, person
name in a basic list and
college address, person
address, person family
details, education in
secondary list.
In classical reporting, we We can interact with the In ALV (abap list view) we
have to do hard coding for report with interactive report, don't want to do hard coding
reporting. if we click on a line in report for printing report. Instead of
we can move to the secondary it, we can use predefined
screen function or method to print
report.
It is nothing but getting data It Is nothing but Its stands for Application list viewer,
from one or more tables and communications between one it is used for analysis purpose, it has
report data to another. no limitations characters for the
printing.
displays it on LPS formatted or
unformatted.

6. data element and domain ?

Data element domain

Data element is the collection of domain with Domain is the collection of data type and length.
short description.

Data element contain technical attributes as well Domain contains only technical attributes(data
as semantic information (field description) . type , size ) .
7.data class and delivery class ?

Data class Delivery class


Data class specifies the physical area in the It controls the degree to which SAP or customer
database to store the table . is responsible for table maintenance.
It determines the type of data the table contains. It determines the table type.
It is set in Technical settings for the table It is set in Delivery & Maintenance
They are of 5 types: Following are the delivery classes:
Aà Application table
APPL0 à Master Data
Cà Customer table
APPL1 à Transactional Data
L,G,E,S,W
APPL2 à Organizational Data

USER, USER1

8. append and insert ?

APPEND INSERT
In append the record will always add in the Using Insert we can add the field in the
last of the internal table . specific position (anywhere we can add) of
the internal table .
New records are always added in the last If position is not specified then new records
position . are inserted in last .
System field sy-tabix is set at the end of the System field Sy-tabix is not set .
internal table .
9. structure and work area ?

structure Work area


1. We can create Structure in se11 as 1. We only create work are in abap
well as in report program . program .
2. Structure can global also and local 2. work area is local only .
also .
3. we declare structure with data in report 3. we declare work area with type in report
program . program .
4. a structure is reusable in all abap program 4. a work area is reusable with in the report
interfaces ,and data dictionary . program where it is created .
5. we can create nested structure . 5. we cant create nested work area .
10.function module and sub-routines .

FUNCTION MODULE SUB-ROUTINES


1. Function module can handle 1.we cant create exceptions for sub-routines
exception . .
2. Function module will execute 2. Sub-routines will not execute
independently . independently .
3.fm returns the sy-subrc value . 3.subroutines may or may not be return sy-
subrc value .
4.Fm globally called anywhere in the 4.Subroutines called always before
program . definition of the subroutine .
5. we can prepare documentation for fm. 5.We cant create documentation for fm .
6. FM can romote enabled. 6. subroutines are not remote enabled.
11.difference between normal , rfc , update fm ?

Normal rfc update


There is no need to be Need to be register. Need to register in log table
registered. first .
It is executed immediately It is executed when 2 servers It is executed when commit
when a call is made in the are available. work statement is triggered .
abap program.
Sy-subrc can be checked Sy-subrc is undefined after Sy-subrc is undefined after
after the execution . execution . exection .
Exception can be handled . Exception can’t be handled Exception can’t be handled .
We use pass by reference . We use pass pass by value . We use pass by value .
12.commit work and roll back ?

Commit work Roll back


1.commit work statement we use to 1.roll back work statement cancels all the
perform many functions relevant to the requests relevant to the synchronized
synchronized execution of tasks. execution of tasks .
2.we use commit work to save all the 3. Roll back is used to undo all the
changes on current transaction is permanent changes that made in the current
. transaction .
3.once we use commit work all the changes 3.if any cases we thing our changes are in
will updated in the database and new state appropriate and we wants to come back to
is achieved . previous state of database table then we
use rollback keyword .
13.difference between reports and mpp ?

Reports mpp
Reports are type E and can run directly . Mpp are type m , and we need transaction
code to run the program .
Reports are used to display the database Mpp used to update the database table .
table .
We use events like start of selection , end of We use events like PBO , PAI etc .
selection etc .
Report programs are standalone means no Mpp are not standalone we need one screen
need of screens and transaction code . and must transaction code for mpp .
Report programs are less flexible . Mpp programs are more flexible .
14. Tabstrip and table control ?

Tabstrip Table control


We can see different tabs there; they are Table control is nothing but the table on the
nothing but the tabstrips. output screen.
15. Lsmw and bdc ?

LSMW BDC
1) LSMW stands for legacy system 3) Bdc stands for batch data
migration workbench . communication .
4) Lsmw used for normal sap 2) Bdc used for customized application .
application .
5) Its a functional consultants . 3) It’s a technical consultants .
4) if we wants to transfer less then 5000 6) When we wants to transfer more
then we go for lsmw . than 5000 we go for bdc .
5)lsmw is not very flexible hence we do not 7) Bdc is flexible and we perform coding
perform coding . .
8) Lsmw is the non-sap to sap 9) Bdc is the sap to sap communication
communication tool , tool .

16. Call transaction and session method ?

Call transaction Session method


1) Used for single transaction. 1)Can be use multiple transaction.
2) Error we have to handle explicitly in 2) errors can be handle by the creation of
program with the structure error log .
bdcmsgcoll .
3) data processing is synchronous . 3) data processing is asynchronous .
4) data updating is asynchronous / 4) data updation is synchronous .
synchronous ,
5) it is prefer less amount of data . 5) it is used for large amount of data .
6) we use this syntax:- 6) we use 3 function modules :-
Call transaction (t_code) a) bdc_open_group
Using (lt_bdc) B)bdc_insert
Mode(a/e/n) C)bdc_close_group
Update(a/s) .
10) It returns sy-subrc value . 7) it don’t return sy-subrc value .
11) Data Immediately updated to 8) data is not immediately updated to db
database unless session processed. table untill session is processed .
17. Bdc and bapi

Bdc bapi
Bdc we can use for any transaction which Bapi is used when it is available for
has a particular screen or fields . particular transaction like delivery sales
order .
Using bdc we are updating the screen . Using bapi we are updating the database
table directly .
Bdc is a procedure oriented . Bapi is a object oriented.
For bdc we need to do recording . no need to do recording
Bdc is not rfc enabled . Bapi is the rfc enable .
We are not using commit work and roll back We are use commit work and rollback in fm .
.

18 . Bapi and rfc

Bapi Rfc
Bapi’s are rfc enabled function module that Rfc is a protocol used to communicate
gives external access to the sap business between applications of different systems
applications . on the sap environment .
It can be wrapped bussiness objects . It can’t wrapped business objects .
All bapi’s are rfc . All rfc’s are not bapi .
We can’t handle exception in bapi . Exception can be defined in the interface of
calling function module .
It can be compared to CGI applications . It can be compared to HTTP applications .
19. TABLE AND TEMPLETE ?

Tables Templets
Tables have header , body and footer . Templets do not contain header , body and
footer .
We have to do looping for tables No need to write .
Tables are dynamic height . Templetes are static heights .
If the number of rows and columns are not If the number of rows and columns are fixed
fixed and anytime we wants to increase and then we can go for templetes .
decrease the length then we go for tables .
20. Scripts and smartforms ?

Scripts Smart forms


Scripts are client dependent . Smart forms are client independent .
In scripts we have 99 main window . In scripts we have only one main window .
In scripts we use only black and white In smart forms we can use various colors.
colors.
windows are main , var and graphical There are main , secondary , final and copied
window . window in smartorm .
There is no fm is generated for scripts . There is one fm is generated .
Only single page format is possible in scripts Multiple page format is possible in Smart
. forms .
21. Bapi_transaction_commit and bapi_transaction_rollback ?

Bapi_transaction_commit Bapi_transaction_rollback
Bapi_transaction_commit is used when we Bapi transaction rollback is used when we
make any changes to the database by calling wants to rollback / undo the transaction to
bapi from outside sap and wants to commit the sap system .
the database .
If bapi is success then we go for another If bapi has errors then we go for
bapi ‘bapi_transaction_commit’ to save all ‘bapi_transaction_rollback’ to revort back
the changes made to the database table . the changes made to the database table .
22. Difference between bapi_transaction_commit and commit work ?

Bapi_transaction_commit Commit work


Bapi_transaction_commit is used when we Commit work is used when we directly
wants to change the database by calling a wrote the code and make change the
bapi . database and wants to commit the database
.
In bapi_transaction_commit external ststem With commit work we have to code it inside
have a way of deciding where to commit our bapi and outside the system then have
and where to rollback . No chance or have any hold over the
commit .

Commit work and Bapi transaction commit both are used for update the database ,
the main difference between Bapi transaction commit and commit work is bapi
transaction commit refreshes the buffer and the buffer holds the data to be updated
when we use commit work and if any reason it fails to updated then buffer does not
refreshes .

And hence when we call commit work again then the porevious data got updated to database
, but in bapi transaction commit function module we have buffer_refresh_all function module
right after the commit work so hence the commit work fails the buffer is refreshed .

So bapi_transaction_commit is good to use .


23. Difference between user exit and customer exit ?

User exit Customer exit


User exits are placed in sap in the form of Customer exits are placed in sap in the form
sub-routines and only used for sd modules . of function modules .
User exits are reusuable . Customer exits are not reusuable .
These are created in sap name space . These are created in sap customer name
space .
It required access key . It does not required access key .
We can write the code inside the We have to write the code inside the include
subroutine. that present in the fm .

24.difference between implicit enhancement and explicit enhancement ?

Implicit Explicit
1.In implicit enhancements SAP provide the 1.In explicit enhancements
space where we will write our own programmer will decide where they
functionality.
want to write there functionality. So
that in explicit enhancement we have
to create enhancement sport for
writing the functionality.
1. It is available at the following 2. here are two type of
places :-
explicit enhancement
2. --> Begin/ end of an include.
3. --> Begin/end of method / FM / option available : -
form routine. --> Enhancement point.
4. --> End of structure. --> Enhancement section.

25) enhancement option and enhancement section ?

Option Section
Previous code will always called along with Only one section can implemented at one
new code . time .
If another developer write another set of
code in same section then the previous code
will not work .

26) classical Badi and kernel badi ?

Classical badi Kernel badi


1) fallback class is not present in classical 1) Fallback class is present in kernel
badi . badi .
2) Automatically interface and class will 2) We have to create interface and class
generate in classical badi . manually .
3) We use proxy (cl_handlerexit) class . 3) we are using call badi and get badi
keyword .
4) it is slow . 4) It is fast .
5) Execution time more . 5)Execution time less .
6) For Object reference type we use 6) for object reference type we use badi
interface . definition .

27) Procedure oriented and object oriented ?

Procedure oriented Object oriented


1) procedure oriented 1) Object oriented
programming are based on programming are
unreal world . based on real world .
1) No access modifiers 2) Access modifiers are
are present . there in object
oriented such as
public, private ,
protected etc .
3) These are reusuable 3)these are not reusuable .
4) There is no specific 4) data hiding concept is
concept of data there so it is more secure .
hiding so it is less
secure .
5)procedural programming 5) Object oriented
used to design medium sized programs are used to
programs . design large and
complex programs .
6) It follows bottom up 6) it follows top down
approach . approach .
7) Adding new data and 8) Adding new data and
function is not easy . function is easy .

28) difference between pass by value and pass by reference ?

1.currency and quantity fields in ddic?


Table:-- ZSRN_CURRENCY .
We use currency and quantity fields to store the currency amount data and
quantity data .
For currency and quantity field we have to specify some corresponding units like
INR, EURO, USA,EA, PC or KGS.
DATATYPES:-
CURR:- it is for currency amount and price fields.
CUKY: - it is the datatype used for store the corresponding units like INR, USA,
EURO for the currency field.
QUAN: - it is used to specify the quantity.
UNIT: - It is the datatype used to specify units like pc, kgs and ea .

2.Log data changes in technical setting on ddic?


The logging flag defines whether changes to the data records of a table should be
logged. If logging is activated, every change (with UPDATE, DELETE) to an existing
data recorded by a user or an application program is recorded in a log table in the
database.

3.What are dialog data transport details in TMG?

If it is a standard recording routine, whenever you make any changes, the system will ask
for transport and the changes will be captured in the transport, then it can be transported to
the testing and production system.
If it is a no, or user, recording routine -> system won't ask for transport and you have
maintained it locally in every system.

 If you want to transport the entries to other systems --> Standard


recording routine.
 If you just want to create entries --> no, or user, recording routine.
COMPARE FLAG: -

The compare flag is ‘Automatically adjustable’ for the maintenance


Dialog <Table Name>.

As this maintenance dialog is modified – either the flow logic of the


maintenance screen(s) are modified and/or corresponding events exist –

The effect of all changes on the modifications must be considered


because they may affect the compare. The compare flag must be checked each time.
4.BUFFERING IN technical setting?
Buffering is the temporary storage memory , it does not have any physical
memory .
Buffering permissions:-
There are 3 types of buffering permissions are there
1. Buffering not permitted
2. Buffering permitted but not activated
3. Buffering activated (in this option we need to specify the buffering type)
Buffering type:-

4.Full buffering: All the records of the accessed table will be buffered.
5.Generic buffering: All other records which have the same generic fields of the accessed
records will be buffered.
6.Single record buffering: Only the accessed record will buffer in this case.
NO INPUT HISTORY:-
If this indicator is set, the mechanism that the SAP GUI uses to handle the input history of a screen input
field is switched off.

You might also like