SAP ABAP Interview Questions and Answers PDF
SAP ABAP Interview Questions and Answers PDF
SAP ABAP Interview Questions and Answers PDF
1. What is an ABAP?
Answer: ABAP (Advanced Business Application Programming) is a high-level programming language created by
the German software company SAP. It is currently positioned as the language for programming SAP’s Web
Application Server, part of its NetWeaver platform for building business applications. Its syntax is somewhat
similar to COBOL.
Organization Data: This data is customized data and is entered into the system when the system is
configured. It is rarely changed.
6. In events, start-of-selection is a default event. When we have to use this event explicitly? Why?
Answer: The default event in the ABAP is Start-of-selection.We have to call explicitly this event when you are
writing other than this event, that is when you write AT SELECTION-SCREEN EVENTS OR INITIALIZATION
EVENT etc, you have to explicitly mention the Start-of-selection event while you are writing the logic.
Before these events called, all the code you have written come into this default Start-of-selection screen event.
7. What are the differences between ABAP and OOABAP? In which situation we use OOABAP?
Answer: ABAP is used to develop BSP/PCUI applications and also anything involved object-oriented like
BADIs, SmartForms..etc.where as ABAP is used to develop traditional programs in R/3.
We can call the function module in the ABAP Code. Press the Pattern button on Appl. toolbar then u will get a
box where u write the function module NAME which u want to call in the code by selecting the radio button
CALL FUNCTION. In this way, we link the function module to the ABAP Code.
For example, we have four programs in abap memory and assigned some variables to a particular program in abap
memory then those variables can’t be used by another program in abap memory i.e., the variables are only for that
program and also local to that memory, whereas sap memory can access all the abap memory or else it can
perform any kind of modifications.
10. List down the functional modules used in sequence in BDC?
Answer: There are 3 functional modules which are used in sequence to perform data transfer successfully using
BDC programming. They are
a) BDC_OPEN_GROUP
b) BDC_INSERT
c) BDC_CLOSE_GROUP
12. Mention what is ALV programming in ABAP? When is this grid used in ABAP?
Answer: ALV stands for Application List Viewer. To enhance the output of the report, SAP provides a set of ALV
function modules which can be used, and it also improves the functionality and readability of any report output. It
is an efficient tool used for arranging the columns in the report output.
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.
Value Table: Prior to Release 4.0, it was possible to use the value table of a domain to provide input help. This is
no longer possible, primarily because unexpected results could occur if the value table had more than one key
field. It was not possible to restrict the other key fields, which meant that the environment of the field was not
considered, as is normal with check tables. In cases where this kind of value help was appropriate, you can
reconstruct it by creating a search help for the data elements that use the domain in question, and using the value
table as the selection method. Check table will be at field level checking. Value table will be at domain level
checking ex: scarr table is check table for carried.
Tables: Data is permanently stored in tables in the database. Database tables are generated from them.
Structure:
It contains data temporarily during program run-time. No Database tables are generated from it.
16. Explain the relationship between a functional area, user group, and query when developing queries
using the SAP Query tool?
Answer: Functional areas and user groups are organizational elements used in SAP Query that must first be
created in order to use the query environment.
The data that a query will be based on is defined in a functional area. A functional area is typical – based
on a logical database but can be any table and fields within that table.
Users are assigned to user groups. Functional areas are also assigned for the user group allowing users to
create and start queries based on the data in that functional area. Multiple functional areas can be assigned
to a user group and a functional area can be assigned to several different groups.
19. Mention the difference between ABAP and OOABAP? In what situation do you use OOABAP?
Answer: ABAP is used to develop traditional programs in R/3, while OO ABAP is used to develop BSP/ PCUI
applications and also anything that an involved object-oriented like BADI’s and SmartForms etc.
20. What is the table buffer? Which type of tables used this buffer?
Answer: Over here, buffer means memory area, table buffer means the table information is available on the
application server. When you call data from the database table, it will come from the application server.
Transparent tables and pool tables are buffered, while cluster table cannot be buffered.
‘Type’: You assign data type directly to the data object while declaring.
‘Like’: You assign the data type of another object to the declaring data object.
‘Type’ refers to the existing data type while ‘Like’ refers to the existing data object.
Page
Window
Page Window
Paragraph Format
Character Format
23. What are the different ABAP/4 editors? What are the differences?
Answer: The 2 editors are SE38 and SE80 and both have the ABAP editor in place. In SE38, you can create
programs and view online reports and basically do all the development of objects in this editor. In SE80, there are
additional features such as creating packages, function group, module pool, classes, programs, and BSP
applications.
29. Mention what are the two methods of modifying SAP standard tables?
Answer: There are two methods for modifying SAP standard tables
1. Append structures
2. Customizing includes
30. What is the difference between a ‘Database index’ and a ‘Match code’?
Answer: Database Index’ contains fields from one table while ‘Match Code’ contain fields from several tables.
Match code objects can be built on cluster tables, transparent tables, and pooled tables.
I am text block. Click the edit button to change this text. Lorem ipsum dolor sits amet, consectetur adipiscing elit.
Ut elit tellus, luctus nec ullamcorper Mattis, pulvinar dapibus leo.
32. How can you create callable modules of program code within one ABAP/4 program?
Answer:
1. By defining Macros
33. What Is Function Group? Difference Between Function Group And Function Module?
Answer:
Function Groups act as containers for Function Modules that logically belong together.\
Function Groups
Function Modules
35. Difference Between Domain And Data Element? What Are Aggregate Object?
Answer:
Domain – Specifies the technical attributes of a data element – its data type, length, possible values, and
appearance on the screen. Each data element has an underlying domain. A single domain can be the basis
for several data elements. Domains are objects in the ABAP Dictionary.
Data Element – Describes the business function of a table field. Its technical attributes are based on a
domain, and its business function is described by its field labels and documentation.
Aggregate Object – Views, Match Code and Lock objects are called aggregate objects because they are
formed from several related tables.
37. Can You Print Decimals In Type N? What Is Difference Between Float And Packed Data Type?
Answer:
No, we cannot print decimals in type N because decimal places are not permitted with N data type.
C = A + B.
38. What Are The Different Functions Used In Sap Script? What Are The Parameters Used In Each
Function?
Answer:
There are three different functions used in SAP Script:
OPEN_FORM
WRITE_FORM
CLOSE_FORM
Parameters in Each Function:
OPEN_FORM
Exporting
Form
Language
WRITE_FORM
Exporting
Element
Window
CLOSE_FORM
Initialization
At Selection-Screen
Start-of-Selection
Get
Get Late
End-of-Selection
Top-of-Page
End-of-Page
At Line Selection
At User Command
At PF (nn)
Header
Logo
Main Window
Footer
Database View
Help View
Projection View
Maintenance View
46. Explain What Are The Events Used For Logical Database?
Answer: There are Two Events:
GET – This is the most important event for executable programs that use a logical database. It occurs when the
logical database has read a line from the node and made it available to the program in the work area declared
using the statement NODES table Tag. The depth to which the logical database read is determined by the GET
statements.
PUT – The PUT statement directs the program flow according to the structure of the logical database.
GET – After the logical database has read an entry from the node table Tag.
GET LATE – After all the nodes of the logical database have been processed that are below in the
database hierarchy.
48. What Are The Events Used In Abap In The Order Of Execution?
Answer:
The Events used in ABAP are:
1. INITIALIZATION
2. AT SELECTION-SCREEN
3. AT SELECTION-SCREEN ON
4. START-OF-SELECTION
5. TOP-OF-PAGE
6. TOP-OF-PAGE DURING LINE SELECTION
7. END-OF-PAGE
8. END-OF-SELECTION
9. AT USER-COMMAND
10. AT LINE-SELECTION
11. AT PF
12. GET
13. GET LATE.
14. AT User Command
PAI (Process After Input) – When the user interacts with the screen, the PAI event is processed.
POH (Process On Help) – is triggered when the user requests field help (F1). You can program the
appropriate coding in the corresponding event blocks. At the end of processing, the system carries on
processing the current screen.
POV (Process On Value) – is triggered when the user requests possible values help (F4). You can
program the appropriate coding in the corresponding event blocks. At the end of processing, the system
carries on processing the current screen.