Interview
questions for Technical Round in SAP ABAP.
Most important Interview questions for 2020 Technical Round in SAP ABAP.
1.
How do you rate yourself in DDIC
2. Which
type of developments you are doing in your latest client
3. What is your ABAP team size
4. What is
your Functional team size
5. What is
your current CTC
6. What is
MANDT and what is the use of it.
Ans. It’s
the data element used in the table to make the data of that table as client
specific i.e. the data of that particular table will be
visible in the logical separation in which it is created
8. What
are the options in technical settings and meaning of all
Ans. Data
Class:- It determines that in
which table space the table will be stored while table
Creation. A tablespace is a physical
file on disk that is used to hold tables. Every table
is assigned to one tablespace, tables
with similar characteristics are usually grouped
into one tablespace.
Size
category:- It describes the probable space requirement of the table in the
Database.
Buffering
:- The database interface(component of workprocess) buffers the
information
from the database on the application server. When data is read from the
database,
it can be stored in buffer on the application server. This technique reduces
the
load on the database server and on the network link between the database and
application server.
There
are 3 buffering options: - Buffering not allowed,
Buffering allowed but switched off, and
Buffering
switched on.
There
are three buffering types:-
Single record buffering:
- With this
kind of buffering, only the records of a table which are actually accessed are
loaded into the buffer. This buffering should be used for large tables where
there are frequent single-record accesses (using SELECT
SINGLE ...).
Generic
area buffering: - In a
read access to a record of a generically buffered table, all the records whose
left-justified part of the key (generic area) corresponds are loaded into the
buffer. If this type of buffering is selected, the generic area must be defined
by specifying a number n of key fields. The first n key fields of the table
then define the generic key. The number of key fields to be entered must lie
between 1 and the number of key fields -1. For example, only values between 1
and 5 are permitted for a table with 6 key fields. The client field is included
here.
Full
buffering :- With full buffering, either
the complete table or none of the table is in the buffer. If a read access is
made to a record, all records of the table are transferred to the buffer.
9. What
is delivery class
Ans. Delivery class:-
It controls the degree to which SAP or customer is responsible for table
maintenance.
The delivery class controls the transport of table
data when installing or upgrading, in a client copy and when transporting
between customer systems. The delivery class is also used in the extended table
maintenance.
10. Difference
between structure and table
Ans.
Structure does not have technical settings but table do have technical
settings, Structure does not have primary key but table do have technical
settings, Structure does not have associate database table but table have
associate database table.
11. What
is foreign key relationship
Ans.
Foreign key is field in a table that is connected to another table via foreign
key relationship The purpose of foreign key relationship is to validate the data
being entered into one table by checking against a valid set of values in
another table. The table that contains foreign key is called foreign key table.
The table that contains valid set of values is called check table.
12. Difference
between value table and check table
Ans. Value table:- This is maintained at domain
level. Whenever you create a domain, you can enter allowed values. For
example you go to Domain SHKZG - Debit/credit indicator.
Here only allowed values is H or S. Whenever you use this Domain, the system
will forces you to enter only these values. This is a sort of master check.
Check table:- The ABAP
Dictionary allows you to define relationships between tables using foreign keys. A
dependent table is called a foreign key table, and the referenced table is
called the check table. Each key field of the check table corresponds to a
field in the foreign key table. These fields are called foreign key fields. One
of the foreign key fields is designated as the check field for checking the
validity of values. The key fields of the check table can serve as input help
for the check field.
13. What
is index and its uses
Ans. An
index is an efficiency mechanism for quickly finding rows within a table. It is
needed because data is stored in a table in the order in which it was added. It
is used to speed up the SQL query but on the other hand updating a table with
indexes takes more time than updating a table without indexes (because the
indexes also need an update) so we should create index on the field which are
frequently searched
14. What
is view.
Ans. A view also called
virtual table is a logical view of one or more than one tables. View or data
from view is not physically stored, instead being derived from one or more
tables. A view can be used to summarize data which is distributed among several
tables. We can add functions like join, where statements to a view and present
the data as if the data is coming from a single table.
15. What
is type group
Ans. A
type pool (AKA type group) is a data dictionary object that exist merely to
contain one or more types or constants statements. Sometimes we come across
certain situation in which we need to declare the same set of variables in a
number of ABAP programs, so to reduce the pain of this repetitive declaration
we can create just one type-pool and use it in all the programs so in a way it
is global data declaration.
16. What
is native and open SQL and how can we write it in our code
Ans. Open SQL:- The SQL that we
write in general in ABAP editor is called Open SQL.
Database server converts the open SQL to
Native SQL while execution.
Native SQL:- The pure SQL
that database understands is known as Native SQL. We
can write Native SQL in
ABAP editor in between a statement mentioned below:-
EXEC
SQL.
<Business Logic>
END EXEC.
If
we write Native SQL in ABAP editor then the processing will be faster as
compared to the Open SQL.
17. Difference
between clear, refresh, free in internal table
Ans.
Clear :- Deletes the header line. If
the internal table is with header line then clear will
work in below mentioned way:-
Clear: itab, “
will delete the header line of internal table
Itab[]. “ will delete the body of internal table
Refresh:-
Deletes the body of internal table
Free:- It
will free the memory occupied by the
internal table
18. How
many types of reports are there
Ans.
Classical Report, ALV Report, Interactive Report.
19. Events
of reports and when are they triggered
Ans. Load of program:-
It allocates memory for the variables used in your program. This event is
triggered only if the type of the program is M,F,S and 1.
Initialization:-
It is used to assign values to the variables you have used in the
programs.
It is triggered when report is loaded in the memory
At
selection-screen output:- This event is used to hide/unhide the parameters.
This is triggered when the selection-screen is loaded in memory before being
displayed.
At selection-screen:- It
is used to perform check on the user’s input. This is triggered before leaving
the selection screen.
Start-of-selection:- The
first and default event for displaying the report, data retrieval logic is
written under this event.
Top-of-page:- This event is used for
writing the header information or message on top of the report. This event is
triggered when it gets the first write statement of the code.
End-of-page:-
This event is used for writing the footer information or message at bottom of
the report. This event is triggered considering the line count statement
written in the report (Report <Report_name> Line count <Page
length>)
20. Sy
fields used in interactive reports
Ans.
Sy-subrc, Sy-lsind (Shows the Interaction level of interactive report), Sy-lilli
(Gives the index of line, counting from the top of the page of the report’s
output), Sy-lisel (Gives the work area on which the user have double clicked),
Sy-ucomm (Gives the user’s action)
21. Control
break statement in SAP
Ans. Control break Statement:-
Stop, Check, Exit
Stop:- It
is usually used in Start-of-selection, At
selection screen, and Get. And if the stop condition succeeds then the control
will move to the End-of-selection event.
Exit:-
Exit statement takes the control out of the processing block once it succeeds.
Check:-
Inside a loop it works as continue and inside a processing block it works as
exit statement.
22. What
is BDC and what are the ways to run BDC program, call transaction statement in BDC
Ans. BDC (Batch Data
Communication) is a interfacing technique used to
transfer data from SAP to SAP system or from Non-SAP to SAP system. It uses
normal T-codes to transfer the data. There are 2 ways to run BDC program:-
Using Call Transaction, Using Batch Input Session(SM35). Call transaction
method is much faster and is useful for transferring large amount of data as
compared to Batch Input Session.
23. What
is message class, types of messages and how to include it in your program
Ans.
Message class is a group of logically related messages which we can include in
our program by using message-id statement (Report <report_name>
message-id <messageclass_name>)
24. Difference
between sap script and smart forms.
Ans.
Smartform is a advanced version of SAPScript with more advanced functionality
and more GUI friendly
25. What
will you do if you want to optimize a program(performance tuning)
Ans.
Data declaration:-
1. Never
use internal table with header line
2. Always
create type groups rather than taking all fields of the tables
Data fetching:-
1. Avoid
using “Select- End Select” Statement
2. Never
use select query inside a loop
3. Use “Sy-subrc
“
after the query to avoid useless execution if in case query fails to fetch data as per your need
4. Avoid
using * in the select query, fetch
only needful fields from the table
5. Never
use “into corresponding field of table”, always maintain the order of the
fields in declaration in type groups and in the query
6. While
using “For all entries in”, check that the table used in for all entries in is
initial or not. Sort the table by fields in where clause
7. Delete
the adjacent duplicates from the driver table otherwise for the same entry
system will check redundantly
8. If
a field used in where clause is used frequently in the program and in other
programs also then create a secondary index on them
Processing the fetched data:-
1. Never
use “sort” statement in loop
2. Use
delete adjacent duplicate after sorting so as to avoid redundant data
3. Always
clear all the work areas used in the loop at the end of looping statement
4. While
“Reading Table” sort the table by key field used in read table statement.
5. Use
binary search in read table statement as it reduces the runtime of the search
for the large table.
6. Check
if the read statement has executed successfully or not by using sy-subrc, so as
to avoid useless execution if the read statement fails in it is purpose.
After
developing the program:- SLIN (Extended program check)
& SCI (Code Inspector)
Extended Program Check (SLIN)
Many checks are excluded from the standard syntax
check for performance reasons. The extended program check performs a complete check
that includes the interfaces of external procedures called from your program.
The extended program check returns both errors and
warnings and it is possible to run either specialized tests or one whole
standard check.
Errors in the
extended program check cause exceptions when you run the program which, in
turn, lead to runtime errors. You must therefore correct them. The exception to
this is coding that cannot be reached. However, you should delete this to
minimize the size of your program and make the source code easier to
understand.
Warnings in the
extended program check should also be corrected. If your program contains
statements that are definitely correct but still produce warnings in the
extended program check, you can exclude them from the check using pseudo comments
("#EC ...).
SCI (Code Inspector)
The Code
Inspector is a tool
for checking Repository objects regarding performance, security, syntax, and
adherence to name conventions
26. Events
in module-pool programming and sequence of it
Ans.
PBO, PAI, POV, POH
PBO event
This event is triggered
before the screen is displayed. The processing of screen before the display of screen is done in this event. For
example, filling in default values in the screen fields.
PAI event
This event is responsible for processing
of screen after the user enters the data and clicks pushbutton. The processing of screen can include
displaying another screen, or just displaying
list or quitting the transaction itself and many more things. These operations
can be carried out in the PAI event.
OKCODE plays an important role in this operation
POV event
Process on value request is triggered
when the user clicks F4 key. You can handle this
event when the user presses. F4 key by writing
code for the same in module pool
program. Normally when the user presses
F4, list of possible values are displayed. The
standard list produced by system is
adequate for applications you develop yourself.
However, you can also have the option of
setting up your own documentation and lists of
possible values that are more detailed.
POH event
Normally when the user places the cursor
on the field and presses F1 function key, the
System displays its own Help for that
particular field. You can add your own
functionality to the Help button by writing
code for the same in the POH event.
27. How to
call BAdI from Zprogram
Ans.
Through Get BAdI and Call BAdI statements
28. Why we are
using Chain and end chain
Ans. Chain
endchain statement is used to validate the group of fields
29. How
to create f4 help in module pool programming.
Ans.
Module <module_name> on <field_name> input
30. What
is the flow of SD
Ans. Flow of SD:-
·
Inquiry
·
Quotation
·
Sales
order generation
·
Delivery:-
Transfer order:- Transfer of goods from warehouse to loading point
PGI (Post goods
issue):- Maintaining the record of the goods delivered by
posting it in FI.
·
Invoice
generation
·
Receipt
of Payment
Flow of MM:-
·
Purchase
requisition
·
RFQ
(Request for quotation)
·
Quotation
maintenance:- keeping the records of quotations
·
Purchase
order generation
·
MIGO
(Goods received)
·
MIRO
(Invoice verification)
31. What
is Unicode and non- Unicode
Ans. Unicode system supports
multi languages
Non-Unicode system supports
only 2 languages (English & German) only
We can see that
if the system supports Unicode or non-unicode by:-
Logon to SAPà
Click
on system/status
32. What
is binary search used in read statement
Ans. Binary
search option in read statement fastens the read of internal table.