Ansicht
Dokumentation

COM_IOITF_IMG_09 - Define/Create Action

COM_IOITF_IMG_09 - Define/Create Action

PERFORM Short Reference   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

In this IMG activity, you determine which actions you will require.

Actions define what your application wants to happen when the event is raised. There are two cases to consider.

Case 1: You want the action to do something.

Since SAP does not deliver actions with the OITF, you must create your own actions outside of the IMG.

SAP does deliver a template to use as a model for creating your actions. The name of the template is: CL_COM_IOITF_SAMPLE_ACTION. The template itself performs no action. It is called the "Do Nothing Action".

The instructions for creating your own action are listed below.

  • Copy the template CL_COM_IOITF_SAMPLE_ACTION to create your new action,
  • Your action must conform to the action interface, IF_COM_IOITF_AC, specified by OITF. By copying the template CL_COM_IOITF_SAMPLE_ACTION to create your new action, your action will automatically comply with the requirements of the action interface.

  • Name your action, for example, MY_ACTION.
  • Using Class Builder (transaction SE24) create a Usual ABAP Class with the name CL_MY_ACTION_CLASS.
  • On the Interfacestab specify IF_COM_IOITF_AC.
  • On the Methodstab double-click on the method IF_COM_IOITF_AC~EXECUTE. Put any necessary code here.
  • The following template should be used.

,,METHOD if_com_ioitf_ac~execute.

* 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.

* If your event expects something in return then create the

* Individual Object Context that you specified for the corresponding

* Event.

*  DATA: lo_my_iobj_ctx TYPE REF TO cl_my_iobj_ctx VALUE IS INITIAL.

*  CREATE OBJECT lo_my_iobj_ctx.

* --> Begin: Put your code

* You can access the information in Application Context or

* Individual Object Context as follows -

* lv_iobj_guid       = lo_my_appl_ctx->iobj_guid.

* lo_my_iobj_ctx->rc = lv_rc.

* ...and so on!

* --> End: Put your code

* Return Individual Object context

*  co_iobj_context ?= lo_my_iobj_context.

ENDMETHOD.

  • Saveand activateyour action.
  • Register your Action with OITF in the next IMG activity. You must specify the action name as well as the corresponding action class.

Case 2: You want the action to do nothing.

You can use the DO_NOTHING action provided by OITF. The corresponding action class is CL_COM_IOITF_AC_DO_NOTHING. This action is already registered with OITF.






General Data in Customer Master   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 3873 Date: 20240523 Time: 161957     sap01-206 ( 52 ms )