SlideShare a Scribd company logo
1 of 31
1. What is OOPS ABAP ?
Ans:
 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.
Q2. Is It Mandatory To Implement All Methods Of Interface In The Class Which
Includes Interface?
Ans: No it is not mandatory to implement all normal interface methods but it is mandatory
to implement all Abstract methods.
Q3. What Is An Interface In Ooabap?
Ans: Interface is class which contains methods without implementations.
Q4. Can We Instantiate The Interface?
Ans: No, we can not instantiate interface using create object keyword.
Q5.Can We Achieve Multiple Inheritance Using Interfaces?
Ans: Yes, by using interface concept in SAP ABAp, we can achieve multiple inheritance
Q6. Does Polymorphism Achieved Through Interfaces?
Ans: Yes, by using interface concept in SAP ABAP, we can polymorphism
Q7. What Is The Difference Between Abstract Class And Interface?
Ans: 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 .
Q8. What Is Alias Name In Ooabap?
Ans: Alias is an alias name for the interface method implemented in the class .
Q9. Can We Raise Events In Interface?
Ans: No, you can not raise events in interface, Because there is no Implementation for the
methods. We can create events in interfaces .
Q10. What Is A Single-ton Class?
Ans: Single-ton class is a class which allows to instantiate once only .
Q11. What Is The Difference In Attributes Defined In The Public Versus Private Section
Of A Class?
Ans: Public attributes can be accessed by class, subclasses and other classes where as
Private attributes can be accessed by class itself only.
Q12. What is the Difference between Class and Object ?
Ans: A Class is actually a blueprint or a template to create an Object. Whereas an Object
is a an actual instance of a Class. For example Employee ia a class, while John is a real
employee which is an Object of Employee Class.
Q13. How polymorphism can be implemented ?
Ans: Some examples to implement polymorphism:
 Method Overriding
 Method Overloading
 Operator Overloading
Q14. What is Inheritance ?
Ans: In OOPs terminology, inheritance is a way to form new classes using classes that
have already been defined. Inheritance is intended to help reuse existing code with little or
no modification. The new classes, known as derived classes, inherit attributes and behavior
of the pre-existing classes, which are referred to as base classes.
Q15. What is Method Overriding ?
Ans:
 Method overriding allows a subclass to override a specific implementation of a
method that is already provided by one of its super classes.
 A subclass can give its own definition of methods but need to have the same
signature as the method in its super class. This means that when overriding a
method the subclass's method has to have the same name and parameter list as the
super class's overridden method.
Q16. What is Method Overloading ?
Ans: Method overloading is in a class have many methods having same name but different
parameter called overloading or static polymorphism
Q17. What is Aggregation ?
Ans: 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.
Q18. What is object oriented programming language ?
Ans: 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.
Q19. What are the core ABAP oops concepts ?
Ans:
 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.
Q20. Definition: Polymorphism
Ans: 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.
Q21. Definition: Encapsulation
Ans:
 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.
Q22. Definition: Abstraction
Ans: 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.
Q23. What is UML ?
Ans:
 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.
Q24. What are the types of Objects and Classes ?
Ans: In general there are two types of Objects: Instance Object and Static Object and as
such there are two types of Classes: Instance class and Static Class. Specifically when it
comes to visibility, Private class, Protected class and Public classes are the types of
classes one can have.
Q25. What are the types of classes which can be created ?
Ans:
 We can create four types of classes under final and only modeled category(optional)
with the private, protected, public and abstract instantiation.
 Usual Abap Class.
 Exception Class(With/Without messages).
 Persistent Class.
 Test Class(ABAP Unit).
Q26. What are the types of classes which can be created ?
Ans:
 We can create four types of classes under final and only modeled category(optional)
with the private, protected, public and abstract instantiation.
 Usual Abap Class.
 Exception Class(With/Without messages).
 Persistent Class.
 Test Class(ABAP Unit).
Q27. What is a reference variable ?
Ans: 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.
Q28. What is a reference variable ?
Ans: 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.
Q29. What is the difference between Abstract method and a Final method ?
Ans:
 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.
Q30. What is a super class ? How can it be implemented ?
Ans: A super class is a generalization of its subclasses. The subclass in turn is a
specialization of its super classes.
Q31. What is a Narrowing Cast ? How can you implement it ?
Ans: The assignment of a subclass instance to a reference variable of the type "reference
to superclass" is described as a narrowing cast, because you are switching from a more
detailed view to a one with less detail.
Q32. What is a Widening Cast ?
Ans: 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.
Q33. What is a singleton ?
Ans: 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.
Q34. What are the limitations of redefining a method ?
Ans: 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.
Q35. What are static components? What is a component selector ?
Ans: 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.
Q36. What are component instance ?
Ans: A component instance is a running component that can be run in parallel with other
instances of the same component.
Q37. How is Encapsulation implemented in OOPs ?
Ans: Encapsulation means that the implementation of an object is hidden from other
components in the system, so that they cannot make assumptions about the internal status
of the object and therefore dependencies on specific implementations do not arise.
Q38. What are BADIs? What are BADI filters ?
Ans: BADI - Business Add Ins are enhancements to the standard version of the code of
SAP.
Filter Badi- Business Add-Ins may be implemented on the basis of a filter value. If an
enhancement for country-specific versions is provided for in the standard version, it is likely
that different partners will want to implement this enhancement. The individual countries
can create and activate their own implementation.
Q39. What are the types of Exception classes ?
Ans:
 Global
 Local Exceptions Class.
Q40. Where can a protected method be accessed ?
Ans: Protected components Only visible within the class and its sub classes.
Q41. What is a signature of a method ?
Ans:
 Methods have a parameter interface (called signature ) that enables them to receive
values when they are called and pass values back to the calling program.
 In ABAP Objects, methods can have IMPORTING, EXPORTING, CHANGING, and
RETURNING parameters as well as exception parameters.
 CLASS DEFINITION. ... METHODS: [ IMPORTING TYPE EXPORTING TYPE
CHANGING TYPE RETURNING VALUE() TYPE EXCEPTIONS RAISING ].
ENDCLASS.(signature of a method). CLASS IMPLEMENTATION. METHOD . ...
ENDMETHOD. ENDCLASS.
Q42. What is a functional Method ?
Ans: Methods that have a RETURNING parameter are described as functional methods.
These methods cannot have EXPORTING or CHANGING parameters, but has many (or as
few) IMPORTING parameters and exceptions as required.
Q43. What is a de-referenced variable ? What is a garbage collector ?
Ans: To go to an address before performing the operation a dereference variable is a
pointer to the variable, not the variable itself. A pointer can be re-assigned any number of
times while a reference cannot be reassigned after initialization. Field symbols are similar
to dereference pointers. Thus, you can only access the content of the data object to which
the field symbol points. (That is, field symbols use value semantics). If you want to access
the content of the data object, you need to dereference the data reference first.
Q44. Can a class be defined without a constructor ?
Ans: Yes, class can be created without any constructor. Default constructor will be created
when we define a class without constructor.
Q45. What Is The Difference In An Instance Method And A Static Method?
Ans: Instance method is available separately in each object (instance), static method is
global and no instance is required for static method.
once .
Q46. What Is A Class In Ooabap?
Ans: Class is user defined data type which contains methods, events, attributes, interfaces
etc.
Q47. What Is The Difference Between Singleton And Static Class In Sap Abap ?
Ans: Before going to static classes, you should understand static components.
 Static Components: Static components (static attributes, static events and static
methods) exists globally, no need to create object/instance of the class to access
them, we can access them by using static component selector => .
 Static Class: A class that only contains static components and no instance
components is referred to as a static class.
 Singleton Class: It is a class which does not allow you to create multiple instances.
Q48. Can We Make Methods Of Interface As Abstract And Final In Ooabap ?
Ans: No we can not make interface methods as abstract or final in Object Oriented ABAP
Q49. Can We Declare Events In Interface In Ooabap ?
Ans: Yes, we can declare events in interface in Object Oriented ABAP
Q50. What Is A Singleton Class In Ooabap ?
Ans: Singleton class is a class which allows to instantiate(Create Object) only
Q51. What Is A Global Class In Sap ?
Ans: 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
Q52. What Is A Local Class In Sap ?
Ans: Local classes are defined in an ABAP program (Transaction SE38) and can only be
used in the program in which they are defined.
Q53. What Is An Event In Ooabap ?
Ans: Event is a mechanism by which method of one class can raise method of another
class, without the hazard of instantiating that class.
Q54. How To Declare And Raise Events In Ooabap ?
Ans: We need to follow below steps when working with events in Object Oriented
ABAP:
 Define an event
 Define a method
 Link event and method and convert the method into event-handler method
 Create a triggering method which will raise the event
 Use set handler and register event handler method to a particular instance in the
program
Q55. What Is A Constructor Method In Ooabap ?
Ans:
 These are special type of methods
 constructor method is executed automatically whenever a object is created or
instantiated
 These methods are mainly used to set default values in a class
 The name of the constructor method is 'constructor'
 These methods have only importing parameters
 There are no exporting parameters
Q56. What Is Abstract Method In Ooabap ?
Ans: Abstract methods is a method which doesn't contain any implementation.
Q57. What Is An Abstract Class In Ooabap ?
Ans:
 It is a class which contains methods with implementation as well as methods without
implementation .
 Abstract class is a class which contains at least one abstract method.
Q58. Can We Instantiate Abstract Class In Ooabap ?
Ans:
 we cannot create an object to the abstract class instead create an object to the child
class and call the methods .
 Abstract class are mainly used for creating inheritance.
Q59. What Is The Use Of 'defination Deferred' Keyword In Ooabap ?
Ans: It is the keyword which indicates the class definition is delayed or postponed or
Defined at some place in program.
Syntax : CLASSÂ Â DEFINITION DEFERED.
Q60. What Are The Advantages Of Oo Alv ?
Ans: Some of the main advantages of Object Oriented ALV
 We have no of events available in the classes when compared to ALV with function
modules which gives 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 custom container with which we can
control the size of 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 ALV grid data.
Q61. What Are The Types Of Constructor's In Ooabap ? Explain ?
Ans: CONSTRUCTOR's are special type of methods, constructor method is executed
automatically whenever a object is created or instantiated.
 Constructor: This method is executed automatically whenever object is created,
this is used to set default values with respect to instance/object. The name of the
constructor method is CONSTRUCTOR.
 Static Constructor: This method is executed automatically whenever object is
created, this is used to set default values globally irrespective of
instances/objects.The name of the static constructor is CLASS_ CONSTRUCTOR.
Q62. What Is A Polymorphism In Ooabap ?
Ans: 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.
Q63. Can We Defined A Class Without A Constructor In Ooabap ?
Ans: Yes, class can be created without any constructor. Default constructor will be created
when we define a class without constructor.
Q64. What Is A Friend Class?
Ans: Friend class is a class it can access private components of it’s friends class.
Q65. What Is Alias?
Ans: Instead of specifying full name of interface methods, we can assign it a name which
can directly trigger.
Q66. What Is Me Variable?
Ans: It just like a selfreference, by this we can call methods that are with in same class with
out creating object.
Q67. How To A Create Object For The Class?
Ans:
Data: ref type ref to .
Create object ref.
Q68. How To Call A Method?
Ans: Call method ref>method_name .
Q69. What Are The Differences Local & Global Classes?
Ans:
 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).
Q70. What Is The Difference Between Function Group And Classes?
Ans: We can create many instances of the same class with in a program, but we cannot
create many instances of function group.
Q71. How Many Types Of Classes Are There In Ooabap?
Ans:
 Public class
 Private class
 Final class
 Singleton class
 Abstract class
 Persistent class
 Friend class
Q72. How To Define A Class Locally?
Ans:
class <cl_name> definition.
Public section.
Methods: m1 importing p1 type
Exporting p2 type
Changing p3 type
Returning p4 type
Exceptions
Protected section
Private section
Endclass
Class <c1_name> implementation.
Method m1.
Endmethod.
Endclass
Q73. How To Create An Object For Private Class?
Ans: 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.
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.
SAP Adobe Forms Interview
Questions And Answers
Q1. What is Adobe form?
Ans: PDF stands for Portable Document Format. Definition: It is a Universal file
format developed by Adobe that preserves all the fonts, formatting, graphics, and
color of any source document, regardless of the application and platform used to
create it.
Q2. What are components of SAP Script?
Ans:Layout Set, Form, Print Program, Function Modules.
Q3. What are components of Layout Set?
Ans: Header Data, Page, Page Windows, Windows, Paragraph Format, Character
Q4. What is SAP Smart Forms?
Answer :SAP Smart Forms is used to create and maintain forms for mass printing
in SAP Systems.As output medium SAP Smart Forms support a printer, a fax, e-
mail, or the Internet (by using the generated XML output). SAP introduced
SmartForms in 1998 to overcome the limitations in SAP Scripts Format.
Q5. What is interactive form?
Ans:An interactive form is a data-gathering window containing multiple questions
that interactively change based on user input. In other words, a user’s response to
one question may cause one or more additional questions to be added to the
window.
Q6. How to display a logo dynamically in the Adobe Forms?
Ans. To display a logo dynamically, we will have to upload it first into SAP using
transaction SE78. This transaction will store this logo internally into a table
“stxbitmaps”.
After uploading the logo we will have to create an interface and we will define two
global variables there. Let’s say V1 type XSTRING and V2 type STRING (default
value ‘imagebmp’). In Code initialization section we will have to write a simple query
to fetch the logo from the table above by providing the log name. Then we will have
to call a method cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp and pass on
tdobject, tdname, tdid and tdbyte fetched from the query. This method is going to
return a XSTRING type variable which we will move to the global variable V1
defined already.
After this step we have to create a Form and assign the interface created above to
it. In the right side pane under the context tab, we have to create a graphic node.
Select the graphic node and in the properties section make the Graphic Type as
Graphic Content. Save it and drag V1 (from the left pane under the Global Data
node) to the Field property of the Graphic and V2 (from the left pane under the
Global Data node) to the MIME Type property of the form. Under the Layout tab
create an image field and bind it with graphic node created. Save and activate.
Execute the form. This will display an image dynamically.
Q7. What needs to be done to convert the static text in the form layout to a
different language?
Ans.
 Go to transaction code SFP.
 Enter your form name and hit display.
 Now go to menu Goto -> Translation.
 Give Original Language as EN and Target Language as whatever
language you want to convert the static text into and hit enter.
 You will find two objects TLGS and PDFB.
 Double click on the form under PDFB tag.
 Go to menu Utilities -> Expand Tags.
 You will find vertically cascaded windows for source text and target text.
 Under the target text press copy source text button. This will copy
everything defined as static text in the layout to target text.
 Now here we can convert the text into the respective language.
 Once done, save and activate the changes.
 Come out and execute the form in whatever language you want. Make
sure to input the language in LA field of /1BCDWB/DOCPARAMS input
table.
 Execute and see the output.
Q8. What Is Lock Object?
Answer :To synchronize access of several users using same data Lock objects are
used.
Q9. What Are The Types Of Subroutines?
Answer :
Internal Subroutines: The source code of the internal subroutines will be in the
same ABAP/4 program as the calling procedure (internal call).
External Subroutines: The source code of the external subroutines will be in an
ABAP/4 program other than the calling procedure.
Q10. How to create a form object?
Answer:
Creating a Form Object
Creating a Form Object in the Repository Browser.
You are in the Repository Browser of the ABAP Workbench.
Select a package.
To create a form interface, proceed as follows:
1.In the context menu of the package, choose
Create -> Form Object -> Interface.
2.Enter the name of the interface in the Create Interface dialog box.
To create a form with a context and layout, proceed as follows:
1.In the context menu of the package, choose
Create -> Form Object -> Form.
2.Enter the name of the form in the Create Form dialog box.
3.Enter the name of the interface that you want the form to use.
4.Choose Save.
5.The Create Object Directory Entry dialog box appears.
6.Enter your data and save the object.
Advanced SAP Adobe Forms Interview and Answers
Q11. List the components involved in creation of Adobe Forms.
And: The components involved in creation of Adobe Forms are Layout, Context and
Interface.
Q12. Can we use the same interface in multiple Adobe Forms?
Ans: Yes, we can use same interface in multiple Adobe Forms.
Q13. What are the Scripting languages available in Adobe Forms?
And: There are 2 languages available JavaScript and FormCalc.
Q14. Which type of data processing is supported in PDF forms?
Ans: Client side data processing is supported in PDF forms.
Q15. What are the advantages of Adobe Forms?
Ans:
1. Flexible tool for designing the form(WYSIWYG Editor)
2. Graphics can be included in the form directly. No conversion is
required.
3. Different page orientation like in smartforms. Existing PDF or word
document can be imported
4. Barcodes can be printed on all printers of types Postscript, PCL, PDF,
or Zebra.
5. Form are regular repository objects and has version management.
6. Forms can be integrated in the browser based environment and made
interactive.
Q16. What is smartform?
Answer
Smart Forms are printing forms used to print Invoice and purchase order forms etc.
We are calling smartforms from ABAP programs then spools are generated, now
smartform ready to be printed.
SMARTFORMS is the transaction to design the smart form layout.
SMARTSTYLES are used to define paragraph and character formats (fonts,
barcodes, etc.)
Q17. How can you make the Smartforms to choose a printer name by default?
Answer
In the CALL FUNCTION of the Smartform Function Module, set the output options
parameter to set the printer name.
The output options is of the type SSFCOMPOP which contains the field TDDEST.
Set the TDDEST field to your default printer name.
Q18. Where can I provide the input parameters to the smartform?
The input parameters for the smartform can be defined in Global Settings->Form
Interface.
The Associated Type must be defined in the ABAP Dictionary.
Q19. How are conditions used in the adobe forms?
Ans. Suppose you want to display a particular text module in case if language you
pass is EN in the input parameter. For this follow the steps below
1. Go to transaction SFP and create a form.
2. In the context tab, create a Text and assign a Text Module to it (created
under smartforms transaction) under its properties.
3. Click on conditions button and add a row using + button. Give the
Import parameter name as EX_LANGU (language parameter in my
example) under first OPERAND and ‘EN’ under second OPERAND as
shown.
1. Save and activate the form.
2. Execute it by passing EN as language parameter. This time the text
module will be displayed. If you execute it by passing FR as language
parameter, the text module won’t display on the form output this time
Q20. Types of Form layout
Answer:
Live Cycle Designer offers two types of form layout techniques for you to work
with:
Static layout : These forms have fixed layouts. When presented to the end user,
the form retains its original layout, regardless of the amount of data available to fill
the form.
Dynamic layout : A form with a dynamic layout is designed to expand or shrink
according to the amount of data available to fill it.
Frequently Asked SAP Adobe Forms Interview Questions and
Answers
Q21. What’s in a form design?
Answer:
The following key components make up a form design:
1.Master pages
2.Body pages
3.Content areas
4.Subforms
5.Fields
6.Boilerplate objects
Q22. What is master pages in form design?
Answer: Every form design contains at least one master page that Live Cycle
Designer creates automatically. Master pages define the orientation and dimensions
of body pages. Master pages are responsible for formatting body pages. Provide a
background and layout format for more than one of the body pages in a form design.
Each master page is created with a default content area that covers the whole page.
Q23. What is body pages in form design?
Answer: Body pages
 Body pages represent the pages of a form.
 Each body page derives its page size and orientation from a master
page.
 Each body page is associated with the default master page that
LiveCycle Designer creates.
 You can choose which master page to assign to a body page.
Q24. What are subforms in form design?
Answer: Sub Forms
 Subforms are container objects that you can use to group form design
objects including: fields,address,images etc.
 A subform provides anchoring, layout, and geometry management for
objects.
 You can also configure subform objects to be repeatable.
Q25. What are the uses of Form Interface?
Answer:
1. In the form interface, you specify the data that is exchanged with the
application program (such as tables, structures, work areas).
2. Under Global Definitions, you define your own fields, variables etc.
3. The system fields contain data with a predefined meaning (such as the
date).
Q26. Prerequisites to learn SAP Adobe forms
Ans: No knowledge or experience is required to learn SAP Adobe forms, but the
basic knowledge of SAP adds an advantage to learn adobe forms.
Q27. How information is allocated in bunch table?
Ans:
A bunch table contains information from numerous DDIC tables. It stores data as
name esteem combine.
Q28. What are the sorts of Subroutines?
Ans:
1. Interior Subroutines: The source code of the inner subroutines will be in the same
ABAP/4 program as the calling method (inward call).
2. Outside Subroutines: The source code of the outer subroutines will be in an
ABAP/4 program other than the calling strategy.
Q29. Are SAP Scripts client dependent or independent?
Ans:
Standard scripts are client independent
User defined scripts are client dependent.
Q30. How do I create an Adobe form?
Answer:
To create fillable PDF files:
1. Open Acrobat:
2. Click on the “Tools” tab and select “Prepare Form.”
3. Select a file or scan a document:
4. Acrobat will automatically analyze your document and add form fields.
5. Add new form fields:
6. Use the top toolbar and adjust the layout using tools in the right pane.
7. Save your fillable PDF:
8. You can also share it with others or click Distribute to collect responses
automatically.
SAP Adobe Forms Interview Questions For Experienced
Q31. What is a function group?
Answer:
A function group is a program that contains function modules.Each function group is
identified by a four-character identifier called a function group ID.
Q32. Which are the components of function group?
Answer:
1. A main program.
2. A top include.
3. A UXX include.
4. A function module include.
Q33. What is MVC in WebDynpro ABAP?
Answer:
Basically WebDynpro follows MVC M-Model(Business logic ) V-View(Screen) C-
Controller( Controls screen and Model).
Q34. What is a context in WebDynpro ABAP?
Answer:
Context is a temporary place which stores data in the form of nodes and attributes.
Q35. What Is Sap Style Maintenance?
Answer :
SAP style maintenance is a collection of character & paragraph format.
Q36. How Can You Format The Data Before Write Statement In The Report?
Answer :
By using the loop event the reports output can be formatted
.at first
.at new
.at last
Q37. What Is The Difference Between A ‘database Index’ And A ‘match Code’?
Answer :
Database Index’ contains fields from one table while ‘Match Code’ contain fields
from several tables. Match code objects can be built on cluster tables, transparent
tables and pooled tables.

More Related Content

What's hot

SAP ABAP Interview questions
SAP ABAP Interview questionsSAP ABAP Interview questions
SAP ABAP Interview questionsIT LearnMore
 
0104 abap dictionary
0104 abap dictionary0104 abap dictionary
0104 abap dictionaryvkyecc1
 
SAP Fiori Interview Q& A - IQ Online Training
SAP Fiori Interview Q& A - IQ Online TrainingSAP Fiori Interview Q& A - IQ Online Training
SAP Fiori Interview Q& A - IQ Online TrainingIQ Online Training
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questionsKranthi Kumar
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modificationsscribid.download
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IIAshish Saxena
 
Technical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part ITechnical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part IAshish Saxena
 
Sap Abap Reports
Sap Abap ReportsSap Abap Reports
Sap Abap Reportsvbpc
 
ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infosapdocs. info
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONKranthi Kumar
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAPsapdocs. info
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overviewsapdocs. info
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systemsKranthi Kumar
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.docKranthi Kumar
 
Module-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdfModule-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdfSuman817957
 

What's hot (20)

SAP ABAP Interview questions
SAP ABAP Interview questionsSAP ABAP Interview questions
SAP ABAP Interview questions
 
0104 abap dictionary
0104 abap dictionary0104 abap dictionary
0104 abap dictionary
 
SAP Fiori Interview Q& A - IQ Online Training
SAP Fiori Interview Q& A - IQ Online TrainingSAP Fiori Interview Q& A - IQ Online Training
SAP Fiori Interview Q& A - IQ Online Training
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
 
SAP-ABAP/4@e_max
SAP-ABAP/4@e_maxSAP-ABAP/4@e_max
SAP-ABAP/4@e_max
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part II
 
Technical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part ITechnical Overview of CDS View – SAP HANA Part I
Technical Overview of CDS View – SAP HANA Part I
 
Sap Abap Reports
Sap Abap ReportsSap Abap Reports
Sap Abap Reports
 
ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.info
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAP
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
Sap abap
Sap abapSap abap
Sap abap
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systems
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
Reports
ReportsReports
Reports
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
 
Module-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdfModule-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdf
 
ABAP Advanced List
ABAP Advanced ListABAP Advanced List
ABAP Advanced List
 

Similar to OOPS ABAP.docx

OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.Questpond
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingmustafa sarac
 
EEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerEEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerJeba Moses
 
Data Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersData Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersSatyam Jaiswal
 
Object Oriented Programing JAVA presentaion
Object Oriented Programing JAVA presentaionObject Oriented Programing JAVA presentaion
Object Oriented Programing JAVA presentaionPritom Chaki
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsGaruda Trainings
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oopcolleges
 
software engineer interview questions.pdf
software engineer interview questions.pdfsoftware engineer interview questions.pdf
software engineer interview questions.pdfRaajpootQueen
 
Abstraction in java [abstract classes and Interfaces
Abstraction in java [abstract classes and InterfacesAbstraction in java [abstract classes and Interfaces
Abstraction in java [abstract classes and InterfacesAhmed Nobi
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questionssatish reddy
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questionssatish reddy
 
Java OOPs Concepts.docx
Java OOPs Concepts.docxJava OOPs Concepts.docx
Java OOPs Concepts.docxFredWauyo
 

Similar to OOPS ABAP.docx (20)

OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
EEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerEEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answer
 
Unusual C# - OOP
Unusual C# - OOPUnusual C# - OOP
Unusual C# - OOP
 
C++ interview question
C++ interview questionC++ interview question
C++ interview question
 
Data Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersData Structure Interview Questions & Answers
Data Structure Interview Questions & Answers
 
Object Oriented Programing JAVA presentaion
Object Oriented Programing JAVA presentaionObject Oriented Programing JAVA presentaion
Object Oriented Programing JAVA presentaion
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
 
software engineer interview questions.pdf
software engineer interview questions.pdfsoftware engineer interview questions.pdf
software engineer interview questions.pdf
 
Core java questions
Core java questionsCore java questions
Core java questions
 
Abstraction in java [abstract classes and Interfaces
Abstraction in java [abstract classes and InterfacesAbstraction in java [abstract classes and Interfaces
Abstraction in java [abstract classes and Interfaces
 
General oops concepts
General oops conceptsGeneral oops concepts
General oops concepts
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
 
Android interview questions
Android interview questionsAndroid interview questions
Android interview questions
 
Java OOPs Concepts.docx
Java OOPs Concepts.docxJava OOPs Concepts.docx
Java OOPs Concepts.docx
 
Intervies
InterviesIntervies
Intervies
 
JAVA-PPT'S.pdf
JAVA-PPT'S.pdfJAVA-PPT'S.pdf
JAVA-PPT'S.pdf
 
Java interview
Java interviewJava interview
Java interview
 

Recently uploaded

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Recently uploaded (20)

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

OOPS ABAP.docx

  • 1. 1. What is OOPS ABAP ? Ans:  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. Q2. Is It Mandatory To Implement All Methods Of Interface In The Class Which Includes Interface? Ans: No it is not mandatory to implement all normal interface methods but it is mandatory to implement all Abstract methods. Q3. What Is An Interface In Ooabap? Ans: Interface is class which contains methods without implementations. Q4. Can We Instantiate The Interface? Ans: No, we can not instantiate interface using create object keyword. Q5.Can We Achieve Multiple Inheritance Using Interfaces? Ans: Yes, by using interface concept in SAP ABAp, we can achieve multiple inheritance Q6. Does Polymorphism Achieved Through Interfaces? Ans: Yes, by using interface concept in SAP ABAP, we can polymorphism
  • 2. Q7. What Is The Difference Between Abstract Class And Interface? Ans: 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 . Q8. What Is Alias Name In Ooabap? Ans: Alias is an alias name for the interface method implemented in the class . Q9. Can We Raise Events In Interface? Ans: No, you can not raise events in interface, Because there is no Implementation for the methods. We can create events in interfaces . Q10. What Is A Single-ton Class? Ans: Single-ton class is a class which allows to instantiate once only . Q11. What Is The Difference In Attributes Defined In The Public Versus Private Section Of A Class? Ans: Public attributes can be accessed by class, subclasses and other classes where as Private attributes can be accessed by class itself only. Q12. What is the Difference between Class and Object ? Ans: A Class is actually a blueprint or a template to create an Object. Whereas an Object is a an actual instance of a Class. For example Employee ia a class, while John is a real employee which is an Object of Employee Class. Q13. How polymorphism can be implemented ? Ans: Some examples to implement polymorphism:  Method Overriding  Method Overloading
  • 3.  Operator Overloading Q14. What is Inheritance ? Ans: In OOPs terminology, inheritance is a way to form new classes using classes that have already been defined. Inheritance is intended to help reuse existing code with little or no modification. The new classes, known as derived classes, inherit attributes and behavior of the pre-existing classes, which are referred to as base classes. Q15. What is Method Overriding ? Ans:  Method overriding allows a subclass to override a specific implementation of a method that is already provided by one of its super classes.  A subclass can give its own definition of methods but need to have the same signature as the method in its super class. This means that when overriding a method the subclass's method has to have the same name and parameter list as the super class's overridden method. Q16. What is Method Overloading ? Ans: Method overloading is in a class have many methods having same name but different parameter called overloading or static polymorphism Q17. What is Aggregation ? Ans: 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. Q18. What is object oriented programming language ? Ans: 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. Q19. What are the core ABAP oops concepts ? Ans:
  • 4.  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. Q20. Definition: Polymorphism Ans: 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. Q21. Definition: Encapsulation Ans:  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. Q22. Definition: Abstraction Ans: 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. Q23. What is UML ? Ans:  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.
  • 5. Q24. What are the types of Objects and Classes ? Ans: In general there are two types of Objects: Instance Object and Static Object and as such there are two types of Classes: Instance class and Static Class. Specifically when it comes to visibility, Private class, Protected class and Public classes are the types of classes one can have. Q25. What are the types of classes which can be created ? Ans:  We can create four types of classes under final and only modeled category(optional) with the private, protected, public and abstract instantiation.  Usual Abap Class.  Exception Class(With/Without messages).  Persistent Class.  Test Class(ABAP Unit). Q26. What are the types of classes which can be created ? Ans:  We can create four types of classes under final and only modeled category(optional) with the private, protected, public and abstract instantiation.  Usual Abap Class.  Exception Class(With/Without messages).  Persistent Class.  Test Class(ABAP Unit). Q27. What is a reference variable ? Ans: 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. Q28. What is a reference variable ? Ans: 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. Q29. What is the difference between Abstract method and a Final method ? Ans:
  • 6.  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. Q30. What is a super class ? How can it be implemented ? Ans: A super class is a generalization of its subclasses. The subclass in turn is a specialization of its super classes. Q31. What is a Narrowing Cast ? How can you implement it ? Ans: The assignment of a subclass instance to a reference variable of the type "reference to superclass" is described as a narrowing cast, because you are switching from a more detailed view to a one with less detail. Q32. What is a Widening Cast ? Ans: 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. Q33. What is a singleton ? Ans: 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. Q34. What are the limitations of redefining a method ? Ans: 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.
  • 7. Q35. What are static components? What is a component selector ? Ans: 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. Q36. What are component instance ? Ans: A component instance is a running component that can be run in parallel with other instances of the same component. Q37. How is Encapsulation implemented in OOPs ? Ans: Encapsulation means that the implementation of an object is hidden from other components in the system, so that they cannot make assumptions about the internal status of the object and therefore dependencies on specific implementations do not arise. Q38. What are BADIs? What are BADI filters ? Ans: BADI - Business Add Ins are enhancements to the standard version of the code of SAP. Filter Badi- Business Add-Ins may be implemented on the basis of a filter value. If an enhancement for country-specific versions is provided for in the standard version, it is likely that different partners will want to implement this enhancement. The individual countries can create and activate their own implementation. Q39. What are the types of Exception classes ? Ans:  Global  Local Exceptions Class. Q40. Where can a protected method be accessed ? Ans: Protected components Only visible within the class and its sub classes. Q41. What is a signature of a method ? Ans:  Methods have a parameter interface (called signature ) that enables them to receive values when they are called and pass values back to the calling program.
  • 8.  In ABAP Objects, methods can have IMPORTING, EXPORTING, CHANGING, and RETURNING parameters as well as exception parameters.  CLASS DEFINITION. ... METHODS: [ IMPORTING TYPE EXPORTING TYPE CHANGING TYPE RETURNING VALUE() TYPE EXCEPTIONS RAISING ]. ENDCLASS.(signature of a method). CLASS IMPLEMENTATION. METHOD . ... ENDMETHOD. ENDCLASS. Q42. What is a functional Method ? Ans: Methods that have a RETURNING parameter are described as functional methods. These methods cannot have EXPORTING or CHANGING parameters, but has many (or as few) IMPORTING parameters and exceptions as required. Q43. What is a de-referenced variable ? What is a garbage collector ? Ans: To go to an address before performing the operation a dereference variable is a pointer to the variable, not the variable itself. A pointer can be re-assigned any number of times while a reference cannot be reassigned after initialization. Field symbols are similar to dereference pointers. Thus, you can only access the content of the data object to which the field symbol points. (That is, field symbols use value semantics). If you want to access the content of the data object, you need to dereference the data reference first. Q44. Can a class be defined without a constructor ? Ans: Yes, class can be created without any constructor. Default constructor will be created when we define a class without constructor. Q45. What Is The Difference In An Instance Method And A Static Method? Ans: Instance method is available separately in each object (instance), static method is global and no instance is required for static method. once . Q46. What Is A Class In Ooabap? Ans: Class is user defined data type which contains methods, events, attributes, interfaces etc. Q47. What Is The Difference Between Singleton And Static Class In Sap Abap ? Ans: Before going to static classes, you should understand static components.
  • 9.  Static Components: Static components (static attributes, static events and static methods) exists globally, no need to create object/instance of the class to access them, we can access them by using static component selector => .  Static Class: A class that only contains static components and no instance components is referred to as a static class.  Singleton Class: It is a class which does not allow you to create multiple instances. Q48. Can We Make Methods Of Interface As Abstract And Final In Ooabap ? Ans: No we can not make interface methods as abstract or final in Object Oriented ABAP Q49. Can We Declare Events In Interface In Ooabap ? Ans: Yes, we can declare events in interface in Object Oriented ABAP Q50. What Is A Singleton Class In Ooabap ? Ans: Singleton class is a class which allows to instantiate(Create Object) only Q51. What Is A Global Class In Sap ? Ans: 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 Q52. What Is A Local Class In Sap ? Ans: Local classes are defined in an ABAP program (Transaction SE38) and can only be used in the program in which they are defined. Q53. What Is An Event In Ooabap ? Ans: Event is a mechanism by which method of one class can raise method of another class, without the hazard of instantiating that class. Q54. How To Declare And Raise Events In Ooabap ? Ans: We need to follow below steps when working with events in Object Oriented ABAP:  Define an event  Define a method  Link event and method and convert the method into event-handler method
  • 10.  Create a triggering method which will raise the event  Use set handler and register event handler method to a particular instance in the program Q55. What Is A Constructor Method In Ooabap ? Ans:  These are special type of methods  constructor method is executed automatically whenever a object is created or instantiated  These methods are mainly used to set default values in a class  The name of the constructor method is 'constructor'  These methods have only importing parameters  There are no exporting parameters Q56. What Is Abstract Method In Ooabap ? Ans: Abstract methods is a method which doesn't contain any implementation. Q57. What Is An Abstract Class In Ooabap ? Ans:  It is a class which contains methods with implementation as well as methods without implementation .  Abstract class is a class which contains at least one abstract method. Q58. Can We Instantiate Abstract Class In Ooabap ? Ans:  we cannot create an object to the abstract class instead create an object to the child class and call the methods .  Abstract class are mainly used for creating inheritance. Q59. What Is The Use Of 'defination Deferred' Keyword In Ooabap ? Ans: It is the keyword which indicates the class definition is delayed or postponed or Defined at some place in program. Syntax : CLASSÂ Â DEFINITION DEFERED.
  • 11. Q60. What Are The Advantages Of Oo Alv ? Ans: Some of the main advantages of Object Oriented ALV  We have no of events available in the classes when compared to ALV with function modules which gives 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 custom container with which we can control the size of 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 ALV grid data. Q61. What Are The Types Of Constructor's In Ooabap ? Explain ? Ans: CONSTRUCTOR's are special type of methods, constructor method is executed automatically whenever a object is created or instantiated.  Constructor: This method is executed automatically whenever object is created, this is used to set default values with respect to instance/object. The name of the constructor method is CONSTRUCTOR.  Static Constructor: This method is executed automatically whenever object is created, this is used to set default values globally irrespective of instances/objects.The name of the static constructor is CLASS_ CONSTRUCTOR. Q62. What Is A Polymorphism In Ooabap ? Ans: 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. Q63. Can We Defined A Class Without A Constructor In Ooabap ? Ans: Yes, class can be created without any constructor. Default constructor will be created when we define a class without constructor. Q64. What Is A Friend Class? Ans: Friend class is a class it can access private components of it’s friends class. Q65. What Is Alias?
  • 12. Ans: Instead of specifying full name of interface methods, we can assign it a name which can directly trigger. Q66. What Is Me Variable? Ans: It just like a selfreference, by this we can call methods that are with in same class with out creating object. Q67. How To A Create Object For The Class? Ans: Data: ref type ref to . Create object ref. Q68. How To Call A Method? Ans: Call method ref>method_name . Q69. What Are The Differences Local & Global Classes? Ans:  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). Q70. What Is The Difference Between Function Group And Classes? Ans: We can create many instances of the same class with in a program, but we cannot create many instances of function group. Q71. How Many Types Of Classes Are There In Ooabap? Ans:  Public class  Private class  Final class
  • 13.  Singleton class  Abstract class  Persistent class  Friend class Q72. How To Define A Class Locally? Ans: class <cl_name> definition. Public section. Methods: m1 importing p1 type Exporting p2 type Changing p3 type Returning p4 type Exceptions Protected section Private section Endclass Class <c1_name> implementation. Method m1. Endmethod. Endclass Q73. How To Create An Object For Private Class? Ans: 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. SAP OOPS ABAP Interview Questions And Answers
  • 14. 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?
  • 15. 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:
  • 16. 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 ?
  • 17. 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.
  • 18. 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?
  • 19. 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
  • 20. 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 ?
  • 21. 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.
  • 22. SAP Adobe Forms Interview Questions And Answers Q1. What is Adobe form? Ans: PDF stands for Portable Document Format. Definition: It is a Universal file format developed by Adobe that preserves all the fonts, formatting, graphics, and color of any source document, regardless of the application and platform used to create it. Q2. What are components of SAP Script? Ans:Layout Set, Form, Print Program, Function Modules. Q3. What are components of Layout Set? Ans: Header Data, Page, Page Windows, Windows, Paragraph Format, Character Q4. What is SAP Smart Forms? Answer :SAP Smart Forms is used to create and maintain forms for mass printing in SAP Systems.As output medium SAP Smart Forms support a printer, a fax, e- mail, or the Internet (by using the generated XML output). SAP introduced SmartForms in 1998 to overcome the limitations in SAP Scripts Format. Q5. What is interactive form? Ans:An interactive form is a data-gathering window containing multiple questions that interactively change based on user input. In other words, a user’s response to one question may cause one or more additional questions to be added to the window. Q6. How to display a logo dynamically in the Adobe Forms? Ans. To display a logo dynamically, we will have to upload it first into SAP using transaction SE78. This transaction will store this logo internally into a table “stxbitmaps”.
  • 23. After uploading the logo we will have to create an interface and we will define two global variables there. Let’s say V1 type XSTRING and V2 type STRING (default value ‘imagebmp’). In Code initialization section we will have to write a simple query to fetch the logo from the table above by providing the log name. Then we will have to call a method cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp and pass on tdobject, tdname, tdid and tdbyte fetched from the query. This method is going to return a XSTRING type variable which we will move to the global variable V1 defined already. After this step we have to create a Form and assign the interface created above to it. In the right side pane under the context tab, we have to create a graphic node. Select the graphic node and in the properties section make the Graphic Type as Graphic Content. Save it and drag V1 (from the left pane under the Global Data node) to the Field property of the Graphic and V2 (from the left pane under the Global Data node) to the MIME Type property of the form. Under the Layout tab create an image field and bind it with graphic node created. Save and activate. Execute the form. This will display an image dynamically. Q7. What needs to be done to convert the static text in the form layout to a different language? Ans.  Go to transaction code SFP.  Enter your form name and hit display.  Now go to menu Goto -> Translation.  Give Original Language as EN and Target Language as whatever language you want to convert the static text into and hit enter.  You will find two objects TLGS and PDFB.  Double click on the form under PDFB tag.  Go to menu Utilities -> Expand Tags.  You will find vertically cascaded windows for source text and target text.  Under the target text press copy source text button. This will copy everything defined as static text in the layout to target text.  Now here we can convert the text into the respective language.  Once done, save and activate the changes.  Come out and execute the form in whatever language you want. Make sure to input the language in LA field of /1BCDWB/DOCPARAMS input table.  Execute and see the output. Q8. What Is Lock Object?
  • 24. Answer :To synchronize access of several users using same data Lock objects are used. Q9. What Are The Types Of Subroutines? Answer : Internal Subroutines: The source code of the internal subroutines will be in the same ABAP/4 program as the calling procedure (internal call). External Subroutines: The source code of the external subroutines will be in an ABAP/4 program other than the calling procedure. Q10. How to create a form object? Answer: Creating a Form Object Creating a Form Object in the Repository Browser. You are in the Repository Browser of the ABAP Workbench. Select a package. To create a form interface, proceed as follows: 1.In the context menu of the package, choose Create -> Form Object -> Interface. 2.Enter the name of the interface in the Create Interface dialog box. To create a form with a context and layout, proceed as follows: 1.In the context menu of the package, choose Create -> Form Object -> Form. 2.Enter the name of the form in the Create Form dialog box. 3.Enter the name of the interface that you want the form to use. 4.Choose Save. 5.The Create Object Directory Entry dialog box appears. 6.Enter your data and save the object. Advanced SAP Adobe Forms Interview and Answers
  • 25. Q11. List the components involved in creation of Adobe Forms. And: The components involved in creation of Adobe Forms are Layout, Context and Interface. Q12. Can we use the same interface in multiple Adobe Forms? Ans: Yes, we can use same interface in multiple Adobe Forms. Q13. What are the Scripting languages available in Adobe Forms? And: There are 2 languages available JavaScript and FormCalc. Q14. Which type of data processing is supported in PDF forms? Ans: Client side data processing is supported in PDF forms. Q15. What are the advantages of Adobe Forms? Ans: 1. Flexible tool for designing the form(WYSIWYG Editor) 2. Graphics can be included in the form directly. No conversion is required. 3. Different page orientation like in smartforms. Existing PDF or word document can be imported 4. Barcodes can be printed on all printers of types Postscript, PCL, PDF, or Zebra. 5. Form are regular repository objects and has version management. 6. Forms can be integrated in the browser based environment and made interactive. Q16. What is smartform? Answer Smart Forms are printing forms used to print Invoice and purchase order forms etc. We are calling smartforms from ABAP programs then spools are generated, now smartform ready to be printed. SMARTFORMS is the transaction to design the smart form layout.
  • 26. SMARTSTYLES are used to define paragraph and character formats (fonts, barcodes, etc.) Q17. How can you make the Smartforms to choose a printer name by default? Answer In the CALL FUNCTION of the Smartform Function Module, set the output options parameter to set the printer name. The output options is of the type SSFCOMPOP which contains the field TDDEST. Set the TDDEST field to your default printer name. Q18. Where can I provide the input parameters to the smartform? The input parameters for the smartform can be defined in Global Settings->Form Interface. The Associated Type must be defined in the ABAP Dictionary. Q19. How are conditions used in the adobe forms? Ans. Suppose you want to display a particular text module in case if language you pass is EN in the input parameter. For this follow the steps below 1. Go to transaction SFP and create a form. 2. In the context tab, create a Text and assign a Text Module to it (created under smartforms transaction) under its properties. 3. Click on conditions button and add a row using + button. Give the Import parameter name as EX_LANGU (language parameter in my example) under first OPERAND and ‘EN’ under second OPERAND as shown.
  • 27. 1. Save and activate the form. 2. Execute it by passing EN as language parameter. This time the text module will be displayed. If you execute it by passing FR as language parameter, the text module won’t display on the form output this time Q20. Types of Form layout Answer: Live Cycle Designer offers two types of form layout techniques for you to work with: Static layout : These forms have fixed layouts. When presented to the end user, the form retains its original layout, regardless of the amount of data available to fill the form. Dynamic layout : A form with a dynamic layout is designed to expand or shrink according to the amount of data available to fill it. Frequently Asked SAP Adobe Forms Interview Questions and Answers
  • 28. Q21. What’s in a form design? Answer: The following key components make up a form design: 1.Master pages 2.Body pages 3.Content areas 4.Subforms 5.Fields 6.Boilerplate objects Q22. What is master pages in form design? Answer: Every form design contains at least one master page that Live Cycle Designer creates automatically. Master pages define the orientation and dimensions of body pages. Master pages are responsible for formatting body pages. Provide a background and layout format for more than one of the body pages in a form design. Each master page is created with a default content area that covers the whole page. Q23. What is body pages in form design? Answer: Body pages  Body pages represent the pages of a form.  Each body page derives its page size and orientation from a master page.  Each body page is associated with the default master page that LiveCycle Designer creates.  You can choose which master page to assign to a body page. Q24. What are subforms in form design? Answer: Sub Forms  Subforms are container objects that you can use to group form design objects including: fields,address,images etc.  A subform provides anchoring, layout, and geometry management for objects.  You can also configure subform objects to be repeatable. Q25. What are the uses of Form Interface?
  • 29. Answer: 1. In the form interface, you specify the data that is exchanged with the application program (such as tables, structures, work areas). 2. Under Global Definitions, you define your own fields, variables etc. 3. The system fields contain data with a predefined meaning (such as the date). Q26. Prerequisites to learn SAP Adobe forms Ans: No knowledge or experience is required to learn SAP Adobe forms, but the basic knowledge of SAP adds an advantage to learn adobe forms. Q27. How information is allocated in bunch table? Ans: A bunch table contains information from numerous DDIC tables. It stores data as name esteem combine. Q28. What are the sorts of Subroutines? Ans: 1. Interior Subroutines: The source code of the inner subroutines will be in the same ABAP/4 program as the calling method (inward call). 2. Outside Subroutines: The source code of the outer subroutines will be in an ABAP/4 program other than the calling strategy. Q29. Are SAP Scripts client dependent or independent? Ans: Standard scripts are client independent User defined scripts are client dependent. Q30. How do I create an Adobe form? Answer:
  • 30. To create fillable PDF files: 1. Open Acrobat: 2. Click on the “Tools” tab and select “Prepare Form.” 3. Select a file or scan a document: 4. Acrobat will automatically analyze your document and add form fields. 5. Add new form fields: 6. Use the top toolbar and adjust the layout using tools in the right pane. 7. Save your fillable PDF: 8. You can also share it with others or click Distribute to collect responses automatically. SAP Adobe Forms Interview Questions For Experienced Q31. What is a function group? Answer: A function group is a program that contains function modules.Each function group is identified by a four-character identifier called a function group ID. Q32. Which are the components of function group? Answer: 1. A main program. 2. A top include. 3. A UXX include. 4. A function module include. Q33. What is MVC in WebDynpro ABAP? Answer: Basically WebDynpro follows MVC M-Model(Business logic ) V-View(Screen) C- Controller( Controls screen and Model). Q34. What is a context in WebDynpro ABAP? Answer:
  • 31. Context is a temporary place which stores data in the form of nodes and attributes. Q35. What Is Sap Style Maintenance? Answer : SAP style maintenance is a collection of character & paragraph format. Q36. How Can You Format The Data Before Write Statement In The Report? Answer : By using the loop event the reports output can be formatted .at first .at new .at last Q37. What Is The Difference Between A ‘database Index’ And A ‘match Code’? Answer : Database Index’ contains fields from one table while ‘Match Code’ contain fields from several tables. Match code objects can be built on cluster tables, transparent tables and pooled tables.