Skip to content

ABAP Keyword Documentation →  ABAP - Release-Specific Changes →  Changes in Release 7.40 and Its SPs →  Changes in Release 7.40, SP02 

ABAP Objects in Release 7.40, SP02


1. Parameter interface of functional methods


2. Interfaces in test classes


3. Exception handling


4. Execution of static constructor

Other versions: 7.31 | 7.40 | 7.54

Modification 1

Parameter Interface of Functional Methods

Alongside the return value defined using RETURNING, a functional method can now have any number of other formal parameters. Previously, only input parameters were possible.

Accordingly, functional method calls can now be used with the additions EXPORTING, IMPORTING, and CHANGING, so that actual parameters can be bound to the additional formal parameters.

When the input parameters of a method are declared, the addition PREFERRED PARAMETER can now also be specified, if the method has output parameters or input/output parameters. The only requirement is that all input parameters and input/output parameters are optional.

Modification 2

Interfaces in Test Classes

In test classes, the new addition PARTIALLY IMPLEMENTED can be specified in the statement INTERFACES, which allows only parts interfaces to be implemented. This is particularly useful in test doubles.

Modification 3

Exception Handling

If a class is specified dynamically after TYPE in the statement CREATE OBJECT and the class does not match the static type of the reference variable, the exception can now be handled using the exception class CX_SY_CREATE_OBJECT_ERROR.

Modification 4

Execution of Static Constructor

Until now, the static constructor of a class was called before each use of the class. It is not necessary to execute the static constructor to use a constant of the class. Accessing a constant of a class no longer results in its static constructor being called.