Google News
logo
SAP ABAP Interview Questions
SAP(Systems, Applications, and Products in data processing) is an ERP(Enterprise Resource Planning) type of software that is used to manage the daily affairs of a large company. The ABAP stands for Advanced Business Application Programming. It is a high-level programming language created by the German software company SAP SE. It is one of the many application-specific languages of the fourth generation and was developed in the 1980s.
 
ABAP is used to enable the mass processing of data in SAP business systems. The SAP ABAP platform makes it feasible to create corporate applications for bigger businesses and financial institutions. As a result, SAP ABAP will offer protection against organizational data leaks and security concerns.
 
SAP ABAP is appropriate for integrated applications that businesses use to gather, handle, store, and evaluate data from various functional areas. It will serve as a sole data source and facilitate data sharing between all organizational components. The clients benefit from higher precision in corporate operations.
The Presentation layer consists of any input device that can be used to control SAP system. This could be a web browser, a mobile device and so on. All the central processing takes place in Application server. The Application server is not just one system in itself, but it can be multiple instances of the processing system. The server communicates with the Database layer that is usually kept on a separate server, mainly for performance reasons and also for security. Communication happens between each layer of the system, from the Presentation layer to the Database and then back up the chain.
3 .
Can you tell us about the several  ABAP editors? 
SE38 and SE80 are 2 recognizable ABAP editors, with SE38 being used to generate the program. Similarly, it is used to obtain online records, besides giving aid to the progress of all units relating to this editor.
* ABAP data dictionary represents metadata(i.e. data about data) that is present inside the SAP database in addition to the metadata maintained by the database. Data dictionary allows the necessary description of all the data without redundancies that are used in the system. New or updated information will be provided automatically for all the system components. This ensures data security, data consistency, and data integrity.

* It is used to describe the logical structures of certain objects that can be used in the development of the ABAP/4 application and it can also display the underlying relational database in tables.

* The data dictionary is useful in creating and managing data definitions as well as in creating Tables, Domains, Views, Data Elements, and Types. Also, it supports a few standard functions for editing screen fields like assigning input help to the field of a screen.
Data Dictionary


Some essential object types in the ABAP Dictionary are as follows.
 
Tables : Tables are defined independently in the ABAP Dictionary of the database.
 
Views : Views are rational views of more than one table. The view structure is defined in the ABAP Dictionary. An overlook of the database can be created from this structure.
 
Types : The type structure can be defined globally in ABAP programs. Changes to a type are activated automatically in all the programs using the type.
 
Lock objects : Lock objects are used to synchronize access to similar data by the various user.
 
Domains : The Domain can combine the different fields having the same technical type. A domain defines the value range of all table fields and structure modules that refer to this domain.
Transparent Table Pool Table
It has one to one relation with the database table It has many to one relationship with the database table
It contains only a single table It contains a large number of small tables
Stores master data Stores customizing data or system data
A secondary index can be created A secondary index cannot be created
Can be accessed using Open and Native SQL Can be accessed only using Open SQL
The database table will have the same name, the same number of fields, and the same field names The database table will have a different name, different number of fields, and different field names
7 .
What do you understand by work area and internal tables in ABAP? Why do we use it?
They are temporary memory areas that are used to store the data at run-time. Internal tables and work areas represents the instances of database tables.
8 .
What is use of transparent table in ABAP? How it is different from Pool tables?
Transparent table has one to one relation with the table in the database however Pool table has many to one relationship with database tables.
Function Group and Function Module are said to belong together logically. Function groups are considered to be containers of the Function Modules.  
 
The differences between Function Groups and Function Modules are as follows : 
 
* Function Groups need not be defined in Function Module but however, the latter one must be defined in Function Groups.
* Function Modules are able to be called from various kinds of programs. Function Groups can't be called.
* Function Groups acts as Function Module's containers but the latter one doesn't act as containers.
The same data can be accessed by various programs and Lock Objects which is a particular feature of ABAP that synchronizes the access to these data. Particular programs help in accessing the data records. Sometimes, inconsistencies appear when data gets inserted into the database and in order to avoid this, Lock Object is used.
The message ID gets specified right at the start of the program and this is available in the reported statement. Message command helps in displaying the message ID. Message-ID includes a 2-character code that helps in defining a total set of 1000 total messages and message command defines what sets are to be used in the program.  
 
The following are the different kinds of messages which appear in the program system : 
 
E - Error : When this message appears, the current application stops working. The program running in the background mode also gets canceled. The job log records this message.  

W - Warming : In order for the application to continue when this message appears, Enter must be pressed by the user. The job log also records this message.  

I - Information : When this message appears, Enter must be pressed and this message which appears in the pop-up window also gets recorded by job log.  

A -Abend : The current transaction used by the user gets canceled when this messy appears.  

S - Success : This message appears mainly in the form of feedback that is given to the users. This appears at the bottom of the screen. This is considered to be a positive message. The program is not disturbed by this message.  

X - Abort : Mainly the entire program Gerd aborted by this and generally an ABAP short dump gets created.
Users can access a SAP system in two ways.
 
* Through SAP GUI
* Through a Web browser
 
This is called a front-end. User can install only the front-end, not the application databases server. Front-end accept the user's requests to the database server and application servers.
Internal tables and work areas are temporary memory areas which are used to store data at run-time. These are the instances of database tables and Internal tables. Work Area is a standard data type object. These tables exist only during the execution of the program. It is used to perform table operations on subsets of database tables to re-organize the contents of database tables according to users need.
ITS stands for Internet Transaction Server. It creates an interface between the HTTP server and R/3 system to convert screen provided data by the R/3 system into HTML documents and vice versa.
 
Merits of ITS
 
* A comprehensive web transaction can be developed and tested in the R/3 system.
* It acts on all transaction components, including those used by the ITS outside.
* The advantage of automatic language processing in the R/3 system that we can utilize the language-dependent HTML documents at runtime.
There are many advantages of employing web Dynpro like;
 
* It provides simple structural changes.
* It provides simple transforming of layout and map-reading with graphical tools.
* It provides simple unification in the ABAP domain.
* It presents perfect persistence and refusing components for expansion.
* It gives electronic data transport with the work of data binding.
Web Dynpro applications depend on the Model View Controller (MVC) model, whereas
 
Model : That is used in web Dynpro applications to recover back-end details.
 
View : That is used in web browsers to exhibit data depictions.
 
Controller : A controller is meant to command information exchange connecting the model and the view, where the control system appears to take entries from the user and mould information from the database before exhibiting it in the browser.
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
Following are the two main functions accomplished with the lock mechanism :
 
* A program can communicate with other programs about data records that it is just reading or changing.
 
* A program can prevent itself from reading data that has just been changed by another program.
 
* A lock request is first generated by the program. Then this request goes to the Enqueue server and the lock is created in the lock table. The Enqueue server sets the lock and the program is finally ready to access data.
 
* Go to transaction SE11 to create lock objects.
In SAP ABAP environment, modularization involves the organization of programs into modular units, also known as logical blocks. It reduces redundancy and increases program readability even as you are creating it and subsequently during the maintenance cycle. Modularization also enables reusability of the same code again.
SAP Smart Forms is a tool used for printing and sending documents. It is useful in the development of forms, e-mails, PDF files, and documents for the Internet. This tool offers an interface for building and maintaining the layout and logic of a form. SAP delivers a form selection for business processes such as those used in Sales and Distribution(SD), Customer Relationship Management(CRM), Human Resources(HR), and Financial Accounting(FI).
 
This tool permits you for form modification with the help of simple graphical tools rather than using any programming tool. It implies that a user without any programming knowledge will be able to easily configure these smart forms with data for a business process.
There are 3 functional modules which are used in sequence to perform data transfer successfully using BDC programming. They are :
 
* BDC_OPEN_GROUP
 
* BDC_INSERT
 
* BDC_CLOSE_GROUP
SAP script is a text-processing system of the SAP System's itself. It is much like other leading text-processing systems. It is used to print preformatted text in respective forms.
 
SAP scripts is a SAP tool used for word processing. SAP Script has the following components :
 
Standard text : It is similar to standard normal documents.
 
Layout sets : Layout set consists of the following components :
 
* Format Components of Sap Scripts are Windows and pages, Paragraph formats, Character.
* Forms in the R/3 system.
* Every layout set contains a Header, paragraph, and character string in ABAP/4 program.
A foreign key relationship can be defined between tables and should be explicitly defined at the field level. Foreign keys are used to make sure the consistency of data. The entered data must be checked against existing data to ensure the contradiction. The Cardinality must be specified while defining a foreign key relationship. Cardinality represents how many dependent records and referenced records are possible.
The different types of database integrities are as follows.
 
* Semantic Integrity
* Primary Key Integrity
* Relational Integrity
* Value Set Integrity
* Operational Integrity
* Foreign Key Integrity
25 .
Differentiate between OOABAP and ABAP.  
For the development of traditional programs in R/3, ABAP is used. On the other hand, OOABAP is used for the development of BSP/PCUI applications.
The following steps must be followed to create a cluster table :
 
* From the dictionary of ABAP, the object type table must be selected. Table name should be entered and then the create option must be chosen.

* A maintenance screen gets displayed for the table. The transparent table must be set as the default for the table type option.  

* On the page of attributes, changes must be done in the description box or parallel. Next, table fields get defined.  

* Save the entries for the creation of the transparent table.  

* The category of EXTRAS Change must be chosen. 
 
* Pooled or cluster table - any one of the two table types must be selected from the dialogue box.  

* The next step includes returning to the field maintenance screen for the table.  

* Lastly, the name of the cluster or pooled table must be selected entered.
In the SAP system, workflows in business are used for executing business processes in applications. Workflows are the SAP system’s essential component that helps in business process design, it can be either a simple process or a complex repeated business process. These are predefined in the SAP R/3 system and the user is allowed to create their new workflows. It also permits the users for managing business processes in the most efficient manner.
 
Workflows will make sure that the correct information will be sent to the right person at the right time in a proper sequence. It is a tool for business process automation and will uniformly work across all the applications. It is suitable for business processes that involve multiple people or a group of people.
The ABAP memory is treated as a memory area in which the ABAP program is availed in the internal section. Data is stored in the program calls. These program calls allow the data to be passed from one program calls to another.
 
It is possible to pass the data from one session to another by the SAP Memory. All the sessions of SAP GUI have suspected to the memory area known as SAP Memory. Data transfer from one session of the programming system to another session is effortless.
The following are the events associated with Screen Programming -  
 
Process Before Output (PBO) : This event gets processed long before displaying the screen.  

Process After Input (PAI) : This event is processed while the interaction of a user with the screen continues.  

Process On Help (POH) : This even gets process on request by a user after pressing F1. The program gets appropriately coded in various event blocks. The present screen gets processed by the system.  

Process On Value (POV) : This gets processed by pressing F4 by users. Here also, the coding can be done in the various event blocks.  
The main events used for Logical Database are as follows :
 
GET : The programs used for Logical Database ads executed with the help of this event. It mainly takes place when a line from the node was read by the logical database. This has made it very much available towards the program and GET statements to determine the depth of the logical database.  

PUT : The flow of the program is directed by the PUT event.
A LUW (Logical Unit of Work) is an attached sequence of database operations which must be executed either entirely or not at all. Thus, it constitutes a unit for the database system.
 
There are two types of LUW are:
 
DB LUW :  A database LUW is a method used by the database to ensure data consistency. It is an attached sequence of database operations that ends with a database commit. If a database LUW has been successfully executed, the database will be in a consistent state. If a database LUW contains an error, then all of the database affected by this error. This makes the database as it was during the startup database.
 
SAP LUW : It is a logical unit consisting of dialog steps. The changes of these steps are written to the database in a single database LUW is called an SAP LUW. A SAP LUW can span several dialog steps. It can be executed using a series of different work processes.
With the help of the INSERT statement, it is possible to insert a line or lines into internal tables of ABAP. For inserting a line, you need to put the values which we wish to insert in a work area, then later you can use the INSERT statement for inserting the values in the work area then into the internal table.
 
The general format for a line insertion into an internal table is:
INSERT <work area> INTO TABLE <internal table>.
OR
INSERT <work area> INTO <internal table> INDEX <index>.
Three types of buffering can be found in SAP ABAP, that can be configured for a database view or database table in ABAP Dictionary. They are:
 
SAP Buffer - Single Record Buffering : In this type of buffering, only actually accessed rows in the table will be buffered. It needs less space in the buffer when compared to generic or full buffering. But it requires more amount of administration work and direct database access. If SELECT SINGLE is used for accessing a non-buffered row, it tries to load the row. If the row is not available, this will be noted in the buffer and the database will not again access the next time SELECT SINGLE has been used.

SAP Buffer - Generic Buffering : In this type of buffering, SAP buffer will be loaded with all rows that match a row(on which read is performed) in a left-justified part of the primary key. The count of key fields covered is mentioned within the definition and will be always less than the key field’s total count. Altogether, these key fields are considered as the generic key. Each generic area will be managed similarly as standalone views or tables whose primary key will be the generic key and that are fully buffered.

SAP Buffer - Full Buffering : In this buffering, on reading a row, all rows in the view or table will be loaded into the SAP buffer. The buffered view or table will be either completely in the buffer or not at all. In the buffer, the buffered data records will be sorted on the Key of the view or table basis. Optimized access needs the left-justified part of the primary key/the secondary index fields to be as large as possible. If not, the buffer will be scanned in a linear format.
Below are some important events in ABAP programming:
 
LOAD-OF-PROGRAM : This is the first event to be called before any of the other ABAP code is processed.
 
INITIALIZATIONIt is called after the ABAP selection screen code has been processed. This event is used to initialize input fields of the selection screen or change the default values of these.
 
AT SELECTION-SCREEN OUTPUTThis event is called just before the selection screen is displayed. It can be used to manipulate the actual selection screen attributes using the loop at screen functionality. This event allows functionality like hiding fields, grey them out, so they are output only or make them intensified, etc.
 
TOP-OF-PAGE : This event is called when a new page is started with an ABAP list. It is used to display a header for the list.
 
TOP-OF-PAGE During LINE_SELECTION : This event is also activated while creating detailed lists.
 
END-OF-PAGE : This event is displayed at the end of each page.
ALV is the abbreviation of Application List Viewer. ALV functions are provided by SAP in order for enhancing the report output. These function modules help in improving the readability and the functionality of the output report. Even the columns can be arranged with the help of this tool. 
A subroutine is a reusable section of code. It is a modularization unit within the program where a function is encapsulated in the form of source code. You page out a part of a program to a subroutine to get a better overview of the main program, and to use the corresponding sequence of statements many times.
37 .
What methods are there for tuning? What major techniques will you employ for these?
There are three tuning techniques : disc IO, SQL, and memory tuning. Before tuning, you must use the Oracle utility stat pack and tkprof to determine the status of your database.
When a class has multiple inheritances, that class can have more than one superclass. Because we can only inherit a class from one other class, ABAP objects do not support multiple inheritances. It permits the definition of a class in ABAP objects that derives solely from a single class. The compiler will issue an error notice if you attempt to define multiple superclasses while the class definition is in progress. But even so, utilizing Interfaces in SAP ABAP, you may get functionality akin to multiple inheritances.
An SAP object called IDoc (Intermediate Document) is used to send electronic communications containing business transaction data from one system to another. When moving data and information from the SAP system to other systems and vice versa, the IDoc is helpful. ALE (Application Link Enabling) subsystems transmit data between two SAP systems, and EDI (Electronic Data Interchange) subsystems send data from an SAP system to a non-SAP system.
With SAP GUI open, you will be able find Data Dictionary in the SAP menu tree. This is done via the Tools menu. Open the ABAP Workbench and click the 'Development' folder, where the ABAP Dictionary can be found and double clicked. Alternatively, use the transaction code SE11.
41 .
What is the use of data type C?
Data type C variables are used for holding alphanumeric characters, with a minimum of 1 character and a maximum of 65,535 characters. By default, these are aligned to the left.
42 .
What is the use of CONDENSE statement in ABAP programming?
CONDENSE statement is used to remove blank characters.
‘Type’ ‘Like’
You can assign the data type directly during the declaration of the data object You can assign the data type of one object to another during the declaration of the data object. The datatype will be indirectly referenced here.
It is used when user-defined objects connect with SAP system data type It is used when data objects connect with the other data object
Type keyword is useful in referring to the data type Like keyword is useful in copying the existing data object properties
Modularization is breaking the application code into smaller parts, so that maintenance will be easier. Consider an example where you want to implement the same logic like the addition of two numbers in multiple parts of the same program, then put the logic within a modularization unit and this modularization unit can be called wherever you want to add two numbers.
 
Advantages of modularization techniques are :
 
* Modularization will eliminate redundancy if the program is having similar statement blocks or it needs to process the same function multiple times. Thus it increases the code reusability.

* Using this modularization technique, we can make the program easier to read and improve the program structure.

* Modularized programs will be easier to maintain, update, and debug.
Some control break events are as follows.
 
AT-FIRST : This event is used to execute the statements before records are processed.
 
AT-LAST : This event is used to execute the statements after all records are processed.
 
AT-NEW : This event is used to execute the statement before the collection of records are processed.
 
AT-END : This event is used to execute the statements after processing of a group of records.
There are mainly two types of parameters :
 
Formal parameters : This is basically defined when the subroutine gets defined alongside the FORM statement. 
 
Actual parameters : This is defined when the subroutine gets defined alongside the PERFORM statement.  
 
These can be distinguished by distinguishing the functionality. The data are passed to the subroutines with the help of the Input parameters and data are passed from the subordinates with the help of output parameters.
47 .
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.
48 .
What ABAP statement will trigger list generation?
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.
OSS(Online Service System) notes are a part of an online SAP service portal that gives up-to-date information about SAP notes. It is the Knowledge Base of SAP that will address the known issues specifically in the SAP system. It frequently releases patches, new program developments, bug fixes, and other various updates by SAP. This will provide a list of correction notes for SAP objects.

OSS Notes will be continuously updated as customers report issues in the SAP system and SAP will release a note that includes detailed instructions about fixing or addressing the issue. Most of the issues get addressed or fixed when the next version of the same component gets released by SAP and hence it is very important to see note applicability related to the version where an issue is being addressed. Each note will be applied to a version and almost all its predecessor versions. Before you start with your work, it is necessary to check for the presence of a particular in your SAP system.
In a Web Dynpro application, url is automatically generate. You can find the URL of application in Properties tab. URL structure can be of two types :
 
SAP namespace :
<schema>://<host>.<domain>.<extension>:
<port>/sap/bc/webdynpro/<namespace>/<application name>
 
Custom namespace :
<schema>://<host>.<domain>.<extension>:
<port>/abc/klm/xyz/<namespace>/webdynpro/<application name>
Adobe forms is a technology used for developing the forms and now it has become the current standard in SAP for form development. To use these forms, a Java stack must be first installed in SAP Basis. Along with that, developers need to configure the Adobe Document Service(ADS). Adobe LiveCycle Designer(LCD), GUI(graphical user interface) for Adobe Forms- must also require to be installed separately as the application will run on Windows.

Using Adobe Forms, we can create the forms in companies, fill out the form, output as a print form, show it as a PDF file on screen, or even it can be sent. Such forms will include purchase orders, orders, and invoices.

From the SAP system, it reads the associated master data and transaction data. The data will be displayed by the application in the predefined and desired form, for example, as a print form. Entering data in forms is also allowed.

Adobe has become the successor to SAPscript and SmartForms. This technology has surpassed its two predecessors SAPscript and SmartForms in various areas like performance and design.

We can separate design and programming by using Adobe forms in SAP. Also, Interactive Forms by Adobe in SAP provides different suitable tools and functions for the easier design of a form.

It is possible to customize the forms by form developers with the help of their own programming by using two script languages Adobe FormCalc or JavaScript. The developer tool for Adobe Forms will be accessed through SFP(SAP tcode-Form Builder) transaction.
52 .
What is the use of messages in Web Dynpro?
In ABAP Workbench, you can also create and show messages that contain information for end users of Dynpro application. These messages are displayed on the screen. These are user interactive messages that displays important information about Web Dynpro application.
53 .
What are the different scenarios that can be used to create interactive forms in Web Dynpro?
* Interactive Scenario
* Print Scenario
* Offline Scenario
* Using digital signature
ALE(Application Link Enabling) EDI(Electronic Data Interchange)
It is an SAP technology used for transferring data between SAP systems It is an independent technology used for transferring data between two systems, either between SAP systems or non SAP systems
Useful in internal communications Useful in external communications
It is used for distributing the master data(such as Vendor Master, Material Master) within a company when a distributed environment has been maintained It is used for exchanging transaction data(such as Delivery, Purchase order) among two different business partners
Technically, data transfer is done using memory buffer Technically, data transfer is done using a file port
A translator is not required here Translator is required for converting the X12 to IDoc(Inbound) and IDoc to X12(Outbound)