Normally, you do not need your own state manager – you can skip this section if that is the case.
If you need your own state manager, follow the steps below.
Name your state manager, for example, MY_STATE_MANAGER.
Using transaction SE24 create a
Usual ABAP Class
with the name
CL_MY_STATE_MANAGER
.
On the
Interfaces
tab specify the interface
IF_COM_IOITF_SMA.
On the
Methods
tab choose the method
IF_COM_IOITF_SMA~DETERMINE_TRANSITION
; and add the necessary code.
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.
Once you have created your own state manager, it must be registered with OITF as follows:
In Customizing choose
.Enter the state manager name, description, and class.
Save your entry.
State Manager |
Description |
State Manager Class |
---|---|---|
IOITF_SM |
OITF’s State Manager |
CL_COM_IOITF_SM |