Вы находитесь на странице: 1из 22

BDC

1. What is full form of BDC Session?


Batch Data Communication Session.
2. What are the steps in a BDC session?
The first step in a BDC session is to identify the screens of the transaction that the program will process.
Next step is to write a program to build the BDC table that will be used to submit the data to SAP. The
final step is to submit the BDC table to the system in the batch mode or as a single transaction by the
CALL TRANSACTION command.
3. How do you find the information on the current screen?
The information on the current screen can be found by SYSTEM à
STATUS command from any menu.
4. How do you save data in BDC tables?
The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field value of ‘/11’.
5. What is the last entry in all BDC tables?
In all BDC tables the last entry is to save the data by using the field name BDC_OKCODE and a field value
of ‘/11’.
6. What is a multiple line field?
A multiple line field is a special kind of field which allows the user to enter multiple lines of data into it.
7. How do you populate data into a multiple line field?
To populate data into a multiple line field, an index is added to the field name to indicate which line is to
be populated by the BDC session (Line index).
8. Write the BDC table structure.
BDC table structure
FIELD TYPE DESCRIPTION
Program CHAR (8) Program name of transaction.
DynPro CHAR (4) Screen number of transaction.
DynBegin CHAR (1) Indicator for new screen.
Fnam CHAR (35) Name of database field from screen.
Fval CHAR (80) Value to submit to field.
9. Does the CALL TRANSACTION method allow multiple transactions to be
processed by SAP?
No. The CALL TRANSACTION method allows only a single
transaction to be processed by SAP.
10. Does the BDC-INSERT function allow multiple transactions to be processed
by SAP?
Yes.
11. What is the syntax for ‘CALL TRANSACTION’?
CALL TRANSACTION trans [using bdctab MODE mode].
Three possible entries are there for MODE.
A – Show all screens.
E – Show only screens with errors.
N – Show no screens.
Enhancements and BADIs

1. What are the different ways in which you can make changes to SAP standard software ?

Customizing
Enhancements to the SAP Standard

Modifications to the SAP Standard

Customer Development

2. What is customizing?
Customizing is the setting of system parameters via SAP's own interface.

3. Why do you need enhancements?

The standard applications do not offer some of the functionality you need. The R/3 enhancement
concept allows you

to add your own functionality to SAP's standard business applications.

4. What are the different types of enhancements?

Enhancements using customer exits

Customers' potential requirements which are not included in the standard software are incorporated in
the standard

as empty modification 'shells'. Customers can then fill these with their own coding. Enhancements can
relate to

programs, menus and screens. Upward compatibility is assured. In other words, SAP guarantees that the
jump from the

standard software to the exit and the interface which call the exit will remain valid in future releases.

Enhancements to ABAP/4 Dictionary elements

These are ABAP/4 Dictionary enhancements (creation of table appends), text enhancements (customer-
specific key

words and documentation for data elements) and field exits (creation of additional coding for data
elements).

5. What is customer development?


Creating customer-specific objects within the customer name range.

6. What is SSCR?

SSCR (SAP Software Change Registration) is a procedure, for registering all manual changes to SAP
source coding and

SAP Dictionary objects.

7. What is the difference between modifications and enhancements?

Modifications mean making changes to the SAP standard functionality.

Enhancements mean adding some functionality to SAP standard functionality.

8. What are the disadvantages of modification?

Modifying standard code can lead to errors

Modifications mean more work during software upgrades

9. What are the advantages of enhancements?

Do not affect standard SAP source code

Do not affect software upgrades

10. When do you opt for modification?

Customer exits are not available for all programs and screens within the R/3 standard applications. You
can only

use exits if they already exist within the SAP R/3 System. Otherwise you have to opt for modifications.

11. What are the various types of customer exits?

Menu exits

Screen exits

Function module exits

Keyword exits

12. What is a menu exit?

Adding items to the pull-down menus in standard R/3 applications.


13. What is a screen exit ?

Adding fields to the screens within R/3 applications. SAP creates screen exits by placing special sub
screen areas
within a standard R/3 screen and calling a customer sub screen from within the standard dynpro's flow
logic.

14. What is a function module exit?


Adding functionality to R/3 applications. Function module exits play a role in both menu and screen
exits.

15. What is a keyword exit?


Add documentation to the data elements of key words defined in the ABAP/4 Dictionary. The system
displays this
documentation whenever a user presses F1 to get online help for a screen field.

16. How does SAP organize its exits?


SAP organizes its exits in packages that are called SAP enhancements. Each SAP enhancement can
contain many
individual exits.

17. What is an add-on project?


To take advantage of the exits available within standard R/3 applications, you need to create an add-on
project.
This project lets you organize the enhancement packages and exits you want to use. The add-on project
also allows
you to hang add-on functionality onto the exit hooks contained with SAP enhancements.

Q1: What is the reason for using ENHANCEMENTS?


Ans: Normal programs don’t give us all the functionalities we may need, so to fix this we can use the R/3
enhancements that will permit us to insert our particular functionality to any normal SAP program.

Q2: What is the meaning of customer development?


A2: Customer development generates objects particular to the customers in their name range.

Q3: What weaknesses do we find when using MODIFICATION?


A3: One of the weaknesses is that we could have errors when standard code is modified. This
automatically leads to a higher amount of work when software upgrades are made.

Q4: Why should we choose to make MODIFICATIONS?


A4: Customer exits don’t exist in every screen and program from R/3, and because they can be used just
if they are already existing in SAP R/3, sometimes we must choose to make modifications.

Q5: What is the meaning of a SCREEN EXIT?


A5: Screen exits means to add fields to R/3 screens, SAP generates screen exits by deploying particular
subscreen areas in a normal R/3 screen and then invoking customer subscreens from the normal flow
logic of dynpro.
Q6: What is the way in which exit organizing is made by SAP?
A6: Organizing exit packages of SAP is also found under the name of SAP enhancements and every SAP
enhancement can have several particular exits.

Q7: What is the meaning of USER EXITS, how are they written and which measures do we have to take
for prevention?
A7: In the default standards of SAP we can find the user defined functionalities, we can find a Sap
program in which a customer personal program may be invoked. Unlike customer exits. user exits can
permit the developers to enter and change the parts of the program and also the objects. When
upgrade is made , every user exit has to be verified for conformation to the standard system. The user
exits can use INCLUDES, case in which Customizing makes the management. We have to search for those
customer enhancements from a specific development class.

Q8: Can we classify the ENHANCEMENTS by type?


A8: Yes they can be classified in:
a) enhancements that use customer exits and
b)enhancements of the elements in the ABAP/4 Dictionary.

a) The standard software doesn’t incorporate all the requirements of the customer, but they can be
contained as empty ‘shells’ that can be changed by the customers by inserting their personal codes. The
enhancements can refer to menus, screens or programs, the compatibility being assured. This means
that in SAP guarantees that the compatibility will be maintained even when passing from standard
software to exit and the interface invoking the exit (they will be kept for future versions too).

b) These are enhancements like table appends or text enhancements or field exits (supplementary
coding for data elements).

Q9: What is the meaning of SSCR?


A9: The SAP Software Change Registration or SSCR is the operational that makes possible the
registration of every manual change of the SAP source coding and objects of SAP Dictionary.

Q10: What are the strong features of Enhancements?


A10: They don’t have an impact on the standard source code of SAP, they don’t have an impact on
software upgrades.

Q11: Which are the main types of CUSTOMER EXITS?


A11: The main types of customer exits are: the screen exits, the menu exits, the function module exits
and the keyword exits.

Q12: What is the meaning of FUNCTION MODULE EXIT?


A12: The function module exit is meting supplementary functionality in R/3 programs having a big role in
the menu exits and the screen exits.

Q13: What is the meaning of an add-on project?


A13: For using in the best way the exits we find in the standard R/3 programs we have to make an add-
on project, that makes possible organizing the enhancement packs and the exits we desire to use. An
add-on project makes possible to met add-on functionality on the texts from the SAP enhancements.
Q14: What is the meaning of a keyword exit?
A14: With a keyword exit we can give to the data elements of the keywords from the ABAP/4 dictionary
some documentation. This documentation will be shown by the system every time users hit the F1 key
for obtaining help online regarding a screen field.

Q15: What is the meaning of a MENU EXIT?


A15: Menu exits mean when we add item on the pull-down menus.

Q16: How can we separate ENHANCEMENTS from MODIFICATIONS?


A16: When we create modifications on the functionality of the SAP standard we say modifications.
When we put supplementary functionality on the standard functionality of SAP we say enhancements.

Q17: What is the meaning of CUSTOMIZING?


A17: When we configure the system parameters through the SAP interface we mean customizing.

A18: How can we classify the methods in which we generate modifications in the standard software of
SAP?
A18: We can make: enhancements to the standard of SAP, modifications to the standard of SAP,
customizing and customer development.

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 A customer exit can be implemented as:
Subroutine i.e. PERFORM xxx.  Function exit
Example: INCLUDE MVF5AFZZ   Screen Exit
PERFORM userexit_save_document_prepare.  Menu Exit
 Field Exit
Example: CALL Customer function ‘xxx’
INCLUDE xxx.
You modify this include.
In case of a PERFORM, you have access to You have access only to the importing,
almost all the data. So you have better exporting, changing and tables parameter of
control, but more risk of making the system the Function Module. So you have limited
unstable. access to data.
User exit is considered a modification and A customer exit is considered an
not an enhancement. 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 Customer exits came later and they
option offered by SAP. 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 RFC is nothing but a remote enabled
OR Facebook offers APIs for Comment/Like, function module. So if there is a Function
SAP offers APIs in the form of BAPIs. BAPI is Module in SAP system 1 on server X , it can
a library of function modules released by be called from a SAP system 2 residing on
SAP to the public so that they can interface server Y.
with SAP.
There is a Business Object Associated with a No Business Object is associated with a RFC.
BAPI. So a BAPI has an Interface, Key Field,
Attributes, Methods, and Events.
Outside world (JAVA, VB, .Net or any Non Non–SAP world cannot connect to SAP using
SAP system) can connect to SAP using a RFC.
BAPI.
Error or Success messages are returned in a RFC does not have a return table.
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 SMARTFORM generates a Function Module
module. when activated.
Main Window is must. You can create a SMARTFORM without a
Main Window.
SAPSCRIPT can be converted to SMARTFORMS cannot be converted to
SMARTFORMS. Use Program SF_MIGRATE. 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 The Protect Checkbox can be ticked for Page
used for Page protection. 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 Call transaction method is when the data
the data volume is huge. volume is low
Session method is slow as compared to Call Transaction method is relatively faster
Call transaction. than Session method.
SAP Database is updated when you SAP Database is updated during the
process the sessions. You need to process execution of the batch input program.
the sessions separately via SM35.
Errors are automatically handled during Errors should be handled in the batch
the processing of the batch input session. 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 Background and Foreground processing
in BAPI. options are available for BDC.
BAPI would generally used for small data BDCs would be preferred for large
uploads. volumes of data upload since background
processing option is available.
For processing errors, the Return Errors can be processed in SM35 for
Parameters for BAPI should be used.This session method and in the batch input
parameter returns exception messages or program for Call Transaction method.
success messages to the calling program.

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

Macro Subroutine
Macro can be called only in the program it is Subroutine can be called from other
defined. 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: Subroutine is defined inside:
DEFINE … FORM …..
…. …..
END-OF-DEFINITION. ENDFORM.
Macro is used when same thing is to be done Subroutine is used for modularization.
in a program a number of times.
Question 7: What is the difference between SAP memory and ABAP memory?

SAP Memory ABAP Memory


When you are using the SET/GET Parameter When you are using the EXPORT IMPORT
ID command, you are using the SAP Statements, you are using the ABAP
Memory. Memory.
SAP Memory is User Specific. ABAP Memory is User and Transaction
What does this mean?The data stored in Specific.What does this mean? The data
SAP memory can be accesses via any session stored in ABAP memory can be accessed
from a terminal. 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.

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 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 tableFor 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.
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:

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:
SAP OOPS ABAP INTERVIEW QUESTIONS AND ANSWERS
What is OOPS ABAP ?
Object orientation (OO), or to be more precise, object-oriented programming, is a problem-solving
method in which the software solution reflects objects in the real world.
A comprehensive introduction to object orientation as a whole would go far beyond the limits of this
introduction to ABAP Objects. This documentation introduces a selection of terms that are used
universally in object orientation and also occur in ABAP Objects. In subsequent sections, it goes on to
discuss in more detail how these terms are used in ABAP Objects. The end of this section contains a list
of further reading, with a selection of titles about object orientation.
What is the Difference between Class and Object ?
A Class is actually a blueprint or a template to create an Object. Whereas an Object is a an actual
instance of a Class. For example Employee ia a class, while John is a real employee which is an Object of
Employee Class.

How polymorphism can be implemented ?


Some examples to implement polymorphism:
Method Overriding
Method Overloading
Operator Overloading

What is Inheritance ?
In OOPs terminology, inheritance is a way to form new classes using classes that have already been
defined. Inheritance is intended to help reuse existing code with little or no modification. The new
classes, known as derived classes, inherit attributes and behavior of the pre-existing classes, which are
referred to as base classes.

What is Method Overriding ?


Method overriding allows a subclass to override a specific implementation of a method that is already
provided by one of its super classes.
A subclass can give its own definition of methods but need to have the same signature as the method in
its super class. This means that when overriding a method the subclass's method has to have the same
name and parameter list as the super class's overridden method.

What is Method Overloading ?


Method overloading is in a class have many methods having same name but different parameter called
overloading or static polymorphism

What is Aggregation ?
Aggregation is a special form of association. Aggregation is the composition of an object out of a set of
parts. For example, a car is an aggregation of engine, tyres, brakes, etc.
Aggregation represents a "Has" relationship like a car has a engine.

What is object oriented programming language ?


Object oriented programming language allows concepts such as abstraction, modularity, encapsulation,
polymorphism and inheritance. Simula is the first object oriented language. Objects are said to be the
most important part of object oriented language. Concept revolves around making simulation programs
around an object.

What are the core ABAP oops concepts ?


Inheritance: Inheritance is the ability of an object to inherit the properties and methods of another
object. This characteristic leads to the creation of families of objects (just like families exist for humans)
with parent objects and child objects.
Polymorphism: Polymorphism is about an objects ability to provide context when methods or operators
are called on the object.
Definition: Polymorphism
In object-oriented programming, polymorphism (from the Greek meaning "having multiple forms") is
the characteristic of being able to assign a different meaning to a particular symbol or "operator" in
different contexts. The simple example is two classes that inherit from a common parent and implement
the same virtual method.
Definition: Encapsulation
Encapsulation: Encapsulation is the ability that an object has to contain and restrict the access to its
members. Encapsulation is a key concept of object programming that ensures the autonomy and
integrity of the objects.
Abstraction: Another OOPS concept related to encapsulation that is less widely used but gaining ground
is abstraction.
Definition: Abstraction
Through the process of abstraction, a programmer hides all but the relevant data about an object in
order to reduce complexity and increase efficiency. In the same way that abstraction sometimes works
in art, the object that remains is a representation of the original, with unwanted detail omitted. The
resulting object itself can be referred to as an abstraction, meaning a named entity made up of selected
attributes and behavior specific to a particular usage of the originating entity.

What is UML ?
UML (Unified Modeling Language) is a standardized modeling language. It is used for the specification,
construction, visualization and documentation of models for software systems and enables uniform
communication between various users.
UML does not describe the steps in the object-oriented development process.
SAP uses UML as the company-wide standard for object-oriented modeling.
UML describes a number of different diagram types in order to represent different views of a system.

What are the types of Objects and Classes ?


In general there are two types of Objects: Instance Object and Static Object and as such there are two
types of Classes: Instance class and Static Class. Specifically when it comes to visibility, Private class,
Protected class and Public classes are the types of classes one can have.

What are the types of classes which can be created ?


We can create four types of classes under final and only modeled category(optional) with the private,
protected, public and abstract instantiation.
Usual Abap Class.
Exception Class(With/Without messages).
Persistent Class.
Test Class(ABAP Unit).

What are the types of classes which can be created ?


We can create four types of classes under final and only modeled category(optional) with the private,
protected, public and abstract instantiation.
Usual Abap Class.
Exception Class(With/Without messages).
Persistent Class.
Test Class(ABAP Unit).

What is a reference variable ?


Objects can only be created and addressed using reference variables. Reference variables allow you to
create and address objects. Reference variables can be defined in classes, allowing you to access objects
from within a class.
What is a reference variable ?
Objects can only be created and addressed using reference variables. Reference variables allow you to
create and address objects. Reference variables can be defined in classes, allowing you to access objects
from within a class.

What is the difference between Abstract method and a Final method ?


Abstract method
Abstract instance methods are used to specify particular interfaces for subclasses, without having to
immediately provide implementation for them. Abstract methods need to be redefined and thereby
implemented in the subclass (here you also need to include the corresponding redefinition statement in
the DEFINITION part of the subclass). Classes with at least one abstract method are themselves abstract.
Static methods and constructors cannot be abstract (they cannot be redefined).
Abstract (instance) methods are defined in the class, but not implemented
They must be redefined in subclasses.

What is a super class ? How can it be implemented ?


A super class is a generalization of its subclasses. The subclass in turn is a specialization of its super
classes.

What is a Narrowing Cast ? How can you implement it ?


The assignment of a subclass instance to a reference variable of the type "reference to superclass" is
described as a narrowing cast, because you are switching from a more detailed view to a one with less
detail.

What is a Widening Cast ?


The widening cast is, as with inheritance, the opposite of the narrowing cast: Here it is used to retrieve a
class reference from an interface reference.

What is a singleton ?
If it is to be impossible to instantiate a class more than once (for example, because it serves as a data
administrator or data container), you can use the singleton concept. The class is defined with the
addition CREATE PRIVATE and FINAL and instantiated using its static constructor. A public static
component could then make the reference to the class available to an external user.

What are the limitations of redefining a method ?


Inherited methods can be redefined in subclasses Redefined methods must be re-implemented in
subclasses. The signature of redefined methods cannot be changed Static methods cannot be redefined.
In inheritance, static components are "shared": A class shares its non-private static attributes with all its
subclasses. In ABAP Objects, you can not only add new components, but also provide inherited methods
with new implementations. This is known as redefinition. You can only redefine (public and protected)
instance methods, other components (static methods, attributes and so on) cannot be redefined.
Changes to method parameters (signature changes) are not possible.

What are static components? What is a component selector ?


In inheritance, static components are "shared": A class shares its non-private static attributes with all its
subclasses. => and -> are the component selectors used to refer.
What are component instance ?
A component instance is a running component that can be run in parallel with other instances of the
same component.

How is Encapsulation implemented in OOPs ?


Encapsulation means that the implementation of an object is hidden from other components in the
system, so that they cannot make assumptions about the internal status of the object and therefore
dependencies on specific implementations do not arise.

What are BADIs? What are BADI filters ?


BADI - Business Add Ins are enhancements to the standard version of the code of SAP.
Filter Badi- Business Add-Ins may be implemented on the basis of a filter value. If an enhancement for
country-specific versions is provided for in the standard version, it is likely that different partners will
want to implement this enhancement. The individual countries can create and activate their own
implementation.

What are the types of Exception classes ?


a. Global
b. Local Exceptions Class.

Where can a protected method be accessed ?


Protected components Only visible within the class and its sub classes.

What is a signature of a method ?


Methods have a parameter interface (called signature ) that enables them to receive values when they
are called and pass values back to the calling program.
In ABAP Objects, methods can have IMPORTING, EXPORTING, CHANGING, and RETURNING parameters
as well as exception parameters.
CLASS DEFINITION. ... METHODS: [ IMPORTING TYPE EXPORTING TYPE CHANGING TYPE RETURNING
VALUE() TYPE EXCEPTIONS RAISING ]. ENDCLASS.(signature of a method). CLASS IMPLEMENTATION.
METHOD . ... ENDMETHOD. ENDCLASS.

What is a functional Method ?


Methods that have a RETURNING parameter are described as functional methods. These methods
cannot have EXPORTING or CHANGING parameters, but has many (or as few) IMPORTING parameters
and exceptions as required.

What is a de-referenced variable ? What is a garbage collector ?


To go to an address before performing the operation a dereference variable is a pointer to the variable,
not the variable itself. A pointer can be re-assigned any number of times while a reference cannot be
reassigned after initialization. Field symbols are similar to dereference pointers. Thus, you can only
access the content of the data object to which the field symbol points. (That is, field symbols use value
semantics). If you want to access the content of the data object, you need to dereference the data
reference first.

Can a class be defined without a constructor ?


Yes, class can be created without any constructor. Default constructor will be created when we define a
class without constructor.

Вам также может понравиться