Skip to content

ABAP Keyword Documentation →  ABAP − Release-Specific Changes →  Changes in Release 4.6A 

ABAP Objects - Further Developments for Release 4.6A

In Release 4.6A the following components are added to the core functionality of ABAP Objects:


1. Object generation with explicit class specification


2. Non-public instantiation


3. Internal tables as collections


4. Functional methods in expressions


5. Instance destructor


6. Change process for global interfaces


7. Compiler enhancements


8. Internal optimizations

Other versions: 7.31 | 7.40 | 7.54

Modification 1

Object generation with explicit class specification

The statement CREATE OBJECT has two new variants that make it possible to specify the name of the class, which is to generate an instance, both statically and dynamically. Previously a reference variable with reference to the class had to be created before an object could be generated. In the new variants of the statement CREATE OBJECT, any reference variables can be used that are compatible with the specified class.

Modification 2

Non-public instantiation

The new additions CREATE PROTECTED and CREATE PRIVATE of the statement CLASS class DEFINITION can be used to ensure that only the class itself or its subclasses can generate instances of the class class. This enables unique instance management.

Modification 3

Internal tables as collections

If the line type of internal tables contains reference variables as components comp, the attributes attr of the object to which the reference of a line points can be used as key values for reading, sorting and changing table lines. This is possible in the following statements:

  • LOOP AT itab ... WHERE comp->attr ...
  • READ TABLE itab ... WITH [TABLE] KEY comp->attr = ...
  • SORT itab BY comp->attr ...
  • DELETE itab WHERE comp->attr ...
  • MODIFY itab ... TRANSPORTING ... WHERE comp->attr ...

If a table contains non-structured lines of the type of a reference variable, the attributes of the object to which a line points can be addressed using table_line->attr.

Modification 4

Functional methods in expressions


Functional method calls are supported for the following statements and expressions:

  • for arithmetical expressions (COMPUTE)
  • for bit expressions (COMPUTE)
  • for logical expressions (IF, ELSEIF, WHILE, CHECK)
  • for multiple queriesn (CASE, WHEN)
  • for loops (LOOP)
  • for assignments (MOVE)

Modification 5

Instance destructor

The instance destructor can be used for releasing internal and external resources. External resources, for example, the printer of a called class, must be released by the application involved, whereas internal resources are released automatically when the mode is closed. Currently a C function must be called for this purpose using SYSTEM-CALL.

Modification 6

Change process for global interfaces

If a method is missing in the implementation, the syntax check results in a warning message instead of an error message. When the method is called at runtime, execution is terminated.

If an implemented method is not used, a warning message is issued instead of an error message. The coding of the method is ignored.

Modification 7

Compiler enhancements

The statement CLASS class DEFINITION LOAD is no longer required with the following statements:

  • CALL METHOD global_class=>method
  • SET HANDLER global_class=>method
  • METHODS m FOR EVENT e OF CLASS global_class

From within a global superclass, a subclass can be referenced provided that the superclass does not address components of the subclass.

Modification 8

Internal optimizations

  • Objects are now addressed indirectly using indices instead of pointers. This makes the ABAP data layout platform-independent. In addition, this ensures object mobility as a basis for future developments such as:

  • - Integrated persistence services

  • - Shared Memory objects

  • -Destroyfor objects

  • - More compact memory management
  • Improved memory management is achieved because objects are managed without blocks. In addition, objects can be released individually.
  • The Garbage Collector uses Mark & Sweep instead of reference counting , which enables cycle recognition. This provides efficient support for the debugger in finding all references to a specific object.
  • A separate interface load has been introduced to relieve the load of the implementing classes from some of its tasks.