ABAP Objects Questions Answers

1) What class is used to display the AVL Grid.

cl_gui_alv_grid

2) Define Polymorphism.

It's one of the main strengths of inheritance.
The same method is implemented in different ways by redefining the method in subclasses.
It's a characteristic when objects from different classes react differently to the same method call.

3) What is the only component that is implemented in the implementation part of a class.

   Method.

4) What is contained in a class that does not exist in an interface.

Implementation.

5) Where would the components of a class be define.

Definition part of a class.

6) Global class cl_course has been defined using the class builder. The development class is ZCL. What is the key entry in the repository table TADIR.

R3TR CLASS cl_course.

7) Your program has register several handler methods. How does the program know what methods are available for executing when an event is triggered?

The system looks for registered handler methods In the event handler internal table and processes those that are registered for the event

8) Static method and instance method.

Instance methods MUST be addressed by object ref after instantiation
Static methods MUST be addressed by class_name even when object is instantiated

9) Characteristics of the self-reference ME.

Self-references allow an object to give other objects a reference to it.
The reference ME can be used to determine the dynamic type of the reference variable in the debugger.
The self-reference ME can be used to access individual components.

10) Primary difference between function and object.

Calling a function loads the entire function group implicitly into memory whereas instances of an object are generated explicitly when an object is created.
A program can only work with a single instance of the same function group versus a program can access several instances of the same object.

11) What can be said about the lifetime of an object?

An object exists for as long as it is being used in the program.
An object exists as long as at least one reference points to it.
An object exists as long as at least one method of the object is registered as an event handler.

12) Global class

Class Builder can be used to test global classes.
Access to a global class is done as a reference variable using TYPE REF TO
Global classes are stored in TADIR with key R3TR CLASS
A method to be transported is identified in transport organizers as LIMU METH

13) What implications exist when private components of a class are changed?

Programs are insulated from change

14) Mark the invalid attribute definitions.

class lcl_course definition.

10 public section.
20   Data: school(20)  type c,
30         Supervisor  type string value 'ADAMS',
40         Price(3)  type p decimals 2 value 100 READ-ONLY.
50   types: type_category(15) type c,
60          type_name(10)     type c.
70   constants: write_position type i value 10.
80   class-data: course_count type i.
90  private section.
100   data: category(15) type c,
110         name(10)     type c.
120         courseid     like mara-matnr.

endclass.

15) When method of Class CL_GUI_ALV_GRID would be used to display the contents of an internal table?

SET_TABLE_FOR_FIRST_DISPLAY

16) What statement will request memory to be allocated to an object?

Create Object

17) How can the values of an attribute be set in an object?

When the object is created and values are implicitly exported to the Constructor Method
Using the VALUE statement will set the value of an attribute when the object is created

18) Items that are not part of the Event character.

Events also allow RETURNING parameters.
EXPORTING Parameters for events can only be passed by reference.

ABAP Tips

Related ABAP Topics:
ABAP Q & A

Get help for your ABAP problems
Do you have a ABAP Question?

SAP Books
SAP Certification, Interview Questions, Functional, Basis Administration and ABAP Programming Reference Books

More ABAP Tips

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.