Top 50 Sap Abap Interview Questions
Q1. Explain What Is The Difference Between Primary Key And Unique Key?
Primary Key – It can accepts 0 price and can not be NULL.
Unique Key – It can be NULL.
Q2. How To Upload Data Using Catt?
These are the stairs to be followed to Upload records through CATT: Creation of the CATT test case & recording the sample records input. Download of the supply report template. Modification of the supply report. Upload of the records from the source report.
Q3. What Are The System Fields You Have Worked With? Explain?
I had worked with the following (30) device fields:
1) SY-DBSYS - Central Database
2) SY-HOST - Server
three) SY-OPSYS - Operating System
four) SY-SAPRL - SAP Release
five) SY-SYSID - System Name
6) SY-LANGU - User Logon Language
7) SY-MANDT - Client
eight) 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
thirteen) 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 contemporary loop Pass
19) SY-TABIX - Current line of internal table
20) SY-DBCNT - Number of desk entries processed
21) SY-SUBRC - Return Code
22) SY-UCOMM - Function Code
23) SY-LINCT - Page Length of listing
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 at some point of printing
Q4. Describe The Difference Between Macro And Subroutine?
Macros can simplest be used in the program they are described in and most effective after the definition are increased at compilation / generation. Subroutines (FORM) may be referred to as from both the program they're described in and other programs. A MACRO is extra or much less an abbreviation for some lines of code that are used more than once or twice. A FORM is a nearby subroutine (which can be referred to as external). A FUNCTION is (extra or less) a subroutine that is called external. Since debugging a MACRO is not in reality feasible, prevent the usage of them (I’ve never used them, but visible them in movement). If the subroutine is used most effective neighborhood (known as inner) use a FORM. If the subroutine is known as outside (used by multiple application) use a FUNCTION.
Q5. How Do You Write A Function Module In Sap? Describe?
Called program - SE37 - Creating feature organization, feature module with the aid of assigning attributes, uploading, exporting, tables, and exceptions.
Calling software - SE38 - In software, click on pattern and write function name- offer export, import, tables, exception values.
Q6. Write Special Commands Of List?
There are 4 specials commands of lists:
Write
Uline
Skip
New-Page
Q7. What Is A Collect Statement? How Is It Different From Append?
Collect: If an entry with the equal key already exists, the COLLECT declaration does not append a brand new line, but provides the contents of the numeric fields inside the paintings area to the contents of the numeric fields inside the current entry.
Append : Duplicate entries occurs
Q8. What Is The Syntax Of Packed Number?
Data : NUM type P decimals 2.
Q9. Explain What Are Interactive Reports?
An output listing which displays just the primary info & allow user to interact, so that a new listing is populated based on consumer-choice. With interactive list, the person can actively manipulate statistics retrieval and show for the duration of the consultation.
Q10. How Many Default Tab Strips Are There? How To Insert More Tabs In It?
There are 2 default Tab strips. Screen painter attributes incorporate Tab Title, that is used to insert greater tabs in tab strip.
Q11. What Is Alv Programming In Abap? When Is This Grid Used In Abap?
ALV is Application List viewer. Sap affords a fixed of ALV (ABAP LIST VIEWER) function modules which may be put into use to decorate the output of a file. This set of ALV capabilities is used to beautify the clarity and capability of any record output. Cases rise up in sap whilst the output of a record incorporates columns extending more than 255 characters in period. In such instances, this set of ALV functions can help choose selected columns and set up the exclusive columns from a report output and additionally save extraordinary editions for document show. This is a totally green tool for dynamically sorting and arranging the columns from a file output. The report output can incorporate as much as 90 columns inside the display with the big selection of show options.
Q12. Difference Between Domain And Data Element? What Are Aggregate Object?
Domain - Specifies the technical attributes of a statistics element - its records type, length, possible values, and look on the screen. Each statistics element has an underlying domain. A single area can be the premise for numerous statistics elements. Domains are items inside the ABAP Dictionary.
Data Element - Describes the enterprise feature of a table field. Its technical attributes are based totally on a site, and its enterprise characteristic is described by means of its field labels and documentation.
Aggregate Object – Views, Match Code and Lock items are referred to as aggregate items because they are formed from numerous associated table.
Q13. What Are Field Symbols And Field Groups? Have You Used Component Idx Of Structure Clause With Field Groups?
Field Symbols – They are placeholder or symbolic names for the alternative fields. They do no longer bodily reserve space for a subject, but factor to its contents. It can point to any statistics objects.
Field-symbols <fs>
Field Groups – Field groups does not reserve storage area but includes tips to present fields.
An extract dataset consists of a chain of information. These data might also have exceptional systems. All records with the same shape shape a record type. You need to define each record kind of an extract dataset as a area group, the use of the FIELD-GROUPS announcement.
Field-businesses <fg>
Q14. What Do You Do With Errors In Bdc Batch Sessions?
We inspect the listing of wrong session and method it again. To accurate incorrect session, we examine the session to decide which display and fee produced the error. For small mistakes in information we correct them interactively in any other case modify batch enter application that has generated the consultation or normally even the data document.
Q15. What Are The Abap Commands That Link To A Layout Set?
Control Commands, System Commands.
Q16. Different Types Of Luws. What Are They?
Two types of LUW are:
DB LUW - A database LUW is the mechanism utilized by the database to make certain that its information is usually constant. A database LUW is an inseparable collection of database operations that ends with a database commit. The database LUW is either completely finished by using the database system or under no circumstances. Once a database LUW has been efficaciously achieved, the database will be in a steady nation. If an error occurs within a database LUW, all of the database modifications on account that the beginning of the database LUW are reversed. This leaves the database within the nation it had before the transaction commenced.
SAP LUW - A logical unit including conversation steps, whose changes are written to the database in a unmarried database LUW is known as an SAP LUW. Unlike a database LUW, an SAP LUW can span numerous dialog steps, and be done using a series of different paintings tactics.
Q17. Does Sap Handle Multiple Currencies? Multiple Languages?
Yes.
Q18. What Are The Different Types Of Views In Sap R/three System?
The one of a kind perspectives are:
a. Logical view
b. Software-orientated view
c. User-orientated view
Q19. A Situation: An Abap Program Creates A Batch Input Session. We Need To Submit The Program And The Batch Session In Background. How To Do It?
Go to SM36 and create history task by way of giving job call, process class and task steps (JOB SCHEDULING).
Q20. If You Are Using Logical Databases How Will You Modify The Selection-display screen Elements?
Select-options : dname for deptt-dname.
Q21. What Is Sap Script And Layout Set?
The tool, that's used to create layout set is called SAP Script. Layout set is a layout, look and structure of report.
Q22. How To Debug A Script In Abap?
Go to SE71, supply layout set call, go to utilities pick debugger mode on.
Q23. What Are Conversion & Interface Programs In Sap?
CONVERSION: Legacy system to flat record.
INTERFACE: Flat record to SAP gadget.
Q24. What Is Get Cursor Field?
GET CURSOR assertion transfers the call of the display screen detail on which the cursor is positioned at some stage in a consumer action into the variable <f>.
GET CURSOR FIELD <f> [OFFSET <off>] [LINE <lin>] [VALUE <val>] LENGTH <len>].
Q25. What Is Asynchronous And Synchronous Update?
Asynchronous Update – The software does no longer look forward to the work procedure to complete the replace.
Commit Work.
Synchronous Update – The software anticipate the work system to complete the replace.
Commit Work and Wait.
Q26. What Are Matchcodes? Describe?
It is similar to desk index that offers listing of viable values for both number one keys or non-primary keys.
Q27. What Is Function Group? Difference Between Function Group And Function Module?
Function Groups act as boxes for Function Modules that logically belong collectively.
Function Groups
1) These can't be defined in a Function Module.
2) It cannot be called.
Three) They are bins for Function Module.
Function Modules
1) These ought to be described in a Function Group.
2) It may be called from any program.
Three) They are not containers for Function Group.
Q28. What Is The Difference Between A Substructure And An Append Structure?
• In case of a substructure, the reference originates within the desk itself, in the shape of a assertion consist of.
• In case of an append structure, the desk itself remains unchanged and the reference originates within the append structure.
Q29. Can We Have More Than One Selection-display And How?
Yes, we can have multiple selection screen.
Selection-display start of block honey with frame title text-a hundred and one.
Select-options : deptno for zrekha_deptt-deptno.
Selection-display give up of block honey.
Selection-screen start of block honey1 with body title textual content-102.
Select-alternatives : dname for zrekha_deptt-dname.
Selection-screen stop of block honey1.
Q30. What Are The Data Types Of Internal Tables?
There are three types:
Line
Key
Table
Q31. What Is The Transaction Code For Table Maintenance?
SM30.
Q32. What Are Client Dependant Objects In Abap / Sap?
SAP Script layout, textual content detail, and a few DDIC gadgets.
Q33. Is A Logical Database A Requirement/need to To Write An Abap Query?
No, it isn't ought to to apply LDB. Apart from it, we have other alternatives:
Table be part of by means of Basis Table
Direct Read of desk
Data Retrieval by means of Program
Q34. In Sap Scripts, How Will You Link Form With The Event Driven?
In PAI, define characteristic code and write code for the equal.
Q35. What Are The Different Functions Used In Sap Script? What Are The Parameters Used In Each Function?
There are three special capabilities utilized in SAP Script:
OPEN_FORM
WRITE_FORM
CLOSE_FORM
Parameters in Each Function:
OPEN_FORM
Exporting
Form
Language
WRITE_FORM
Exporting
Element
Window
CLOSE_FORM
Q36. What Are The Contents In Technical Specifications?
There are five contents in Technical Settings:
Data Class
Size Category
Buffering Permission
Buffering Type and
Logging.
Q37. What Are The Different Types Of Mode (run Code) In Call Transaction Method?
There are 3 modes in Call Transaction:
A – Displays All Screen
E – Display Errors
N – Background Processing
Q38. What Is The Structure Of A Bdc Sessions.?
BDCDATA.
Q39. What Will You Code In Start-of-selection & End-of-choice ?
START-OF-SELECTION SELECT * FROM DEPTT INTO CORRESPONDING FIELDS OF ITAB WHERE DEPTNO IN DEPTNO. APPEND ITAB. ENDSELECT. LOOP AT ITAB. WRITE : / 10 ITAB-DEPTNO. HIDE : ITAB-DEPTNO. ENDLOOP. END-OF-SELECTION
Q40. What Are Dml Commands In Abap?
Select, Insert, Delete, Modify, Update.
Q41. What Does An Exec Sql Stmt Do In Abap? What Is The Disadvantage Of Using It?
To use a Native SQL assertion, you must precede it with the EXEC SQL statement, and comply with it with the ENDEXEC assertion as follows:
EXEC SQL [PERFORMING <form>].
<Native SQL statement>
ENDEXEC.
There is no duration after Native SQL statements. Furthermore, using inverted commas (") or an asterisk (*) at the beginning of a line in a local SQL assertion does now not introduce a remark as it would in everyday ABAP syntax. You need to understand whether or not table and field names are case-touchy in your preferred database.
Q42. What Is The Typical Structure Of An Abap Program?
HEADER, BODY, FOOTER.
Q43. Are Programs Client Dependent?
Yes, group of users can get entry to these packages with a consumer quantity.
Q44. What Are Different Types Of Screen Keywords?
There are four sorts of screen keywords:
Module
Loop
Chain
Field.
Q45. What Is An Interactive Report? What Is The Obvious Difference Of Such Report Compared With Classical Type Reports?
An Interactive file is a dynamic drill down document that produces the listing on customers preference.
Difference: -
The list produced by way of classical report would not allow user to have interaction with the machine in which as the listing produced by way of interactive record lets in the person to have interaction with the machine.
Once a classical report, achieved consumer looses manage wherein as Interactive, user has manage.
In classical report, drilling isn't feasible wherein as in interactive, drilling is possible.
Q46. What Is The Difference Between Tables And Structures?
Tables:
Data is permanently saved in tables in the database.
Database tables are generated from them.
Structure:
It contains data quickly all through software run-time.
No Database tables are generated from it.
Q47. Name A Few System Global Variables You Can Use In Abap Programs?
SY-SUBRC, SY-DBCNT, SY-LILLI, SY-DATUM, SY-UZEIT, SY-UCOMM, SY-TABIX..
Q48. What Is A Batch Input Session?
BATCH INPUT SESSION is an intermediate step among internal table and database table. Data along with the movement is stored in consultation i.E. Data for display screen fields, to which display screen it is surpassed, software name in the back of it, and how next display screen is processed.
Create session – BDC_OPEN_GROUP
Insert batch input – BDC_INSERT
Close session – BDC_CLOSE_GROUP
Q49. Name A Few Data Dictionary Objects?
Different styles of statistics dictionary objects:
Tables
Views
Data factors
Structure
Matchcode
Domains
Search Helps
Local Objects
Q50. What Are The Advantages And Disadvantages Of Abap Query Tool?
Advantages: No programming expertise is required.
Disadvantages: Depending at the complexity of the database tables, it is able to not be easy for the user to choose the vital facts effectively.

