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.

2. What do you mean by BDC (Batch Data Communications) programming?
Answer: It is an automatic procedure to transfer large or external data into the SAP system. ‘Queue file’ is the central component of the transfer, which receives the data through batch input programs and groups that are associated with ‘sessions’.

3. Describe the data classes?
Answer: The data classes are classified into the following classes

  • Master Data: The data in this class seldom change
  • Transaction Data: The data can be changed often in this class
  • Organization Data: This data is customized data and is entered into the system when the system is configured. It is rarely changed.
  • System Data: This data is used by the R/3 system itself

4. What are the internal tables?
Answer: Internal table exists only when the program is run. It is used for performing table calculations on a subset of database tables and also for re-organizing the content of database tables as per the users need.

5. What is the difference between Table and Template?
Answer: the table is a dynamic and template is static.

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.

8. What is the use of a pretty printer?
Answer: Pretty Printer is used to format the ABAP Code we write in ABAP Editor, like KEYWORDS in Capitals and remaining are in small letters which also depend on system settings.

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.

9. What is the difference between SAP memory and ABAP memory?
Answer: sap memory is a global memory whereas abap memory is local memory.

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

11. What is a foreign key relationship?
Answer: To ensure the consistency of data, foreign keys are used. The relationship established between the tables and must be explicitly defined at field level. Data entered should be checked against the existing data to ensure that there is no contradiction. Cardinality has to be specified while defining a foreign key relationship.

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.

13. What Are The Check Tables And Value Tables?
Answer:

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.

14. What Is The Difference Between Tables And Structures?
Answer:

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.

15. What Are Lock Objects?
Answer: Reason for Setting Lock: Suppose a travel agent wants to book a flight. The customer wants to fly to a particular city with a certain airline on a certain day. The booking must only be possible if there are still free places on the flight. To avoid the possibility of overbooking, the database entry corresponding to the flight must be locked against access from other transactions. This ensures that one user can find out the number of free places, make the booking, and change the number of free places without the data being changed in the meantime by another transaction.

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.

17. What ABAP statement will trigger list generation?
Answer: The first WRITE statement encountered in an ABAP program will trigger list processing. Upon completion of the program, the list is output. The system will generate some standard headings for list output that includes the program name and a page number in the heading.

18. When do we use End-of-selection?
Answer: End of the selection event is mostly used when we are writing HR-ABAP code. In the HR-ABAP code, data is retrieved at the start of selection event and printing on the list and all will be done at the end of the selection event.

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.

21. What is the difference between ‘Type’ and ‘Like’?
Answer:

‘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.

22. What Are The Types Of Windows In Sap Script?
Answer: There are five Standard Layouts in SAP Script:

  • 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.

24. Explain the difference between a dialog program and a report?
Answer: A report is an executable program; the dialog is a module pool program. It has to be executed via a transaction only. Dialog programming is used for customizations of screens.

25. What is the lock object?
Answer: To synchronize access of several users using the same data Lock objects are used.

26. What are the ways you can do the tuning? What are the major steps will you use for these?
Answer: Tuning can be done in three ways disk i/o, SQL tunning and memory tunning. Before tuning, you have to get the status of your database using oracle utility called stat pack and tkprof.

27. In the ‘select’ statement what is ‘group by’?
Answer: To fetch the data from the table by the specified field Group by Clause is used.

28. What is dispatcher?
Answer: A control agent referred to as SAP dispatcher, manages resources for the R/3 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.

31. Explain the benefits of modularization technique?
Answer: By using modularization techniques, you can avoid redundancy if the program contains the same or similar blocks of statements or it is required to process the same function several times. By modularizing the ABAP/4 programs, we make them easy to read and improve their structure. Modularized programs are also easier to maintain and update.

32. How can you create callable modules of program code within one ABAP/4 program?
Answer:

  1. By defining Macros
  2. By creating include programs in the library.

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

1) These cannot be defined in a Function Module.
2) It cannot be called.
3) They are containers for Function Module.

Function Modules

1) These must be defined in a Function Group.
2) It can be called from any program.
3) They are not containers for Function Group.

34. What Function Does Data Dictionary Perform?
Answer: Central information repository for application and system data. The ABAP Dictionary contains data definitions (metadata) that allow you to describe all of the data structures in the system (like tables, views, and data types) in one place. This eliminates redundancy. 

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.

36. What Is View? Different Types Of View. Explain?
Answer:
View – A view is a virtual table containing fields from one or more tables. A virtual table that does not contain any data, but instead provides an application-oriented view of one or more ABAP Dictionary tables.

Different Types of View:
Maintenance
Database – It is on more than two tables.
Projection – It is only on one table.
Help

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.

Float Data Type: It cannot be declared in Parameters.
Packed Number: It can be declared in Parameters.
For e.g.
PARAMETERS: A(4) TYPE P DECIMALS 2, B(4) TYPE P DECIMALS 2.

DATA: C(4) TYPE P DECIMALS 2.

C = A + B.

WRITE : / ‘THE SUM IS’ , C.

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

39. What Is a Sequence Of Event-Triggered In Report?
Answer:
There are 6 events in the report:

  • 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)

40. What Are Standard Layouts Sets In The Sap Script?
Answer: There are four standard layouts in the SAP Script:

  • Header
  • Logo
  • Main Window
  • Footer

41. What Are The Various Types Of Selection Screen Event?
Answer:
SELECTION-SCREEN BEGIN OF BLOCK ABC WITH FRAME TITLE T01.

SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.

CALL SELECTION-SCREEN 500 STARTING AT 10 10

42. What Are The System Fields? Explain?
Answer: The ABAP system fields are active in all ABAP programs. They are filled by the runtime environment, and you can query their values in a program to find out particular states of the system. Although they are variables, you should not assign your own values to them, since this may overwrite information that is important for the normal running of the program. However, there are some isolated cases in which you may need to overwrite a system variable. For example, by assigning a new value to the field SY-LSIND, you can control navigation within details lists.

43. What is a view?
Answer: A view is a logical view of one or more tables. i.e. the data from a view is not actually physically stored in the database instead the data will be derived from one or more tables during runtime.

44. What are the different types of views and their definition?
Answer:

  • Database View
  • Help View
  • Projection View
  • Maintenance View

45. Explain What Is A Logical Database?
Answer:
Logical Databases are special ABAP programs that retrieve data and make it available to application programs.
Use of LDB – is used to read data from database tables by linking them to executable ABAP programs.

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.

47. What Is The Difference Between getting And Get Late?
Answer:

  • 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

49. Explain What Are Interactive Reports?
Answer: An output list which displays just the basic details & allows the user to interact so that a new list is populated based on user-selection. With an interactive list, the user can actively control data retrieval and display during the session.

50. Explain What Are The Events In Screen Programming?
Answer:

  • PBO (Process Before Output) – Before the screen is displayed, the PBO event is processed.
  • 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.

Note: Browse latest Abap Interview Questions and Abap Tutorial Videos. Here you can check Abap Training details and Abap Training Videos for self learning. Contact +91 988 502 2027 for more information.

Leave a Comment

Scroll to Top