Top 50 Sap Abap Interview Questions You Must Prepare 26.May.2022

Primary Key – It can accepts 0 value and cannot be NULL.

Unique Key – It can be NULL.

These are the steps to be followed to Upload data through CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.

I had worked with the following (30) system fields:
1) SY-DBSYS - Central Database
2) SY-HOST - Server
3) SY-OPSYS - Operating System
4) SY-SAPRL - SAP Release
5) SY-SYSID - System Name
6) SY-LANGU - User Logon Language
7) SY-MANDT - Client
8) SY-UNAME - Logon User Name
9) SY-DATLO - Local Date
10) SY-DATUM - Server Date
11) SY-TIMLO - Local Time
12) SY-UZEIT - Server Time
13) SY-DYNNR - Screen Number
14) SY-REPID - Current ABAP program
15) SY-TCODE - Transaction Code
16) SY-ULINE - Horizontal Line
17) SY-VLINE - Vertical Line
18) SY-INDEX - Number of current loop Pass
19) SY-TABIX - Current line of internal table
20) SY-DBCNT - Number of table entries processed
21) SY-SUBRC - Return Code
22) SY-UCOMM - Function Code
23) SY-LINCT - Page Length of list
24) SY-LINNO - Current Line
25) SY-PAGNO - Current Page Number
26) SY-LSIND - Index of List
27) SY-MSGID - Message Class
28) SY-MSGNO - Message Number
29) SY-MSGTY - Message Type
30) SY-SPONO - Spool number during printing 

Macros can only be used in the program they are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program they are defined in and other programs. A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (I’ve never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.

  1.  Called program - SE37 - Creating function group, function module by assigning attributes, importing, exporting, tables, and exceptions.
  2.  Calling program - SE38 - In program, click pattern and write function name- provide export, import, tables, exception values.

There are four specials commands of lists:

  • Write
  • Uline
  • Skip
  • New-Page

  • Collect: If an entry with the same key already exists, the COLLECT statement does not append a new line, but adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry.
  • Append : Duplicate entries occurs

Data : NUM type P decimals 2.

An output list which displays just the basic details & allow user to interact, so that a new list is populated based on user-selection. With interactive list, the user can actively control data retrieval and display during the session.

There are 2 default Tab strips. Screen painter attributes contain Tab Title, which is used to insert more tabs in tab strip.

ALV is Application List viewer. Sap provides a set of ALV (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. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.

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

Field Symbols – They are placeholder or symbolic names for the other fields. They do not physically reserve space for a field, but point to its contents. It can point to any data objects.
Field-symbols <fs>

Field Groups – Field groups does not reserve storage space but contains pointers to existing fields.
An extract dataset consists of a sequence of records. These records may have different structures. All records with the same structure form a record type. You must define each record type of an extract dataset as a field group, using the FIELD-GROUPS statement.
Field-groups <fg>

We look into the list of incorrect session and process it again. To correct incorrect session, we analyze the session to determine which screen and value produced the error. For small errors in data we correct them interactively otherwise modify batch input program that has generated the session or many times even the data file.

Two types of LUW are:

  1.  DB LUW - A database LUW is the mechanism used by the database to ensure that its data is always consistent. A database LUW is an inseparable sequence of database operations that ends with a database commit. The database LUW is either fully executed by the database system or not at all. Once a database LUW has been successfully executed, the database will be in a consistent state. If an error occurs within a database LUW, all of the database changes since the beginning of the database LUW are reversed. This leaves the database in the state it had before the transaction started.  
  2. SAP LUW - A logical unit consisting of dialog steps, whose changes are written to the database in a single database LUW is called an SAP LUW. Unlike a database LUW, an SAP LUW can span several dialog steps, and be executed using a series of different work processes.

The different views are:

a. Logical view
b. Software-oriented view
c. User-oriented view

Go to SM36 and create background job by giving job name, job class and job steps (JOB SCHEDULING).

The tool, which is used to create layout set is called SAP Script. Layout set is a design, appearance and structure of document.

Go to SE71, give layout set name, go to utilities select debugger mode on.

  • CONVERSION: Legacy system to flat file.
  • INTERFACE: Flat file to SAP system.

GET CURSOR statement transfers the name of the screen element on which the cursor is positioned during a user action into the variable <f>.

GET CURSOR FIELD <f> [OFFSET <off>] [LINE <lin>] [VALUE <val>] LENGTH <len>]. 

Asynchronous Update – The program does not wait for the work process to finish the update.
Commit Work.

Synchronous Update – The program wait for the work process to finish the update.
Commit Work and Wait.

It is similar to table index that gives list of possible values for either primary keys or non-primary keys.

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.

• In case of a substructure, the reference originates in the table itself, in the form of a statement include.
• In case of an append structure, the table itself remains unchanged and the reference originates in the append structure.

Yes, we can have more than one selection screen.

Selection-screen begin of block honey with frame title text-101.
Select-options : deptno for zrekha_deptt-deptno.
Selection-screen end of block honey.

Selection-screen begin of block honey1 with frame title text-102.
Select-options : dname for zrekha_deptt-dname.
Selection-screen end of block honey1.

There are three types:

  1.  Line
  2.  Key
  3.  Table

SAP Script layout, text element, and some DDIC objects.

No, it is not must to use LDB. Apart from it, we have other options:

  •  Table join by Basis Table
  •  Direct Read of table
  •  Data Retrieval by Program

In PAI, define function code and write code for the same.

There are three different functions used in SAP Script:


Parameters in Each Function:

    • Exporting
    • Form
    • Language
    • Exporting
    • Element
    • Window

There are five contents in Technical Settings:

  • Data Class
  • Size Category
  • Buffering Permission
  • Buffering Type and
  • Logging.

There are three modes in Call Transaction:

  • A – Displays All Screen
  • E – Display Errors
  • N – Background Processing


Select, Insert, Delete, Modify, Update.

To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:

<Native SQL statement>

There is no period after Native SQL statements. Furthermore, using inverted commas (") or an asterisk (*) at the beginning of a line in a native SQL statement does not introduce a comment as it would in normal ABAP syntax. You need to know whether table and field names are case-sensitive in your chosen database. 

Yes, group of users can access these programs with a client number.

There are four types of screen keywords:

  • Module
  • Loop
  • Chain
  • Field.

An Interactive report is a dynamic drill down report that produces the list on users choice.
Difference: -

  •  The list produced by classical report doesn't allow user to interact with the system where as the list produced by interactive report allows the user to interact with the system.  
  • Once a classical report, executed user looses control where as Interactive, user has control.  
  • In classical report, drilling is not possible where as in interactive, drilling is possible.


  1.  Data is permanently stored in tables in the database.
  2.  Database tables are generated from them.


  1.  It contains data temporarily during program run-time.  
  2. No Database tables are generated from it.


BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session i.e. data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.

  • Create session – BDC_OPEN_GROUP
  • Insert batch input – BDC_INSERT
  • Close session – BDC_CLOSE_GROUP

Different types of data dictionary objects:

  1.  Tables
  3.  Data elements
  4.  Structure
  5.  Matchcode
  6.  Domains
  7.  Search Helps
  8.  Local Objects

  • Advantages: No programming knowledge is required.
  • Disadvantages: Depending on the complexity of the database tables, it may not be easy for the user to select the necessary data correctly.