ABAP Interview Questions
ABAP Interview Questions
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
Medium Questions
Difficult Questions
2. Internal Tables
Easy questions
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
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. 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 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. 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 are the two ways for restricting the value range for a domain
A. By specifying fixed values, By stipulating a value table
Medium Questions
Q. What are the technical settings maintained while creating the table
A. Data Class, Size Category, Logging , Buffering
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.
4. Reports
COMPANY CONFIDENTIAL 6
Interview Questions
Easy questions
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
AT USER-COMMAND
Moment at which the user presses a function key.
COMPANY CONFIDENTIAL 7
Interview Questions
has a fixed number of lines part of which is reserved for use at the END-OF-PAGE
event.
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. 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 the seltab-high (upper interval limit) entry on the selection
screen
A. NO INTERVALS
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.
COMPANY CONFIDENTIAL 9
Interview Questions
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
Transaction
Call and return - CALL TRANSACTION
Call without return - LEAVE TO TRANSACTION
Easy questions
Medium Questions
COMPANY CONFIDENTIAL 10
Interview Questions
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. 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.
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.
6. Memory Management
Medium Questions
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 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
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
Medium Questions
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 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)
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
Medium Questions
COMPANY CONFIDENTIAL 14
Interview Questions
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. 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
9. Number Ranges
Easy questions
Q. Which is the function module used in determining the next available number
A. NUMBER_GET_NEXT
Medium Questions
10. LUW
Medium Questions
Easy questions
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. 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.
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.
COMPANY CONFIDENTIAL 17
Interview Questions
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.
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. How to protect your attributes from access from outside the class
A. Declare it as private attributes.
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.
Static method can use only static components. It is called using class .They are defined
using CLASS-METHODS.
Medium Questions
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.
COMPANY CONFIDENTIAL 20
Interview Questions
COMPANY CONFIDENTIAL 21
Interview Questions
CLASS statement.
Difficult Questions
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
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. 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.
Medium questions
COMPANY CONFIDENTIAL 23
Interview Questions
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
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.
COMPANY CONFIDENTIAL 24
Interview Questions
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. 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. 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. 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. 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.
Object names must be unique within the set of all subscreens called in a single main
COMPANY CONFIDENTIAL 26
Interview Questions
screen.
You cannot use the SET TITLEBAR, SET PF-STATUS, SET SCREEN, or LEAVE
SCREEN statements in the modules of a subscreen.
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. 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.
COMPANY CONFIDENTIAL 27
Interview Questions
A. ACTIVETAB
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
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
COMPANY CONFIDENTIAL 28
Interview Questions
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
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.
COMPANY CONFIDENTIAL 29
Interview Questions
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.
Difficult Questions
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. 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
In BADI, we used ABAP Objects. Therefore we can create multiple instances. Therefore
it is reusable. Whereas this is not possible in Customer Exits.
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) 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.
SPAU
Objects
ABAP programs
interfaces (menus)
screens
matchcode objects
views
lock objects.
COMPANY CONFIDENTIAL 32
Interview Questions
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
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.
Recommended
Refresh: int_fligh.
Select * from zflight into table int_fligh.
COMPANY CONFIDENTIAL 33
Interview Questions
Not Recommended
Loop at int_fligh1.
Append int_fligh1 to int_fligh2.
Endloop.
Recommended
Append lines of int_fligh1 to int_fligh2.
Not Recommended
Read table int_fligh with key airln = ‘LF’.
Recommended
Sort int_fligh.
Read table int_fligh with key airln = ‘LF’ binary search.
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.
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.
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
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.
16. Smartforms
Easy questions
Medium Questions
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.
COMPANY CONFIDENTIAL 36
Interview Questions
Difficult Questions
17. SapScripts
Easy questions
COMPANY CONFIDENTIAL 37
Interview Questions
Q. Is sapscript client-dependant
A. Yes
Medium Questions
Q. What is the table name that will contain all the script form names and print
program names
A. TNAPR
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
COMPANY CONFIDENTIAL 38
Interview Questions
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
18. BDC
Easy questions
COMPANY CONFIDENTIAL 39
Interview Questions
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”.
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
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?
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.
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>].
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 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.
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. 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
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.
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.
COMPANY CONFIDENTIAL 44
Interview Questions
The ALE components are inherently integrated with SAP applications and are robust,
leading to a highly reliable system.
Q. What are the database tables used to maintain the changed document
A. BDCP, BDCPS, CDHDR and CDPOS.
COMPANY CONFIDENTIAL 45
Interview Questions
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 Transaction codes to distribute master data ( material master,
customer master, vendor master)
A. BD10, BD12, BD14 respectively.
COMPANY CONFIDENTIAL 46
Interview Questions
Difficult Questions
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 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.
COMPANY CONFIDENTIAL 47
Interview Questions
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.
COMPANY CONFIDENTIAL 48
Interview Questions
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