100 Updated SAP ABAP Interview Questions Part – 1
Q – 1 What is the table, which contain the details of all the name of the programs and forms?
Ans- Table contains vertical and horizontal lines. We can store the data in table as blocks. We can scroll depends upon your wish. And these all are stored in database (data dictionary).
Q – 2 What are the difference between Interactive and Drill Down Reports?
Ans- ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click) or AT USER-COMMAND (pressing a button). You can use these events to move through layers of information about individual items in a list.
Drill down report is nothing but interactive report…drilldown means above paragraph only.
Q – 3 Among the Call Transaction and Session Method, which is faster?
Ans- Call transaction is faster then session method. But usually we use session method in real time…because we can transfer large amount of data from internal table to database and if any errors in a session, then process will not complete until session get correct.
Q – 4 What is runtime analysis? Have you used this?
Ans- It checks program execution time in microseconds. When you go to SE30. If you give desired program name in performance file. It will take you to below screen. You can get how much fast is your program.
Q – 5 How can I copy a standard table to make my own Z_TABLE?
Ans- Go to transaction SE11. Then there is one option to copy table. Press that button. Enter the name of the standard table and in the Target table enter Z_table name and press enter.
Q – 6 Which transaction code can I used to analyze the performance of ABAP program?
Ans- Transaction Code AL21.
Q – 7 Can we create field without data element and how?
Ans- In SE11, one option is available above the fields strip i.e. Data element / direct type.
Q – 8 When top of the page event is triggered?
Ans- After executing first write statement in start-of-selection event.
Q – 9 How do you get output from IDOC?
Ans- Data in IDOC is stored in segments; the output from IDOC is obtained by reading the data stored in its respective segments.
Q – 10 In selection screen, I have three fields, plant material number and material group. If I input plant how do I get the material number and material group based on plant dynamically?
Ans- AT SELECTION-SCREEN ON VALUE-REQUEST FOR MATERIAL.
CALL FUNCTION ‘F4IF_INT_TABLE_VALUE_REQUEST’
to get material and material group for the plant.
Q – 11 On which event we can validate the input fields in module programs?
Ans- In PAI (Write field statement on field you want to validate, if you want to validate group of fields put in chain and End chain statement.)
Q – 12 What are client dependant objects in ABAP / SAP?
Ans- SAP Script layout, text element, and some DDIC objects.
Q – 13 How data is stored in cluster table?
Ans- Each field of cluster table behaves as tables, which contains the number of entries.
Q – 14 Write special commands of List?
Ans- There are four specials commands of lists: Write, Uline, Skip and New-Page
Q – 15 What are different types of screen keywords?
Ans- There are four types of screen keywords: Module, Loop, Chain and Field.
Q – 16 hat are the different types of mode (run code) in Call Transaction method?
Ans- There are three modes in Call Transaction:
A – Displays All Screen
E – Display Errors
N – Background Processing
Q – 17 Write the steps to execute session method?
Ans- Steps for execution Session Method:
1) System
2) Service
3) Batch Input
4) Session
5) Choose Session Name
6) Process
7) Asks for Mode (Display All Screen, Display Errors & Background)
8) Process
Q – 18 What are the function module in BDC?
Ans- There are three function module in BDC:
1) BDC_OPEN_GROUP
2) BDC_INSERT
3) BDC_CLOSE_GROUP
Q – 19 Write syntax for Message Error (Report)?
Ans- AT SELECTION-SCREEN.
SELECT * FROM ZREKHA_DEPTT INTO CORRESPONDING FIELDS OF ITAB
WHERE DEPTNO IN DEPTNO.
ENDSELECT.
If SY-DBCNT = 0.
MESSAGE E000 WITH ‘NO RECORDS FOUND’.
ENDIF.
Q – 20 What is Asynchronous and Synchronous Update?
Ans- 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.
Q – 21 What are DML commands in ABAP?
Ans- Select,
Insert,
Delete,
Modify,
Update
Q – 22 What are types of Select statements?
Ans- SELECT SINGLE … WHERE …
SELECT [DISTINCT] … WHERE …
SELECT * …
Q – 23 What are the sequences of event block?
Ans- i. Reports
ii. Nodes
iii. Data
iv. Initialization
v. At selection-screen
vi. Start-of-selection
vii. Get deptt
viii. Get emp
ix. Get deptt late
x. End-of-selection
xi. Form
xii. Endform
Q – 24 How to display or know if the value entered contains records or not?
Ans- SY-SUBRC
Q – 25 What are the components of Selection Table?
Ans- There are four components of selection table:
Low, High, Sign, Options
Q – 26 What are the properties of Selection Screen?
Ans- There are 11 properties of selection screen:
1) Default
2) Memory ID
3) Lowercase
4) Visible length
5) Obligatory
6) Matchcode
7) Check
8) Checkbox
9) Radiobutton Group
10) No-display
11) Modif ID
Q – 27 How many default Tab Strips are there? How to insert more Tabs in it?
Ans- There 2 default Tab strips. Screen painter attributes contain Tab Title, which is used to insert more tabs in tab strip.
Q – 28 List of Screen elements.
Ans- There are 13 screen elements:
i. Input / output fields
ii. Text fields
iii. Checkbox
iv. Radio button
v. Push Button
vi. Drop down list
vii. Subscreen
viii. Table control
ix. Tabstrip control
x. Custom control
xi. Box
xii. Status icons
xiii. OK_CODE fields
Q – 29 What are different types of attributes of Function Module?
Ans- There are 6 attributes of FM:
1. Import
2. Export
3. Table
4. Changing
5. Source
6. Exception
Q – 30 What is the syntax of Packed Number?
Ans- Data : NUM type P decimals 2.
Q – 31 What are the ABAP commands that link to a layout set?
Ans- Control Commands, System Commands
Q – 32 What is SAP Script and layout set?
Ans- The tool, which is used to create layout set is called SAP Script. Layout set is a design, appearance and structure of document.
Q – 33 Does SAP handle multiple currencies? Multiple languages?
Ans- Yes.
Q – 34 How do you set up background jobs in SAP? What are the steps? What are the events driven batch jobs?
Ans- Go to SM36 and create background job by giving job name, job class and job steps
(JOB SCHEDULING)
Q – 35 What do you do with errors in BDC batch sessions?
Ans- 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.
Q – 36 What do you do when the system crashes in the middle of a BDC batch session?
Ans- We will look into the error log file (SM35). Check number of records already updated and delete them from input file and run BDC again.
Q – 37 What is the structure of a BDC sessions.?
Ans- BDCDATA
Q – 38 Is a logical database a requirement/must to write an ABAP query?
Ans- No, it is not must to use LDB. Apart from it, we have other options:
1) Table join by Basis Table
2) Direct Read of table
3) Data Retrieval by Program
Q – 39 What are the functional areas? User groups? How does ABAP query work in relation to these?
Ans- Functional Areas – By creating functional areas, we can initially select this data. This ensures that the data is presented to the ABAP Query user in a meaningful way to accomplish the task, and that only the data that the user may use is presented.
User Groups – A user group is a collection of users that work with about the same data and carry out similar tasks. The members of a user group can use all programs (queries) created by any user of the group. Changes to such a program are at once visible to all users. This ensures that all members of a user group use the same evaluation programs.
ABAP Query: It consists of three components – queries, functional areas and user groups. The functional areas provide the user with an initial set of data in accordance with the task to be accomplished. All users must be members of at least one user group. All members of one user group can access the same data as well as the same program (queries) to create lists.
Q – 40 What are the advantages and disadvantages of ABAP query tool?
Ans- 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.
Q – 41 What specific statements do you using when writing a drill down report?
Ans- AT LINE-SELECTION
AT USER-COMMAND
AT PF.
Q – 42 What are logical databases? What are the advantages/disadvantages of logical databases?
Ans- To read data from a database tables we use logical database.
A logical database provides read-only access to a group of related tables to an ABAP/4 program.
Advantages: –
The programmer need not worry about the primary key for each table. Because Logical database knows how the different tables relate to each other, and can issue the SELECT command with proper where clause to retrieve the data.
1) An easy-to-use standard user interface.
2) Check functions, which check that user input is complete, correct, and plausible.
3) Meaningful data selection.
4) Central authorization checks for database accesses.
5) Good read access performance while retaining the hierarchical data view determined by the application logic.
6) No need of programming for retrieval, meaning for data selection
Disadvantages: –
1) If you do not specify a logical database in the program attributes, the GET events never occur.
2) There is no ENDGET command, so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).
3) Fast in case of lesser no. of tables But if the table is in the lowest level of hierarchy, all upper level tables should be read so performance is slower.
Q – 43 Have you used SAP supplied programs to load master data?
Ans- SAP supplied BDC programs
RM06BBI0 (Purchase Requisitions)
RMDATIND (Material Master)
RFBIKR00 (Vendor Masters)
RFBIDE00 (Customer Master)
RVINVB00 (Sales Order)
Q – 44 What are Conversion & Interface programs in SAP?
Ans- CONVERSION: Legacy system to flat file.
INTERFACE: Flat file to SAP system.
Q – 45 How to find the return code of an stmt in ABAP programs?
Ans- Open SQL has 2 system fields with return codes:
1) SY-SUBRC
2) SY-DBCNT
Using function modules
Q – 46 What are datasets in ABAP?
Ans- The sequential files (ON APPLICATION SERVER) are called datasets. They are used for file handling in SAP.
Q – 47 How do you take care of performance issues in your ABAP programs?
Ans- Performance of ABAP programs can be improved by minimizing the amount of data to be transferred. The data set must be transferred through the network to the applications, so reducing the amount of time and also reduces the network traffic.
Some measures that can be taken are:
– Use views defined in the ABAP/4 DDIC (also has the advantage of better reusability).
– Use field list (SELECT clause) rather than SELECT *.
– Range tables should be avoided (IN operator)
– Avoid nested SELECTS.
Q – 48 What are internal tables? How do you get the number of lines in an internal table? How to use a specific number occurs statement?
Ans-
1) It is a standard data type object, which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organizing the contents of database tables according to users need.
2) Using SY-DBCNT.
3) The number of memory allocations the system need to allocate for the next record population.
Q – 49 Name a few system global variables you can use in ABAP programs?
Ans- SY-SUBRC, SY-DBCNT, SY-LILLI, SY-DATUM, SY-UZEIT, SY-UCOMM,
SY-TABIX…..
Q – 50 Are programs client dependent?
Ans- Yes, group of users can access these programs with a client number.
Q – 51 What is the client concept in SAP? What is the meaning of client independent?
Ans- In commercial, organizational and technical terms, the client is a self-contained unit in the R3 system, with separate set of Master data and its own set of Tables. When a change is made in one client all other clients are affected in the system – this type of objects are called Client independent objects.
Q – 52 What is CTS and what do you know about it?
Ans- CTS stands for Correction and Transport System. The CTS provides a range of functions that help you to choose a transport strategy optimally suited to your requirements. We recommend that you follow the transport strategy while you plan and set up your system landscape.
Correction and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems and clients in your system landscape.
This documentation provides you with an overview of how to manage changes with the CTS and essential information on setting up your system and client landscape and deciding on a transport strategy. Read and follow this documentation when planning your development project.
For practical information on working with the Correction and Transport System, see Correction and Transport Organizer and Transport Management System.
Q – 53 How do you validate the selection criteria of a report? And how do you display initial values in a selection screen?
Ans- The selection criteria is validated in the processing block of the AT SELECTION SCREEN event for the input values on the screen and respective messages can be sent.
To display initial values in the selection screen:
1) Use INITIALIZATION EVENT
2) Use DEFAULT VALUE option of PARAMETERS Statement
3) Use SPA/GPA Parameters (PIDs).
Validate: –
by using match code objects.
Display :-
Parameters default ‘xxx’.
Select-
options for spfli-carrid.
Initial values in a selection screen:
INITIALIZATION.
DNO-LOW = 10.
DNO-HIGH = 30
SIGN I.
OPTION NB.
APPEND DNO.
Q – 54 What are ranges? What are number ranges?
Ans- Main function of ranges to pass data to the actual selection tables without displaying the selection screen.
Min, Max values provided in selection screens.
It is often necessary to directly access individual records in a data structure. This is done using unique keys. Number ranges are used to assign numbers to individual database records for a commercial object, to complete the key. Such numbers are e.g. order numbers or material master numbers.
Q – 55 What are matchcodes? Describe?
Ans- It is similar to table index that gives list of possible values for either primary keys or non-primary keys
Q – 56 What happens when a table is activated in DD?
Ans- When the table is activated, a physical table definition is created in the database for the table definition stored in the ABAP dictionary. The table definition is translated from the ABAP dictionary of the particular database.
It is available for any insertion, modification and updation of records by any user.
Q – 57 Name a few data dictionary objects?
Ans- Different types of data dictionary objects:
1) Tables
2) Views
3) Data elements
4) Structure
5) Matchcode
6) Domains
7) Search Helps
8) Local Objects
Q – 58 How are the date and time field values stored in SAP?
Ans- DD.MM.YYYY. HH:MM:SS
Q – 59 What are the exceptions in function module?
Ans-
Exceptions:
Our function module needs an exception that it can trigger if there are no entries in table SPFLI that meet the selection criterion. The exception NOT_FOUND serves this function.
COMMUNICATION_FAILURE & SYSTEM_FAILURE
Q – 60 How do you write a function module in SAP? Describe?
Ans-
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.
Q – 61 What is a drill down report?
Ans- Its an Interactive report where in the user can get more relevant data by selecting explicitly.
Q – 62 What is an interactive report? What is the obvious difference of such report compared with classical type reports?
Ans- An Interactive report is a dynamic drill down report that produces the list on users choice.
Difference: –
a) 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.
B) Once a classical report, executed user looses control where as Interactive, user has control.
C) In classical report, drilling is not possible where as in interactive, drilling is possible.
Q – 63 What are the events in ABAP language?
Ans- The events are as follows:
1. Initialization
2. At selection-screen
3. Start-of-selection
4. End-of-selection
5. Top-of-page
6. End-of-page
7. At line-selection
8. At user-command
9. At PF
10. Get
11. At New
12. At LAST
13. AT END
14. AT FIRST
Q – 64 What is the meaning of ABAP editor integrated with ABAP data dictionary?
Ans- ABAP Editor: Tool in the ABAP Workbench in which you enter the source code of ABAP programs and check their syntax. You can also navigate from the ABAP Editor to the other tools in the ABAP Workbench.
Q – 65 What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?
Ans-
To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:
EXEC SQL [PERFORMING