Show TOC

 Creating a State Manager

Purpose

Normally, you do not need your own state manager – you can skip this section if that is the case.

Process Flow

Creating a State Manager

If you need your own state manager, follow the steps below.

  1. Name your state manager, for example, MY_STATE_MANAGER.

  2. Using transaction SE24 create a Usual ABAP Class with the name CL_MY_STATE_MANAGER .

  3. On the Interfaces tab specify the interface IF_COM_IOITF_SMA.

  4. On the Methods tab choose the method IF_COM_IOITF_SMA~DETERMINE_TRANSITION ; and add the necessary code.

  5. Save and activate your entry.

Given the application context, this method returns a transition object (conforming to the transition, CL_COM_IOITF_TR , specified by OITF). The following template could be used.

METHOD if_com_ioitf_sma~determine_transition.

* Before you can access the Application Context you must convert it

* into the format that you specified for the corresponding Event.

  DATA: lo_my_appl_ctx TYPE REF TO cl_my_appl_ctx VALUE IS INITIAL.

  lo_my_appl_ctx ?= io_appl_context.

* --> Begin: Put your code

* You can access the information in Application Context as follows -

* lv_iobj_guid = lo_my_appl_ctx->iobj_guid.

* ...and so on!

* --> End: Put your code

* Create your own Transition

  DATA: lo_my_transition TYPE REF TO cl_my_transition

                         VALUE IS INITIAL.

  CREATE OBJECT lo_my_transition

    EXPORTING

      iv_av = lv_action

* Return Transition

  ro_tr ?= lo_my_transition.

ENDMETHOD.

Registering a State Manager

Once you have created your own state manager, it must be registered with OITF as follows:

  1. In Customizing choose Start of the navigation path Customer Relationship Management Next navigation step Master Data Next navigation step Products Next navigation step Objects Next navigation step Object Integration Framework (OITF) Next navigation step State Manager Next navigation step Register State Manager End of the navigation path .

  2. Enter the state manager name, description, and class.

  3. Save your entry.

Example

IOITF: State Managers

State Manager

Description

State Manager Class

IOITF_SM

OITF’s State Manager

CL_COM_IOITF_SM