In transaction SE93, you can specify a transaction code as an OO transaction.
You either associate the transaction code with the transaction service of ABAP Object Services for persistent objects or with a public method of a global or local class of a program. When calling up a transaction that is associated with an instance method, the system automatically generates an instance of the class in its own internal session.
The following is an example of how a transaction code is associated with an instance method of a local class of an unspecified ABAP program:
*&-----------------------------------------------------------**& Module Pool 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 that does not contain any dynpros or dialog modules. Instead, the program contains the definition of a local class DEMO_CLASS.
The DEMO_OO_METHOD transaction code is associated with 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, the program is loaded, an instance of the class is created, and the method is executed.