SAP NEWS-740-ABAP OBJECTS



Get Example source ABAP code based on a different SAP table
  



ABAP Objects in ABAP Release 7.40, SP02
ITOC

ABAP_MODIFICATION_NN 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.

ABAP_MODIFICATION_NN 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.

ABAP_MODIFICATION_NN 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.

ABAP_MODIFICATION_NN 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.