InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How To Create An Object For Private Class? |
|
Answer» 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. 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. |
|
| 2. |
How To Define A Class Locally? |
|
Answer» class <cl_name> definition. class <cl_name> definition. |
|
| 3. |
How Many Types Of Classes Are There In Ooabap? |
Answer»
|
|
| 4. |
What Is The Difference Between Function Group And Classes? |
|
Answer» We can create MANY instances of the same CLASS with in a PROGRAM, but we cannot create many instances of FUNCTION group. We can create many instances of the same class with in a program, but we cannot create many instances of function group. |
|
| 5. |
What Are The Differences Local & Global Classes? |
Answer»
|
|
| 7. |
How To A Create Object For The Class? |
|
Answer» DATA: REF TYPE ref to . Data: ref type ref to . |
|
| 8. |
How To Create A Global Class? |
|
Answer» With TCODE SE24. With tcode SE24. |
|
| 9. |
What Is Me Variable? |
|
Answer» It just like a selfreference, by this we can call methods that are with in same CLASS with out CREATING OBJECT. It just like a selfreference, by this we can call methods that are with in same class with out creating object. |
|
| 10. |
What Is A Friend Class? |
|
Answer» FRIEND class is a class it can ACCESS PRIVATE components of it’s FRIENDS class. Friend class is a class it can access private components of it’s friends class. |
|
| 11. |
Can We Defined A Class Without A Constructor In Ooabap ? |
|
Answer» YES, CLASS can be created without any CONSTRUCTOR. Default constructor will be created when we define a class without constructor. Yes, class can be created without any constructor. Default constructor will be created when we define a class without constructor. |
|
| 12. |
What Is A Polymorphism In Ooabap ? |
|
Answer» Polymorphism is a concept by which the same METHOD NAMES will behave differently in different classes i.e each method will have it's own IMPLEMENTATION in different classes but with the same NAME. Polymorphism is a concept by which the same method names will behave differently in different classes i.e each method will have it's own implementation in different classes but with the same name. |
|
| 13. |
What Are The Types Of Constructor's In Ooabap ? Explain ? |
|
Answer» CONSTRUCTOR's are special type of METHODS, constructor method is EXECUTED automatically whenever a object is created or instantiated.
CONSTRUCTOR's are special type of methods, constructor method is executed automatically whenever a object is created or instantiated. |
|
| 14. |
What Are The Advantages Of Oo Alv ? |
|
Answer» Some of the main advantages of Object Oriented ALV
Some of the main advantages of Object Oriented ALV |
|
| 15. |
What Is The Use Of 'defination Deferred' Keyword In Ooabap ? |
|
Answer» It is the keyword which INDICATES the CLASS definition is delayed or POSTPONED or Defined at some place in PROGRAM. Syntax : CLASSÂ Â DEFINITION DEFERED. It is the keyword which indicates the class definition is delayed or postponed or Defined at some place in program. Syntax : CLASSÂ Â DEFINITION DEFERED. |
|
| 16. |
Can We Instantiate Abstract Class In Ooabap ? |
Answer»
|
|
| 17. |
What Is An Abstract Class In Ooabap ? |
Answer»
|
|
| 18. |
What Is Abstract Method In Ooabap ? |
|
Answer» ABSTRACT METHODS is a METHOD which doesn't CONTAIN any IMPLEMENTATION. Abstract methods is a method which doesn't contain any implementation. |
|
| 19. |
What Is A Constructor Method In Ooabap ? |
Answer»
|
|
| 20. |
How To Declare And Raise Events In Ooabap ? |
|
Answer» We need to follow below steps when working with events in Object Oriented ABAP:
We need to follow below steps when working with events in Object Oriented ABAP: |
|
| 21. |
What Is An Event In Ooabap ? |
|
Answer» EVENT is a MECHANISM by which method of one class can RAISE method of ANOTHER class, without the HAZARD of instantiating that class. Event is a mechanism by which method of one class can raise method of another class, without the hazard of instantiating that class. |
|
| 22. |
What Is A Local Class In Sap ? |
|
Answer» LOCAL CLASSES are DEFINED in an ABAP PROGRAM (Transaction SE38) and can only be USED in the program in which they are defined. Local classes are defined in an ABAP program (Transaction SE38) and can only be used in the program in which they are defined. |
|
| 23. |
What Is A Global Class In Sap ? |
|
Answer» Global classes and interfaces are DEFINED in the Class Builder (TRANSACTION SE24) in the ABAP Workbench.All of the ABAP programs in an R/3 SYSTEM can ACCESS the global classes Global classes and interfaces are defined in the Class Builder (Transaction SE24) in the ABAP Workbench.All of the ABAP programs in an R/3 System can access the global classes |
|
| 24. |
What Is A Singleton Class In Ooabap ? |
|
Answer» SINGLETON CLASS is a class which allows to instantiate(Create OBJECT) only once . Singleton class is a class which allows to instantiate(Create Object) only once . |
|
| 25. |
Can We Declare Events In Interface In Ooabap ? |
|
Answer» Yes, we can declare events in INTERFACE in OBJECT Oriented ABAP Yes, we can declare events in interface in Object Oriented ABAP |
|
| 26. |
Can We Make Methods Of Interface As Abstract And Final In Ooabap ? |
|
Answer» No we can not make interface METHODS as ABSTRACT or final in OBJECT ORIENTED ABAP No we can not make interface methods as abstract or final in Object Oriented ABAP |
|
| 27. |
What Is The Difference Between Singleton And Static Class In Sap Abap ? |
|
Answer» Before going to static classes, you should understand static COMPONENTS.
Before going to static classes, you should understand static components. |
|
| 28. |
What Is A Class In Ooabap? |
|
Answer» CLASS is USER DEFINED data type which CONTAINS methods, EVENTS, attributes, interfaces etc. Class is user defined data type which contains methods, events, attributes, interfaces etc. |
|
| 29. |
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. Instance method is available separately in each object (instance), static method is global and no instance is required for static method. |
|
| 30. |
What Is The Difference In Attributes Defined In The Public Versus Private Section Of A Class? |
|
Answer» PUBLIC attributes can be ACCESSED by class, subclasses and other classes where as PRIVATE attributes can be accessed by class itself only. Public attributes can be accessed by class, subclasses and other classes where as Private attributes can be accessed by class itself only. |
|
| 31. |
What Is A Single-ton Class? |
|
Answer» Single-ton CLASS is a class which ALLOWS to INSTANTIATE once only . Single-ton class is a class which allows to instantiate once only . |
|
| 32. |
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 . No, you can not raise events in interface, Because there is no Implementation for the methods. We can create events in interfaces . |
|
| 33. |
What Is Alias Name In Ooabap? |
|
Answer» ALIAS is an alias NAME for the INTERFACE METHOD IMPLEMENTED in the class . Alias is an alias name for the interface method implemented in the class . |
|
| 34. |
Does Polymorphism Achieved Through Interfaces? |
|
Answer» Yes, by USING INTERFACE CONCEPT in SAP ABAP, we can polymorphism Yes, by using interface concept in SAP ABAP, we can polymorphism |
|
| 35. |
Can We Achieve Multiple Inheritance Using Interfaces? |
|
Answer» Yes, by USING INTERFACE concept in SAP ABAp, we can ACHIEVE multiple inheritance Yes, by using interface concept in SAP ABAp, we can achieve multiple inheritance |
|
| 36. |
Can We Instantiate The Interface? |
|
Answer» No, we can not INSTANTIATE INTERFACE using create OBJECT keyword. No, we can not instantiate interface using create object keyword. |
|
| 37. |
What Is An Interface In Ooabap? |
|
Answer» Interface is CLASS which CONTAINS methods without IMPLEMENTATIONS. Interface is class which contains methods without implementations. |
|
| 38. |
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. No it is not mandatory to implement all normal interface methods but it is mandatory to implement all Abstract methods. |
|