Sunday, August 10, 2014

SAP Object Oriented ABAP Interview Questions Answers

OOPS ABAP Interview Questions Answers
SAP ABAP Object Oriented Programming Interview Questions and Answers, this post consist of OOABAP interview questions and answers. 

Object Oriented ABAP Interview Questions Answers

These OOPS ABAP interview questions are frequently asked  in the interviews. Just have a look into this post and read this questions. Click on read more to read this post.

SAP OOABAP Interview Questions Answers

SAP ABAP Object Oriented Programming Interview Questions and Answers, this post consist of some ABAP OOPS interview questions and answers for the interview aspirants. These questions are frequently asked  in the interviews. Just have a look into this post and read this questions.

OOPS ABAP Interview Questions Answers

1.      Explain about Object oriented programming?

Object oriented programming is one of the most popular methodologies in software development. It offers a powerful model for creating computer programs. It speeds the program development process, improves maintenance and enhances re-usability of programs.

  1. Object oriented Concepts?

 It means combining data and code that acts up on data into one single unit of organization, so that both are safe from out side interference. In OOAbap encapsulation is achieved through classes.


It means many forms that mean the same method behaves differently in different method calls.


It means deriving a child class from base class; child class acquires all the properties from base class.


Abstraction simplifies a complex problem to a simpler problem by specifying and modeling the class to the relevant problem scenario. 

It simplifies the problem by giving the class its specific class of inheritance. Composition also helps in solving the problem to an extent.

  1. What is a class?
Classes are templates for objects. Conversely, you can say that the type of an object is the same as its class. A class is an abstract description of an object. 

You could say that it is a set of instructions for building an object. The attributes of objects are defined by the components of the class, which describe the state and behavior of objects.

  1. What is an object?
An object is a combination of messages and data. Objects can receive and send messages and use messages to interact with each other. The messages contain information that is to be passed to the recipient object.

  1. How many types of classes are there in OOAbap?
Public class

Private class

Final class

Single-ton class

Abstract class

Persistent class

Friend class

  1. What is the difference between function group and classes?
We can create many instances of the same class with in a program, but we cannot create many instances of function group.

  1. What are the differences local & global classes?
Local classes are defined locally with in a program and the other programs can’t access the same classes directly. 

But global classes are not like that they are globally accessible from ABAP environment. Global classes are centrally defined in a repository. Transaction code for global classes is SE24(class builder).

  1. What are the Components of a class?
Attributes and methods are components inside a class.

  1. How to define a class locally?
    class <cl_name> definition.
Public section.

Methods: m1 importing p1 type <c>
                      Exporting p2 type <i>
                      Changing p3 type <n>
                      Returning p4 type <i>
                      Exceptions <e1>.

Protected section.

Private section.


Class <c1_name> implementation.

Method m1.


  1. What is a constructor & types of constructors?
Constructor is a special method, which will be called automatically as and when the object is created for a class, it can have only importing parameters but not exporting, it is generally used to give some initial state to the object. 

A class can contain have two types of constructors static and instance constructors.

  1. Difference between static and instance constructors?
Static constructor will be called only once, i.e. at the time of loading class in to memory. Instance constructors are instance specific, these constructors will be called as and when the new object is created for that class.

  1. How to a create object for the class?
Data: ref type ref to <cl_name>.

Create object ref.

  1. how to call a method?
Call method ref->method_name <exporting x = 1>.

  1. What is static attribute & method?
Static attributes & methods are class specific, memory will be allocated only once for Static attributes & methods irrespective of no. of objects created. 

We can access the components with a reference variable i.e. by using class name

Call method <cl_name>=>menthod_name.

  1. Can we instantiate a class within implementation of other class?      Yes

  1. Can we put non declarative statement e.g. START-OF-SELECTION within a class?
No, we can’t use.

  1. How to create a global class?
With tcode SE24

  1. How can we pass importing parameter?
Pass by value/pass by reference

  1. Can we pass returning parameter by reference?                                  NO only pass by value

  1. Can a method call itself? Yes

  1. What is me variable?
It just like a self-reference, by this we can call methods that are with in same class with out creating object.

  1. Can we have export parameter in Instance constructor?                    No

  1.  What is an abstract class?
Abstract class contains both abstract methods and normal methods, abstract methods cannot implement in side abstract class, and instead these methods will be implemented by child classes of that abstract class.

  1. What is final class & Method?
Final classes can’t be inherited that means it can not have child classes and final method of a class cannot be redefined.

  1. What is an interface?
Interfaces contain only public methods with no implementation; these interfaces are included in public section of classes and implement the methods of interfaces.

  1. Can we implement interface in private section of any class?                      No

  1. What is alias?
Instead of specifying full name of interface methods, we can assign it a name which can directly trigger.

  1. What is a friend class?
Friend class is a class it can access private components of it’s friends class.

  1. How to create an object for private class?   
In general we can not create object for a private class, but we can access static method of a private class so call that method using its class name and import that object. 

For example take one static method with an exporting parameter inside private class and write object creation code in that static method and export that object.

  1. What is a Single-ton class?
Single-ton classes can be instantiated only once, i.e. only one object is created for Single-ton classes.

  1. What is a Persistent class?
A special class, the attributes of which are linked to database tables via object-relational mapping. Since Release 6.10 they can be created using the Mapping Assistant of the Class Builder. 

The objects of persistent classes are managed by Object Services. An object in a persistent class, the attributes of which are saved as database content after the run time of an ABAP program. 

Dear Friends if you have any questions on Object Orientation please write in comment box below it'll help fellow ABAPers. 

"You found the information helpful and want to say thanks? Your donation is enough to inspire us to do more. Thanks a bunch!"


Sugavanes said...

Very Useful information. Commented by Bukkas

Uday Reddy said...

how can we differentiate ooabap with core abap? explain in detail.

Post a Comment

Note: Only a member of this blog may post a comment.


ABAP (1) ABAP Interview Questions (112) ABAP Open SQL Statements (1) ABAP Syntax Rules (6) ABAP WORKBENCH (2) ABAP-Interview-Questions (52) ALE IDOC (6) ALE IDOC Interview Questions (6) ale-idoc (6) ALE-IDOC-Interview-Questions (19) ALV Interview Questions (5) ALV-Interview-Questions (22) BADI (2) BAPI (1) BAPI Interview Questions (1) BAPI-Interview-Questions (14) BDC (6) BDC Interview Questions (6) BDC-Interview-Questions (9) big data (2) big data interview questions (1) Classical Reports Interview Question (3) Classical-Reports-Interview-Questions (22) Conditional Statements (1) Cross Applications (3) Cross-Applications (14) Data Dictionary (22) Data Type Questins (1) Data types (1) Data-Dictionary (48) Data-Type-Questins (6) Dialog programming (5) Dialog Programming Interview Questions (4) Dialog-Programming (30) DOMAIN Interview Questions (1) Domain-Interview-Questions (8) Function Module (2) hadoop (2) hadoop interview questions (2) hdfs (1) IDoc Tutorials (6) Interactive Report Interview Questions (4) Interactive-Reports-Interview-Questions (22) Internal Tables (1) interview questions (1) Lock Object Interview Questions (1) Lock-Objects-Interview-Questions (10) Logical Database (1) Modularization Interview Questions (4) Modularization-Interview-Questions (25) Module Pool Programming (5) Module-Pool-Programming (39) modules in sap (1) Object Oriented ABAP (19) Object Oriented ABAP Interview Questions (15) object-oriented-abap (2) Object-Oriented-ABAP-Interview-Questions (34) OOABAP (9) Reports (14) Reports Interview Questions (9) Reports-Interview-Questions (19) RFC (1) RFC Interview Questions (1) RFC-Interview-Questions (14) RICEF (1) RICEF Objects (1) SAP (4) SAP ABAP (4) SAP ABAP Interview Questions (42) SAP ABAP Introduction (46) SAP ABAP Message Types (2) SAP BADI Interview Questions (2) SAP Basics (71) SAP Books (2) SAP Certification (1) SAP CONSULTANTS (5) SAP CRM (1) SAP ENHANCEMENTS (3) SAP EXITS (2) SAP EXITS ( SAP ENHANCEMENTS ) Interview Questions (1) SAP Free Books (1) SAP HR (2) SAP Lock Object (1) sap modules (2) SAP Open SQL Statements (1) SAP R/3 Architecture (4) SAP Search help (1) SAP Smartforms (1) SAP Smartforms Interview Questions (2) SAP Tables (5) SAP Tcodes (10) SAP Views (1) SAP Webdynpro ABAP (12) SAP Work Processors (2) SAP Workflow (3) SAP-BADI-Interview-Questions (11) SAP-Enhancements (39) SAP-Exits (39) SAP-Exits-Enhancements-Interview Questions (3) SAP-HANA (1) SAP-HANA-Interview-Questions (1) SAP-Smartforms-Interview-Questions (2) SAP-Workflow (3) Scripts (3) Scripts Interview Questions (2) Scripts-Interview-Questions (32) Search Help Interview Questions (1) Search-Help-Interview-Questions (9) Smartforms (1) Table Maintenance Generator (1) Table-Maintenance-Generator (4) Tables in SAP (2) Tables Interview Questions (3) Tables-Interview-Questions (3) Type Group Interview Questions (1) Type-Group-Interview-Questions (7) Variable Declaration (1) Views Interview Questions (1) Views-Interview-Questions (5) Webdynpro (12) what is big data (1)

Protected Blog

This blog is not affiliated to SAP AG |SAP is trademark of SAP AG |The information collected from various sources use information with your own risk.