Ads

SAP ABAP OOPs Interview Questions Part one

SAP ABAP OOPs Interview Questions Part one

What are the main features of Object-oriented programming?


  • Encapsulation
  • Plomorphysm
  • Inheritance
  • Abstraction


What is the class definition?

A class is an abstract definition of a real-world object.

What is an Object?


An object is a real-world Object that contains properties and data.


How many types of classes in oops?


Public class
Private Class
Final Class
Singleton Class
Abstract class
Friend class
Persistent class

What is the difference between class and function group?


We can't create many instances of the function group but we create a number of instances for a class within an ABAP program.

What are the components of the classes?


Methods and attributes are components of the classes

What are the differences between local and global classes?


Locals is defined within the ABAP program but Global class is defined in the class builder SE24, available for all SAP applications.

What are the constructors and the difference between them?


A constructor is a special kind of method .it will be called automatically when the object is instantiated in the class. A class contains the two types of constructors default which are static and instance 

static constructor called only one time when class loaded. Instance constructors are instance-specific that is object-specific, whenever we created a new object, instance constructors will be calling.

How do you create objects for the class?


Data:ob1 type ref to <class name>.

Create Object Ob1.

Can we instantiate the class within the implementation of other classes?


It is possible.

What are the static attribute and a static method?

static attributes and methods are class-specific and memory will be allocated only once for these ones irrespective of the number of objects created.

we can access these using 
Call method <class name>=>Method_name.


Where do you create a global class?


class Builder SE24.

What is the ME reference variable?


In the class, without creating an object, we call the method using self-reference object ME.


What is a Final Class?

  The final class does not have any child classes and the final methods can not be redefined.


What is a friend class?


It can access the private components of its friend classes.


What is a persistent class?


The classes of these objects must be created as persistent classes in the Class Builder.  (As a template for objects, every class is persistent). Rather, it means that the objects of that class and their state are managed by the Persistence Service. When the Class Builder creates a persistent class, it automatically generates an associated class, known as the class actor or class agent, whose methods manage the objects of persistent classes. As well as their identity, persistent classes can contain key attributes, which allow the Persistence Service to ensure that the content of each persistent object is unique.

What is a singleton class?


Only one object create for the singleton class and it can be instantiated only once.

Read more very import OOPs Interview Questions

ABAP OOPs Interview Questions Part Two

ABAP OOPs Interview Questions Part Three

ABAP OOPs Interview Questions Part Four

Conclusion

If you know more SAP ABAP Object Oriented Programming(OOPs) interview questions, Please comment below, or share these posts to help others.

Comments

Popular posts from this blog

BADI Interview Questions in SAP ABAP

Sample SAP ABAP Programming Examples for Practice

Module Pool Programming Interview Questions and Answers in SAP ABAP

Step by Step tutorial on BDC Session Method Program in SAP ABAP

SAP ABAP Interview Questions and Answers for 10 Years Experienced