2/12/2015 1:21:07 PM

The check function module is called synchronously in the Logical Unit of Work of the event creator by the event manager directly before the receiver function module is called when an active linkage could be determined and the name of a check function module is specified.

The yellow marked type linkage will be enabled automatically when the start event is activated in SWDD.




A check function module is used to determines whether the workflow should be triggered or not, e.g. when knowing the event has been raised is not sufficient to determine whether the workflow should be started.  Most of the scenarios that require check function modules can now be covered by Start Conditions.  Start Conditions a standard check function module and a logical expression (entered in transaction SWB_COND or the workflow basic data) to decide whether or not to start the workflow.  E.g. You might have an event Purchase Requisition Created, but only want to start a particularly workflow based on the Order Type used.

a) SWE2 transaction,Shows list of events with Workflows.Here only we will enter Check Funtion module.

b) Start condition if you adding up in workflow header in SWDD transaction,It leads to automatically creating Check FM based on condition in SWE2 line entry.

c) You are validating some condition,Based on condition pass or failure,

d) The check function module terminates without an exception, the receiver function module is called by the event manager.

e) The check function module terminates with an exception, the receiver function module is not called. Exceptions are not treated in different ways.

You can write your logic inside the Check function module ZPR_RELEASE_CHECK_FM.

You can add the import parameters and exceptions.

*"*"Local Interface:
*"      NO_RECTYPE

Within the Check function module you can write your own logic

                  INTO wa_eban
                  WHERE banfn objkey.

  IF sy-subrc 0.
    IF wa_eban-frgzu NE space.
      RAISE no_rectype.

If you raise an exception then the workflow will not be called.

Receiver function module

The receiver function module is provided by the interested event receiver. and is available for using events in the SAP Business Workflow environment. They are usually entered into the relevant linkage by the workflow system.

The interface of a receiver function module is standard and contains only import parameters. A receiver function module does not support return parameters.

The receiver function module is called with the parameters required if an event entered in a linkage occurs and the check function module (if any) terminates without an exception.

Receiver type function module

Function module for dynamic determination of the receiver type of an event receiver linkage.
The receiver type function module is the first function module to be called, if it is entered for a linkage.
The event container is evaluated in the receiver type function module, and a receiver type is determined from the information. Typically, no receiver type function module is required in SAP Business Workflow.

If you like this blog, please share (Facebook/LinkedIn/Google+) to click below links so it will reach to others.