Wednesday, September 23, 2015

ABAP SAP Questions and Answers

Dear Friends,

I have best collections of questions, I have mentioned the source website as well, because we should not steal somebody else hardwork. This blog is to increase our knowldge and make it single point for all Interview questions. Thank you.
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 is an ABAP data dictionary? 
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.
What are domains and data element? Domains:Domain is the central object for describing the technical characteristics of an attribute of an business objects. It describes the value range of the field. Data Element: It is used to describe the semantic definition 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 are now contradiction. While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible.
Describe data classes. 
Master data: It is the data which is seldom changed. Transaction data: It is the data which is often changed. Organization data: It is a customizing data which is entered in the system when the system is configured and is then rarely changed. System data:It is the data which R/3 system needs for itself.
What are indexes? 
Indexes are described as a copy of a database table reduced to specific fields. This data exists in sorted form. This sorting form ease fast access to the field of the tables. In order that other fields are also read, a pointer to the associated record of the actual table are included in the index. The indexes are activated along with the table and are created automatically with it in the database.
Difference between transparent tables and pooled tables.
[_private/tble_firefox.htm]
Transparent tables: Transparent tables in the dictionary has a one-to-one relation with the table in database. Its structure corresponds to single database field. Table in the database has the same name as in the dictionary. Transparent table holds application data. Pooled tables. Pooled tables in the dictionary has a many-to-one relation with the table in database. Table in the database has the different name as in the dictionary. Pooled table are stored in table pool at the database level.
What is an ABAP/4 Query? 
ABAP/4 Query is a powerful tool to generate simple reports without any coding. ABAP/4 Query can generate the following 3 simple reports: Basic List: It is the simple reports. Statistics: Reports with statistical functions like Average, Percentages. Ranked Lists: For analytical reports. - For creating a ABAP/4 Query, programmer has to create user group and a functional group. Functional group can be created using with or without logical database table. Finally, assign user group to functional group. Finally, create a query on the functional group generated.
What is BDC programming? 
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”.
What are the functional modules used in sequence in BDC? 
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.
What are internal tables? 
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
What is ITS?
What are the merits of ITS?- 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.
What is DynPro? 
DynPro is a Dynamic Programming which is a combination of screen and the associated flow logic Screen is also called as DynPro.
What are screen painter and menu painter? 
Screen painter: Screen painter is a tool to design and maintain screen and its elements. It allows user to create GUI screens for the transactions. Attributes, layout, filed attributes and flow logic are the elements of Screen painter. Menu painter: Menu painter is a tool to design the interface components. Status, menu bars, menu lists, F-key settings, functions and titles are the components of Menu painters. Screen painter and menu painter both are the graphical interface of an ABAP/4 applications.
What are the components of SAP scripts? 
SAP scripts is a word processing tool of SAP which has the following components: Standard text. It is like a standard normal documents. Layout sets. - Layout set consists of the following components: Windows and pages, Paragraph formats, Character formats. Creating forms in the R/3 system. Every layout set consists of Header, paragraph, and character string. ABAP/4 program.
What is ALV programming in ABAP? When is this grid used in ABAP? 
ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.
What are the events in ABAP/4 language?
[_private/tbl_gglapck.htm]
Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page, end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT END, AT FIRST.
What is CTS and what do you know about it? 
The Change 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.
What are logical databases? What are the advantages/ dis-advantages of logical databases? 
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. dis advantages: i)If you donot specify a logical database in the program attributes,the GET events never occur. ii)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).
What is a batch input session? 
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.
How to upload data using CATT ? 
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.
What is Smart Forms? 
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.
How can I make a differentiation between dependent and independent data? 
Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAPscripts 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.
What is the difference between macro and subroutine? 
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.
What is the differences between structure and table in data dictionary in ABAP? 
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.

What is the difference between collect and sum?
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.
How we format the data before before write statement in report ? 
We can format the reports output by using the loop events like:

1.at first
2.at new
3.at last
etc check docu
What is the difference between Table and Template? 
table is a dynamic and template is a static
When do we use End-of-selection? 
End-of-selection event are mostly used when we are writing HR-ABAP code. In the HR-ABAP code, data is retrived in the Start-of-selection event and Printing on the list and all will be done in End-of-selection event.
In events start-of-selection is default event. When we have to use this event explicitly? Why? 
The default event in the ABAP is Start-of-selection.We have to call explicitely this event when you are writing other than ths event , that is when you write AT SELECTION-SCREEN EVENTS OR INITIALIZATION EVENT etc,you have to explicitely mention the Start-of-selection event while you are writing the logic.

Before these events called ,all the code you have written come into this default Start-of-selection screen event.
What is the differences between ABAP and OOABAP. In which situation we use OOABAP? 
OOABAP is used to develop BSP/PCUI applications and also anthing involved object oriented like BADIs, SmartForms..etc.where as ABAP is used to develop traditional programs in R/3.
What is table buffer? Which type of tables used this buffer? 
buffer is nothing but a memory area. table is buffered means that table information is available on application server. when you call data from database table it will come from application server.

transperent and pooled tables are buffered. cluster tables can not buffered.
What is the use of pretty printer ? 
Exactly where can we link the functional module to abap coding.

Pretty Printer is used to format the ABAP Code we write in ABAP Editor ,like KEY WORDS in Capitals and remaining are in small letters which is also depend on system settings.

We can call the function module in the ABAP Code .Press the Pattern button on Appl. tool bar then u will get box where u write the function module NAME which u want to call in the code by selecting the radio button CALL FUNCTION. In this way we link function module to ABAP Code.
What is the difference between SAP memory and ABAP memory? 
Answer1:
data sending between main sessions using get parameter and set parameter is sap memory
data sending between internal sessions using import or export parameters is abap memory

Answer2:
sap memory is a global memory whereas abap memory is local memory.

For example, we have four programs in abap memory and assigned some varibles to a particular program in abap memory then those varibles can't be used by anyother program in abap memory i.e., the variables are only for that program and also local to that memory,whereas sap memory can access all the abap memory or else it can perform any kind of modifications.

Answer3:
SAP memory is available to the user during the entire terminal session.
ABAP memory is available to the user during life time of external session.

What is the difference between Type and Like?
Answer1:
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.

Answer2:
Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.

Answer3:
type refers the existing data type
like refers the existing data object
What is Tcode SE16. For what is it used. Explain briefly? 
Answer1:
SE16 is a T-code for object browser.
Generally used to search the fields of SAP Tables . and respective data.

Answer2:
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
What are different ABAP/4 editors? What are the differences? 
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 thedevelopmet 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 .
What is difference between dialog program and a report? 
Report is a excecutable program
Dialog is a module pool program.It has to be executed via a transaction only.
Dialog programming is used for customization ofscreens
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, intermidiate documents which carry the data you want to transfer or the documents you want to transfer, these IDOC are interpretted by the system at the recieving end with the message class with which it is bound with. If you want to logon a system which is very distant..then remote login can be used this depends on the internet speed.
Explain about roll area , Dispatcher, ABAP-Processor. 
Answer1:
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.

Answer2:
Dispatcher recieves the request from client and assigns the request to one of the work process.
Roll area: Each workprocess works in a particular memory that memory is known as Role Area, which consists of User context and session data.
ABAP- Processor :is an interpretor which can execute logic
Which one is not an exit comand ? (Exit, cencle, stop, back) 
STOP.
Effect :The statement STOP is only to be used in executable programs

EXIT.
Effect :If the EXIT statement is executed outside of a loop, it will immediately terminate the current processing block.

BACK.
Effect : This statement positions the list cursor on the first position of the first line in a logical unit.

So "Cancle" is not an exit command
What is Field symbol ? 
Answer1:
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 <tc> type cxtab_control. "Table control

assign (p_tc_name) to <tc>.

* insert 100 lines in table control
<tc>-lines = 100.

Answer2:
fieldsymbol has the same concept as pointer in c,
fieldsymbol don't point to a data type like char, num instead of that it points to the memory block. the syntax for fieldsymbol is
FIELD-SYMBOL <N>.
EG. FOR FIELD SYMBOL.
DATA: DAT LIKE SY-DATUM,
TIM LIKE SY-UZEIT,
CHAR(3) TYPE C VALUE 'ADF'.
FIELD-SYMBOL : <FS>.
MOVE DAT TO <FS>.
WRITE:/ <FS>.
MOVE TIM TO <FS>.
WRITE:/ <FS>.
MOVE CHAR TO <FS>.
WRITE:/ <FS>.
The output will be
Today's date
current time
What is lock object ? 
LockObjects used to synchornize access of several users using same data.
Why BAPI need then BDC ? 
BAPI"S provide the standard interface to other applications apart from SAP and within differnt vesions of SAP too. Also it is OOD bases so dosen"t depends on screen flow. BDC gets failed if we make changes for screen changes through IMG customization

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
How data is stored in cluster table? 
A cluster table conatins data from mulitple DDIC tables.
It stores data as a name value pair ( varkey, vardata)
Have you used performance tuning? What major steps will you use for these? 
First of all tunning can be done
In three ways: disk i/o ,sql tunning , memory tunning,
Before tunning u have to get the status of your database using
Oracle utility called statpack , tkprof, then you should go for tunning
How to create client independent tables? 
client independent tables:
the table in which the first field is not mandt is the client independent tables
*mandt is the field with mandt as the data element
*automatically client which we login is populated to mandt
What type of user exits have you written? 
there are four types
1.function exit
2.menu ixit
3.screen exit.
4.field exit.
these are the user exits
How can you debug a script form? 
SE71 -> give the form name -> utilities -> activate debugger 
How do we debug sapscript? 
First we need to put Break point in Print program where ever you want to stop the execution.
After in SE71 give your form name and go to Utilities-->Active De-bugger.
Then go to your transcation like VF03(for Invoice or Credit memo) etc to see the print preview or print the form execute it.
When you execute it the the form Debugging will get activated and you can see your Form execution step by step.
What are the different types of data dictionary objects? Answer1
Data Dictionary Objects

* Tables
* Views
* Domain
* Data Element
* Type Groups
* Search Helps/Matchcode Objects
* Lock objects
* Structures
* Table Types

Answer2
the dictionary objects are:
domain
dataelements
tables
views
structures
typegroups
search helps
lock objects etc which are data base related objects in sap
What is the step by step process to create a table in data dictionary? 
Answer1
steps to create database tables
1.go to se11
2.give name the database table
3.give short description for the table
4.Give delivery class name as A and data browser / table view maint as Display/maintenence allowed
5.select fields tab
6.give field name data type(user defined element type/built-in-type),short text
7.select technical settings tab ,give data class as appl0 and size category as 0
8.save it
9.go utillities menu click table contents select create and enter the field values then select display in table contents and u can view the table values with field lables

Answer2
bottom to top approach:
_________________________
step 1:
creating a domain:
*se11,select the object type as domain ,name it ,create,description,enter the datatype and length(size),save ,activate
step2:
creating a dataelement;
se11,select the object type as :date element,name it ,create,desc,assign it with a domain what we created now,save,activate it.
step3:
creating a table;
se11,select the object type as table,name it, create,
enter the field name and assign it with the data element instead of assigning a datatype to it,
like this create req fields:
on behalf of this:
table maintainence:
assign the type of the table ie.,A C G L S
NEXT
maintaince:
allowed,not allowed ,allowed with restricions
______________________________________________
fields of a table:(as descripted above)
___________________________________________
techical settings:
A0
OR
A1
AND
BUFFERED OR NON-BUFFERED
Can a transparent table exist in data dictionary but not in the data base physically? 
Answer1
NO. TRANSPARENT TABLE DO EXIST WITH THE SAME STRUCTURE BOTH IN THE DICTIONARY AS WELL AS IN THE DATABASE,EXACTLY WITH THE SAME DATA AND FIELDS.
No,
at the point you will activate your table a same transparent table is going to be create in database

Answer2
Yes, a transparent table(definition) can exist in the data dictionary and not in the database. In this case, it is not activated
What are the domains and data elements?

domains:
___________

domains are the dictionary objects that are assigned with constants and data types
data elements:
______________
data elements are dictionary objects that are assigned with the domains.
uses:'
* data elements are used to create relation between tables.
* data elements are used to transfer the data from one R/3 to another R/3.
* to create search helps.
What is a collect statement? How is it different from append? 
APPEND :
IT IS USED TO GET THE RECORD FROM THE INTERNAL TABLE HEADER TO THE BODY AREA
IT ALLOWS DUPLICATION

COLLECT:
IT IS USED TO A GET A RECORD FROM HEADER TO THE BODY AREA BUT IT WILL NOT ALLOW ANY DUPLICATION EXCEPT IF THERE IS ANY NUMERIC FIELS IT ADDS THAT FIELDS DATA BUT NOT AS A NEW RECORD
On ABAP: Did you set up a workflow? Are you familiar with all steps for setting up a workflow? 
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.
In the ‘select’ statement what is “group by”? Group by clause is used to fetch the data from the table by the specified field
ex.select count (*) from emptable group by deptno where deptno = 1.
It is used to find the number of employees present in the specified department no. 
How can I copy a standard table to make my own z_table? 
WE CAN CREATE A STRUCTURE LIKE THE SAME STRUCTURE AS DATABASE TABLE AND WE CAN USE
SELECT* FROM DATABASE TABLE INTO TABLE ITAB
OR
INSERT INTO ITAB VALUES DATABASE TABLE
From Excel to ABAP - Is batch mode possible ? 
DATA w_file TYPE string.
* Convert the file path into string
w_file = p_input.

* Internal Table should have same field sequence as EXL File.

CLEAR t_upload.
REFRESH t_upload.

* Call function to upload the data into internal table
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = w_file
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = t_upload
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc NE 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE.
* Delete the first row of heading from the uploaded table
DELETE t_upload INDEX 1.
ENDIF. " IF sy-subrc EQ 0.

Source: http://techpreparation.com/computer-interview-questions/sap-abap-interview-questions-answers5.htm#.VgL_9dKqqko

----------------------------------------------------------------

Looking for ABAP interview questions? You have come to THE RIGHT place. I have planned to
continuously update this blog post. So if you have been appearing for interviews recently , share your experiences in the comments below:

Let’s make this list count and add some value to everyone.
All the best for your interview preparation . J Here you go!!


SAP ABAP interview questions: 


Important 

Question 1: What is the difference between User Exit and Function Exit?

User Exit
Customer Exit
User exit is implemented in the form of a Subroutine i.e. PERFORM xxx.
Example: INCLUDE MVF5AFZZ 
à
PERFORM userexit_save_document_prepare.  
A customer exit can be implemented as:
·         Function exit
·         Screen Exit
·         Menu Exit
·         Field Exit
Example: CALL Customer function ‘xxx’
INCLUDE xxx.
You modify this include.
In case of a PERFORM, you have access to almost all the data. So you have better control, but more risk of making the system unstable.
You have access only to the importing, exporting, changing and tables parameter of the Function Module. So you have limited access to data.
User exit is considered a modification and not an enhancement.
A customer exit is considered an enhancement.
You need Access Key for User Exit.
You do not need access key.
Changes are lost in case of an upgrade.
Changes are upgrade compatible.
User exit is the earliest form of change option offered by SAP.
Customer exits came later and they overcome the shortcomings of User Exit.
No such thing is required here.
To activate a function exit, you need to create a project in SMOD and activate the project.



  
 What is the difference between RFC and BAPI?
BAPI
RFC
Just as Google offers Image/Chart/Map APIs OR Facebook offers APIs for Comment/Like, SAP offers APIs in the form of BAPIs. BAPI is a library of function modules released by SAP to the public so that they can interface with SAP.
RFC is nothing but a remote enabled function module. So if there is a Function Module in SAP system 1 on server X , it can be called from a SAP system 2 residing on server Y.
There is a Business Object Associated with a BAPI. So a BAPI has an Interface, Key Field, Attributes, Methods, and Events.
No Business Object is associated with a RFC.
Outside world (JAVA, VB, .Net or any Non SAP system) can connect to SAP using a BAPI.
Non–SAP world cannot connect to SAP using RFC.
Error or Success messages are returned in a RETURN table.
RFC does not have a return table.



Question 3:
What is the difference between SAPSCRIPT and SMARTFORM? 
SAPSCRIPT
SMARTFORM
SAPSCRIPT is client dependent.
SMARTFORM is client independent.
SAPSCRIPT does not generate any Function module.
SMARTFORM generates a Function Module when activated.
Main Window is must.
You can create a SMARTFORM without a Main Window.
SAPSCRIPT can be converted to SMARTFORMS. Use Program SF_MIGRATE.
SMARTFORMS cannot be converted to SCRIPT.
Only one Page format is possible
Multiple page formats are possible.
Such thing is not possible in SCRIPT.
You can create multiple copies of a SMARTFORM using the Copies Window.
PROTECT … ENDPROTECT command is used for Page protection.
The Protect Checkbox can be ticked for Page Protection.

The way SMARTFORM is developed and the way in which SCRIPT is developed is entirely different. Not listing down those here. That would be too much. 


Question 4:What is the difference between Call Transaction Method and the Session method ?

Session Method
Call Transaction
Session method id generally used when the data volume is huge.
Call transaction method is when the data volume is   low
Session method is slow as compared to Call transaction.
Call Transaction method is relatively faster than Session method.
SAP Database is updated when you process the sessions. You need to process the sessions separately via SM35.
SAP Database is updated during the execution of the batch input program.
Errors are automatically handled during the processing of the batch input session.
Errors should be handled in the batch input program.


Question 5: What is the difference between BDC and BAPI?

BAPI
BDC
BAPI is faster than BDC.
BDC is relatively slower than BAPI.
BAPI directly updates database.
BDC goes through all the screens as a normal user would do and hence it is slower.
No such processing options are available in BAPI.
Background and Foreground processing options are available for BDC.
BAPI would generally used for small data uploads.
BDCs would be preferred for large volumes of data upload since background processing option is available.
For processing errors, the Return Parameters for BAPI should be used.This parameter returns exception messages or success messages to the calling program.
Errors can be processed in SM35 for session method and in the batch input program for Call Transaction method.


Question 6: What is the difference between macro and subroutine?

Macro
Subroutine
Macro can be called only in the program it is defined.
Subroutine can be called from other programs also.
Macro can have maximum 9 parameters.
Can have any number of parameters.
Macro can be called only after its definition.
This is not true for Subroutine.
A macro is defined inside:
DEFINE …
….
END-OF-DEFINITION.
Subroutine is defined inside:
FORM …..
…..
ENDFORM.
Macro is used when same thing is to be done in a program a number of times.
Subroutine is used for modularization.



Question 7: What is the difference between SAP memory and ABAP memory?

SAP Memory
ABAP Memory
When you are using the SET/GET Parameter ID command, you are using the SAP Memory.
When you are using the EXPORT IMPORT Statements, you are using the ABAP Memory.
SAP Memory is User Specific.
What does this mean?
àThe data stored in SAP memory can be accesses via any session from a terminal. 
ABAP Memory is User and Transaction Specific.What does this mean?à The data stored in ABAP memory can be accessed only in one session. If you are creating another session, you cannot use ABAP memory.


Important
Question 8:
 What is the difference between AT SELECTION-SCREEN and AT SELECTION-SCREEN OUTPUT?
AT SELECTION-SCREEN is the PAI of the selection screen whereas
AT SELECTION-SCREEN OUTPUT is the PBO of the selection screen.



Question 9: What is the difference between SY-INDEX and SY-TABIX?
Remember it this way 
à TABIX = Table.
So when you are looping over an internal table, you use SY-TABIX.
When you use DO … ENDDO / WHILE for looping, there is no table involved.
So you use SY-INDEX.

For READ statement, SY-INDEX is used.

Question 10: What is the difference between VIEW and a TABLE?A table physically stores data.
A view does not store any data on its own. It can contain data from multiple tables and it just accesses/reads data from those tables.

Question 11:
 What is the difference between Customizing and Workbench request?A workbench request is client independent whereas a Customizing request is client dependent.
Changes to development objects such as Reports, Function Modules, Data Dictionary objects etc. fall under Workbench requests.

Changes in SPRO / IMG that define system behavior fall under customizing requests.
An example would be ‘defining number ranges’ in SPRO.

In short, generally a developer would end up creating a Workbench request and a Functional Consultant would create a Customizing request.

Workbench vs Customizing work request

Question 12: What is the difference between PASS BY VALUE and PASS BY REFERENCE?These concepts are generally used for Function modules or Subroutines etc. and their meaning can be taken literally.

Say we are passing a variable lv_var:
CALL FUNCTION 'DEMO_FM'
   EXPORTING
     VAR  = lv_var.

When we PASS lv_var by VALUE , the actual value of lv_var is copied into VAR.
When we PASS lv_var by REFERENCE , the reference or the memory address of lv_var is passed to the Function module. So VAR and lv_var will refer to the same memory address and have the same value. 


Question 13: What is the difference between Master data and Transaction data?Master data is data that doesn’t change often and is always needed in the same way by business.
Ex: One time activities like creating Company Codes, Materials, Vendors, Customers etc.

Transaction data keeps on changing and deals with day to day activities carried out in business.
Transactions done by or with Customers, Vendors, and Materials etc. generate Transaction Data. So data related to Sales, Purchases, Deliveries, Invoices etc. represent transaction data

Some important transactions here for Master Data:
Material: MM01 MM02 MM03
Vendor: XK01 , XK02 , XK03
Customer: Xd01 , XD02 , XD03

Some Important transactions for Transaction data:
Purchase Order: ME21n , ME22n , ME23n
Sales Order: VA01 , VA02 , VA03
Goods Receipt: MIGO
Invoices: MIRO



Important
Question 14: What will you use SELECT SINGLE or SELECT UPTO 1 ROWS ?
What will you use SELECT SINGLE or SELECT UPTO 1 ROWS ?
There is great confusion over this in the SAP arena.
If you Google, you will see lots of results that will say SELECT SINGLE is faster and efficient than SELECT UPTO 1 ROWS.
But that is 100% incorrect.

SELECT UPTO 1 ROWS is faster than SELECT SINGLE.
If for a WHERE condition, only one record is present in DB, then both are more or less same.
However, If for a WHERE condition multiple records are present in DB, SELECT UPTO 1 ROWS will perform better than SELECT SINGLE. 

 
Question 15: What is the difference between .Include Structure and .Append structure? 
I have seen ridiculous answers for this at many places on the Web.
The true answer is this:

Let’s say you want to use the Structure X in your table Y.
With .Include X, you can include this structure in multiple tables.
With .Append X, you specify that structure X has been used in table Y and that this cannot be used in any other table now.  So you restrict structure X only to Table Y.

Important 
Question 16: Can you describe the events in ABAP?

LOAD-OF-PROGRAM:
INITIALIZATION: If you want to initialize some values before selection screen is called
AT SELECTION SCREEN OUTPUT: PBO for Selection Screen
AT SELECTION SCREEN: PAI for Selection Screen
START-OF-SELECTION
END-OF-SELECTION
TOP-OF-PAGE
END-OF-PAGE

AT USER-COMMAND: When user click on say buttons in application toolbar. SY-UCOMM
AT LINE SELECTION:
 Double click by user on basic list. SY-LISEL
AT PF##: When User Presses any of the Function Keys
TOP-OF-PAGE DURING LINE SELECTION


Question 17:

What events do you know in Module Pool Programming?
PBO:
 you know this . If not you should know this . That's basic.
PAI: You know this. If not you should know this . That's basic.
POV: Process on Value request … i.e. when you press F4.
POH: Process on help request … i.e. when you press F1.
Question 18: Can you show multiple ALVs on a Single Screen?
Yes, there are multiple ways of doing this:
·         If you are using OOALV, you can create multiple custom containers  
   (cl_gui_custom_container)
 & put an ALV control (cl_gui_alv_grid) in each of those.
·         You can even use a Splitter container control and place multiple ALVs in each of
    the split container.
·         If you are using Normal ALV, You can use the following FMS:
1.      REUSE_ALV_BLOCK_LIST_INIT
2.      REUSE_ALV_BLOCK_LIST_APPEND
3.      REUSE_ALV_BLOCK_LIST_DISPLAY

Question 19: A system has two clients 100 and 500 on the same application server. If you make changes to a SAPSCRIPT on client 100, will the changes be available in client 500?

No. SAPSCRIPT is client dependent. You will have to transport changes from client 100 to client 500. However, for SMARTFORMS, Changes will be made both for client 100 and client 500.

Question 20: There are 1000’s of IDOCs in your system and say you no longer need some of them? How will you get rid of those IDOCs?

One way is to archive the IDOCs using transaction SARA.
But what the interviewer was expecting was ‘How do you change IDoc Status’?
There are different ways of doing this:
A) Use FM IDOC_STATUS_WRITE_TO_DATABASE
B) USE FMs:
     EDI_DOCUMENT_OPEN_FOR_PROCESS and
     EDI_DOCUMENT_CLOSE_PROCESS


Question 21: What is the difference between CHAIN … ENDCHAIN and FIELD commands in Module Pool?

If you want to validate a single field in Module Pool, you use the FIELD Command.
On error, this single filed is kept open for input.

If you however want to validate multiple fields, you can use the CHAIN … ENDCHAIN command. You specify multiple fields between CHAIN and ENDCHAIN.
On error, all fields between CHAIN …… ENDCHAIN are kept open for input.



Question 22:
 What are the types of Function Modules? What is an UPDATE function module?There are three types of Function Modules: Normal , RFC , UPDATE.
The aim of the Update function module is either to COMMIT all changes to database at once or to ROLLBACK all the changes. By definition, an update function module is used to bundle all the updates in your system in one LUW (logical unit of work).

This FM is called whenever COMMIT WORK statement is encountered in the calling program and the way you call it isCALL FUNCTION XXX IN UPDATE TASK. 

Have a look at FM EDI_DOCUMENT_CLOSE_PROCESS_UPD and do a where used.
This FM is used as Update FM in case you make changes to IDoc contents/status via your program.

Question 23: How is the table sorted when you do not specify field name and Ascending or Descending? On what criteria will the table be sorted? Do internal table have keys?

Yes, internal table have keys.
The default key is made up of the non-numeric fields of the table line in the order in which they occur.



Question 24: Explain what is a foreign key relationship?Explain this with the help of an example.
Let’s discuss about tables EKKO (PO header) and EKPO (PO line item).
Can you have an entry in table EKPO without having an entry in table EKKO?
In other words can you have PO line items without the PO header?

How does this happen? The answer is foreign key relationship.
So foreign keys come into picture when you define relationship between two tables.


Foreign key relationship in ABAP

  
Foreign keys are defined at field level.
Check the foreign key relation for field EBELN of table EKPO.
The check table is EKKO. This just means that whenever an entry is made in EKPO, it is checked whether the entered value for EBELN already exists in EKKO. If not, entry cannot be made to EKPO table.
 

Question 25 : What is the difference between a value table and a check table?Check table is maintained when you define foreign key relationships.
For Check table, read question above.
.
Value table is defined and maintained at a domain level.
At a domain level, you can mention allowed values in the form of:
1) Single values
2) Ranges
3) Value table
For example, have a look at domain SHKZG. Only allowed values are S and H for Debit/Credit indicator. Whenever and wherever you use this domain, the system will force you to use only these two values: S and H.

Another example is domain MATNR. For this domain the value table is MARA.
So whenever and wherever, you use this domain the system will force you to use values for MATNR in table MARA.


Question 26: How do you find BAPI?Approach1:
You can go to Transaction BAPI and then search for your desired object.
Say you want to find a BAPI for creating users in the system, in such case you can search for the ‘User’ and find the relevant BAPIs.

Approach2:
Another way is to find a Business Object. Say you want to find a BAPI for creating Material in SAP and you know the BO for Material is BUS1001006. You can go to Transaction SWO1 and enter the BO BUS1001006 in the BOR. Then have a look at the methods for this BO.
How to Find a BAPI ?



Important 
Question 27: How do you find BADI?
Approach1: 

Go to Class CL_EXITHANDLER in SE24 ---> Put a breakpoint in method GET_INSTANCE.Now go and execute your transaction code for which you want to find BADI.
You will find the BADI in the changing parameter exit_name:

How to find a BADI in ABAP ?


Approach 2:
Go to Tcode SE84 à Enhancements àBADIs à Definitions.
Find the package for the Tcode for which you are finding the BADI.
Enter it as shown and hit execute:


How do you find a BADI ?

Find BADI in SAP
Are we done yet ? Definitely not !
Let the questions come and lets keep on updating this blog.

I will update the blog with the following questions soon:
Question: Synchronous and asynchronous methods in BDC ?
Question: What is the difference between inner joins and outer joins?
Question: What is the difference between INSTANCE methods and STATIC methods?
Question: What is the difference between Implicit Enhancements and Explicit Enhancements?
Question: What is the difference between Enhancement point and Enhancement Section?
Question: How do you find Function Exit?
Question: How do you activate a Function Exit?

Source: http://sap-interview-questions-and-answers.blogspot.in/2012/07/abap-interview-questions.html

-------------------------------------------------------------------------------------------------

SAP DATA DICTIONARY INTERVIEW QUESTIONS & ANSWERS

  1. What are the layers of data description in R/3?
  • The external layer.
  • The ABAP/4 layer.
  • The database layer.
  1. Define external layer?
The external layer is the plane at which the user sees and interacts with the data, that is, the data format in the user
interface.  This data format is independent of the database system used.

  1. Define ABAP/4 layer?
The ABAP/4 layer describes the data formats used by the ABAP/4 processor.

  1. Define Database layer?
The database layer describes the data formats used in the database.

  1. What is a Data Class?
The Data class determines in which table space the table is stored when it is created in the database.

  1. What is a Size Category?
The Size category describes the probable space requirement of the table in the database.

  1. How many types of size categories and data classes are there?
There are five size categories (0-4) and 11 data classes only three of which are appropriate for application tables:
·
APPL0- Master data (data frequently accessed but rarely updated).
·
APPL1- Transaction data (data that is changed frequently).
·
APPL2- Organizational data (customizing data that is entered when system is configured and then rarely changed).
The other two types are:
·
USR
·
USR1 – Intended for customer’s own developments.

  1. What are control tables?
The values specified for the size category and data class are mapped to database-specific values via control tables.

  1. What is the function of the transport system and workbench organizer?
The function of the transport system and the Workbench Organizer is to manage any changes made to objects of the ABAP/4
Development Workbench and to transport these changes between different SAP
systems.

  1. What is a table pool?
A table pool (or pool) is used to combine several logical tables in the ABAP/4 Dictionary.  The definition of a pool consists of
at least two key fields and a long argument field (VARDATA).

  1. What are pooled tables?
These are logical tables, which must be assigned to a table pool when they are defined.  Pooled tables can be used to store control
data (such as screen sequences or program parameters).

  1. What is a table cluster?
A table cluster combines several logical tables in the ABAP/4 Dictionary.  Several logical rows from different cluster tables are
brought together in a single physical record.  The records from the cluster tables assigned to a cluster are thus stored in a single common table in the
database.

  1. How can we access the correction and transport system?
Each time you create a new object or change an existing object in the ABAP/4 Dictionary, you branch automatically to the
Workbench Organizer or correction and transport system.

  1. Which objects are independent transport objects?
Domains, Data elements, Tables, Technical settings for tables, Secondary indexes for transparent tables, Structures, Views,
Matchcode objects, Matchcode Ids, Lock objects.

  1. How is conversion of data types done between ABAP/4 & DB layer?
Conversion between ABAP/4 data types and the database layer is done within the database interface.

  1. How is conversion of data types done between ABAP/4 & external level?
Conversion between the external layer and the ABAP/4 layer is done in the SAP dialog manager DYNP.

  1. What are the Data types of the external layer?
ACCP, Char, CLNT, CUKY, CURR, DATS, DESC, FLTP, INT1, INT2, INT4, LANG, LCHR, LRAW, NUMC, PREC, QUAN, RAW, TIMS, UNIT,VARC.

  1. What are the Data types of the ABAP/4 layer?
Possible ABAP/4 data types:
C: Character.
D: Date, format YYYYMMDD.
F: Floating-point number in DOUBLE PRECISION (8 bytes).
I: Integer.
N: Numerical character string of arbitrary length.
P: Amount of counter field (packed; implementation depends on h/w platform).
S: Time Stamp YYYYMMDDHHMMSS.
V: Character string of variable length, length is given in the first two bytes.
X: Hexadecimal (binary) storage.

  1. How can we set the table spaces and extent sizes?
You can specify the extent sizes and the table space (physical storage area in the database) in which a transparent table is to be
stored by setting the size category and data class.

  1. What is the function of the correction system?
The correction system manages changes to internal system components. Such as objects of the ABAP/4 Dictionary.

  1. What are local objects?
Local objects (Dev class$TMP) are independent of correction and transport system.

  1. What is a Development class?
Related objects from the ABAP/4 repository are assigned to the same development class.  This enables you to correct and
transport related objects as a unit.

  1. What is a data dictionary?
Data Dictionary is a central source of data in a data management system.  Its main function is to support the creation and management
of data definitions.  It has details about
·
what data is contained?
·
What are the attributes of the data?
·
What is the relationship existing between the various data elements?

  1. What functions does a data dictionary perform?
In a data management system, the principal functions performed by the data dictionary are
·
Management of data definitions.
·           
Provision of information for evaluation.
·
Support for s/w development.
·
Support form documentation.
·
Ensuring that the data definitions are flexible and up-to-date.

  1. What are the features of ABAP/4 Dictionary?
The most important features are:
·
Integrated to aABAP/4 Development Workbench.
·
Active in the runtime environment.

  1. What are the
    uses of the information in the Data dictionary?
The following information is directly taken from the Data dictionary:
·
Information on fields displayed with F1 help.
·
Possible entries for fields displayed with F4 help.
·
Matchcode and help views search utilities.

  1. What are the basic objects of the data dictionary?
·
Tables
·
Domains
·
Data elements
·
Structures
·
Foreign Keys

  1. What are the aggregate objects in the data dictionary?
·
Views
·
Match codes
·
Lock objects.

  1. In the ABAP/4 Dictionary Tables can be defined independent of the underlying database (T/F).
True.
  1. ABAP/4
    Dictionary contains the Logical definition of the table.
  2. A field containing currency amounts (data type CURR) must be assigned to a reference table and a reference field. Explain.
As a reference table, a system containing all the valid currencies is assigned or any other table, which contains a field with the
currency key format.  This field is called as reference field.  The assignment of the field containing currency amounts to the reference field is made at
runtime.  The value in the reference field determines the currency of the amount.

  1. A field containing quantity amounts (data type QUAN) must be assigned to a reference table and a reference field. Explain?
As a reference table, a system table containing all the valid quantity units is assigned or any other table, which contains a field
with the format or quantity units (data type UNIT).  This field is called as reference field.
The assignment of the field containing quantity amounts to the reference field is made at runtime.  The value in the reference
field determines the quantity unit of the amount.

  1. What is the
    significance of Technical settings (specified while creating a table in the data dictionary)?  By specifying technical settings we can control how
    database tables are created in the database.  The technical settings allows us to
·
Optimize storage space requirements.
·
Table access behavior.
·
Buffering required.
·
Changes to entries logged.

  1. What is a Table attribute?
The table’s attributes determine who is responsible for maintaining a table and which types of access are allowed for the table.
The most important table attributes are:
·
Delivery class.
·
Table maintenance allowed.
·
Activation type.

  1. What is the significance of Delivery Class?
·
The delivery class controls the degree to which the SAP or the customer is responsible for table maintenance.
·
Whether SAP provides the table with or without contents.
·
Determines the table type.
·
Determines how the table behaves when it is first installed, at upgrade, when it is transported, and when a client copy is
performed.
  1. What is the max. no. Of structures that can be included in a table or structure.
Nine.

  1. What are two methods of modifying SAP standard tables?
·
Append Structures and
·
Customizing Includes.

  1. What is the difference between a Substructure and an Append Structure?
·
In case of a substructure, the reference originates in the table itself, in the form of a statement include….
·
In case of an append structure, the table itself remains unchanged and the reference originates in the append structure.

  1. To how many tables can an append structure be assigned.
One.
  1. If a table that is to be extended contains a long field, we cannot use append structures why?
Long fields in a table must always be located in the end, as the last field of the table.  If a table has an append structure the
append line must also be on the last field of the table.

  1. Can we include customizing include or an append structure with Pooled or Cluster tables?
No.
  1. What are the two ways for restricting the value range for a domain?
·
By specifying fixed values.
·
By stipulating a value table.

  1. Structures can contain data only during the runtime of a program (T/F)
True.
  1. What are the aggregate objects in the Dictionary?
·
Views
·
Match Code.
·
Lock Object.

  1. What are base tables of an aggregate object?
The tables making up an aggregate object (primary and secondary) are
called aggregate object.

  1. The data of a view is not physically stored, but derived from one or more tables (t/f)
True.

  1. What are the 2 other types of Views, which are not allowed in Release 3.0?
·
Structure Views.
·
Entity Views.

  1. What is a Match Code?
Match code is a tool to help us to search for data records in the system. Match Codes are an efficient and user-friendly search aid where key of a record
is unknown.

  1. What are the two levels in defining a Match Code?
·
Match Code Object.
·
Match Code Id.

  1. What is the max no of match code Id’s that can be defined for one Match code object?
A match code Id is a one character ID that can be a letter or a number.

  1. Can we define our own Match Code ID’s for SAP Matchcodes?
Yes, the number 0 to 9 are reserved for us to create our own Match Code Ids for a SAP defined Matchcode object.

  1. What is an Update type with reference to a Match code ID?
If the data in one of the base tables of a matchcode ID changes, the matchcode data has to be updated.  The update type stipulates
when the matchcode is to be updated and how it is to be done.  The update type also specifies which method is to be used for Building matchcodes.  You must
specify the update type when you define a matchcode ID.

  1. Can matchcode object contain Ids with different update types?
Yes.

  1. What are the update types possible?
The following update types are possible:
·
Update type A: The matchcode data is updated asynchronously to database changes.
·
Update type S: The matchcode data is updated synchronously to database changes.
·
Update type P: The matchcode data is updated by the application program.
·
Update type I: Access to the matchcode data is managed using a database view.
·
Update type L: Access to the matchcode is achieved by calling a function module.

  1. What are the two different ways of building a match code object?
A match code can be built in two different ways:
·
Logical structure: The matchcode data is set up temporarily at the moment when the match code is accessed. (Update type I,
k).
·           
Physical Structure: The match code data is physically stored in a separate table in the database. (Update type A, S, P).

  1. What are the differences between a Database index and a match code?
·
Match code can contain fields from several tables whereas an index can contain fields from only one table.
·
Match code objects can be built on transparent tables and pooled and cluster tables.

  1. What is the function of a Domain?
·
A domain describes the technical settings of a table field.
·
A domain defines a value range, which sets the permissible data values for the fields, which refers to this domain.
·
A single domain can be used as basis for any number of fields that are identical in structure.

  1. Can you delete a domain, which is being used by data elements?
No.
  1. What are conversion routines?
·
Non-standard conversions from display format to sap internal format and vice-versa are implemented with so called conversion
routines.

  1. What is the function of a data element?
A data element describes the role played by a domain in a technical context.  A data element contains semantic information.

  1. Can a domain, assigned to a data element be changed?
Yes.  We can do so by just overwriting the entry in the field domain.

  1. Can you delete data element, which is being used by table fields.
No.

  1. Can you define a field without a data element?
Yes.  If you want to specify no data element and therefore no domain for a field, you can enter data type and field length and a
short text directly in the table maintenance.

  1. What are null values?
If the value of a field in a table is undefined or unknown, it is called a null value.

  1. What is the difference between a structure and a table?
Structures are constructed the almost the same way as tables, the only difference using that no database table is generated from them.

  1. What is a view?
A view is a logical view on one or more tables.  A view on one or more tables i.e., the data from a view is not actually physically
stored instead being derived from one or more tables.

  1. How many types of Views are there?
·
Database View
·
Help View
·
Projection View
·
Maintenance View

  1. What is Locking?
When two users simultaneously attempt to access the same data record, this is synchronized by a lock mechanism.

  1. What is database utility?
Database utility is the interface between the ABAP/4 Dictionary and the underlying the SAP system.

  1. What are the basic functions of Database utility?
The basic functions of database utility are:
·
Create database objects.
·
Delete database objects.
·
Adjust database objects to changed ABAP/4
dictionary definition.

  1. What is Repository Info. Systems?
It is a tool with which you can make data stored in the ABAP/4 Dictionary available
Source: http://sapbrainsonline.com/faq/sap-data-dictionary-interview-questions-answers.html
-------------------------------------------------------------------------------------------------
1)      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).
2)      What do you mean by an ABAP data dictionary?
To describe the logical structures of the objects that are used in application development ABAP 4 data dictionary is used.  It is also used to show the underlying relational database in tables.
3)      Explain 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.
a)      Basic List: For simple reports
b)      Statistics:  For Percentage, Average etc.
c)       Ranked List : For analytical reports
ABAP
4)      What do you mean by BDC (Batch Data Communications) programming?
It is an automatic procedure to transfer large or external data into SAP system. ‘Queue file’ is the central component of the transfer, which receives the data through batch input programs and groups that are associated into ‘sessions’.
5)      Describe the data classes?
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
6)      What are the internal tables?
Internal table exists only when the program is run. It is used for performing table calculations on subset of database tables and also for re-organizing the content of database tables as per the users need.
7)      List down the functional modules used in sequence in BDC?
There are 3 functional modules which are used in sequence to perform data transfer successfully using BDC programming.  They are
a)      BDC_OPEN_GROUP
b)      BDC_INSERT
c)       BDC_CLOSE_GROUP
8)      What is a foreign key relationship?
To ensure the consistency of data, foreign keys are used. The relationship established between the tables and must be explicitly defined at field level. Data entered should be checked against the existing data to ensure that there is no contradiction. Cardinality has to be specified while defining foreign key relationship.
9)      In ABAP what are the differences between table and structure in data dictionary?
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
10)   What is Smart Forms?
Smart forms allow you to create forms using a graphical design tool.
11)   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.
12)   How to create ‘table cluster’?
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.
13)   How can you format the data before write statement in the report?
By using the loop event the reports output can be formatted
a)      .at first
b)      .at new
c)       .at last
14)   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.

15)   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.
16)   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.
17)   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 SmartForms etc.
18)   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.
19)   What is the use of ‘pretty printer’?
To format the ABAP code ‘pretty printer’ is used.
20)   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.
21)   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.
22)   Explain 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.
23)   What is lock object?
To synchronize access of several users using same data Lock objects are used.
24)   How data is stored in cluster table?
A cluster table contains data from multiple DDIC tables.  It stores data as name value pair.
25)   How can you debug a script form?
To debug a script form, you have to follow
SE71–>give the form name->utilities->activate debugger
26)   What are different types of data dictionary objects?
The different types of data dictionary objects are:
a)      Tables
b)      Views
c)       Domain
d)      Data Element
e)      Type Groups
f)       Search Helps/Matchcode Objects
g)      Lock Objects
h)      Structures
i)        Table Types
27)   What are the ways you can do the tuning? What are the major steps will you use for these?
Tunning can  be done in three ways disk i/o, sql tunning  and memory tunning.  Before tunning, you have to get the status of your database using oracle utility called statpack and tkprof .
28)   In the ‘select’ statement what is ‘group by’?
To fetch the data from the table by the specified field Group by Clause is used.
29)   What is dispatcher?
A control agent referred as SAP dispatcher, manages resources for the R/3 applications.
30)   Mention what are the two methods of modifying SAP standard tables?
There are two methods for modifying SAP standard tables
a)      Append structures
b)      Customizing includes
31)   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.
32)   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.
33)   How can you create callable modules of program code within one ABAP/4 program?
a)      By defining Macros
b)      By creating include programs in the library.
34)   What are different types of parameters? How can you distinguish between different kinds of parameters?
The different types of parameters are
a)      Formal Parameters:  It is defined during the definition of subroutine with the ‘FORM’ statement
b)      Actual Parameters:  It is specified during the call of a subroutine with the ‘PERFORM’ statement
You can distinguish different kind of parameters by their functionality.  Input parameters are used to pass data to subroutines, while output parameters are used to pass data from subroutines.
35)   What are the different databases Integrities?
a)      Semantic Integrity
b)      Relational Integrity
c)       Primary Key Integrity
d)      Value Set Integrity
e)      Foreign Key Integrity
f)       Operational Integrity
Source: http://career.guru99.com/top-35-interview-questions-on-sap-abap/