Top 50 SAP ABAP Interview Questions And Answers For Freshers Pdf

Top 50 SAP ABAP Interview Questions And Answers Pdf

1. In ABAP what are the differences between table and structure in data dictionary ?

Answer:
The difference between structure and table is

a) Data can be stored physically in Table, but a structure cannot

b) Structure does not have primary key but table can have

c) Table can have the technical attribute but the structure does not have

Top 50 SAP ABAP Interview Questions And Answers For Freshers Pdf

2. How to create ‘table cluster’ ?

Answer:
a) In ABAP dictionary, select object type Table, enter a table name and choose create

b) A field maintenance screen for the table is displayed. Table type Transparent table, set it as a default

c) Make the necessary entries in the short description and delivery classified on the Attributes page. Then define the fields of the table.

d) Proceed as when creating a transparent table. Now save your entries

e) Now choose EXTRASàChange table category

f) When a dialogue box appears you have to select the table type ‘Pooled table’ or ‘Cluster table’

g) 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.

h) Now enter the name of the table cluster or table pool to which you want to assign the cluster table.

3. Explain What Is The Difference Between Primary Key And Unique Key ?

Answer:
Primary Key – It can accepts 0 value and cannot be NULL.

Unique Key – It can be NULL.

4. Explain the difference between Template and Table ?

Answer:
The difference between the table and template is that, table is a dynamic and template is a static.

5. What is the difference between collect and sum ?

Answer:
SUM.
When processing an internal table in a block starting with LOOP and concluded by ENDLOOP , SUM calculates the control totals of all fields of type I , F and P (see also ABAP/4 number types ) and places them in the LOOP output area (header line of the internal table or an explicitly specified work area).

When you use SUM in a LOOP with an explicitly specified output area, this output area must be compatible with the line type of the internal table.When using LOOP to process a sorted extract (see SORT ), the control total of f at the end of the group appears in the field SUM(f) – – if f is type I , F or P .

COLLECT.
COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab .

If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields.

If, besides its default key fields, the internal table contains number fields,the contents of these number fields are added together if the internal table already contains an entry with the same key fields.

If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line.

If you specify wa INTO , the entry to be processed is taken from the explicitly specified work area wa . If not, it comes from the header line of the internal table itab .

After COLLECT , the system field SY-TABIX contains the index of the – existing or new – table entry with default key fields which match those of the entry to be processed.

COLLECT can create unique or compressed datasets and should be used precisely for this purpose. If uniqueness or compression are unimportant, or two values with identical default key field values could not possibly occur in your particular task, you should use APPEND instead. However, for a unique or compressed dataset which is also efficient, COLLECT is the statement to use.

If you process a table with COLLECT , you should also use COLLECT to fill it. Only by doing this can you guarantee that the internal table will actually be unique or compressed, as described above and COLLECT will run very efficiently.

If you use COLLECT with an explicitly specified work area, it must be compatible with the line type of the internal table.

Top 50 SAP SD Interview Questions And Answers For Freshers Pdf

6. How we format the data before before write statement in report ?

Answer:
We can format the reports output by using the loop events like:

1.at first
2.at new
3.at last
etc check document.

7. What are two different ways to add fields to SAP tables ?

Answer:
An append structure or a customizing include can be used to add fields to a table. Append structures are created by adding fields to the end of a table while Customizing includes are specified by the SAP developer in advance to allow for the customer to create new fields.

8. What is a BADI ?

Answer:
– BADI stands for Business add-in. BADI’s are a relatively new enhancement concept that make use of ABAP Object technology. This is a true object oriented approach to SAP enhancements using classes, interfaces and methods to implement the BADI
– In order to enhance a SAP application program, the BADI must first be defined. The developer will create an interface for the BADI. An adapter class is created from this that will implement the interface. Developers will then create an instance of the adapter class in the SAP application program and create method calls as required.

Top 50 SAP ABAP Interview Questions And Answers For Freshers Pdf

9. What two statements are required in an ABAP program to output an icon using a write statement ?

Answer:
– There are 2 statements required in the ABAP program:
The INCLUDE or INCLUDE statement is required in the program.
The WRITE statement will have the following syntax: WRITE AS ICON.
The Include files contain the names of constants that represent all system defined icons. contains only icons that are relevant for list processing while will contain all system defined icons.

10. What is BDC programming ?

Answer:

Transferring of large/external/legacy data into SAP system using Batch Input programming. Batch input is a 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”.

11. What are the functional modules used in sequence in BDC ?

Answer:

These are the 3 functional 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 modules. 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.

12. What are internal tables ?

Answer:

Internal tables are 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.

13. What is ITS? What are the merits of ITS ?

Answer:

ITS is a Internet Transaction Server. ITS forms an interface between HTTP server and R/3 system, which converts screen provided data by the R/3 system into HTML documents and vice-versa. Merits of ITS: A complete web transaction can be developed and tested in R/3 system. All transaction components, including those used by the ITS outside the R/3 system at runtime, can be stored in the R/3 system. The advantage of automatic language processing in the R/3 system can be utilized to language-dependent HTML documents at runtime.

14. What Are The System Fields You Have Worked With? Explain ?

Answer:

I had worked with the following (30) system fields:
1) SY-DBSYS – Central Database
2) SY-HOST – Server
3) SY-OPSYS – Operating System
4) SY-SAPRL – SAP Release
5) SY-SYSID – System Name
6) SY-LANGU – User Logon Language
7) SY-MANDT – Client
8) 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
13) 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 current loop Pass
19) SY-TABIX – Current line of internal table
20) SY-DBCNT – Number of table entries processed
21) SY-SUBRC – Return Code
22) SY-UCOMM – Function Code
23) SY-LINCT – Page Length of list
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 during printing

15. What Are The Events Used In Interactive Reports ?

Answer:

There are three events of Interactive Reports:

At PF(nn)
At line-selection
At user-command

16. What Will You Code In Start-of-selection & End-of-selection ?

Answer:

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

Top 50 SAP ABAP Interview Questions And Answers For Freshers Pdf

17. What Are Joins And Different Types Joins ?

Answer:

There are four types of Joins:

Self Join
Inner Join
Outer Join
Equi Join

18. How Do You Display A Data In A Detail List ?

Answer:

By using two statements:

Top-of-page during line-selection
At line-selection

19. What Are The Function Modules Used In A Sapscript Driver Program ?

Answer:

There are three functions used in SAP Script:

OPEN_FORM
WRITE_FORM
CLOSE_FORM

20. What Are Extracts ?

Answer:

Extracts are dynamic sequential datasets in which different lines can have different structures. We can access the individual records in an extract dataset using a LOOP.

21. Explain the difference between pool tables and transparent tables ?

Answer:

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.

a) Basic List: For simple reports

b) Statistics: For Percentage, Average etc.

c) Ranked List : For analytical reports

22. Update function modules are classified as either V1 or V2. Which type of update is performed first and in what mode (Asynchronously, Synchronously or locally) can each type be processed in ?

Answer:

V1 updates take priority over V2 updates and are therefore processed prior to V2 updates. V1 updates can be performed asynchronously, synchronously or locally. V2 updates always run asynchronously.

23. What is the Modification Assistant ?

Answer:

The modification assistant is a tool introduced in release 4.5 to simplify the upgrade process as it relates to modifications. The modification assistant can be triggered through the ABAP editor and it will assist in logging modifications for any changes that are made to the system.
– The modification assistant provides support for modification made through the ABAP Editor, Screen Painter, Menu Painter, text element maintenance, Function Builder and ABAP Dictionary.

Top 50 SAP ABAP Interview Questions And Answers For Freshers Pdf

24. What statement will be found in an SAP application program that implements a function module exit ?

Answer:

Function module exits will exist in some SAP application programs to allow a customer to add some functionality to the SAP program. Search the SAP application program globally looking for the following search string: “CALL CUSTOMER” to determine if an exit exists.

25. What is a transaction variant and why are they used ?

Answer:

A transaction variant is a set of screen variants that is used to predefine screen behavior and defaults. Fields, subscreens and full screens that may not be required by a user can be suppressed from that users view through the use of variant functionality. Default values can also be set for any input fields and fields can have the “ready for input” status revoked.
– A transaction variant can only be created for a dialog or reporting transaction and only normal, subscreen and dialog screens can be included in the variant.
– The GuiXT script language allows a developer to modify a screen through transaction variant maintenance providing more flexibility and power to the developer. Screen layouts can be modified by inserting buttons, value helps, moving objects, inserting screens and much more

26. List some of the many different ways that the SAP standard functionality can be changed by a customer ?

Answer:

– The SAP standard can be changed through personalization, customizing, modifications, enhancements and custom ABAP programs developed by the customer development team. Examples of these different approaches for changing the standard are as follows:
Personalization techniques include creation of variants, set/get parameters and activity groups.
– Customizing is the most common way for changing the SAP standard through the use SAP tools such as the R/3 reference model and the Implementation Guide. Customizing could be considered mandatory in order to implement R/3 and is usually performed by the functional team.
– Enhancements are usually performed by the development team and include activities such as dictionary enhancements, function module exits, menu and screen exits and Business add-ins (BADI’s)
– Custom ABAP programs are developed for a wide variety of reasons and can work with standard SAP objects or custom developed objects.
– Modifications to SAP objects are strongly discouraged. All other techniques should be explored before modifying an SAP object. The SAP Software Change Registration SSCR) is a procedure for registering all manual modification to SAP objects.

27. What is an ABAP data dictionary ?

Answer:

ABAP 4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views.

28. What are logical databases? What are the advantages/ disadvantages of logical databases ?

Answer:

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: i)check functions which check that user input is complete, correct,and plausible. ii)Meaningful data selection. iii)central authorization checks for database accesses. iv)good read access performance while retaining the hierarchical data view determined by the application logic. disadvantages)If you don’t specify a logical database in the program attributes,the GET events never occur. ii)There is no END GET command,so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).

29. What is a batch input session ?

Answer:

BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session ie data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.

30. How to upload data using CATT ?

Answer:

These are the steps to be followed to Upload data through CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.

Top 50 SAP ABAP Interview Questions And Answers For Freshers Pdf

31. What is Smart Forms ?

Answer:

Smart Forms allows you to create forms using a graphical design tool with robust functionality, color, and more. Additionally, all new forms developed at SAP will be created with the new Smart Form solution.

32. How can I make a differentiation between dependent and independent data ?

Answer:

Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAP scripts are client specific, some entries in customizing are client independent. If you display the object list for one change request, and then for each object the object attributes, you will find the flag client specific. If one object in the task list has this flag on, then that transport will be client dependent.

33. What is the difference between macro and subroutine ?

Answer:

Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the 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.

34. What is the differences between structure and table in data dictionary in ABAP ?

Answer:

Structure and table both are 2/2 matrices but there are many differences between table and structure.

1. Table can store the data physically but a structure dose not store.
2. Table can have primary key but a structure dose not have.
3. Table can have the technical attribute but a structure dose not have.

structure doesn’t contain technical attributes.
structure doesn’t contain primary key.
structure doesn’t stores underline database level.

35. Explain the difference between Template and Table ?

Answer:

The difference between the table and template is that, table is a dynamic and template is a static.

36. What is the difference between Type and Like ?

Answer:

TYPE, you assign datatype directly to the data object while declaring.
LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.

Top 50 SAP ABAP Interview Questions And Answers For Freshers Pdf

37. What is Tcode SE16. For what is it used. Explain briefly ?

Answer:

se16 is a data browse and it is used to view the contents of the table and we cannot change or append new fields to the existing structure of the table as we cannot view the structure level display using the se16.

38. What are different ABAP/4 editors? What are the differences ?

Answer:

The 2 editors are se38 and se80 both have the abap editor in place. In se38 you can go create programs and view online reports and basically do all the
developmet of objects in this editor. In se80 ( object navigator) there are additional features such as creating packages,module pool , function group ,classes, programs ( where you can create ur programs) and BSP applications

39. What is difference between dialog program and a report ?

Answer:

Report is a executable program
Dialog is a module pool program.It has to be executed via a transaction only.
Dialog programming is used for customization of screens

How do you connect to the remote server if you are working from the office for the client in remote place.
WAS web application server or ITS are generally used for this purpose. If you are sitting at your office with a server which is in the system and the other server is at the clients place you can generate IDOC, intermediate documents which carry the data you want to transfer or the documents you want to transfer, these IDOC are interpreted by the system at the receiving end with the message class with which it is bound with. If you want to log on a system which is very distant..then remote login can be used this depends on the internet speed.

40. What are the different databases Integrities ?

Answer:

a) Semantic Integrity

b) Relational Integrity

c) Primary Key Integrity

d) Value Set Integrity

e) Foreign Key Integrity

f) Operational Integrity

41. Explain about roll area , Dispatcher, ABAP-Processor ?

Answer:

Roll area is nothing but memory allocated by work process. It holds the information needed by R/3 about programs execution such as value of the variables.
Dispatcher :All the requests that come from presentation server will be directed first to dispatcher. Further dispatcher sends this requests to work process on FIFO(First In and First Out) basis.

42. What is Field symbol ?

Answer:

You can use field symbols to make the program more dynamic. In this example the name of a table control is substituted by a field symbol. Thus you cal call the form with any internal table, using the name of the table control as a parameter.

Example
form insert_row
using p_tc_name.

field-symbols type cxtab_control. “Table control

assign (p_tc_name) to .

* insert 100 lines in table control
-lines = 100.

43. How data is stored in cluster table ?

Answer:

A cluster table contains data from multiple DDIC tables.
It stores data as a name value pair ( varkey, vardata)

44. On ABAP: Did you set up a workflow? Are you familiar with all steps for setting up a workflow ?

Answer:

Yes.
Execute the Txn SWDD(Creating a new Workflow).
In the header of the Workflow, define the Business Object and Event you refer to for triggering the Wf.
Create the Steps required for your workflow(Activity).
Inside the Activity, Create the task and assign the Business Object and the related method for that business object.
Activate the Workflow.

Top 50 SAP ABAP Interview Questions And Answers For Freshers Pdf

45. Difference Between Sap Script And Report ?

Answer:

SAP Script – It is the integrated text management system of the SAP R/3 System.
Two types:

PC Editor
Line Editor.

Reports – It is the way to display data fetched from database table onto screen or directly output it to a printer.
Two types:

Classical
Interactive.

46. Difference Between Sy-tabix And Sy-index? Where It Is Used? Can You Check Sy-subrc After Perform ?

Answer:

SY-TABIX – Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.

* APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
* COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
* LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop loss. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
* READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
* SEARCH FOR sets SY-TABIX to the index of the table line in which the search string is found.

SY_INDEX – In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.

47. What are the difference between Tables and Structures ?

Answer:

Table Structure
Table has an underlying database table No underlying database table
Table has a primary key No primary key
Table has technical attributes No technical attributes

48. What is a Data Class ?

Answer:

The Data class determines in which table space the table is stored when it is created in the database.

49. What is a Size Category ?

Answer:

The Size category describes the probable space requirement of the table in the database.

50. What is the difference between Type and Like ?

Answer:

TYPE, you assign datatype directly to the data object while declaring.
LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.

close-link