Interview Questions.

OOPS ABAP Interview Questions and Answers


OOPS ABAP Interview Questions and Answers

Q1. What is OOPS ABAP ?


Object direction (OO), or to be more exact, object-situated writing computer programs, is a critical thinking strategy wherein the product arrangement reflects objects in reality.

A thorough prologue to protest direction overall would head a long ways past the restrictions of this prologue to ABAP Objects. This documentation presents a determination of terms that are utilized generally in object direction and furthermore happen in ABAP Objects. In resulting segments, it proceeds to talk about in more detail how these terms are utilized in ABAP Objects. The finish of this segment contains a rundown of additional perusing, with a determination of titles about object direction.

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

Ans: No it isn't compulsory to carry out all typical point of interaction techniques however executing all Abstract methods is required.

Q3. What Is An Interface In Ooabap?

Ans: Interface is class which contains techniques without executions.

Q4. Might We at any point Instantiate The Interface?

Ans: No, we can not launch interface utilizing make object watchword.

Q5.Can We Achieve Multiple Inheritance Using Interfaces?

Ans: Yes, by involving connection point idea in SAP ABAp, we can accomplish various legacy

Q6. Does Polymorphism Achieved Through Interfaces?

Ans: Yes, by involving connection point idea in SAP ABAP, we can polymorphism

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

Ans: Abstract class is a class which contains something like one dynamic technique( Method without execution), Abstract class contains strategies with execution and without execution and we can't make example for the theoretical class .

Unique class is fundamentally for legacy .

Interface contains techniques without execution .

Q8. What Is Alias Name In Ooabap?

Ans: Alias is a moniker name for the connection point strategy carried out in the class .

Q9. Might We at any point Raise Events In Interface?

Ans: No, you can not bring occasions up in interface, Because there is no Implementation for the strategies. We can make occasions in interfaces .

Q10. What Is A Single-ton Class?

Ans: Single-ton class is a class which permits to start up once just .

HubSpot Video

Q11. What Is The Difference In Attributes Defined In The Public Versus Private Section Of A Class?

Ans: Public credits can be gotten to by class, subclasses and different classes where as Private ascribes can be gotten to by class itself as it were.

Q12. What is the Difference among Class and Object ?

Ans: A Class is really a diagram or a format to make an Object. Though an Object is a genuine occasion of a Class. For instance Employee ia a class, while John is a genuine worker which is an Object of Employee Class.

Q13. How polymorphism can be executed ?

Ans: Some guides to execute polymorphism:

Technique Overriding

Technique Overloading

Administrator Overloading

Q14. What is Inheritance ?

Ans: In OOPs phrasing, legacy is a method for framing new classes utilizing classes that have previously been characterized. Legacy is expected to assist with reusing existing code with practically no alteration. The new classes, known as inferred classes, acquire traits and conduct of the previous classes, which are alluded to as base classes.

Q15. What is Method Overriding ?


Strategy abrogating permits a subclass to supersede a particular execution of a technique that is now given by one of its super classes.

A subclass can give its own meaning of techniques yet need to have similar signature as the strategy in its super class. This implies that while abrogating a technique the subclass' strategy must have a similar name and boundary list as the super class' abrogated strategy.

Q16. What is Method Overloading ?

Ans: Method over-burdening is in a class have numerous techniques having same name yet unique boundary called over-burdening or static polymorphism

Q17. What is Aggregation ?

Ans: Aggregation is an exceptional type of affiliation. Total is the organization of an item out of a bunch of parts. For instance, a vehicle is a total of motor, tires, brakes, and so on.

Conglomeration addresses a "Has" relationship like a vehicle has a motor.

Q18. What is object situated programming language ?

Ans: Object arranged programming language permits ideas like reflection, seclusion, embodiment, polymorphism and legacy. Simula is the principal object arranged language. Objects are supposed to be the main piece of article situated language. Idea spins around making recreation programs around an article.

Q19. What are the center ABAP uh oh ideas ?


Legacy: Inheritance is the capacity of an item to acquire the properties and techniques for another article. This trademark prompts the production of groups of items (very much like families exist for people) with parent articles and kid objects.

Polymorphism: Polymorphism is about an items capacity to give setting when strategies or administrators are approached the article.

Q20. Definition: Polymorphism

Ans: In object-situated programming, polymorphism (from the Greek signifying "having various structures") is the trait of having the option to dole out an alternate importance to a specific image or "administrator" in various settings. The straightforward model is two classes that acquire from a typical parent and execute a similar virtual strategy.

Q21. Definition: Encapsulation


Epitome: Encapsulation is the capacity that an article needs to contain and limit the admittance to its individuals. Embodiment is a vital idea of item programming that guarantees the independence and uprightness of the items.

Reflection: Another OOPS idea connected with epitome that is less broadly utilized however making strides is deliberation.

Q22. Definition: Abstraction

Ans: Through the course of deliberation, a software engineer conceals everything except the pertinent information about an item to diminish intricacy and increment productivity. Similarly that reflection at times works in craftsmanship, the item that remains is a portrayal of the first, with undesirable detail excluded. The subsequent item itself can be alluded to as a reflection, meaning a named substance comprised of chosen credits and conduct intended for a specific utilization of the starting element.

Q23. What is UML ?


UML (Unified Modeling Language) is a normalized displaying language. It is utilized for the detail, development, perception and documentation of models for programming frameworks and empowers uniform correspondence between different clients.

UML doesn't portray the means in the article situated improvement process.

SAP involves UML as the expansive norm for object-situated demonstrating.

UML portrays various different chart types to address various perspectives on a framework.

Q24. What are the sorts of Objects and Classes ?

Ans: overall there are two sorts of Objects: Instance Object and Static Object and as such there are two kinds of Classes: Instance class and Static Class. Explicitly with regards to perceivability, Private class, Protected class and Public classes are the sorts of classes one can have.

Q25. What are the kinds of classes which can be made ?


We can make four kinds of classes under last and just demonstrated category(optional) with the private, secured, public and conceptual launch.

Regular Abap Class.

Special case Class(With/Without messages).

Constant Class.

Test Class(ABAP Unit).

Q26. What are the sorts of classes which can be made ?


We can make four kinds of classes under last and just displayed category(optional) with the private, secured, public and dynamic launch.

Normal Abap Class.

Exemption Class(With/Without messages).

Steady Class.

Test Class(ABAP Unit).

Q27. What is a reference variable ?

Ans: Objects must be made and tended to utilizing reference factors. Reference factors permit you to make and address objects. Reference factors can be characterized in classes, permitting you to get to objects from inside a class.

Q28. What is a reference variable ?

Ans: Objects must be made and tended to utilizing reference factors. Reference factors permit you to make and address objects. Reference factors can be characterized in classes, permitting you to get to objects from inside a class.

Q29. What is the contrast between Abstract strategy and a Final technique ?


Unique strategy

Unique occasion techniques are utilized to determine specific points of interaction for subclasses, without having to give execution to them right away. Unique techniques should be re-imagined and subsequently carried out in the subclass (here you additionally need to remember the comparing redefinition proclamation for the DEFINITION part of the subclass). Classes with something like one dynamic strategy are themselves conceptual. Static techniques and constructors can't be unique (they can't be re-imagined).

Conceptual (case) techniques are characterized in the class, yet entirely not carried out

They should be re-imagined in subclasses.

Q30. What is a super class ? How might it be carried out ?

Ans: A super class is a speculation of its subclasses. The subclass thus is a specialization of its super classes.

Q31. What is a Narrowing Cast ? How might you execute it ?

Ans: The task of a subclass occasion to a reference variable of the sort "reference to superclass" is depicted as a limiting cast, since you are changing from a more point by point view to a one with less detail.

Q32. What is a Widening Cast ?

Ans: The enlarging cast is, likewise with legacy, something contrary to the restricting cast: Here it is utilized to recover a class reference from a connection point reference.

Q33. What is a singleton ?

Ans: If it is to be difficult to start up a class at least a couple of times (for instance, since it fills in as an information manager or information compartment), you can utilize the singleton idea. The class is characterized with the expansion CREATE PRIVATE and FINAL and started up utilizing its static constructor. A public static part could then make the reference to the class accessible to an outer client.

Q34. What are the limits of rethinking a technique ?

Ans: Inherited strategies can be re-imagined in subclasses Redefined techniques should be re-carried out in subclasses. The mark of reclassified techniques can't be changed Static strategies can't be re-imagined. In legacy, static parts are "shared": A class imparts its non-private static credits to every one of its subclasses. In ABAP Objects, you can add new parts, yet in addition give acquired strategies new executions. This is known as redefinition. You can rethink (public and safeguarded) example strategies, different parts (static techniques, ascribes, etc) can't be reclassified. Changes to technique boundaries (signature changes) are unrealistic.

Q35. What are static parts? What is a part selector ?

Ans: In legacy, static parts are "shared": A class imparts its non-private static credits to every one of its subclasses. => and - > are the part selectors used to allude.

Q36. What are part occasion ?

Ans: A part case is a running part that can be run in lined up with different examples of a similar part.

Q37. How is Encapsulation executed in OOPs ?

Ans: Encapsulation implies that the execution of an article is stowed away from different parts in the framework, so they can't make suspicions about the interior status of the item and thusly conditions on unambiguous executions don't emerge.

Q38. What are BADIs? What are BADI channels ?

Ans: BADI - Business Add Ins are improvements to the standard variant of the code of SAP.

Channel Badi-Business Add-Ins might be carried out based on a channel esteem. Assuming an upgrade for country-explicit variants is accommodated in the standard adaptation, almost certainly, various accomplices will need to execute this improvement. The singular nations can make and initiate their own execution.

Q39. What are the kinds of Exception classes ?



Nearby Exceptions Class.

Q40. Where might a safeguarded technique at any point be gotten to ?

Ans: Protected parts Only noticeable inside the class and its sub classes.

Q41. What is a mark of a technique ?


Techniques have a boundary interface (called signature ) that empowers them to get values when they are gotten back to and pass values to the calling program.

In ABAP Objects, strategies can have IMPORTING, EXPORTING, CHANGING, and RETURNING boundaries as well as exemption boundaries.


Q42. What is a utilitarian Method ?

Ans: Methods that have a RETURNING boundary are depicted as utilitarian techniques. These techniques can't have EXPORTING or CHANGING boundaries, however has many (or as scarcely any) IMPORTING boundaries and special cases as required.

Q43. What is a de-referred to variable ? What is a trash specialist ?

Ans: To go to a location prior to playing out the activity a dereference variable is a pointer to the variable, not the actual variable. A pointer can be re-doled out quite a few times while a reference can't be reassigned after introduction. Field images are like dereference pointers. Hence, you can get to the substance of the information object to which the field image focuses. (That is, field images use esteem semantics). If you have any desire to get to the substance of the information object, you want to dereference the information reference first.

Q44. Might a class at any point be characterized without a constructor ?

Ans: Yes, class can be made with no constructor. Default constructor will be made when we characterize a class without constructor.

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

Ans: Instance technique is accessible independently in each item (example), static strategy is worldwide and no case is expected for static strategy.

once .

Q46. What Is A Class In Ooabap?

Ans: Class is client characterized information type which contains techniques, occasions, ascribes, interfaces and so forth.

Q47. What Is The Difference Between Singleton And Static Class In Sap Abap ?

Ans: Before going to static classes, you ought to grasp static parts.

Static Components: Static parts (static ascribes, static occasions and static techniques) exists all around the world, don't bother making object/example of the class to get to them, we can get to them by utilizing static part selector => .

Static Class: A class that just holds back static parts and no case parts is alluded to as a static class.

Singleton Class: It is a class which doesn't permit you to make various cases.

Q48. Could We at any point Make Methods Of Interface As Abstract And Final In Ooabap ?

Ans: No we can not make interface strategies as conceptual or last in Object Oriented ABAP

Q49. Could We at any point Declare Events In Interface In Ooabap ?

Ans: Yes, we can proclaim occasions in interface in Object Oriented ABAP

Q50. What Is A Singleton Class In Ooabap ?

Ans: Singleton class is a class which permits to instantiate(Create Object) as it were

Q51. What Is A Global Class In Sap ?

Ans: Global classes and connection points are characterized in the Class Builder (Transaction SE24) in the ABAP Workbench.All of the ABAP programs in a R/3 System can get to the worldwide classes

Q52. What Is A Local Class In Sap ?

Ans: Local classes are characterized in an ABAP program (Transaction SE38) and must be utilized in the program in which they are characterized.

Q53. What Is An Event In Ooabap ?

Ans: Event is a component by which strategy for one class can raise technique for another class, without the peril of launching that class.

Q54. The most effective method to Declare And Raise Events In Ooabap ?

Ans: We want to follow beneath steps while working with occasions in Object Oriented ABAP:

Characterize an occasion

Characterize a technique

Interface occasion and technique and convert the strategy into occasion overseer strategy

Make a setting off strategy which will raise the occasion

Utilize set controller and register occasion overseer strategy to a specific case in the program

Q55. What Is A Constructor Method In Ooabap ?


These are unique kind of strategies

constructor strategy is executed consequently at whatever point an item is made or launched

These strategies are chiefly used to set default values in a class

The name of the constructor technique is 'constructor'

These techniques have just bringing in boundaries

There are no trading boundaries

Q56. What Is Abstract Method In Ooabap ?

Ans: Abstract strategies is a strategy which contains no execution.

Q57. What Is An Abstract Class In Ooabap ?


It is a class which contains strategies with execution along with techniques without execution .

Theoretical class is a class which contains something like one unique technique.

Q58. Might We at any point Instantiate Abstract Class In Ooabap ?


we can't make an item to the theoretical class rather make an item to the kid class and call the strategies .

Conceptual class are chiefly utilized for making legacy.

Q59. What Is The Use Of 'defination Deferred' Keyword In Ooabap ?

Ans: It is the catchphrase which demonstrates the class definition is deferred or delayed or Defined at some spot in program.


Q60. What Are The Advantages Of Oo Alv ?

Ans: Some of the fundamental benefits of Object Oriented ALV

We have no of occasions accessible in the classes when contrasted with ALV with capability modules which gives adaptability for the software engineer to foster ALV'S for different situations.

We can show more than one ALV framework information on a solitary screen.

The ALV lattice information is shown as custom holder with which we have some control over the size of ALV matrix Whereas we have zero control over the size of the ALV with capability Modules.

We can likewise put different UI components like checkbox, Radiobutton on similar screen moreover ALV network information.

Q61. What Are The Types Of Constructor's In Ooabap ? Make sense of ?

Ans: CONSTRUCTOR's are unique kind of strategies, constructor strategy is executed naturally at whatever point an item is made or started up.

Constructor: This strategy is executed consequently at whatever point object is made, this is utilized to set default values concerning case/object. The name of the constructor technique is CONSTRUCTOR.

Static Constructor: This strategy is executed naturally at whatever point object is made, this is utilized to set default esteems all around the world independent of examples/objects.The name of the static constructor is CLASS_ CONSTRUCTOR.

Q62. What Is A Polymorphism In Ooabap ?

Ans: Polymorphism is an idea by which a similar technique names will act contrastingly in various classes i.e every strategy will have it's own execution in various classes yet with a similar name.

Q63. Can We Defined A Class Without A Constructor In Ooabap ?

Ans: Yes, class can be made with next to no constructor. Default constructor will be made when we characterize a class without constructor.

Q64. What Is A Friend Class?

Ans: Friend class is a class it can get to private parts of it's companions class.

Q65. What Is Alias?

Ans: Instead of indicating complete name of connection point techniques, we can relegate it a name which can straightforwardly set off.

Q66. What Is Me Variable?

Ans: It very much like a self­reference, by this we can call strategies that are with in same class with out making object.

Q67. How To A Create Object For The Class?


Information: ref type ref to .

Make object ref.

Q68. How To Call A Method?

Ans: Call technique ref­>method_name .

Q69. What Are The Differences Local and Global Classes?


Nearby classes are characterized locally with in a program and different projects can't get to similar classes straightforwardly.

However, worldwide classes dislike that they are universally open from ABAP climate.

Worldwide classes are halfway characterized in a vault. Exchange code for worldwide classes is SE24(class manufacturer).

Q70. What Is The Difference Between Function Group And Classes?

Ans: We can make many occasions of a similar class with in a program, however we can't make many occurrences of capability bunch.

Q71. What number of Types Of Classes Are There In Ooabap?


Public class

Confidential class

Last class

Single­ton class

Theoretical class

Diligent class

Companion class

Q72. How To Define A Class Locally?


class <cl_name> definition.

Public area.

Strategies: m1 bringing in p1 type

Sending out p2 type

Changing p3 type

Returning p4 type

Special cases

Safeguarded area

Confidential area


Class <c1_name> execution.

Strategy m1.­­­­­­



Q73. How To Create An Object For Private Class?

Ans: overall we can not make object for a confidential class, yet we can get to static strategy for a confidential class so call that technique utilizing its class name and import that item.

For instance take one static technique with a sending out boundary inside confidential class and compose object creation code in that static strategy and product that item.