Entering content frameOO Transactions Locate the document in its SAP Library structure

In transaction maintenance (SE93), you can specify a transaction code as an OO transaction.

You either link the transaction code to the Transaction Service of the Structure link ABAP Object Services for persistent objects or to a public method of a global or local class of a program. When calling up a transaction that is linked to an instance method, the system automatically generates an instance of the class in its own internal session.

An example of a link between a transaction code and an instance method of a local class of an unspecified ABAP program:

Example

*&-----------------------------------------------------------*
*& Modulpool DEMO_OO_TRANSACTION *
*& *
*&-----------------------------------------------------------*

program DEMO_OO_TRANSACTION.

class DEMO_CLASS definition.
public section.
methods INSTANCE_METHOD.
endclass.

class DEMO_CLASS implementation.
method INSTANCE_METHOD.
message 'Instance method in local class' type 'I'.
endmethod.
endclass.

The DEMO_OO_TRANSACTION program is a module pool of type M that does not contain any screens or dialog modules. Instead, the program contains the definition of a local class DEMO_CLASS.

The DEMO_OO_METHOD transaction code is linked to this program as follows:

The start object of the transaction is Method of a class (OO transaction).

OO transaction model is not selected.

The Class Name is DEMO_CLASS.

The Method is INSTANCE_METHOD.

Local in program is selected and DEMO_OO_TRANSACTION specified.

When the transaction is called up, the program is loaded, an instance of the class is created, and the method is executed.

Leaving content frame