Show TOC

Regenerating a Constructor for Exception ClassesLocate this document in the navigation structure

Exception classes have special constructor methods. If they implement the IF_T100_MESSAGE interface, the signature and the implementation have a special logic.

Prerequisites

This functionality is provided since SAP NetWeaver 7.5 SP00.

Context

You should regenerate the constructor whenever you add or remove:

  • the interface IF_T100_MESSAGE, or
  • public or protected attributes.

Example

Before Execution After Execution

To copy the source code example, click here

You have added the interface IF_T100_MESSAGE and an additional attribute SPEED to an exception class. Therefore, the constructor is no longer up to date.

The signature and the implementation of the constructor have been modified in accordance with T100 semantics and the new attribute.

* Note that the asterisk stands as a placeholder for the interface IF_T100_MESSAGE.

Procedure

  1. In the definition or the implementation, select the name of the exception class or the constructor method for which you want to regenerate the constructor.
  2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by using the Quick Assist view.
  3. Apply Regenerate constructor.