SAP ABAP (Advanced Business Application Programming) is a fourth-generation programming language specifically designed for customizing and extending the functionalities of SAP software. It’s a procedural language with object-oriented features, enabling developers to create reports, data manipulations, interfaces, and complex business logic within the SAP environment. Proficiency in SAP ABAP is highly sought-after in various industries that heavily rely on SAP systems for core business operations.
Here, we have listed all the Top SAP ABAP Interview Questions and Answers for Fresher’s & Experienced.
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).
What is an ABAP?
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.
What do you mean by an ABAP data dictionary?
ABAP data dictionary is a central repository where all data descriptions, also known as metadata, are stored. The system ensures that there are no redundant data in the dictionary and makes the data available for all system components automatically.
The ABAP dictionary has several object types. They are
Tables- Represents DB tables where data is present
Types– This is defined globally and any change to type is automatically reflected in all the programs that make use of the same type
Views- Data is usually distributed among different tables. Views are used to summarize these
Lock Objects– These are used to synchronize simultaneous data access of the same data by different users
What are domains and data element?
Domains: Domain is the central object for describing the technical characteristics of an attribute of a business object. It describes the value range of the field.
Data Element: It is used to describe these mantic definitions of the table fields like description the field. Data element describes how a field can be displayed to end-user.
What is foreign key relationship?
A relationship which can be defined between tables and must be explicitly defined at field level. Foreign keys are used to ensure the consistency of data. Data entered should be checked against existing data to ensure that there is now contradiction.
While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible.
What are 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.
Basic List: For simple reports
Statistics: For Percentage, Average etc.
Ranked List: For analytical reports
What do you mean by Batch Data Communications programming?
Transferring of large/external/legacy data into SAP system using Batch Input programming. Batch input is an automatic procedure referred to as BDC (Batch Data Communications). The central component of the transfer is a queue file which receives the data vie a batch input programs and groups associated data into “sessions”.
What are the functional modules used in sequence in BDC?
These are the 3functional modules which are used in a sequence to perform a data transfer successfully using BDC programming:
BDC_OPEN_GROUP – Parameters like Name of the client, sessions and user name are specified in this functional module.
BDC_INSERT – It is used to insert the data for one transaction into a session.
BDC_CLOSE_GROUP – This is used to close the batch input session.
What are the differences between table and structure in data dictionary?
The difference between structure and table is
- Data can be stored physically in Table, but a structure cannot
- Structure does not have primary key but table can have
- Table can have the technical attribute but the structure does not have
Differentiate: Transparent tables, Cluster tables and Pooled tables
Transparent Table: A transparent table contains only a single table. It has a 1-1 relation with the table in DB and stores data directly. A single table can have either one or multiple primary keys. You can access them via native as well as open SQL. These tables are generally used to hold master data. It is possible to create secondary indexes in case of transparent tables.
Cluster Table: Instead of a single large table, cluster tables hold multiple small tables. The relationship is many to one in this case. Each table will have a primary key and it does not begin with the same fields. It’s not possible to create secondary indexes for cluster tables. They are used for performance improvement purposes such as when several tables have to be opened at the same time.
Pooled Tables: This is a combination of cluster and transparent data. This table is mainly used to store system data and contains data from a few large tables. The relationship here is again many-to-one as in cluster table. It is not possible to create secondary indexes and can be accessed only via open SQL. The primary key of each field begins with the same field as well.
What is Smart Forms?
Smart forms allow you to create forms using a graphical design tool.
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.
How to create ‘table cluster’?
- In ABAP dictionary, select object type Table, enter a table name and choose create
- A field maintenance screen for the table is displayed. Table type Transparent table, set it as a default
- Make the necessary entries in the short description and delivery classified on the Attributes page. Then define the fields of the table.
- Proceed as when creating a transparent table. Now save your entries
- Now choose EXTRAS Change table category
- When a dialogue box appears, you have to select the table type ‘Pooled table’ or ‘Cluster table’
- 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.
- Now enter the name of the table cluster or table pool to which you want to assign the cluster table.
How can you format the data before write statement in the report?
By using the loop event the reports output can be formatted
- .at first
- .at new
- .at last
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.
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.
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.
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 Smart Forms etc.
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.
What is the use of ‘pretty printer’?
To format the ABAP code ‘pretty printer’ is used.
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.
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.
What is 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.
What is lock object?
To synchronize access of several users using same data Lock objects are used.
How data is stored in cluster table?
A cluster table contains data from multiple DDIC tables. It stores data as name value pair.
How can you debug a script form?
To debug a script form, you have to follow
SE71–>give the form name->utilities->activate debugger
What are different types of data dictionary objects?
The different types of data dictionary objects are:
- Tables
- Views
- Domain
- Data Element
- Type Groups
- Search Helps/Match code Objects
- Lock Objects
- Structures
- Table Types
What are the ways you can do the tuning? What are the major steps will you use for these?
Tuning can be done in three ways disk i/o, Sql tuning and memory tuning. Before tuning, you have to get the status of your database using oracle utility called stat pack and tkprof.
In the ‘select’ statement what is ‘group by’?
To fetch the data from the table by the specified field Group by Clause is used.
What is dispatcher?
A control agent referred as SAP dispatcher, manages resources for the R/3 applications.
Mention what are the two methods of modifying SAP standard tables?
There are two methods for modifying SAP standard tables
- Append structures
- Customizing includes
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.
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.
How can you create callable modules of program code within one ABAP/4 program?
- By defining Macros
- By creating include programs in the library
What are different types of parameters? How can you distinguish between different kinds of parameters?
The different types of parameters are
Formal Parameters: It is defined during the definition of subroutine with the ‘FORM’ statement
Actual Parameters: It is specified during the call of a subroutine with the ‘PERFORM’ statement
What are the different databases Integrities?
- Semantic Integrity
- Relational Integrity
- Primary Key Integrity
- Value Set Integrity
- Foreign Key Integrity
- Operational Integrity
What is the difference between macro and subroutine?
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.
What are the advantages and disadvantages of using views in ABAP programming?
Advantages:
- view is used to retrieve the data very fastly from the database tables
- memory wastage is reduced
- faster than joins to retrieve the data from database tables
Disadvantages:
- view is not a container, it will not hold the data
- view memory is not permanent memory
What type of user exits have you written?
There are four types
- function exit
- menu exit
- screen exit
- field exit
Advanced SAP ABAP Interview Questions And Answers
Question: What is BADI (Business Add-In) and how is it different from User Exits?
Answer:
BADI:
- Object-oriented approach: Defined as a class interface with specific methods that can be implemented by different classes.
- Multi-level implementation: Can have multiple implementations for different purposes (e.g., partner, customer-specific).
- Upward compatibility guaranteed: Interfaces are future-proof, ensuring compatibility with future SAP releases.
- Multiple instances possible: Can have multiple active implementations at the same time.
User Exits:
- Procedural approach: Defined as specific points in SAP code where developers can insert their own code (function modules).
- Limited to single implementation: Only one implementation can be active at a time.
- Susceptible to compatibility issues: Modifications might need adjustments during SAP upgrades.
- Limited flexibility: Generally, have less control over the behavior compared to BADIs.
Question: What is the concept of ALV (ABAP List Viewer) and its types?
Answer:
ALV is a powerful tool for displaying data tables in SAP. It offers various functionalities and comes in two main types:
Grid Control: Provides a tabular view of data with sorting, filtering, and grouping capabilities.
Tree Control: Presents data hierarchically, similar to a file system structure.
Question: What is the difference between BDC and LSMW?
Answer:
BDC (Batch Data Communication):
- Older method: Uses recordings to automate data transfer between external systems and SAP.
- Less user-friendly: Requires technical expertise and can be complex to maintain.
LSMW (Legacy System Migration Workbench):
- Modern approach: Offers a user-friendly interface for defining data transfer processes.
- More flexible: Supports mapping, validation, and error handling features.
- LSMW is generally preferred today due to its ease of use and advanced capabilities.
Question: How does SAP Memory differ from ABAP Memory?
Answer:
SAP Memory: Refers to the shared memory space used by all instances of the SAP system on a server. It stores global data and buffers for optimal performance.
ABAP Memory: Represents the memory allocated to individual ABAP programs during execution. It holds local variables, temporary data, and program code.
Think of SAP Memory as the “shared apartment building” where all SAP instances reside, while ABAP Memory is each tenant’s “private apartment” within the building.
Question: What are the enhancements in SAP ABAP using Enhancement Framework?
Answer:
The Enhancement Framework provides a structured approach to customizing SAP functionality without directly modifying standard code. It utilizes techniques like:
- BADIs: Allow for flexible and reusable enhancements.
- Enhancement Points: Designated locations in standard code where custom logic can be inserted.
- Enhancement Spots: Areas in the user interface where custom elements can be added.
This framework helps maintain SAP system stability and avoid modification conflicts during upgrades.
Question: What is the purpose of SAP Smart Forms and SAPScripts?
Answer:
SAPScript: The older technology for creating printed reports in SAP. It offers limited formatting options and requires technical knowledge.
SAP Smart Forms: A more modern and user-friendly tool for designing reports. It provides rich formatting capabilities, easier development, and greater flexibility.
SAP Smart Forms is the preferred choice for report development in newer SAP systems.
Question: What is the use of SAP Web Dynpro for ABAP?
Answer: SAP Web Dynpro for ABAP is a framework for building dynamic user interfaces within SAP. It allows developers to create web-based applications that interact with SAP data and functionality, offering a more modern and user-friendly experience compared to traditional SAP screens.
Question: What is the difference between Classical Reports and Interactive Reports in SAP ABAP?
Answer:
Classical Reports: Traditional SAP reports that offer limited user interaction. They primarily display static data with basic formatting options.
Interactive Reports: Modern SAP reports that allow users to interact with the data through features like sorting, filtering, and drilling down into details. They provide a more dynamic and user-driven experience.
Interactive reports are becoming increasingly common due to their improved user experience and data exploration capabilities.
Question: How does SAP NetWeaver Gateway facilitate communication between SAP systems and external applications?
Answer: SAP NetWeaver Gateway acts as a mediator between SAP systems and external applications. It exposes SAP data and functionality as RESTful services, enabling seamless communication and integration with various technologies and platforms
Question: What is the role of SAP ALE in data communication between systems?
Answer: SAP Application Link Enabling (ALE) facilitates data exchange between different SAP systems. It utilizes standardized messages and protocols to ensure secure and reliable communication, enabling efficient data synchronization and business process integration.