Entering content frameBackground documentation Function Modules for Processing Events Locate the document in its SAP Library structure

Receiver type function module

You can enter a receiver type function module for the linkage to determine a receiver type at runtime. You can use the information associated with the event.

Example

A workflow is to be started in response to an event.

You use the function module for starting workflows as a receiver function module, which requires the ID of the workflow task to be started as an input parameter in the receiver type.

If you do not know this ID at definition time because the workflow to be started depends on information from the event-creating application (for example an amount), you enter a suitable receiver type function module for this linkage. This function module reads the event container, determines the ID of the workflow required from this information, and passes this ID in the parameter receiver type.

The interface of the receiver type function module is described in the documentation for the function module SWE_TEMPLATE_RECTYPE_FB . This function module can be used as a template and is stored in the function group SWE_TEMPLATE .

Check function module

You can enter a check function module for the linkage to decide whether the receiver function module should actually be called. The data in the event container can be used for this.

If an exception is triggered during execution of the check function module, the linkage between the event and the receiver is not created.

A check function module exception has no effect on the event creator.

Example

The event notification created is only to call the receiver function module, if the notification is a service notification.

The interface of the check function module is described in the documentation for the function module SWE_TEMPLATE_CHECK_FB . This function module can be used as a template and is stored in the function group SWE_TEMPLATE .

Receiver function module

A receiver function module must be entered for each linkage, which executes the actual reaction to the event. The workflow system enters the following function modules as standard:

Receiver function module

Entry for linkage made by workflow system

SWW_WI_CREATE_VIA_EVENT

Type linkage (workflow/task with triggering event)

SWW_WI_COMP_EVENT_RECEIVE

Instance linkage (work item with terminating event)

SWW_EI_EVENT_RECEIVE

Instance linkage (wait step work item)

The indicator Remote-enable module must be set in the properties of the receiver function module.

The interface of the receiver function module is described in the documentation for the function module SWE_TEMPLATE_REC_FB . This function module can be used as a template and is stored in the function group SWE_TEMPLATE .

Note

Return parameters and exceptions cannot be passed by the receiver function module. In addition, it cannot trigger exceptions (error messages and warnings) which lead to the function module being aborted.

Macro instructions for processing containers

The event container passed in the interface of the function modules can be read using the macro instructions provided. If object references were passed in the container, they must first be converted into runtime handles.

For further information and a full list of all macro instructions, refer to:

 

 

Leaving content frame