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

ABAP Interview Questions

This document contains interview questions related to ABAP programming. It covers topics such as basics of ABAP, internal tables, data dictionary, reports, modularization, memory management, logical database, ABAP Objects, enhancements and performance optimization. The questions range from easy to difficult levels of complexity. Sample questions and answers are provided for different topics to help interviewers evaluate candidates' knowledge of ABAP.

Uploaded by

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

ABAP Interview Questions

This document contains interview questions related to ABAP programming. It covers topics such as basics of ABAP, internal tables, data dictionary, reports, modularization, memory management, logical database, ABAP Objects, enhancements and performance optimization. The questions range from easy to difficult levels of complexity. Sample questions and answers are provided for different topics to help interviewers evaluate candidates' knowledge of ABAP.

Uploaded by

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

Interview Questions

ABAP Interview Questions

Origin/Author : Sharmila Parmar


Sunanda Navle
Preeti Sawant
Nishant Maheshwari

Reviewed by : Sharmila Parmar

Approved by : Nikhil Behere

Date Approved : 28-Feb-2007

Capgemini Consulting India Pvt. Ltd


Vikhroli -East, Mumbai - 400079

Phone +91 (0)22 5555 7000


Fax +91 (0)22 5555 7000

COMPANY CONFIDENTIAL 1
Interview Questions

Table of contents

1. Basics............................................................................................................................ 3
2. Internal Tables............................................................................................................... 3
3. Data Dictionary............................................................................................................... 3
4. Reports.......................................................................................................................... 3
5. Modularization using Subroutines..................................................................................3
6. Memory Management.................................................................................................... 3
7. Lock Objects.................................................................................................................. 3
8. Logical Database........................................................................................................... 3
9. Number Ranges............................................................................................................. 3
10. LUW............................................................................................................................... 3
11. Database Update........................................................................................................... 3
12. ABAP OBJECTS............................................................................................................ 3
13. Module Programming..................................................................................................... 3
14. Enhancements............................................................................................................... 3
15. Performance Optimization.............................................................................................. 3
16. Smartforms..................................................................................................................... 3
17. SapScripts...................................................................................................................... 3
18. BDC............................................................................................................................... 3
19. ALE/IDOC...................................................................................................................... 3

COMPANY CONFIDENTIAL 2
Interview Questions

1. Basics

 Easy questions

Q. Architecture - 3 different layer


A. Presentation, Application, Database

Q. Different type of work processes


A. Update, Spool, Background, Dialog, Enqueue/Dequeue

 Medium Questions

Q. Two services that are used to deal with communication


A. Message Server and Gateway Server

Q. How many enqueue work process possible


A. 1

Q. What is the function of dispatchers


A. It distributes the load to the available work process.

 Difficult Questions

Q. What is the use of message server and gateway server


A. Message server is use to communicate between different dispatchers while Gateway
server is use to communicate between the systems.

2. Internal Tables

 Easy questions

Q. What are different types of internal table

A. Standard, Sorted, and Hashed table.


- Standard table is used mainly for fetching records using index with basically
non-unique keys.
- Sorted table is used for both unique/non unique keys. Index access also possible.
- Hash table no index allow. Fetching only using full primary keys

Q. What are the data types that makes the default key of internal table
A. C,N,D,T,S

Q. Which is the system field to check whether record was found or not
A. sy-subrc

Q. How to remove duplicate records from an internal table


A. Delete adjacent duplicates from internal table

COMPANY CONFIDENTIAL 3
Interview Questions

 Medium Questions

Q. What are different method for defining internal tables and what is the difference
when used with clear statement
A. We can define it with header line/ without header lines.
With header lines: Clear statement only clears the header line.
Without header line: Clear statement clear the body content

Q. How to find total number of records in an internal table


A. Describe table itab lines i

Q. What is the difference between select single and select up to 1 rows


A. In select single, full primary key should be specify. While in select upto 1 row it is not
necessary. It will fetch the first found record.

Q. What are the different ways of reading internal tables? What is the difference them
A. 1. Read table itab into wa_area
2. Read table itab assigning wa_area.
In case 1, it copies the records into wa_area while in 2nd case it sets a pointer. Any
changes made to the wa_area, it will automatically get reflected in the internal table.
3. Read table itab index n
4. Loop at internal table into wa_area.

Q. What is the use of transporting fields while reading internal table


A. By using transporting f1,f2 or transporting all fields, we can copy only the required fields
in the work_area

Q. How does comparing statement works in read statement


A. It will first compare whether the required fields is present in the internal table. If yes, then
only it will transfer the required fields into work_area.

Q. What are the basic requirements when we use for all entries
A. 1. Check for initialization.
2. Sort and remove duplicate records by using delete adjacent duplicate

Q. What is the other way instead of reading, changing the value and then modify
A. Use assigning field-symbols instead of work area

Q. What are the control break statements


A. At first---- It will execute only once i.e. at the first loop pass
At last-----It will execute only once i.e. at the last loop pass
At new of--It will execute at every new value of control level
At end of--It will execute at the end of new control level
At sum --It will do the sum of all other numeric field for the that control level field value

Q. What is the basic criteria to use control break statement


A. Sort the table in ascending order

Q. In which field will the index of read records of an internal table be stored
A. sy-tabix

COMPANY CONFIDENTIAL 4
Interview Questions

3. Data Dictionary

 Easy questions

Q. What is the use of domain


A. It is use to describe the technical attributes of a field (data type and length)

Q. What are the two ways for restricting the value range for a domain
A. By specifying fixed values, By stipulating a value table

Q. What is the use of data element


A. It is used for describing short text of a field, It can also be used as a label for field on the
selection screen

Q. Can you define a field without a data element


A. Yes. If you want to specify no data element and therefore no domain for a field, you can
enter data type and field length and a short text directly in the table maintenance

Q. What is data class used for


A. It is used to specify on which physical area of database the table should be stored.

Q. What is size category used for


A. It specifies the amount of space (extent) allocated.

Q. Different types of views


A. Database, Projection, Maintenance, Help views

Q. Different types of search help


A. Elementary Search help, Collective Search help

 Medium Questions

Q. What are the two methods of modifying SAP standard tables


A. Append Structures, Customizing Includes

Q. What are the technical settings maintained while creating the table
A. Data Class, Size Category, Logging , Buffering

Q. Different type of buffering? Explain


A. Full Buffering - When a record is read from the table, entire records of that table is
loaded into the buffer. When the table is small, and more frequently it is read and less it
is written, full buffering is used.

Generic Buffering- When a record is read from the table, it generics part of the key which
are same are loaded into the buffer.

Single buffering - When a record is read from a table, only that record is loaded into the
buffer. It is used for large table. If suppose a particular record is not present in the

COMPANY CONFIDENTIAL 5
Interview Questions

database table, it will be marked as non-existence and that record will be uploaded in
the buffer. Now if u tries to read the same record, it will be read from the buffer.

Q. 2 level domain Concept


A. Two different data element use the same domain. It is used when technical attributes of
both data element are same. So that if domain changes, it will be reflected in both the
data element

Q. What is the difference between database view and maintenance view


A. If database view consists of more than one table, then only read status is possible with
this view. It is not possible to insert record through this view. While maintenance view
allows to maintain (insert) the records in table.

Q. What is use of value table in domain


A. If table is specified as value table while maintaining domain, it will be proposed as check
table when defining foreign key on the field which uses this domain.

Q. What is the difference between active and generated version.


A. Active version is that version which is accessible by all users. Suppose if program is
active, then all user will use that active program. Now suppose the program is changed,
but it is in the inactive state. Now if other users try to access this program, they will be
accessing only the active version and not the changes. Whereas if the user who has
changed the program, and if it execute, it will be executing the new generated version.

Q. What is type groups


A. Type Groups are used to store user-defined data types or constants in ABAP 4
Dictionary for cross-program use. In ABAP/4 programs, you define type groups with the
TYPE-POOLS statement.

Q. A field containing currency amounts (data type CURR) must be assigned to a


reference table and a reference field. Explain
A. As a reference table, a system table containing all the valid currencies is assigned or
any other table which contains a field with the currency key format (CUKY). This field is
called as reference field.

Q. A field containing quantity amounts (data type QUAN) must be assigned to a


reference table and a reference field. Explain
A. As a reference table, a system table containing all the valid quantity units is assigned or
any other table which contains a field with the format for quantity units (data type UNIT).
This field is called as reference field.

Q. If a table that is to be extended contains a long field, we cannot use append


structures. Why
A. Long fields in a table must always be located in the end, as the last field of the table. If a
table has an append structure the append line must also be on the last field of the table.

4. Reports

COMPANY CONFIDENTIAL 6
Interview Questions

 Easy questions

Q. Which is the first event triggered in a report


A. Start-of-selection (if event ‘initialization’ is not present)

Q. When top-of-the-page event is triggered


A. At the start of new page

Q. What are the events in ABAP program


A. Initialization / Load-of-program
Start-of-selection.
At Selection Screen Output
At Selection Screen
Top-of-page
At line-Selection
AT USER-COMMAND
Top-of-page during line-selection
End-of-page
End-of-selection.

Q. What are the control level events


A. AT First
At New
At End of
At Last

Q. What indicates success or failure of a SQL operation


A. SY-SUBRC
Q. Name the ABAP/4 key words which are used to change the contents of database
table
A. UPDATE or MODIFY

Q. In the statement Write: / 15 (10) lfa1-lifnr. , what do the numbers 15 and 10 stand
for
A. 15 stands for the offset on the screen and 10 stands for the field length displayed.

 Medium Questions

Q. What are the event key words in interactive reporting


A. AT LINE-SELECTION
Moment at which the user selects a line by double-clicking on it or by positioning the
cursor on it and pressing F2.

AT USER-COMMAND
Moment at which the user presses a function key.

TOP-OF-PAGE DURING LINE-SELECTION


Moment during list processing of a secondary list at which a new page starts.
Q. What is the use of LINE-COUNT <lines_per_page>
A. The use of LINE-COUNT <lines_per_page> (<footer_lines>) indicates that the page

COMPANY CONFIDENTIAL 7
Interview Questions

has a fixed number of lines part of which is reserved for use at the END-OF-PAGE
event.

Q. How to suppress the standard page heading in report


A. NO STANDARD PAGE HEADING addition

Q. How can you maintain header


A. Goto  Text Elements  List Heading
or
System  List  List Header.

Q. How to colors the line background


A. FORMAT COLOR ON

Q. How to suppresses output of spaces after the <f> field


A. NO-GAP

Q. What does <LIST> include contains


A. The <LIST> include contains include statements for <SYMBOL>, <ICON>, <LINES>,
and <COLOR>.

Q. What are system fields for secondary lists


A. SY-LSIND
Index of the list created during the current event (basic list = 0)

SY-LISTI
Index of the list level from which the event was triggered

SY-LILLI
Absolute number of the line from which the event was triggered

SY-LISEL
Contents of the line from which the event was triggered

SY-CUROW
Position of the line in the window from which the event was triggered (counting starts
with 1)

SY-CUCOL
Position of the column in the window from which the event was triggered (counting starts
with 2)

SY-CPAGE
Page number of the first displayed page of the list from which the event was triggered

SY-STARO
Number of the first line of the first page displayed of the list from which the event was
triggered (counting starts with 1). Possibly, a page header occupies this line.

SY-STACO
Number of the first column displayed in the list from which the event was triggered
(counting starts with 1)

COMPANY CONFIDENTIAL 8
Interview Questions

SY-UCOMM
Function code that triggered the event

SY-PFKEY
Status of the displayed list

Q. To execute a page break under the condition that less than a certain number of
lines are left on a page is achieved by
A. RESERVE n lines

Q. What are the events used for page headers and footers
A. The events TOP-OF-PAGE and END-OF-PAGE are used for page headers and footers

Q. What is the difference between PARAMETERS and SELECT-OPTIONS


A. The system generates input-ready fields in the selection screen with PARAMETERS
stmt. Whereas SELECT-OPTIONS allows a range of values as well as complex
selections instead of just a single input-ready field.

Q. If you make reference to a dictionary object that has a foreign key established,
how to verify that the input is valid.
A. Using VALUE CHECK

Q. How to suppresses multiple single or multiple range selections in select-options


A. NO-EXTENSION

Q. How to suppresses the seltab-high (upper interval limit) entry on the selection
screen
A. NO INTERVALS

Q. When is AT SELECTION-SCREEN ON END OF <field>


A. The event AT SELECTION-SCREEN ON END OF <field> belongs to the PAI processing
of the selection screen for multiple selections

Q. How to provide F1 (general help) and F4 (possible entries) in report program


A. AT SELECTION-SCREEN ON HELP-REQUEST and AT SELECTION-SCREEN ON
VALUE-REQUEST.

Q. What is the difference between LOAD-OF-PROGRAM and INITIALIZATION


A. Initialization is available for executable programs only.
If both events are present in program, LOAD-OF-PROGRAM will be executed first.

Q. How many parallel detail lists possible in interactive reports? What happen if it
exceed
A. 20 parallel lists are possible. If it exceeds 20, it gives a short dump.

Q. How does data transport takes place between list


A. 1)Using Hide area
2)GET CURSOR statement to create detail lists according to the cursor position

Q. Is the basic list deleted when the new list is created

COMPANY CONFIDENTIAL 9
Interview Questions

A. NO. It is not deleted

Q. In which system field does the name of current gui status is there
A. The name of the current GUI STATUS is available in the system field SY-PFKEY

Q. What is meant by hide area


A. The hide command temporarily stores the contents of the field at the current line in a
system-controlled memory called the HIDE AREA. At an interactive event, the contents
of the field is restored from the HIDE AREA

Q. What is GET CURSOR command used for


A. The GET CURSOR command returns the name of the field at the cursor position in a
field specified after the addition field, and the value of the selected field in a field
specified after value.

Q. How to call other programs


A. Report
Call and return - SUBMIT AND RETURN
Call without return – SUBMIT

Transaction
Call and return - CALL TRANSACTION
Call without return - LEAVE TO TRANSACTION

5. Modularization using Subroutines

 Easy questions

Q. What is a subroutine and why is it required


A. A subroutine is an internal module within a program. Using subroutines makes your
program more function oriented: it splits the program's task into sub functions so that
each subroutine is responsible for one sub function. This generally makes programs
easier to maintain.

Q. How do you define the structure of a subroutine


A. The structure of a subroutine includes the following:
- Each subroutine starts with FORM and ends with ENDFORM.
- The name of the subroutine is followed by the interface definition.
- The statements that the subroutine executes come between FORM and ENDFORM.

Q. What are actual and formal parameters with respect to a subroutine


A. Data which is passed from the main program is called actual parameters. Data
received in the interface of the subroutine is called formal parameters.

Q. How are internal tables passed


A. By reference

 Medium Questions

COMPANY CONFIDENTIAL 10
Interview Questions

Q. Methods of parameter passing between main program and subroutine


A. Call-by-value – A local copy of the actual parameter is passed to the subroutine. This
means that value assignments to the formal parameter have absolutely no effect on the
actual parameter.

Call-by-reference – A dereference address of the actual parameter is passed to the


subroutine. This means that value assignments to the formal parameter directly affect
the actual parameter. The value of the actual parameter is physically changed by the
subroutine through the address.

Call-by-value-and-result – A local copy of the actual parameter is passed to the


subroutine and a value is passed back to the main program only if the ENDFORM
statement is executed. This means that value assignments to the formal parameter
affect the actual parameter only after they have left the subroutine. Choose this option if
you want to make sure that the actual parameter is not changed if the subroutine is
terminated prematurely.

Q. What is the sequence of parameter passing


A. The sequence of parameters is fixed: first you name all the USING parameters, and
then you name all the CHANGING parameters. The actual parameters are grouped by
USING and CHANGING when the subroutine is called.

Q. Way in which parameters are passed to the interface


A. Call-by-value (f1) – You list these parameters after the USING keyword and complete
them with the value (f1) addition.

Call-by-reference (f2) – You list these parameters after the CHANGING keyword. (For
documentation purposes, you can also list a pass-by-reference parameter after USING.
Technically, USING and CHANGING have exactly the same effect. (However, if you
change a parameter listed after USING in the subroutine, you receive a warning in the
Extended Program Check.)

Call-by-value-and-result (f3) – You list these parameters after the CHANGING keyword
and complete them with the value(f3) addition

Q. Do we need to specify the type of the formal parameters


A. If you use elementary types, you can decide whether or not you want to specify the
type of the formal parameters. By specifying the type of the formal parameters, you
ensure that only actual parameters of that type can be passed to the subroutine.

Q. What happens if you leave the type unspecified and how do you do that
A. If you use the TYPE ANY addition, you leave the type unspecified. (For compatibility
reasons, you can also omit this addition.) In this case, the formal parameter inherits the
type from the actual parameter at run time. If the statements in the subroutine are not
suited to the inherited type, a runtime error may occur.

Q. What is the life of local variables and formal parameters


A. Both the formal parameters and the local data objects are active only at the run time of
the subroutine. This means that memory is allocated only when the subroutine is called
and is released as soon as the subroutine has been executed. Thus these parameters
and data objects can be addressed only from within the subroutine.

COMPANY CONFIDENTIAL 11
Interview Questions

Q. Can we keep the name of a local data object or a formal parameter same as that of
a global variable OR
What are locally obscured objects
A. If a local data object or formal parameter has the same name as a global data object,
the ABAP runtime system addresses the local data object in the subroutine and the
global one outside it. These objects are then known as locally obscured objects.

Q. What about passing structures and internal tables


A. If you use structures or internal tables as formal parameters, you must type them
fully. This allows you to access these formal parameters within the subroutine. If you use
internal tables, the assigned type allows you to address the formal parameter as an
internal table with the usual syntax.

6. Memory Management

 Medium Questions

Q. What happen when we call function module from a program


A. When a function module is called, the corresponding function group is loaded into the
current internal session and the called function module is processed. Processing of
the calling program is interrupted and continued after the function module has been
executed.

Q. What happen when we call program using CALL TRANSACTION or SUBMIT AND
RETURN
A. The program called using CALL TRANSACTION or SUBMIT AND RETURN runs in a
separately opened internal session that contains a new program context.
After the called program has been completed, the new internal session is deleted and
processing is continued for the calling program.

Q. What happen if a program is called through the SUBMIT statement.


A. If a program is called through the SUBMIT statement, the context of the calling program
is removed from the current internal session and the called program is loaded for
processing.

Q. What happen when LEAVE TO TRANSACTION statement is used


A. The LEAVE TO TRANSACTION statement removes all the internal sessions of the
current external session and opens a new internal session for processing the called
transaction.
When this happens, the ABAP memory is initialized! This means, in particular, that you
cannot pass any data to the called transaction through the ABAP memory.

Q. What happen when asynchronous function module is called


A. Function modules that have been called asynchronously are processed on the same
application server in a newly opened external session

Q. What are the different ways of passing on data to a program when it is called
A.  Through the interface of the called program (interface of a subroutine, function

COMPANY CONFIDENTIAL 12
Interview Questions

module, or dialog modules, standard selection screen of a report)


 Through the ABAP memory
 Through the SAP memory
 Through database tables
 Through files on your presentation server or application server

Q. What do you mean by EXPORT TO MEMORY ID <id> statement


A. Using the EXPORT TO MEMORY ID <id> statement, you can copy variables of your
program with their current values as data clusters into the ABAP memory. The ID you
specify here uniquely identifies the created data cluster (maximum 32 characters).
An export to the same memory ID will overwrite the corresponding data cluster

Q. How to delete the respective data cluster.


A. FREE MEMORY ID <id>

Q. What is the difference between ABAP Memory and SAP Memory


A. ABAP Memory is used to pass data between internal sessions of external session. It is
done using EXPORT and IMPORT statement. Whereas SAP memory is used to pass
data between external sessions of a user terminal. It is done using SET PARAMETER
and GET PARAMETER.

7. Lock Objects

 Easy questions

Q. Which are the 2 function modules generated while creating lock objects
A. Enqueue_<lock object name>, Dequeue_<lock object name>
Q. What are there uses?
A. Enqueue_<lock object name> - To set lock on records of a table or entire table itself,
Dequeue_<lock object name> - To release lock

Q. Which is the function module to release all lock


A. Dequeue_all

Q. What is the order to be followed while updating database table?


A. Lock - Read - Change – Unlock

 Medium Questions

Q. What are the 3 modes while creating lock objects


A. Shared(S), Exclusive(X) and Extensible(E)

Shared - This mode ensures that data displayed in your program cannot be changed by
other users during the entire display time.

Exclusive - This mode is used like mode E for changing data. The only technical
difference from mode E is that the respective lock does not allow accumulation.

COMPANY CONFIDENTIAL 13
Interview Questions

Extensible - This sets a lock for changing data. This lock can be accumulated.

 Difficult Questions

Q. What is the use of container in lock object


A. For every lock request, it contacts administrator. So if there are more locks to be set, it
has to communicate again and again. In order to communicate only once, container
concept came into picture. While setting the lock, set the collect_container parameters
as 'X' to keep it in container. Then use function module ENQUEUE_FLUSH to set lock
for all object. If any error, then neither of the lock is set.

Q. What is the effect of setting another lock from other program (PGM2), when
already lock is provided on the same table in some program (PGM1)?
A. PGM 2 PGM 1(Mode already set)

Only shared(S) possible S


Not possible X
Not possible E

Q. What is the effect of setting another lock from same program (PGM1), when
already lock is provided on the same table in program (PGM1)?
A. PGM 1 PGM 1(Mode already set)
Shared(S) and E possible S
(If you have an existing S lock, further S locks for the same data record can be set from
within the same program. If, in addition, there are no further shared locks set by another
user for this data record, you can also set an additional E lock. No X lock can be set if
there is an existing S lock.)

Not possible X
Shared(S) and E possible E

8. Logical Database

 Easy questions

Q. How do we specify a logical database in program?


A. You must enter the LDB name in the program's attributes.
Q. Three main elements of LDB.
A. Structure, Selections, Database Program.

Q. In LDB what determines hierarchy of the tables?


A. Structure.

Q. The layout of the Database program is determined by both


A. Structure and selections.

 Medium Questions

COMPANY CONFIDENTIAL 14
Interview Questions

Q. What are the advantages of Logical Data Bases?


A. -The system generates a selection screen.
-The programmer does not need to know the exact structure or relationship of the tables
involved; the data is made available to the application program in primary key
sequence. Data is formatted for output in the GET events.
-Performance improvements within logical databases directly affect all programs linked
to the logical database without having to change the programs themselves.
-Maintenance and enhancements can be performed at a central location.
-Authorization checks are done in the logical database program rather than in the
application program.

Q. When is Get <node> Late event triggered?


A. The GET <node> LATE event triggers when all subordinate nodes of node <node> have
been processed, before the data is read for the next <node> (whenever a hierarchy level
has been completed).

Q. How the interaction between LDB and database does takes place?
A. When a report program that uses a logical database is started, control is initially passed
to the database program of the logical database. Each event has a corresponding
subroutine in the database program (for example, subroutine init for event
INITIALIZATION). During the interaction between the LDB and the associated report, the
subroutine is always processed first, followed by the event (if there is one in the report).

Logical database programs read data from a database according to the structure
declared for the logical database.

The logical database reads the data in the PUT_<NODE> subroutines. During event
PUT, control passes from the database program to the GET event of the associated
report. The data is made available in the corresponding work areas in the report. The
processing block defined for the GET event is performed. Control then returns to the
logical database. PUT activates the next form subroutine found in the structure.

 Difficult Questions

Q. Suppose a logical database program contains the following lines :


SELECT-OPTIONS CONNID FOR SPFLI-CONNID .
PARAMETERS CARRID LIKE SFLIGHT-CARRID FOR TABLE SFLIGHT.
If the tables statement in a report declares only SPFLI but not SFLIGHT what will
be the output, for the above two statements?
A. Only select-options connid for spfli-carrid will be displayed on the screen.

Q. Consider a report with F1S attribute, what will be the output for the following
code. Whether you will get the data from spfli and sflight or not, with
corresponding tables statement GET SBOOK.
Write: / spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid. (F1S structure
SPFLI-->SFLIGHT-->SBOOK)
A. Yes, you will get the data from spfli and sflight.

Q. Consider a report with F1S attribute, what will be the output for the following
code. Whether you will get the data from spfli and sflight or not, with
corresponding tables statement GET SFLIGHT.

COMPANY CONFIDENTIAL 15
Interview Questions

Write: / spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid.


A. You cannot extract data from sbook.

9. Number Ranges

 Easy questions

Q. Number range object maintenance Transaction


A. SNRO
Q. What does Warning % field indicate while defining number range object
A. This determines with which percentage of remaining interval a warning is displayed

Q. Which is the function module used in determining the next available number
A. NUMBER_GET_NEXT

 Medium Questions

Q. Can we define different number range intervals for one object


A. Yes, either specify the fiscal year or specify numbers in number range field

10. LUW

 Medium Questions

Q. Different type of LUW


A. SAP LUW , Database LUW
An SAP LUW (Logical Unit of Work) consists of changes in SAP R/3 that logically
belongs together. These changes are either carried out in full or they are not carried out
at all ("all or nothing" principle).
A database LUW consists of changes that are executed until the database status is
"sealed" (DB Commit). Within a database LUW, it is always possible to discard all the
changes that have taken place up to that point (DB rollback), in which case the database
is reset to the status it had before the current database LUW. You use this DB rollback
function to restore the previous (consistent) database status if an error has occurred.
The SAP LUW must be processed within a DB LUW.

11. Database Update

 Easy questions

Q. How do u create update function module


A. Using transaction SE37, then selecting processing mode as Update Module
Q. Update function module includes which interface parameters
A. IMPORTING and TABLES parameters

Q. Which system field will contain how many records in database has been process
A. sy-dbcnt

COMPANY CONFIDENTIAL 16
Interview Questions

 Difficult Questions

Q. If you want your database updates from dialog mode to be executed in bundled
form , i.e. you want to ensure that your database changes are processed using the
"all or nothing" principle, what should be done.
A. By using the special subroutine technique PERFORM <subroutine> ON COMMIT. The
statement PERFORM <subroutine> ON COMMIT registers the subroutine that has been
specified. This will not be executed until the system reaches the next COMMIT WORK
statement

Q. Two types of update modules


A. V1 and V2

Q. When programming inline changes and update modules, what are the rules to be
adhere?
A. Create new table entries first. Their database locks pose the least "interference" for
other users.

Perform table updates that are not critical to performance. As a rule, these tables are
accessed simultaneously by relatively few users.

Always change tables that represent central resources in the system (tables accessed
by several users simultaneously) late within an LUW, if possible, so that the respective
database locks hinder others only for a short time.

12. ABAP OBJECTS

 Easy questions

Q. Why did ABAP Objects come into picture when we have function group ( as class
in ABAP Objects is equivalent to function group )
A. 1) When we call function module of Function group, its entire instance is loaded into
internal session of program memory. When we call function module again, it uses the
same instance and work with the changed global attributes. Thus state of an attribute is
not maintained through function module. No multiple instances are created.
In case of ABAP objects, state of an object is maintained. Multiple instance of a class
can also be created.

2)When user uses the function module, it should provide the same interface parameter
required by FM. Suppose if FM changes its interface, it will affect many user and it’s
difficult to predict the implication. The only way to avoid this to rely on interfaces that
guarantee that it will not be changed or its implementation is hidden from outside world.
In FM there is no visibility concept. This requirement is met by ABAP objects through
encapsulation.

Q. What is equivalent to function group in ABAP Objects


A. Class

Q. What is difference between class and objects


A. Class is the template of an object. It is an abstract concept, which is realized by creating

COMPANY CONFIDENTIAL 17
Interview Questions

an object from it.

Example - What is your idea about a Maruti-800 car? You will say that it is a four-wheel,
five seater vehicle with an 800 cc engine.
The idea you have in your mind is the class for Maruti-800.Let us call it as class Maruti-
800.

Now, you see a real Maruti-800 car in front of you. So, this is the object of class Maruti-
800. In other words, the real car is realization/ instantiation of the class Maruti-800.

Q. How is object characterized


A. Object is characterized by state of objects, behaviour of an object and identity.

State of an object contains the current value of all it attributes.


Behaviour of an object is how object acts or reacts to its change of state
Identity is that property of objects which makes it unique from other objects.

Q. What is the difference between local classes and global classes


A. Local classes are only known within the program in which they are defined and
implemented. Local classes are not stored in the Repository (no TADIR entry). There is
no "global" access to these classes or interfaces. No where-used list possible.

Global classes are access from all programs using type ref to.
Global classes are stored in the Repository (TADIR entry).Where-used list possible

Q. What do you mean by READ-ONLY addition to public attribute


A. The READ-ONLY addition means that a public attribute declared with DATA can be read
from outside, but can only be changed by methods of the class.

Q. How to protect your attributes from access from outside the class
A. Declare it as private attributes.

Q. What is the difference between public attribute and private attributes


A. Public attributes can be viewed and changed by all other users. Direct access possible.
Private attributes can be viewed and changed by class itself. No access from outside the
class.

Q. What is the use of private component


A. Let us assume that a class changes its private components, while its interface remains
unchanged. Any user who simply needs to access the interface of the class can carry on
working with the class as usual. The user does not notice the change.
However, if a class changes its public components, then any user who accesses these
public components must take these changes into account.

Q. How to access private attributes from outside


A. We can access private attributes through public methods.

Q. What are two kinds of attributes? What is the difference between them
A. Static attributes exist only once for each class and are visible for all (runtime) instances
in that class. Static attributes are defined using the ABAP keyword CLASS-DATA.

COMPANY CONFIDENTIAL 18
Interview Questions

Instance attributes are attributes that exist separately for each object.
Instance attributes are defined using the ABAP keyword DATA.

Q. What is the difference between Public method and Private method


A. Public method can be called from anywhere. Private method can be called only within
the class.

Q. What is the difference between instance method and static method


A. Instance method can use both instance and static component. It is called using instance.
They are defined using METHODS.

Static method can use only static components. It is called using class .They are defined
using CLASS-METHODS.

Q. What do you mean by DATA: r_vehicle1 TYPE REF TO lcl_vehicle


A. DATA: r_vehicle1 TYPE REF TO lcl_vehicle declares a reference variable that acts as a
pointer to an object.

Q. How to create objects


A. Objects are created using CREATE OBJECT.
Objects can only be created and address using reference variables.

Q. How to access the instance methods and static methods


A. Instance methods: CALL METHOD <reference>-<method>.
Static methods: CALL METHOD <classname>=><class_method>.

 Medium Questions

Q. How do instances of class share their common attributes


A. By declaring components as static.

Q. What are the interface parameters of methods


A. Methods can have IMPORTING, EXPORTING, CHANGING, RETURNING and
RAISING

Q. What is functional method


A. Methods that have a RETURNING parameter are described as functional methods.
These methods cannot have EXPORTING or CHANGING parameters .You can only do
this for a single parameter, which additionally must be passed as a value.

Q. What is the use of garbage collector? How do we use it


A. The Garbage Collector is a system routine that automatically deletes objects that can no
longer be addressed from the main memory and releases the memory space they
occupied.

Q. If you want to keep several objects from the same class in your program, how to
do
A. Define an internal table which only consists of one column containing the object
references for this class. You can process the objects using a LOOP through the internal

COMPANY CONFIDENTIAL 19
Interview Questions

table.

Q. Why only static components can be used in Static methods


A. Whenever static method is invoked, no (ME) address is passed to this methods.

Q. What is the use of defining constructor


A. We need to implement the constructor when:
We need to initialize attributes that cannot be covered by the VALUE addition to the
DATA statement
- We need to modify static attributes

Q. Can constructor be called explicitly


A. No

Q. When is constructor called


A. The constructor is automatically called at runtime within the CREATE OBJECT
statement.

Q. What is static constructor


A. The static constructor is a special static method in a class with the name
class_constructor. It is executed precisely once per program.

Q. When is static constructor called


A. The static constructor of a class <classname> is called automatically when the class is
first accessed, but before any of the following actions are executed:
Creating an instance in the class using CREATE OBJECT <obj>, where <obj> has
the data type REF TO <classname>
Addressing a static attribute using <classname>=><attribute>
Calling a static attribute using CALL METHOD <classname>=><classmethod>
Registering a static event handler method using SET HANDLER
<classname>=><handler_method> FOR <obj>
- Registering an event handler method for a static event in class <classname>.

Q. How can we address the objects inside the method


A. Using reference variable ‘ME’

Q. What do you mean by Generalization and Specialization


A. Generalization is factoring out common elements into more general class
i.e. .superclass.
Specialization requires the depth of experience in a particular domain. As and when we
go up in the hierarchy, we are generalizing the class.
As we do down the hierarchy, we go on adding special features to the component to
make it specialized.

A superclass is a generalization of its subclasses. The subclass in turn is a


specialization of its superclasses.

Q. Can we have multiple inheritances in ABAP Objects


A. No

COMPANY CONFIDENTIAL 20
Interview Questions

Q. Can subclass remove any components from superclass


A. No
Q. Why it is said Inheritance is a "one-sided relationship”
A. Subclasses know their direct superclasses, but (super) classes do not know their
subclasses.

Q. Can we change the signature of methods which are redefine in subclass


A. No, except constructor

Q. How to redefine the static method


A. Static method cannot be redefine

Q. What is the visibility of protected section


A. The visibility of these components lies between that of the public components (visible to
all users, all subclasses, and the class itself), and private (visible only to the class itself).
Protected components are visible to and can be used by all subclasses and the class
itself.

Q. If a subclass add some new components, is it visible by superclass reference


A. No

Q. Why is events used


A. By triggering an event, an object or class announces a change of state, or that a certain
state has been achieved.

Q. Which the transaction used to define global classes


A. SE24

Q. Can constructor or static method be abstract


A. No

Q. What happen when we declare class as final


A. A final class cannot have subclasses, and can protect itself in this way against
(uncontrolled) specialization.

Q. Can methods be both final and abstract.


A. No

Q. Can class be both final and abstract.


A. Yes. Only static components can be used.

Q. What is friend concepts


A.
In rare cases, classes have to work together so closely that they need access to their
protected and private components. To avoid making these components available to all
users, there is the concept of friendship between classes.
To do this you use the FRIENDS additions to the CLASS statement, in which all classes
and interfaces that are to be provided friendship are listed. Friends are allowed to
access the protected and private components of the class providing the friendship and
can always create instances of this class, regardless of the CREATE addition to the

COMPANY CONFIDENTIAL 21
Interview Questions

CLASS statement.

Q. Which is the block executed before leaving the TRY-ENDTRY structure.


A. CLEAN-UP

 Difficult Questions

Q. If a class inherit from superclass and if subclass reference calls a method of


superclass and if method uses private attribute which are declare in both class,
which attribute will it consider
A. Methods that a subclass inherits from a superclass use the private attributes of the
superclass, and not any private components of the subclass with the same names.

Q. Can a method defined in private section be redefined


A. No, since a class's private methods are not visible and therefore cannot be redefined in
subclasses

Q. If, for example, a superclass method M1 contains a call CALL METHOD [ME->]M2,
and M2 is redefined in a subclass, calling M1 from an instance of the superclass,
which method will it call.
A. Calling M1 from an instance of the superclass will cause the original method M2 to be
called, and calling M1 from an instance of the subclass will cause the redefined method
M2 to be called.

Q. If we need to call the method of the same name in the immediate superclass, how
to do
A. Use pseudo-reference super.

Q. Why the constructor of the superclass should must be called within the
constructor of the subclass.
A. To ensure that objects are initialized correctly. Only the class itself, however, can
initialize its own (private) components correctly; this task cannot be carried out by the
subclass. Therefore it is essential that all (instance) constructors are called in an
inheritance hierarchy (in the correct sequence).

Q. Why it is possible for superclass reference to access the sub class components
which are inherited by superclass
A. This is possible because the subclass has inherited all components from the superclass
and therefore has the same interface as the superclass

Q. What is narrowing cast or upcast


A. The assignment of a subclass instance to a reference variable of the type "reference to
superclass" is described as a narrowing cast.

Q. What do you mean by ?= cast operator


A. With this kind of cast, a check is carried out at runtime to ensure that the current content
of the source variable corresponds to the type requirements of the target variables. If it
is, the assignment is carried out. Otherwise, an exception of the error class
CX_SY_MOVE_CAST_ERROR is raised.

Q. How is interface components addressed in the class carrying out the

COMPANY CONFIDENTIAL 22
Interview Questions

implementation
A. By prefixing the interface name, followed by a tilde (the Interface Resolution
Operator): <interfacename>~<componentname>.

Q. What are steps required for triggering and handling the events
A. - A class defines its:
Instance events (using the EVENTS statement)
Static events (using the CLASS-EVENTS statement)
- A class or instance can trigger an event at runtime using the RAISE EVENT statement.
- Classes or their instances that receive a message when an event is triggered at
runtime and want to react to this event define event handler methods.
Statement:
[CLASS-]METHODS <handler_method> FOR EVENT <event> OF <classname>.
- These classes or their instances are registered to one or more events at runtime.
Statement:
SET HANDLER <handler_method> FOR <reference>. (for instance events)
SET HANDLER <handler_method>. (for static events)

Q. If two handler method are registered for an event, which handler method will be
called
A. Both. It will be called in the order which is first registered.

Q. Providing friendship is one-sided? Explain


A. A class providing friendship is not automatically a friend of its friends. If a class providing
friendship wants to access the non-public components of a friend, this friend has to
explicitly provide friendship to it.

Q. Exception classes are derived from the which of the classes? Name them
A. CX_NO_CHECK, CX_DYNAMIC_CHECK, or CX_STATIC_CHECK, themselves derived
from the common superclass CX_ROOT.

Q. Which are the two predefined methods that are inherited by the other exception
classes.
A. The GET_SOURCE_POSITION method returns the program name, include name (if
relevant), and line number in the source code where the exception occurred. The
GET_TEXT method returns an exception text of a class in the form of a string.

Q. How to create only one instance of a class


A. Using singleton concept. Create private and final.

13. Module Programming

 Medium questions

Q. Object Navigator Transaction


A. SE80
Q. Why do you specify Next screen attribute
A. It allows you to specify the screen that should be processed after the current screen in a
fixed sequence.

COMPANY CONFIDENTIAL 23
Interview Questions

Q. What are the different screen types


A. 1) Normal 2) Sub screen 3) Modal Dialog box 4) Selection Screen

Q. If you enter 0 (or no value) for the next screen, what will happen
A. The system resumes processing from the point at which the screen was called once it
finishes processing the screen itself

Q. 2 ways to create a screen.


A. By using transaction SE80, call screen <nnnn>.

Q. Which are the 2 processors involved in module pool programming?


A. ABAP processor controls the program flow within a module. The DYNP processor
controls the flow logic and prepares data to be displayed on the screen

Q. What are the 4 events triggered in Module Pool programming


A. 1) PBO 2) PAI 3) POH 4) POV

Q. Which is the field to store the current screen number


A. Field SY-DYNNR

Q. In which section are Global fields declared


A. TOP Include

Q. In which module can we changed the dynamically the attributes of elements on


the screen
A. PBO module

Q. How to change the dynamically modifiable attributes of the elements on the


screen in a module at PBO
A. LOOP AT SCREEN. …. MODIFY SCREEN. …. ENDLOOP.

Set attributes have the value ‘1’; attributes that are not set have the value ‘0’.
Query on the fields of screen table e.g. SCREEN-NAME or SCREEN-GROUP1 to
SCREEN-GROUP4.

Q. At run time how can you temporarily override the static next screen
A. Using the SET SCREEN <nnnn> statement

Q. To specify the next screen and leave the current screen in a single step, what is
the statement used
A. LEAVE TO SCREEN <nnnn> statement

Q. How to return to the statement following the CALL SCREEN statement from one
screen
A. You can use either SET SCREEN 0. LEAVE SCREEN.
or
LEAVE TO SCREEN 0.

Q. How to set a title for the screen


A. SET TITLEBAR <title_name> WITH <&1> ... <&9>.

COMPANY CONFIDENTIAL 24
Interview Questions

Q. How to create GUI status


A. SET PF-STATUS 'STATUS'.

Q. What is status icon


A. A status icon is an output field that contains an icon. You choose the relevant icon at run
time. Icons allow you to indicate a status in your application.

Q. How the data exchange between screen and program takes place
A. For a screen and its ABAP program to be able to communicate, the fields on the screen
and the corresponding fields in the program must have identical names.

a) After it has processed all of the modules in the PBO processing block, the system
copies the contents of the fields in the ABAP work area to their corresponding fields in
the screen work area.

b) Before it processes the first module in the PAI processing block, the system copies
the contents of the fields in the screen work area to their corresponding fields in the
ABAP work area.

Q. How to change the attributes of several screen elements simultaneously at run


time
A. Assign the elements to same group and query on the group name.

Q. Each element can be assigned to how many group


A. 4

Q. Is it possible that elements you have defined statically in the Screen Painter as
invisible can be reactivated with SCREEN-ACTIVE = 1. If no, then what is the other
way
A. No, Instead use the statement SCREEN-INVISIBLE = 0.

Q. Is it possible that elements you have statically defined as visible in the Screen
Painter can dynamically be made invisible with SCREEN-ACTIVE = 0
A. Yes

Q. How to perform checks on a particular field


A. To do this, use the FIELD <field_name> statement with the MODULE addition.

Q. When the system displays a screen, it automatically places the cursor in the first
input field. If you want the cursor to appear in a different field, how to you do that?
A. SET CURSOR FIELD <object_name> OFFSET <position>.

Q. How to create display icon


A. In the ABAP program, define a field with the same name as the screen field using the
TEXT field from the ICONS structure. At run time, this field contains the name of the icon
you want to display. At run time, assign the required icon to this field using the
ICON_CREATE function module

Q. What happen if warning or error message occurs in the module with field
statement in addition
A. If an error or warning message occurs during the module, the system sends the screen

COMPANY CONFIDENTIAL 25
Interview Questions

again, but without processing the PBO module. The message is displayed; only the field
to which the check was applied is ready for input.

Q. How to check group of fields


A. If you want to ensure that more than one field is ready for input following an error dialog,
you must list all of the relevant fields in the FIELD statement, and include both that and
the MODULE statement in a CHAIN … ENDCHAIN block.

Q. What are different type of messages


A. A, X, E, W, I, and S
A - The processing terminates and the user must restart the transaction
X - Like message type A, but with short dump MESSAGE_TYPE_X
E - Processing is interrupted, and the user must correct the entry
W - Processing is interrupted and the user can correct the entries
I - Information Processing is interrupted, but continues when the user has confirmed the
message (by selecting Enter).
S - Information is displayed on the next screen

Q. What is the order of data transport from screen work area to ABAP work area
A. The system transports data from screen fields into the ABAP fields with the same name
in the PAI processing block. First, it transports all fields that are not contained in any
FIELD statements. The remaining fields are transported when the system processed the
relevant FIELD statement.

Q. What is the use of ON INPUT addition in a MODULE statement after FIELD


A. The module is called only if the field contents have changed from their initial value.

Q. What is the use of ON CHAIN-INPUT addition


A. The module is then called if the contents of at least one screen field within the CHAIN
block have changed from their initial value.

Q. What is the use of ON REQUEST addition in a MODULE statement after FIELD


A. The module is called only if the user enters a new value in that field.

Q. How to avoid the field input checks


A. Implement the module with the AT EXIT-COMMAND addition. You may use the AT
EXIT-COMMAND addition with only one module for each screen.

Q. What do you mean by subscreen area


A. A subscreen area is a reserved rectangular area on a screen, in which you place
another screen at run time. Subscreen areas may not contain any other screen
elements. To use a subscreen, you create a second screen (with the type subscreen)
and display it in the subscreen area you defined on the main screen.

Q. What are the restrictions apply to subscreens


A. CALL SUBSCREEN is not allowed between LOOP and ENDLOOP or between
CHAIN and ENDCHAIN.

A subscreen may not have a named OK_CODE field.

Object names must be unique within the set of all subscreens called in a single main

COMPANY CONFIDENTIAL 26
Interview Questions

screen.

Subscreens may not contain a module with the AT EXIT-COMMAND addition.

You cannot use the SET TITLEBAR, SET PF-STATUS, SET SCREEN, or LEAVE
SCREEN statements in the modules of a subscreen.

Q. How to call the subscreen and in which part it should be called


A. To use a subscreen, you must call it in both the PBO and PAI sections of the flow logic
of the main screen. The CALL SUBSCREEN <subarea> statement tells the system to
execute the PBO and PAI processing blocks for the subscreen as components of the
PBO and PAI of the main screen.

Q. If the subscreen is not in the same module pool as the main program, the global
data of the main program is not available to the subscreen. How does data
transfer takes place in this case?
A. If you want to use subscreens in the screens of several different programs, you
encapsulate the subscreens in a function group and use function modules to transport
data between the program in which you want to use the subscreen and the function
group. You pass data between the calling program and the function group using the
interfaces of the function modules.

Q. What are the steps to create a tabstrip control


A. Define the tab area.
Define the tab titles and, if necessary, add further tab titles.
Assign a subscreen area to each page element.

Q. How does data transfer takes place between ABAP program and Tabstrip
A. Declare an object with the same name using the CONTROLS statement and TABSTRIP
as the type

Q. What happen if the tab title has function type space and what happen if it has P
A. If the function type is ' ‘(space), the PAI processing block is triggered when the user
chooses that tab and the function code of the tab title is placed in the command field. If
the function type is P, the user can scroll between different tab pages of the same type
without triggering the PAI processing block.

Q. To program a tabstrip control to scroll locally at the front end, what has to be
done
A. Assign a separate subscreen area to each tab page. A subscreen will be sent to each of
these when the screen is processed.
Call all of the subscreens from the flow logic.
Assign function type P to all of the tab titles.

Q. If you want the application program to process scrolling in a tabstrip control, what
are the requirements to be met
A. All of the tab pages must share a common subscreen area.
All of the tab titles must have the function code type ' (space).
In the flow logic, you must use a variable to call the screen that is to be displayed in the
subscreen area.

Q. Where is the function code of the active tab title placed

COMPANY CONFIDENTIAL 27
Interview Questions

A. ACTIVETAB

Q. What are the steps to create a table control


A. A table control area
Table control fields

Q. How does data transfer takes place between ABAP program and Table control
A. Declare an object with the same name using the CONTROLS statement and
TABLEVIEW as the type.

Use the DESCRIBE TABLE statement to find out the number of entries in the internal
table and save this number in the lines field of the table control.

In the PBO processing block, you must fill one line of the table control with the
corresponding line from the internal table in each loop pass using statement
LOOP AT <itab> INTO <wa_itab> WITH CONTROL <tc_name>.

In the PAI processing block, you must pass the changes made in the table control back
to the correct line of the internal table. The changed record index can be fetch from
<control>-current_line

14. Enhancements

 Easy questions

Q. What is the difference between Modifications and Enhancements


A. Changes to SAP Repository objects made at the customer site are known as
Modifications. Creating Repository objects for individual customers that refer to objects
that already exist in the SAP Repository is known as Enhancements.

Q. What do you mean by corrections and repairs


A. Changes to an original are called corrections. They are recorded in a change request
whose tasks have the type Development/correction.

If, on the other hand, you change a copy (an object outside its own original system), the
change is recorded in a task with the type Repair. Repairs to SAP objects are called
modifications.

 Medium Questions

Q. Which is the transaction used for maintaining Transaction variants


(Personalization)
A. SHD0

Q. How to enhance tables


A. By using append table
By using Customizing Includes

COMPANY CONFIDENTIAL 28
Interview Questions

Q. What is the difference between append table and customizing include


A. Append structures allow you to enhance tables by adding fields to them that are not part
of the standard. With append structures; customers can add their own fields to any table
or structure they want.
Append structures are created for use with a specific table. However, a table
can have multiple append structures assigned to it.

If it is known in advance that one of the tables or structures delivered by SAP needs to
have customer-specific fields added to it, the SAP application developer includes these
fields in the table using a Customizing include statement.
The same Customizing include can be used in multiple tables or structures

Q. What does text Enhancement includes


A. Text enhancements include customer keywords and customer documentation of data
elements.

Q. What does customer keywords consists of


A. Short, Medium, Long, Header and Short Text of data element.

Q. What is the condition for keyword changes to take effect on a screen


A. In order for keyword changes to take effect on a screen, SAP application programmers
have to maintain the MOD attribute (keyword modification indicator) of the affected field
accordingly in the Screen Painter field list.

The MOD attribute must have one of the following values:


SPACE: the keyword that best fits the field length
1: short keyword
2: medium keyword
3: long keyword
4: keyword for header
V: variable text transfer from the ABAP Dictionary
F: fixed, no text transfer

If F is entered, then the keyword is fixed on the screen and cannot be replaced. In all
other cases, screens that refer to that particular data element will show the changed
keyword.

Q. What is the difference between SMOD and CMOD


A. The SAP application programmer creates SAP enhancements from function module
exits, menu exits and screen exits. A management function is provided for this purpose
(transaction code SMOD).

Customers are given a catalog containing an overview of existing SAP enhancements.


They can then combine the SAP enhancements they want into an enhancement project
using transaction CMOD.

Q. What are the steps for SAP Enhancement creation


A. First, create an enhancement project and then choose the SAP enhancements that you

COMPANY CONFIDENTIAL 29
Interview Questions

want to use using transaction CMOD

Next, edit your individual components using the project management function and
document the entire enhancement project.

Finally, activate the enhancement project. This activates all of the project's component
parts.

Q. What are the various types of customer exits / Enhancements


A. Menu exits
Screen exits
Function module exits

Q. How is the function module exits called


A. CALL CUSTOMER-FUNCTION 'nnn' where nnn is a three-digit number

Q. If you want to change an SAP Repository object, what information must be


provided to the Workbench Organizer
A. If you want to change an SAP Repository object, you must provide the Workbench
Organizer with the following information:
SSCR key
Change request

 Difficult Questions

Q. Where do we write our code in function module exit


A. The function module, contains an INCLUDE statement for an include program that we
have to create in the customer namespace

Q. What should have been done in order for you to be able to implement menu exits?
A. In order for you to be able to implement menu exits, SAP application programmers must
equip the GUI interface with function codes that begin with a plus sign (+), assigns them
to menus, and provides a function module exit.

Q. What are BTE


A. Business Transaction Events (BTE) allow you to attach additional components, in the
form of a function module, for the financial accounting components of R/3

Q. What are the two type of interfaces used by BTE


A. - Publish & Subscribe interfaces
- Process interfaces

Q. How do we know SAP application provides BTE


A. Search for function module that begins with OPEN_FI_PERFORM_ or
OUTBOUND_CALL.

Q. Which is the transaction used for executing all of the actions necessary for using
Business Transaction Events.
A. FIBF

COMPANY CONFIDENTIAL 30
Interview Questions

Q. Is BTE client-specific
A. Yes

Q. Is Customer Exit client-specific


A. No

Q. Difference between Customer Exit and BADI


A. In Customer Exit, it in a project, there are many enhancement then we have to wait till all
enhancement get over. Because unless whole project is activated, effect of
enhancement does not take place in program. Whereas in BADI, there is no
dependencies of other enhancement, irrespective of project activation. The effect of
enhancement using BADI would be visible in program.

In BADI, we used ABAP Objects. Therefore we can create multiple instances. Therefore
it is reusable. Whereas this is not possible in Customer Exits.

Q. What are the steps required for enhancement using BADI


A. 1) Create BADI definition using SE18. Include all the methods definition.
2) Implement methods defined in BADI using SE19.

Q. How are multiple implementations possible for a single definition


A. If we want multiple implementations for a single BADI definition, make sure the multiple
use option for Type is checked.

Q. Which class and method is used for BADI instance


A. Class – cl_exithandler
Method – get_instance

Q. Types of attributes in BADI


A. 1)Reusable
2) Filter-dependent
3)Enhanceable

Q. How to implement filter dependent BADI


A. Select the filter checkbox while defining BADI definition.
Enter the data element you want as a filter type.
When the enhancement method is called, a filter value must be passed to the interface.
If BADI is filter- dependent , we must define an import parameter flt_val for each method.
Q. How does screen enhancement takes place using BADI
A. Steps required in the application program to provide screen enhancement.

In PBO Section.
1) Generate the Business Add-In class
2) Store a reference to this instance in the Add-In class.
3) Registering the instance
4)Making data available
5) Get the program name and screen number
6) Calling the subscreen

In PAI Section.

COMPANY CONFIDENTIAL 31
Interview Questions

1) Call the subscreen


2) Pass the data back

Steps required for implementing screen enhancements

1) Create the implementation for the ADD-In definition. Specify the pgm containing the
subscreen and screen number
2)Create the program specified in the Add-In implementation
3) Create the Subscreen screen
4)In PBO
a) Get the instance of adapter class using method get_instance_for_subscreen.
b) Get data from the adapter class
5)In PAI
Write the changed data to the adapter class.

Q. What are field exits


A. Field exits are use to apply checks to a screen field
Field exits are processed when the user leaves a screen that contains a field that refer
to the data element containing a field exit

Q. Difference between global and local field exits


A. Global field exits are not limited to a particular screen. Whereas local field exits are valid
for one screen only. We can create only one global field exits or upto 36 local field exits
for a data element but not both

Q. Can local field exit exist without global field exit


A. No

Q. When do you opt for modification


A. Customer exits are not available for all programs and screens within the R/3 standard
applications. You can only use exits if they already exist within the SAP R/3 System.
Otherwise you have to opt for modifications.

Q. During the modification adjustment, use transaction is use to adjust ABAP


Dictionary? Which objects are possible with this transaction
A. SPDD.
Objects
 Domains
 Data elements
 Tables

SPAU
Objects
 ABAP programs
 interfaces (menus)
 screens
 matchcode objects
 views
 lock objects.

COMPANY CONFIDENTIAL 32
Interview Questions

15. Performance Optimization

 Medium Questions

Q. What are the various performance tuning tips and tricks to make the ABAP
programs efficient
A.
- Use of selection criteria
- Use of the into table clause of select statement
- Appending 2 internal tables
- Use of binary search option
- Modifying a group of lines of an internal table
- Use of FOR ALL Entries
- Proper structure of Where Clause
- Using table buffering
- Proper use of Inner Join

Q. Explain Use of selection criteria


A. Instead of selecting all the data and doing the processing during the selection, it is
advisable to restrict the data to the selection criteria itself, rather than filtering it out using
the ABAP code

Select only those fields that are needed, so that the database server passes only a small
amount of data back

Not recommended
Select * from zflight.
Check: zflight-airln = ‘LF’ and zflight-fligh = ‘BW222’.
Endselect.
Recommended
Select f1 f2 f3 from zflight into (l1 l2 l3) where airln = ‘LF’
and fligh = ‘222’.
Endselect.

Q. Explain use of the into table clause of select statement


A. Instead of appending one record at a time into an internal table, it is advisable to select
all the records in a single shot.
Not recommended
Refresh: int_fligh.
Select * from zflight into int_fligh.
Append int_fligh. Clear int_fligh.
Endselect.

Recommended
Refresh: int_fligh.
Select * from zflight into table int_fligh.

Q. Explain appending 2 internal tables


A. Instead of using the normal loop-endloop approach for this kind of programming, use the
variation of the append command. Care should be taken that the definition of both the

COMPANY CONFIDENTIAL 33
Interview Questions

internal tables should be identical.

Not Recommended
Loop at int_fligh1.
Append int_fligh1 to int_fligh2.
Endloop.

Recommended
Append lines of int_fligh1 to int_fligh2.

Q. Explain Use of binary search option


A. When a programmer uses the read command, the table is sequentially searched. This
slows down the processing.
Instead of this, use the binary search addition. The binary search algorithm helps faster
search of a value in an internal table.
It is advisable to sort the internal table before doing a binary search. Binary search
repeatedly divides the search interval in half. If the value to be searched is less than the
item in the middle of the interval, the search is narrowed to the lower half; otherwise the
search is narrowed to the upper half.

Not Recommended
Read table int_fligh with key airln = ‘LF’.

Recommended
Sort int_fligh.
Read table int_fligh with key airln = ‘LF’ binary search.

Q. Explain modifying a group of lines of an internal table


A. Use the variations of the modify command to speed up this kind of processing.

Not recommended
Loop at int_fligh.
If int_fligh-flag is initial.
Int_fligh-flag = ‘X’.
Endif.
Modify int_fligh.
Endloop.

Recommended
Int_fligh-flag = ‘X’.
Modify int_fligh transporting flag where flag is initial.
Q. Explain Use of FOR ALL Entries
A. Outer join can be created using this addition to the where clause in a select statement. It
speeds up the performance tremendously, but the cons of using this variation are listed
below

Duplicates are automatically removed from the resulting data set. Hence care should be
taken that the unique key of the detail line items should be given in the select statement.

If the table on which the For All Entries IN clause is based is empty, all rows are
selected into the destination table. Hence it is advisable to check before-hand that the
first table is not empty.

COMPANY CONFIDENTIAL 34
Interview Questions

If the table on which the For All Entries IN clause is based is very large, the performance
will go down instead of improving. Hence attempt should be made to keep the table size
to a moderate level.

Not Recommended
Loop at int_cntry.
Select single * from zfligh into int_fligh
where cntry = int_cntry-cntry.
Append int_fligh.
Endloop.

Recommended
Select * from zfligh appending table int_fligh
For all entries in int_cntry
Where cntry = int_cntry-cntry.

Q. Explain proper structure of Where Clause


A. When a base table has multiple indices, the where clause should be in the order of the
index, either a primary or a secondary index.

To choose an index, the optimizer checks the field names specified in the where clause
and then uses an index that has the same order of the fields. One more tip is that if a
table begins with MANDT, while an index does not, there is a high possibility that the
optimizer might not use that index.

In certain scenarios, it is advisable to check whether a new index can speed up the
performance of a program. This will come handy in programs that access data from the
finance tables.

Q. Explain table buffering


A. Use of buffered tables is recommended to improve the performance considerably.

The buffer is bypassed while using the following statements

Select distinct
Select … for update
Order by, group by, having clause
Joins

Use the Bypass buffer addition to the select clause in order to explicitly bypass the
buffer while selecting the data.
Q. Explain Proper use of Inner Join
A. When multiple SAP tables are logically joined, it is always advisable to use inner join to
read the data from them. This certainly reduces the load on the network.

Let us take an example of 2 tables, zairln and zflight. The table zairln has the field airln,
which is the airline code and the field lnnam, which is the name of the airline. The table
zflight has the field airln, the airline code and other fields which hold the details of the
flights that an airline operates.

Since these 2 tables are logically joined by the airln field, it is advisable to use the inner
join.

COMPANY CONFIDENTIAL 35
Interview Questions

Select a~airln a~lnnam b~fligh b~cntry into table int_airdet


From zairln inner join zflight as b on a~airln = b~airln.

In order to restrict the data as per the selection criteria, a where clause can be added to
the above inner join.

Q. What are the different tools provided by SAP for performance analysis
A. 1)Run time analysis transaction SE30

This transaction gives all the analysis of an ABAP program with respect to the
database and the non-database processing.

2)SQL Trace transaction ST05

16. Smartforms

 Easy questions

Q. What is the transaction used


A. Smartforms
Q. Is smartform client-dependant
A. No

 Medium Questions

Q. How do we translate the text modules in smartform


A. Text modules are translated in other language thru transaction SE63.

Q. Can we keep the backup of smart form? How to upload and download the form?
A. Yes we can keep the backup for a smartform. In the menu option ‘Utilities’ we have the
options for upload and download form, when we download the form it is stored in xml
format.

Q. Is it possible to have multiple page formats in smartform


A. Yes

Q. How to include logo in smartform


A. Using SE78 import the logo in SAP system. Create graphics window in Smartform and
give the name of logo to be uploaded

Q. How to debug a smartform


A. There are two methods :
- Can put hard coded break-point in the initialization part or any code node.
- Go to se37(or SE80), give the name of function module of the smartform, and open it
then Goto  Main Program, you will find three includes: one for Global data, other for
Function Module and the last include will have the code that we have done in
smartform. Open that include and put the break-point wherever is needed by just
selecting the breakpoint button on application toolbar.

COMPANY CONFIDENTIAL 36
Interview Questions

Q. How many MAIN windows are possible in Smartforms


A. One

Q. Where can we write ABAP Code


A. Use Program node

Q. How many tabs are included in Form Interface


A. Import, Export, Tables , Exceptions

Q. How to define address in Smartform


A. Using address node and passing address number to it

Q. What is the difference between Main window and secondary window


A. Secondary window has constant height. If text gets overflow in secondary window, it get
truncated. Whereas in MAIN window, if its overflow, it introduces new page and continue
from that point.

Q. Is it possible to migrate sapscript into smartform


A. Yes

 Difficult Questions

Q. What is the difference between template and table


A. Table determine height at runtime while in template, we specify the height at design time

Q. How do we call smartform


A. Use function module SSF_FUNCTION_MODULE_NAME and pass form name. It will
return the function module name which will actually call the smartform. We can find the
function module name in smartform from Environment menu.

Q. How to break the page


A. Using Command break

Q. How can we incorporate IF-ELSE condition in Smartforms without writing code in


program nodes.
A. Use Alternate node
Q. How to convert smartform into PDF
A. First pass no_dialog = ‘X’ and getotf = ‘X’ to control parameters while calling smartform.
We will get the compress layout in the importing parameter job_output_info. Pass this to
function module ‘CONVERT_OTF_2_PDF’.

17. SapScripts

 Easy questions

Q. What is the transaction used


A. SE71

COMPANY CONFIDENTIAL 37
Interview Questions

Q. Is sapscript client-dependant
A. Yes

Q. What are the components of Layout sets


A. PAGES, Page windows, Header, Paragraph, Character String, Windows.

 Medium Questions

Q. What is the table name that will contain all the script form names and print
program names
A. TNAPR

Q. In which case page break takes place


A. SAPscript automatically inserts a page break when the main window of a page (MAIN) is
full.
You can use the NEW-PAGE command to force a page break in the text at any point
you want one.

Q. How to set that a particular paragraph should not be split in two by a page break
A. Use
/: PROTECT
:
:
/: ENDPROTECT

Q. How many main windows possible for a page? Does coding in each main window
differs
A. 99. No

Q. How are 99 main window identified? In which case is multiple main windows
used?
A. Each main window is assigned a consecutive identifying number (0...98), and the
windows are filled in this order. It is basically used for printing labels

Q. How to call the next main window explicitly


A. NEW-WINDOW command

Q. How to format date fields


A. Using /: SET DATE MASK = 'date_mask'

Q. What is the use of The RESET control command


A. The RESET control command is used to reset the numbering of an outline paragraph to
its initial value. If the RESET command is not used, then the numbering of all outline
paragraphs in a text will be continuous. If the name of an outline paragraph is specified
in the RESET command, then its paragraph numbering and that of subordinate
paragraphs will be reinitialized.

Q. How to include other text into current text


A. Use the INCLUDE control command

COMPANY CONFIDENTIAL 38
Interview Questions

Q. What is the use of ADDRESS - ENDADDRESS control command


A. The ADDRESS - ENDADDRESS control command formats an address according to the
postal convention of the recipient country defined in the COUNTRY parameter.

Q. Which control command is use to specify lines of text to be outputs always at the
top of the main window.
A. Use the TOP... ENDTOP control command

Q. How to print texts at the bottom of the window.


A. Use
/: BOTTOM
:
:
/: ENDBOTTOM

Q. How to search for all sapscript name


A. If you want to see the names of all the SAPScript forms in SAP then go to SE16 -> table
"TADIR"
PGMID is 'R3TR'
OBJECT is ‘FORM’

Execute to see names of all SAPScripts.

Q. Which are the function module used in SapScripts


A. Open_Form
Write_Form
Close_form
Control_form

Q. Which is the transaction for Style Maintenance


A. SE72

Q. How to create standard text module


A. SO10

Q. What is the difference between start-form and open-form


A. Start-form is used in case of multiple forms. Suppose if there are more than one form
attached to a driver program, then open-form will open the pool which has the form
name of first form along with language settings, printer settings etc, start-form will start
the processing of first form, end-form will end the first form, again start-form will start the
processing of second form, end-form will end the processing of second form and finally
close-form will close the pool.

18. BDC

 Easy questions

Q. Three phases of background processing


A. Job Scheduling, Job Processing, and Job Overview.

COMPANY CONFIDENTIAL 39
Interview Questions

Q. Transaction for scheduling a background job


A. SM36

Q. Function module used to trigger/raise event from within an ABAP program


A. BP_EVENT_RAISE

Q. Methods by which a user event can be triggered


A. ABAP function module BP_EVENT_RAISE, use external program SAPEVT.

Q. Transaction to display work processes for a particular application server


A. SM50

Q. Transaction for job overview


A. SM37

Q. Which are the function modules used to generate a background job from within
the ABAP program
A. These steps are accomplished by using three function modules: “JOB_OPEN”,
“JOB_SUBMIT”, and “JOB_CLOSE”.

Q. What does the BDCDATA structure contain


A. – PROGRAM [CHAR 8] - Online program name.
– DYNPRO [NUMC 4] - Screen number.
– DYNBEGIN [CHAR 1] - Flag to indicate the start of a new screen.
– FNAM [CHAR 35] - Field name of a screen field to be filled with data.
– FVAL [CHAR 80] - The actual value to be filled into the specified screen field.

Q. If we want to simulate a user dialog in BDC, what general information is required


A. Online program name, screen numbers, field names and field values.

Q. What are the various methods to perform Batch Input


A. Batch Input session, Call transaction and Call Dialog.

Q. What are the function modules used to perform Batch Input


A. BDC_OPEN_GROUP, BDC_INSERT and BDC_CLOSE_GROUP.

Q. In which processing mode does program RSBDCSUB schedule a Batch Input


session
A. Program “RSBDCSUB” schedules a session to be processed in the background.
When this program is executed, a parameter screen prompts you for the
session name.

 Medium Questions

Q. What is the most important point to remember while executing the BDC program
A. An important point to remember is that executing a BDC program does not update the
SAP database; instead, it creates a batch input session. The SAP database is updated
when the batch input session is processed.

COMPANY CONFIDENTIAL 40
Interview Questions

Q. What are the various methods to process Batch Input sessions


A. – Manually process batch input sessions in the Session Overview using transaction
SM35.
– Execute program “RSBDCSUB”.

Q. With respect to timing, comment on Batch Input session method


A. When dealing with batch input sessions, there is a timing issue involving the creation of
a batch input session and the processing of a batch input session.

The “creation” and “processing” of batch input sessions are distinct actions; therefore,
they occur at different times.

Between the time a batch input session is created and the time it is processed, changes
may have been made to the SAP database. These changes may result in errors when
processing the batch input session.

Q. What is the main difference between Batch Input method and CALL
TRANSACTION/CALL DIALOG.
A. Two questions illustrate the main differences between creating a batch input session
and using the “CALL TRANSACTION/DIALOG”:
When is the SAP database updated?
How are errors handled?

When is the SAP database updated?

If you create a batch input session in a BDC program, the SAP database is
updated during the processing of the batch input session, not the execution of
the BDC program.

If you use the “CALL TRANSACTION” or “CALL DIALOG” statement, the SAP
database is updated during the execution of the batch input program. In other
words, the timing issue we covered in the previous chapter is not an issue with
these two alternatives because the database is updated during the execution of
the batch input program.

How are errors handled?

If you create a batch input session in a BDC program, errors are handled
automatically by the system during the processing of the batch input session.
Errors are recorded in a log and the batch input session in error is kept.

If you use the “CALL TRANSACTION” or “CALL DIALOG” statement, errors are
not handled automatically by the system. Errors must be handled in the batch
input program.

Q. What are the various options when using the CALL TRANSACTION statement
A. CALL TRANSACTION <transaction code>
USING <bdc table>
[MODE <display mode>]
[UPDATE <update mode>]
[MESSAGES INTO <mssg int. table>].

– The <bdc table> must be declared “LIKE BDCDATA”.

COMPANY CONFIDENTIAL 41
Interview Questions

– The only required addition for batch input is “USING”. The other additions are only
valid in conjunction with the “USING” addition.
– The <display mode> determines how the transaction will be processed: ‘A’
(display all), ‘E’ (display errors only), or ‘N’ (no display). The default is ‘A’.
– The <update mode> determines how updating will occur: ‘S’ (synchronous) or ‘A’
(asynchronous). The default is ‘A’.
– Synchronous updating indicates that an update is completed for the transaction
before processing returns to the “calling” program.
– Asynchronous updating indicates that processing returns to the “calling” program
immediately after the transaction is completed, even before the update is completed.
– System messages issued during the transaction can be stored in the <mssg int.
table>. This internal table must be declared “LIKE BDCMSGCOLL”.

Q. What about error handling when using CALL TRANSACTION/CALL DIALOG


A. Errors are not handled automatically by the system. Therefore, you must handle these
errors in the batch input program. The value of SY-SUBRC indicates the success or
failure of the transaction.

Q. What are some of the ways of handling errors


A. Errors can be handled in many ways. Some of them include
- Write an error report.
- Send the record(s) in error to an error file.
- Create a batch input session with the record(s) in error.

Q. Difference between synchronous and asynchronous mode of updating


A. – Synchronous updating indicates that an update is completed for the transaction
before processing returns to the “calling” program.
– Asynchronous updating indicates that processing returns to the “calling” program
immediately after the transaction is completed, even before the update is completed.

Q. With respect to execution speed, comment on the difference between


synchronous and asynchronous mode of updating
A. • Synchronous updating is slower than asynchronous updating because processing
does not return to the “calling” program until the update
is complete.
• Remember that the update mode when processing batch input sessions is always
synchronous.

Q. With respect to return code (sy-subrc), comment on the difference between


synchronous and asynchronous mode of updating
A. The return code (SY-SUBRC) after synchronous updating indicates the success or
failure of the actual update. The return code after asynchronous updating only indicates
the success or failure of the transaction, not the update.

Q. What are the various options when using the CALL DIALOG statement
A. CALL DIALOG <dialog module>
USING <bdc table>
[MODE <display mode>] .
– The <bdc table> must be declared “LIKE BDCDATA”.
– The only required addition for batch input is “USING”. The “MODE” addition is only
valid in conjunction with the “USING” addition.
– The <display mode> determines how the dialog module will be processed: ‘A’

COMPANY CONFIDENTIAL 42
Interview Questions

(display all), ‘E’ (display errors only), or ‘N’ (no display). The default is ‘A’.
– Notice that an update mode is not specified with the “CALL DIALOG” statement.
The update is not handled by the dialog module, but instead by the “calling”
program.
– The “COMMIT WORK” statement is required in the “calling” program to update the
database.

Q. Difference between CALL TRANSACTION and CALL DIALOG


A. – The main difference between the “CALL TRANSACTION USING” method and the
“CALL DIALOG” method is the timing of the update to the SAP database.
– With the “CALL TRANSACTION USING” batch input method, an update occurs after
each transaction is completed.
– With the “CALL DIALOG” batch input method, an update only occurs on the
“COMMIT WORK” statement.

19. ALE/IDOC

 Easy questions

Q. What is an IDOC
A. IDOCs are intermediate documents to hold the messages as a container.
Q. What is a message type
A. It is a type of document for data that is exchanged between two systems.

Q. Where do we create segments and basic type


A. WE31 and WE30 respectively

Q. Where do we monitor the idoc


A. WE02/WE05

Q. Where do we create process code


A. WE42

Q. What is a process code


A. A process code represents the function module that is used for the inbound and
outbound process.

Q. Where do we test the idoc


A. WE19.

Q. Where do we reprocess the idoc


A. BD87.

Q. What is a segment
A. A segment defines the format and structure of a data record.

Q. In which transaction code you would link idoc type to message type
A. WE82

COMPANY CONFIDENTIAL 43
Interview Questions

Q. What are the different types of records in an IDOC


A. It consists of three types of records:

Control Record: An IDOC can contain only one control record.


Data Record: An IDOC can contain one or many data records which contains
applications.
Status Record: An IDOC can contain one or many status records.

Q. What do u mean by control record, data record, status record


A. Control record
It has a fixed predefined structure which is defined in DDIC as EDIDC.
It contains information about IDOC such as:
IDOC ID
Sender ID
Receiver ID
IDOC type
Message type
Directions.

Data record
It contains the application data. It consists of segments that define format and
structure of data record. Data record has predefined structure of DDIC as
EDIDD that holds application data. SDATA field holds application data of length
1000 bytes. SEGNAM determines its structure.

Status record
It contains the status of the idoc (<50 outbound idoc,>50 inbound idoc). It
contains two fields: IDOC ID and Status Information. It maintains the history and
IDOC status. It contains the information whether the IDOC has processed
successfully. Standard DDIC table for status record is EDIDS.

Q. Where do we find the documentation for Idoc type or segment type


A. WE60

Q. What is an idoc type


A. An idoc type defines the structure and format of the business document that needs to be
exchanged between two systems.

 Medium Questions

Q. What is ALE
A. ALE is SAP proprietary technology that enables data communications between two or
more SAP R/3 systems and/or R/3 and external systems. When a new enterprise
resource planning (ERP) solution such as R/3 is implemented, companies have to
interface the ERP system with legacy systems or other ERP systems.

ALE provides intelligent mechanisms where by clients can achieve integration as well as
distribution of applications and data.

ALE technology facilitates rapid application prototyping and application interface


development, thus reducing implementation time.

COMPANY CONFIDENTIAL 44
Interview Questions

The ALE components are inherently integrated with SAP applications and are robust,
leading to a highly reliable system.

ALE comes with application distribution/integration scenarios as well as a set of tools,


programs, data definitions, and methodologies that you can easily configure to get an
interface up and running.

Q. What is IDOC Processing


A. There are two processes in IDOC, one is INBOUND PROCESS (IDOC coming to the
system and its handling at various stages) and the other is OUTBOUND PROCESS
(IDOC is send to other system). Separate ABAP programs are written for these 2
processes and different configuration settings are required for each one .Depending
upon the triggering mechanism different programming approaches are used.
OUTBOUND PROGRAMS handle the IDOC creation and INBOUND PROGRAMS
handle the inbound IDOC and the data transfer from the IDOC to the database tables.

Q. When does the need for ABAP Programming arise


A. -New IDOC was created - Depending upon the triggering mechanism i.e. change
pointer, message control etc the programming technique changes and the type of
process.
-Existing IDOC was extended User Exits are used to populate data in new segments
added and to read them back.
-To enhance an existing process.
-User Exits are used.

Q. How do you get output from IDOC


A. Data in Idocs is stored in segments; the output from Idoc is obtained by reading the data
stored in its respective segments.

Q. What are the database tables used to maintain the changed document
A. BDCP, BDCPS, CDHDR and CDPOS.

Q. What is the transaction code to activate change pointers


A. BD61 –Activate change pointers generally.
BD50- Activate change pointers for message type.

Q. What is the Outbound ALE process


A. The Outbound ALE process sends data (IDOC) to one or more SAP systems.
Involves 4 steps:
 Identify the need for sending IDoc
 Generate Master IDoc
 Generate Communication IDoc
 Deliver the Communication IDoc

Q. What is the Inbound ALE process


A. The inbound receives an IDoc and creates a document in the system.
Involves 3 steps:
 Store the IDoc in the database
 Invokes the posting module
 Create the document

COMPANY CONFIDENTIAL 45
Interview Questions

Q. What are the different methods of creating of an idoc(outbound)


A. STANDALONE PROGRAM
MASTER DATA DISTRIBUTION
MESSAGE CONTROL
CHANGE POINTERS
EXTENDED IDOC
REDUCED MESSAGE TYPE

Q. What are the configurations needed for creating a customized inbound idoc
A. WE81(Create Message Type)
WE31(Create Segments)
WE30(Create basic type)
BD51(Attach your Zfunction module)
WE57(attach your zfunction module to message type and basic type)
WE42(create process code and attach your zfunction module)
WE20(Create Partner profiles)

Before creating partner profiles we need to create a RFC destination (SM59) and Port
creation(WE21)

Q. What are the different types of filtering available for idoc


A. Segment level and IDOC level.

Q. How do we configure the idoc filtering


A. BD59(identifying the filter object)
BD64(modifying the distribution model)

Q. How do we configure the segment filtering


A. BD56.

Q. What are the limitations of segment filtering


A. We cannot filter for mandatory segments.

We must maintain correct parent-child relationship, for example if we want to filter a


parent segment we must ensure that all of its child segments are also filtered.

Q. What are the Transaction codes to distribute master data ( material master,
customer master, vendor master)
A. BD10, BD12, BD14 respectively.

Q. By which technology we handle the errors in ALE


A. Workflow.

Q. Why do we require distribution model (Model View)


A. Distribution model is used to model a distributed environment in which we specify
messages exchanged between sending and receiving systems.

Q. What is the significance of program RSNAST00


A. It is used for applications that use message control to process idoc output.

COMPANY CONFIDENTIAL 46
Interview Questions

 Difficult Questions

Q. How can we create / upload IDOC's from legacy system to SAP


A. Third party tool Mercator may be used to convert Legacy files to Idoc format. Mercator
provides an IDOC tree import facility, SAP provides the export facility. You can transfer
the Idoc layouts from SAP to Mercator automatically and then map.

Q. What is RBDMIDOC
A. It creates IDOC type from change pointers. This program is scheduled for the message
type in periodic basis and calls internally the function module and sends IDOC to the
receiver. Whenever a record is sent to receiver a change document flag is seen in the
BDCP and BDCPS tp prevent from sending record once again, by checking status,
status ‘X’ means processed, status ‘’ means not processed.

Q. What is the chance of getting maximum erroneous idocs (inbound or outbound)


and why
A. We will get maximum erroneous idocs in inbound because for inbound the data comes
from other systems which may not be in the same format as in R/3, whereas for
outbound we are sending the information to other system.

Q. What is the difference between extended idoc and reduced idoc type
A. Extended idoc: we use extended idoc to extend the data which needs to be exchanged
between two systems, means we are enhancing the information to the receiver system.

Reduced idoc type: This is just the opposite of extended idoc where we reduce the
information that needs to be exchanged between the systems.

Q. When should ALE be used


A. Besides the benefits of ALE there are also reasons not to distribute:
The functional scope in a distributed environment is restricted. Not all functionality that is
available in an integrated SAP system can be used with distributed systems in the
standard yet. Although ALE provides tools to create new ALE business processes or to
enhance existing business processes, this does involve additional expenditure.

Each company needs some organizational standards and data harmonization. In a


distributed environment fewer standards are required than on a single integrated
system. However, in a distributed environment the maintenance of the standards and
the data harmonization is more difficult than on a single system.

The administration of decentralized systems is more expensive. Support and service


costs for hardware and software in decentralized systems are higher than these costs in
a single centralized system.
ALE should be used in a company if the benefits of ALE for this company outweigh the
reasons against distribution. For this you always need to carry out a company specific
investigation, in which you also should consider the culture of the company. ALE is good
for some companies but not for all.

Q. Explain the Outbound process and Outbound program


A. Outbound programs are used in outbound process to generate IDOCs. Their purpose is
to extract the data from the tables and to fill the IDOC data records and the control
record in the IDOC and pass it to the ALE layer for distribution to the receiving system.
Depending upon the triggering mechanism (how and when the outbound program will be

COMPANY CONFIDENTIAL 47
Interview Questions

started) different techniques and interface is used for outbound program.

Q. What is Message control


A. Application like PO(purchase order) creation use this technique , where the output type
is linked to the application(Message control is a configurable cross application
component which can be set in IMG .Such programs are created in the form of function
modules and linked to the output type which is linked to the application. These have
predefined interfaces.
In outbound programs (function module) that use message control the key of the
application document is passed to the function module which will read the data from the
table depending upon the key passed (NAST structure) and fill the IDOC segments with
the application data. The control record is also passed to the function module but is not
fully filled, the remaining fields are filled and the control is passed back to the calling
program which is RSNASTED and is invoked by the message control to process ALE
and EDI output types and this program on receiving the IDOC data will create the
physical IDOC in the system.

The parameters passed to the function module are


IMPORTING PARAMETERS
OBJECT LIKE NAST
It contains documents key.
CONTROL_RECORD_IN LIKE EDIDC
It contains the partially filled control record

EXPORTING PARAMETER
OBJECT_TYPE
CONTROL_RECORD_OUT LIKE EDIDC

TABLES
INT_EDID LIKE EDIDD
The internal table used to fill the data records in the same order as they exist in the
IDOC.
The important parameters that should be filled in the custom function module are
CONTROL_RECORD_OUT and INT_EDIDD .The OBJK field of the structure
NAST contains the key of the application document.

Q. What are Stand alone programs


A. Generally used for Master Data transfer and as such depending upon the requirement
can have different interfaces. The programs have a selection screen which has select
options to select the objects, and parameters for specifying the recipient Logical System
and the Message Type.
Data is selected based on the specified objects from the tables and control record of
type EDIDC is created and filled with important values like DIRECTION, DOCTP,
RCVPRT, RCVPRN and MESTYP.
Data is filled in an internal table of TYPE EDIDD according to segment definitions and in
same order and the function module MASTER_IDOC_DISTRIBUTE is called passing
the control record and the internal table containing IDOC data and importing an internal
table consisting of control records for each communication IDOCS created.

Q. What is Change pointer


A. Change Pointer table is read and checked if changes were made to important fields , if
so the outbound program will be triggered automatically , these have predefined
interfaces

COMPANY CONFIDENTIAL 48
Interview Questions

Q. Describe the Basic structure of an OUTBOUND PROGRAM.


A. The basic structure of all outbound programs is same.
The CONTROL record which is of TYPE EDIDC has to be filled. It contains important
fields like
IDOCTP IDOC type
MESTYP Message Type
RCVPRN Receiving Partner (Destination)
RCVPRT Partner Type (it is LS i.e. Logical System)

The DATA RECORD internal table which is of TYPE EDIDD has to be filled in the same
order as there are segments in the IDOC definition.
It has 2 important fields which are to be filled ,these are
SEGNAM Name of the segment
SEGDATA Data in the segment and can be upto 1000 bytes. This field
is corresponds to each data segment in the IDOC.
e.g.
DATA INT_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.
DATA W_SEGDATA LIKE zsegment "custom segment zsegment

INT_EDIDD-SEGNAM = 'ZSEGMENT'
W_SEGDATA-field1 = value "taken from some table
W_SEGDATA-field2 = value "taken from some table
INT_EDIDD-SEGDATA = W_SEGDATA
APPEND INT_EDIDD

This will fill the data record corresponding to the segment ZSEGMENT. For all segments
the same steps will be repeated until all the data corresponding to all the segments in
the idoc is filled in the internal table of type EDIDD.
There is only one control record and can be multiple data records in the idoc structure.
Which data is to be extracted from the tables to be filled in EDIDD type internal table is
determined in standalone programs from the objects which are specified in the selection
screen and from the object key passed to the function module in case of message
control and is taken from BDCP table in case of change pointers using function modules
"CHANGE_POINTERS_READ"
In case of stand alone programs and function modules based on change pointers
method the function module "MASTER_IDOC_DISTRIBUTE" is used to send the IDOC
to ALE layer for distribution, in case of message control it is handled automatically by the
RSNASTED program invoked by the message control.

COMPANY CONFIDENTIAL 49

You might also like