SAP ABAP Interview Question Asked form the
topic (Programming-001,2,3)
ABAP Editor
1. What is the ABAP Editor?
It is a tool in SAP to write, edit, and debug ABAP programs.
2. How do you access the ABAP Editor?
Use transaction code SE38 or SE80 .
Data Types and Data Objects
1. What are the main data types in ABAP?
Elementary ( I, F, P, C, N, D, T, STRING, XSTRING ), Structured, Table, and Reference types.
2. What is the difference between DATA and TYPES?
DATA is used to declare variables, while TYPES is used to define data types.
Conditional Statements
1. What are the conditional statements in ABAP?
IF...ELSE...ENDIF , CASE...ENDCASE , CHECK , and ASSERT .
2. What is the difference between IF and CASE?
IF is used for multiple conditions, CASE is for a single field with multiple values.
Loop and Loop Statements
1. What are the types of loops in ABAP?
DO...ENDDO , WHILE...ENDWHILE , and LOOP AT (for internal tables).
2. What is an endless loop?
A loop without an exit condition, causing infinite execution.
System Variables
1. What are system variables in ABAP?
They are predefined variables storing system-related values like SY-UNAME (user), SY-DATUM (date).
2. How to check the current user in ABAP?
Use SY-UNAME .
String Operations
1. How do you concatenate strings in ABAP?
Using CONCATENATE str1 str2 INTO str3 or || operator in modern syntax.
2. What is the difference between CONCATENATE and && ?
&& is used in inline declarations, while CONCATENATE is an older syntax.
Internal Table and Work Area
SAP ABAP Interview Question Asked form the topic (Programming-001,2,3) 1
1. What is an internal table?
A temporary table stored in memory to process large volumes of data.
2. What is the difference between an internal table and a work area?
A work area holds a single record; an internal table holds multiple records.
Selection Screen
1. How do you create a selection screen in ABAP?
Using PARAMETERS and SELECT-OPTIONS statements.
2. What is the difference between PARAMETERS and SELECT-OPTIONS ?
PARAMETERS allows single input; SELECT-OPTIONS allows range/multiple values.
Classical Reports
1. What is a classical report in ABAP?
A simple list-based output without much user interaction.
2. What are the key events in a classical report?
INITIALIZATION , AT SELECTION-SCREEN , START-OF-SELECTION , END-OF-SELECTION .
FOR ALL ENTRIES IN
1. What is the use of FOR ALL ENTRIES in SAP ABAP?
It retrieves data from a database table using records stored in an internal table.
2. What is a drawback of FOR ALL ENTRIES ?
It doesn't work if the internal table is empty, leading to performance issues.
JOIN
1. What are the types of joins in ABAP?
INNER JOIN , LEFT OUTER JOIN , RIGHT OUTER JOIN .
2. Which is better, JOIN or FOR ALL ENTRIES ?
JOIN is better for smaller datasets; FOR ALL ENTRIES is useful for dynamic filtering.
Message Class
1. What is a message class in ABAP?
A collection of predefined messages used in programs ( SE91 ).
2. How do you display a message from a message class?
MESSAGE E001(ZCLASS) .
Transaction Code
1. What is a transaction code in SAP?
A shortcut to execute a program ( SE11 , SE38 , ME21N ).
2. How to create a transaction code for a program?
Using SE93 .
Best Performance Guidelines
1. How can you optimize ABAP performance?
Use SELECT SINGLE , INDEX fields, BUFFERING , and avoid nested loops.
2. Why should we avoid SELECT * ?
It fetches unnecessary data, affecting performance.
SAP ABAP Interview Question Asked form the topic (Programming-001,2,3) 2
Interactive Classical Report Events
1. What is the difference between classical and interactive reports?
Interactive reports allow user actions like double-clicking to drill down into details.
2. Which statement is used for interactive reports?
HIDE and GET CURSOR .
Control Break Statements
1. What are control break statements in ABAP?
AT FIRST , AT LAST , AT NEW , AT END OF , ON CHANGE OF .
2. How is ON CHANGE OF different from AT NEW ?
ON CHANGE OF works only for individual fields, while AT NEW works for table groups.
Database Operations
1. What are the types of database operations in ABAP?
INSERT , UPDATE , MODIFY , DELETE , SELECT .
2. What is the difference between MODIFY and UPDATE ?
UPDATE changes existing records; MODIFY inserts if the record doesn't exist.
Concept of Variant for a Report
1. What is a variant in ABAP?
A saved set of input values for report selection screens ( SE38 ).
2. How do you create a variant?
Execute the program, enter values, and save as a variant.
Field Symbols
1. What are field symbols in ABAP?
They are placeholders for memory locations, similar to pointers.
2. How do you declare a field symbol?
FIELD-SYMBOLS: <fs> TYPE any .
Classical Reports
Basic Questions
1. What is a Classical Report in SAP ABAP?
A report that displays data in a simple list format without any interactive features.
2. Which events are used in Classical Reports?
INITIALIZATION , AT SELECTION-SCREEN , START-OF-SELECTION , END-OF-SELECTION .
3. What is the difference between a Classical Report and an Interactive Report?
A Classical Report is a simple list, whereas an Interactive Report allows users to click and drill down into details.
4. What is the purpose of WRITE statement in Classical Reports?
It is used to display output on the screen.
5. How can we format output in a Classical Report?
Using WRITE with formatting options like WRITE: /, (10) , ULINE , SKIP .
Advanced Questions
1. What is the use of INITIALIZATION event?
SAP ABAP Interview Question Asked form the topic (Programming-001,2,3) 3
It is used to initialize variables before the selection screen appears.
2. What is the difference between END-OF-SELECTION and START-OF-SELECTION ?
START-OF-SELECTION executes after the selection screen, while END-OF-SELECTION is used for final output processing.
3. Can we use an internal table in a Classical Report?
Yes, data can be fetched into an internal table and displayed using LOOP AT and WRITE .
4. How do you display column headers in a Classical Report?
Using ULINE and WRITE statements at the beginning of the output.
5. Can we create multiple pages in a Classical Report?
Yes, using the NEW-PAGE statement.
Interactive Reports
Basic Questions
1. What is an Interactive Report in SAP ABAP?
A report that allows users to interact by selecting a row to view detailed data.
1. What is the key difference between a Classical and Interactive Report?
Interactive reports allow user actions (e.g., drill-down) using events like AT LINE-SELECTION .
1. Which event is used for drill-down functionality in Interactive Reports?
AT LINE-SELECTION .
1. What is the purpose of the HIDE statement in Interactive Reports?
It stores field values so they can be accessed later when the user clicks a row.
1. How do you capture the cursor position in an Interactive Report?
Using GET CURSOR FIELD fieldname VALUE value .
Advanced Questions
1. How many secondary lists can be created in an Interactive Report?
Up to 20 secondary lists.
1. What happens if we don’t use HIDE in an Interactive Report?
The selected row’s values will not be available in the next drill-down event.
1. Can we have multiple interactive events in a report?
Yes, using AT USER-COMMAND for custom functionalities.
1. How do you navigate back from a secondary list to the primary list?
Using LEAVE LIST-PROCESSING .
1. Can we display ALV in an Interactive Report?
Yes, ALV can be called within an Interactive Report for better formatting.
ALV Reports (ABAP List Viewer)
Basic Questions
1. What is ALV in SAP ABAP?
A tool that provides enhanced reporting with features like sorting, filtering, and exporting data.
1. What are the types of ALV reports?
Simple ALV (Function Module-Based), OO ALV (Object-Oriented), ALV Grid Display.
SAP ABAP Interview Question Asked form the topic (Programming-001,2,3) 4
1. Which function modules are used in ALV reporting?
REUSE_ALV_GRID_DISPLAY , REUSE_ALV_LIST_DISPLAY , REUSE_ALV_HIERSEQ_LIST_DISPLAY .
1. What is the difference between REUSE_ALV_LIST_DISPLAY and REUSE_ALV_GRID_DISPLAY ?
LIST_DISPLAY creates a simple list output, while GRID_DISPLAY provides an interactive table format.
1. What is a field catalog in ALV?
A table that defines column properties such as name, data type, and width.
Advanced Questions
1. What are the key steps to display ALV using function modules?
1️⃣ Prepare internal table
2️⃣ Define field catalog
3️⃣ Call REUSE_ALV_GRID_DISPLAY .
1. What is the difference between Function Module-based ALV and OO ALV?
Function Module ALV is procedural, while OO ALV (using CL_SALV_TABLE ) is object-oriented and more flexible.
1. How do you enable sorting and filtering in ALV?
By setting the LAYOUT parameter or using ALV events.
1. How do you add a button in ALV Grid?
Using SET PF-STATUS and USER_COMMAND event.
1. How to handle user actions in ALV reports?
Using the event USER_COMMAND and checking SY-UCOMM .
Tricky ALV Questions
1. What is the difference between ALV List and ALV Grid?
ALV List ( REUSE_ALV_LIST_DISPLAY ) is for simple lists, while ALV Grid ( REUSE_ALV_GRID_DISPLAY ) provides interactive features.
1. Can ALV reports have multiple grids on the same screen?
Yes, by using CL_GUI_ALV_GRID and container controls.
1. How do you handle checkbox selection in ALV?
Add a checkbox field in the internal table and handle it in USER_COMMAND .
1. How do you color a specific row or column in ALV?
Using the COLOR field in the field catalog.
1. Can ALV reports be converted to Excel?
Yes, ALV provides an Export to Excel option by default.
SAP ABAP Interview Question Asked form the topic (Programming-001,2,3) 5