You are on page 1of 15

SAP ABAP INTERVIEW QUESTIONS

1.What is abap quries?

A. ABAP Query (also known as an SAP Query or Query) is a powerful tool used to generate simple reports
without any coding. Typically, an ABAP query is created first by defining a User Group and a Functional Group.
The functional group can either be created with reference to a logical table or a database table.

2.what are the transaction codes associates with abap quries?

A. 1) Created User group in SQ03

2) Created infoset in SQ03 and assigned that to the user group

3) Created query in SQ01 using the infoset

3.what are the purpose of SQ01,SQ02,SQ03?

A. This is a very good tool for developing simple and medium complex reports. 

Sq01 - for developing queries which are the output reports.

 sq02 - for developing infoset which is nothing but extraction logic.

 Sq03 - this is used to define user groups which group together users to work on infoset assigned to the group

4.is it possible to write abap code in Quries?

A. Yes,ABAP code is used with SAP query tool to enhance the query output. You can write down the code under the Extras tab
for the Infoset in the SQ02 Tcode.

5.what is the difference between LIKE and TYPE?

A. TYPE, you assign datatype directly to the data object while declaring.

LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.

Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of
already existing data object.

6. what is the difference between workarea and field symbol?

A. With work area you have to copy the content of the internal table row to the work area, which can take some
time if you have long structure.

With the field symbol no copy is neccessary, it will only a reference to that line within the internal table.

7. Is it possible to write a program without specifying the table names under ‘TABLES’ statement?
8. How to define Select-Options without specifying the table name?
A.

9. What are the different types Internal Table and which is preferable?
A.there are 3 types of internal tables in sap abap programming those are,
 Standard internal table
 Storted internal table
 hashed internal table
standard internal table is preferable.
10. why standard internal table is preferable?
A. Standard tables are therefore to be preferred for writing. ... A search in a standard table with 50,000 data
records will therefore start from the very first data record. In the worst-case scenario where the requested data record
is at the very end, all preceding 49,999 data records will be read
11. What are the Type Groups and explain about them?
A type group is an ABAP program managed by ABAP Dictionary that is initiated by the statement TYPE-POOL
and that contains ABAP statements for defining globally visible data types, constants, and macros. More
information about type groups can be found under ABAP Program Types and under the statement TYPE-POO
12. What are the performance tips do you follow while developing an object? OR
What are the performance tips do you follow to improve the performance in the given program?
 Avoid nested loops as far as possible.
 Avoid unnecessary loops. ...
 Avoid unnecessary database accesses. ...
 Select the data once only If required, save them in global or static variables or instance attributes
13. What are the performance tools do you perform before the object is released (or) once the development is
completed?
A.

14. How can you format the data before write statement in the report?

By using the loop event the reports output can be formatted

a) .at first

b) .at new

c) .at last

15. Explain the difference between Template and Table?

The difference between the table and template is that, table is a dynamic and template is a static
16.  Mention what is ALV programming in ABAP? When is this grid used in ABAP?

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 a report output.

17.  What is the use of 'pretty printer'?

To format the ABAP code 'pretty printer' is used.

18. What is the difference between 'Type' and 'Like'?

'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 the existing data type while 'Like' refers to the existing data object.

19.  Explain the difference between dialog program and a report?

A report is an executable program; dialog is a module pool program. It has to be executed via a transaction only.
Dialog programming is used for customizations of screens.

20. What is lock object?

To synchronize access of several users using same data Lock objects are used.

21.How data is stored in cluster table?

A cluster table contains data from multiple DDIC tables. It stores data as name value pair.

22. How can you debug a script form?

To debug a script form, you have to follow

SE71-->give the form name->utilities->activate debugger

23. What is a report?

Report is a program used to fetch data from the database tables and display it on the screen. It has 2 screens selection
screen(optional) and list or output screen.

24.When the TOP-OF-PAGE event does get triggered?

TOP-OF-PAGE event will be triggered when the first ULINE, WRITE or SKIP statement occurs in a program.

25.What is the difference between SKIP and RESERVE?

SKIP provides empty space between lines, while RESERVE executes a page break on the current page if the number
of lines between current line and the page footer is less than the number specified in RESERVE statement.
26.What is the difference between SKIP and NEW-LINE?

SKIP generates a blank line, while the NEW-LINE causes the control to move to next line.

27.What is hotspot?

Hotspot is an area on the list where the mouse pointer turns into an upright hand symbol. A single click on the
hotspot does the same thing as a double-click.

28.What does HIDE statement do?

The HIDE statement hides the contents of the line along with the line numbers in a system defined HIDE area. This
is used in interactive reporting.

29.What are the events in classical reports?

 INITIALIZATION
 AT SELECTION-SCREEN
 START-OF-SELECTION
 END-OF-SELECTION
 TOP-OF-PAGE
 END-OF-PAGE

30.How many detail lists can be created in interactive reporting?

20

31.What is the name of the system variable that holds the contents of the selected line in interactive
reporting?

SY-LISEL

32.Can we set page headers to details lists?

Yes. Use TOP-OF-PAGE DURING LINE-SELECTION event.

33. What Is Alv?


ALV (ABAP LIST VIEWER) Sap provides a set ofALV (ABAP LIST VIEWER) function modules, which can be
put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and
functionality of any report output.
Or
ALV stands for ABAP List Viewer. ALV gives us a standard List format and user interface to all our ABAP reports.
ALV is created by a set of standard function modules provided by SAP.

34.What Are The Uses Of Alv Reports?


Sorting of records

Filtering of records
Totals and Sub-totals

Download the report output to Excel/HTML

Changing the order of the columns in the report

Hide the unwanted columns from the report

35.What Is Field Catalog In Sap Alv?


We have the following three ways to build a field catalog.

Automatically through a Data Dictionary structure.

Manually in ABAP program.

Semi-automatically by combining the above two procedures.

Declare an internal table of type SLIS_T_FIELDCAT_ALV.

Call function module REUSE_ALV_FIELDCATALOG_MERGE.

36.What Is Slis In Alv And Standard Type Tables Of It?


SLIS is the type library for ALV grid.

If you’ll use the ALV you have to add TYPE-POOLS : SLIS. command at the beginning of your code.
SLIS_LAYOUT_ALV,

SLIS_T_FIELDCAT_ALV

SLIS_T_LISTHEADER,

SLIS_T_EVENT,

SLIS_SELFIELD.
Get Global Python Certification
Get Started Python Online Training Now!

37.How Do You Define Default Variant For Alv?


The user can programmatically set the initial (default) variant for list display.

The default variant can be found using the function module ‘REUSE_ALV_VARIANT_DEFAULT_GET’.

38.What Is The Events Table In Alv?


A list of possible events is populated into an event table (I_EVENTS) when this table is passed from the function
module REUSE_ALV_EVENT_NAMES_GET. The return table from this function module contains all the possible
events.

39.What Are Layout Parameters Options Of Alv?


Display options:
Exceptions

Totals

Interaction

Detail screen

Display variants (only for hierarchical-sequential lists)

Color

Other

What Is Sort Internal Table Options In Alv?


This internal table has the following fields:
Sops:  Sort sequence.
Fieldname:  Internal output table field name.
Tab name : Only relevant for hierarchical-sequential lists. Name of the internal output table.
Up: ‘X’ = sort in ascending order.
Down: ‘X’ = sort in descending order.
Sub tot : ‘X’ = subtotal at group value change.
Group: ‘* ‘ = new page at group value change ,’UL’ = underline at group value change.

What Is The Main Function Module Of Alv Report?


REUSE_ALV_GRID_DISPLAY

40.What Are The Export Parameters Of Alv Reports Function Modules?


E_EXIT_CAUSED_BY_CALLER: Delete list in CALLBACK_USER_COMMAND
ES_EXIT_CAUSED_BY_USER: How the user left the list Tables
T_OUTTAB: Table with data to be displayed —mandatory

What Is A Report?
There are 2 type of reports:
Interactive report

Classic reports

In classic reports, we can see the output in single list where as in interactive reports we can see the output in multiple
lists.

41.What Are Classical Reports?


These are the most simple reports. Programmers learn this one first. It is just an output of data using the Write
statement inside a loop.

Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING ONLY ONE
SCREEN/LIST FOR OUTPUT.

Events In Classical Reports:


INTIALIZATION: This event triggers before selection screen display.
AT-SELECTION-SCREEN: This event triggers after processing user input still selection screen is in active mode.
START OF SELECTION: Start of selection screen triggers after processing selection screen.
END-OF-SELECTION: It is for Logical Database Reporting.

42.What Are The Interactive Reports?


The user can Interact with the report. We can have a drill down into the report data.

We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).

Events associated with Interactive Reports are:


AT LINE-SELECTION

AT USER-COMMAND

AT PF<key>

TOP-OF-PAGE DURING LINE-SELECTION.

HIDE statement holds the data to be displayed in the secondary list.

sy-lisel : contains data of the selected line.


sy-lsind : contains the level of report (from 0 to 21)
Interactive Report Events:
AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a
new sub list is going to be generated. Under this event what ever the statements that are been return will be
displayed on newly generated sub list.
AT PFn: For predefined function keys…
AT USER-COMMAND : It provides user functions keys.
TOP-OF-PAGE DURING LINE-SELECTION : Top of page event for secondary list.

43.How Many Types Of Tables Are There In Data Dictionary And What They?
Transparent table

CLUSTER Cluster table

POOL Pooled table

44.What Are Pricing Tables?


Pricing Tables starts with A* like A001, A002, A900 like that.

KONH – Condition Header

KONP – Condition Detail

45.What Is A Table Maintenance Generator?


To allow users to maintain table using SM30 transaction you use Table Maintenance generator.

46.What Is The Difference Between Client Dependent And Independent Tables?


If you have MANDT as the first field that is Client Dependant table otherwise it is not. Usually most of the tables
are client dependent. Only few like RFC Connections table (RFCDES), Batch Jobs (TBTCO and TBTCP) are not
client dependant.

47.What Is The Difference Between At Selection Screen And At Selection Screen Output?
AT SELECTION-SCREEN OUTPUT is like Process Before Output Event. This would get triggered before screen
is displayed. This can be used to make fields invisible/visible based on selection.

AT SELECTION-SCREEN: This would be triggered if you hit anything (Enter, Drop-Down, Help, Execute) after
the selection screen is displayed.

What Is The Difference Between Clear, Refresh?


CLEAR: It clears any field, structure or Header line of internal table.
REFRESH: Deletes all entries of internal table.

48.In Alv's How Would You Get Default Values In The Selection Screen?
Create a variant in the ALV Report with whatever columns you would like to see and set sort criteria and column
widths and save as a default variant.

You could get the default variant by calling FM REUSE_ALV_VARIANT_DEFAULT_GET

49.Are The Steps To Create Custom Table?


Create all the Domains and Data elements as needed using Txn SE11.

Start creating the table using Tcode SE11.

Maintain Delivery Class (A-Application Table, C-Customizing, etc)

Enter all the fields (MANDT must be the first field) and appropriate data elements or Built in Types for each field.

Make sure you select the Primary Key for this table.

Maintain the Technical Settings (Data class, Size, Buffering info)

Create Secondary indexes as needed

Activate the Table

50. Explain the events associated with Classical Reports?

 LOAD-OF-PROGRAM : First event fired, loads program in memory


 INITIALIZATION: Initialize variable
 START-OF-SELECTION : Actual Business Logic (After START-OF-SELECTION)
 END-OF-SELECTION : To end above
 AT SELECTION-SCREEN : To validate Multiple Input fields (After Initialization and before START-OF-
SELECTION) (After
 AT SELECTION-SCREEN OUTPUT: To manipulate Dynamic screen
 AT SELECTION-SCREEN ON
 AT SELECTION-SCREEN ON END OF
 AT SELECTION-SCREEN ON BLOCK
 AT SELECTION-SCREEN ON RADIOBUTTON GROUP
 AT SELECTION-SCREEN ON VALUE REQUEST
 TOP-OF-PAGE : To print heading
 END-OF-PAGE: To print footer
1) What is SAP ABAP?

SAP is a type of software known as ERP (Enterprise Resource Planning) that large company use to manage their day
to day affairs. ABAP (Advanced Business Application Programming) is the coding language for SAP to develop
RICEFW objects. (Reports, Interfaces, Extensions, Forms and Workflows).

2) What do you mean by an ABAP data dictionary?

To describe the logical structures of the objects that are used in application development ABAP 4 data dictionary is
used. It is also used to show the underlying relational database in tables.

3) Explain the difference between pool tables and transparent tables?

Transparent tables: It has one to one relation with the table in the database. Its structure corresponds to single
database field.

Pooled tables: It has many to one relation with the table in the database. Pooled tables are stored at the database
level.What is Linux Linux Beginner Tutorial

a) Basic List: For simple reports

b) Statistics: For Percentage, Average etc.

c) Ranked List : For analytical reports

4) What do you mean by BDC (Batch Data Communications) programming?

It is an automatic procedure to transfer large or external data into SAP system. 'Queue file' is the central component
of the transfer, which receives the data through batch input programs and groups that are associated into 'sessions'.

5) Describe the data classes?

The data classes are classified into 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 a customized data and is entered in the system when the system is configured. It is
rarely changed.

System Data: This data is used by R/3 system itself

6) What are the internal tables?

Internal table exists only when the program is run. It is used for performing table calculations on subset of database
tables and also for re-organizing the content of database tables as per the users need.

7) List down the functional modules used in sequence in BDC?


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

8) What is a foreign key relationship?

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 foreign key relationship.

9) In ABAP what are the differences between table and structure in data dictionary?

The difference between structure and table is

a) Data can be stored physically in Table, but a structure cannot

b) Structure does not have primary key but table can have

c) Table can have the technical attribute but the structure does not have

10) What is Smart Forms?

Smart forms allow you to create forms using a graphical design tool.

11) What are the components of SAP scripts?

For SAP, SAP scripts are a word processing tool. It has a function like standard text and layout sets. Its layout set
consists of: Windows and pages, Character formats, Paragraph formats etc.

12) How to create 'table cluster'?

a) In ABAP dictionary, select object type Table, enter a table name and choose create

b) A field maintenance screen for the table is displayed. Table type Transparent table, set it as a default

c) Make the necessary entries in the short description and delivery classified on the Attributes page. Then define the
fields of the table.

d) Proceed as when creating a transparent table. Now save your entries

e) Now choose EXTRASàChange table category

f) When a dialogue box appears you have to select the table type 'Pooled table' or 'Cluster table'

g) After selecting the table, return to the field maintenance screen for the table. Field pool or cluster name is
displayed on the Attributes tab page in addition to the standard fields.
h) Now enter the name of the table cluster or table pool to which you want to assign the cluster table.

13) How can you format the data before write statement in the report?

By using the loop event the reports output can be formatted

a) .at first

b) .at new

c) .at last

14) Explain the difference between Template and Table?

The difference between the table and template is that, table is a dynamic and template is a static.

15) Mention what is ALV programming in ABAP? When is this grid used in ABAP?

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 a report output.

16) When do we use End-of-selection?

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

17) Mention the difference between ABAP and OOABAP? In what situation do you use OOABAP?

ABAP is used to develop traditional programs in R/3, while OOABAP is used to develop BSP/ PCUI applications
and also anything that an involved object oriented like BADI's and SmartForms etc.

18) What is table buffer? Which type of tables used this buffer?

Over here, buffer means memory area, table buffer means the table information is available on the application
server. When you call data from database table, it will come from application server. Transparent tables and pool
tables are buffered, while cluster table cannot be buffered.

19) What is the use of 'pretty printer'?

To format the ABAP code 'pretty printer' is used.

20) What is the difference between 'Type' and 'Like'?

'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 the existing data type while 'Like' refers to the existing data object.

21) What are the different ABAP/4 editors? What are the differences?
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.

22) Explain the difference between dialog program and a report?

A report is an executable program; dialog is a module pool program. It has to be executed via a transaction only.
Dialog programming is used for customizations of screens.

23) What is lock object?

To synchronize access of several users using same data Lock objects are used.

24) How data is stored in cluster table?

A cluster table contains data from multiple DDIC tables. It stores data as name value pair.

25) How can you debug a script form?

To debug a script form, you have to follow

SE71-->give the form name->utilities->activate debugger

26) What are different types of data dictionary objects?

The different types of data dictionary objects are:

a) Tables

b) Views

c) Domain

d) Data Element

e) Type Groups

f) Search Helps/Matchcode Objects

g) Lock Objects

h) Structures

i) Table Types

27) What are the ways you can do the tuning? What are the major steps will you use for these?

Tunning can be done in three ways disk i/o, SQL tunning and memory tunning. Before tunning, you have to get the
status of your database using oracle utility called statpack and tkprof .

28) In the 'select' statement what is 'group by'?


To fetch the data from the table by the specified field Group by Clause is used.

29) What is dispatcher?

A control agent referred as SAP dispatcher, manages resources for the R/3 applications.

30) Mention what are the two methods of modifying SAP standard tables?

There are two methods for modifying SAP standard tables

a) Append structures

b) Customizing includes

31) What is the difference between a 'Database index' and a 'Match code'?

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

32) Explain the benefits of modularization technique?

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.

33) How can you create callable modules of program code within one ABAP/4 program?

a) By defining Macros

b) By creating include programs in the library.

34) What are different types of parameters? How can you distinguish between different kinds of parameters?

The different types of parameters are

a) Formal Parameters: It is defined during the definition of subroutine with the 'FORM' statement

b) Actual Parameters: It is specified during the call of a subroutine with the 'PERFORM' statement

You can distinguish different kind of parameters by their functionality. Input parameters are used to pass data to
subroutines, while output parameters are used to pass data from subroutines.

35) What are the different databases Integrities?

a) Semantic Integrity

b) Relational Integrity

c) Primary Key Integrity


d) Value Set Integrity

e) Foreign Key Integrity

f) Operational Integrity

You might also like