SAP OOPS ABAP Interview Questions And Answers [Latest]

SAP OOPS ABAP Interview Questions And Answers prepared from Codingcompiler experts. These SAP OOPS ABAP Interview Questions were asked in various interviews conducted by top multinational companies across the globe. We hope that these interview questions on SAP OOPS ABAP  will help you in cracking your next job interview. All the best and happy learning.

In this article you’ll learn

SAP OOPS ABAP Interview Questions
SAP OOPS ABAP Interview Questions And Answers
The Best SAP OOPS ABAP Interview Questions And Answers
Top SAP OOPS ABAP Interview Questions And Answers
Frequently Asked SAP OOPS ABAP Interview Questions And Answers

SAP OOPS ABAP Interview Questions

1. What is the concept of Object-Oriented ABAP?
2. What is OOPS ABAP ?
3. What is an Interface in OOABAP?
4. Is It Mandatory To Implement All Methods Of Interface In The Class Which Includes Interface?
5. What Is An Interface In Ooabap?
6. Can We Instantiate The Interface?
7. Can We Achieve Multiple Inheritance Using Interfaces?
8. What is the Difference between Class and Object?
9. How can polymorphism be implemented?
10. What is a reference variable?

SAP OOPS ABAP Interview Questions And Answers



1. What is the concept of Object-Oriented ABAP?

Answer: Object Oriented ABAP came up with the concept of representing Real-Time objects in classes. Ex: Instances at run time.

2. What is OOPS ABAP ?

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

3. What is an Interface in OOABAP?

Answer: Interface is class which contains methods without implementations.

4. Is It Mandatory To Implement All Methods Of Interface In The Class Which Includes Interface?

Answer: No it is not mandatory to implement all normal interface methods but it is mandatory to implement all Abstract methods.

5. What Is An Interface In Ooabap?

Answer: Interface is class which contains methods without implementations.

6. Can We Instantiate The Interface?

Answer: No, we can not instantiate interface using create object keyword.

7. Can We Achieve Multiple Inheritance Using Interfaces?

Answer: Yes, by using interface concept in SAP ABAp, we can achieve multiple inheritances

8. What is the Difference between Class and Object?

Answer: A Class is actually a blueprint or a template to create an Object. Whereas an Object is an actual instance of a Class. 

9. How can polymorphism be implemented?

Answer:

  1. Implement polymorphism:
  2. Method Overriding
  3. Method Overloading
  4. Operator Overloading

10. What is a reference variable?


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

The Best SAP OOPS ABAP Interview Questions And Answers

11. What are the limitations of redefining a method?

Answer:

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.

12. What Is The Difference Between Abstract Class And Interface?

Answer: Abstract class is a class which contains at least one abstract method( Method without implementation), Abstract class contains methods with implementation and without implementation and we cannot create instance for the abstract class .

  • Abstract class is mainly for inheritance .
  • Interface contains methods without implementation.


13. What is Method Overriding?

Answer: Method overriding allows a subclass to override a specific implementation of a method that is already provided by one of its superclasses.

A subclass can give its own definition of methods but need to have the same signature as the method in its superclass. This means that when overriding a method the subclass method has to have the same name and parameter list like the super class’s overridden method.

14. Can we instantiate the interface?

Answer: No, we can not instantiate interface using create object keyword

15.  What is Method Overloading ?

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

16. What is Aggregation ?

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

17. What is object-oriented programming language ?

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

18. What Are The Advantages Of Oo Alv?


Answer: Some of the main advantages of Object Oriented ALV

We have no events available in the classes when compared to ALV with function modules which give flexibility for the programmer to develop ALV’S for various scenarios.

We can display more than one ALV grid data on a single screen.

The ALV grid data is displayed in the form of a custom container with which we can control the size of the ALV grid Whereas we cannot control the size of the ALV with function Modules.

We can also place different UI elements like checkbox, Radiobutton on the same screen in addition to ALV grid data.

19. 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. 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.

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.

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.

20. What is an Interface in OOABAP?

Answer: Interface is class which contains methods without implementations.

Top SAP OOPS ABAP Interview Questions And Answers

21. What is UML?

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

22. What is a reference variable?

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

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

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

24.  Is It Mandatory To Implement All Methods Of Interface In The Class Which Includes Interface?

Answer: No it is not mandatory to implement all normal interface methods but it is mandatory to implement all Abstract methods.

25. What Is An Interface In Ooabap?

Answer: The interface is class which contains methods without implementations.

26. Can We Achieve Multiple Inheritance Using Interfaces?

Answer :  Yes, by using interface concept in SAP ABAp, we can achieve multiple inheritance

27. Does Polymorphism Achieved Through Interfaces?

Answer : Yes, by using interface concept in SAP ABAP, we can polymorphism

Frequently Asked SAP OOPS ABAP Interview Questions And Answers

28. What is a Widening Cast ?

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

29. What is a singleton ?

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

30. What Are The Differences Local & Global Classes?

Answer: Local classes are defined locally within 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 the ABAP environment. Global classes are centrally defined in a repository. Transaction code for global classes is SE24(class builder). 

31. What are static components? What is a component selector ?

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

32. What Is The Difference In An Instance Method And A Static Method?

Answer : Instance method is available separately in each object (instance), static method is global and no instance is required for static method.

33. Can We Raise Events In Interface?

Answer : No, you can not raise events in interface, Because there is no Implementation for the methods. We can create events in interfaces.

Related Interview Questions

  1. SAP ABAP on HANA Interview Questions And Answers
  2. SAP Adobe Forms Interview Questions And Answers
  3. SAP HANA Interview Questions
  4. Core Java Interview Questions
  5. JSF Interview Questions
  6. JSP Interview Questions
  7. JPA Interview Questions
  8. Spring Framework Interview Questions
  9. Spring Boot Interview Questions
  10. Core Java Multiple Choice Questions
  11. 60 Java MCQ Questions And Answers
  12. Aricent Java Interview Questions
  13. Accenture Java Interview Questions
  14. Advanced Java Interview Questions For 5 8 10 Years Experienced
  15. Core Java Interview Questions For Experienced
  16. GIT Interview Questions And Answers
  17. Network Security Interview Questions
  18. CheckPoint Interview Questions
  19. Page Object Model Interview Questions
  20. Apache Pig Interview Questions
  21. Python Interview Questions And Answers
  22. Peoplesoft Integration Broker Interview Questions
  23. PeopleSoft Application Engine Interview Questions

Leave a Comment