Skip to Content
avatar image
Former Member

Can any one brief me about check function module??

Hi,

I am new to workflow..

Can any one tell me what is the functionality of check function module?? Purpose ??

Plz Help me...

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 01, 2013 at 03:39 AM

    Hi Swathi,

    A check function module 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 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 Order Created, but only want to start a particularly workflow based on the Purchase Order Type used.

    It is extremely rare to need to program a check function module itself although the option is still there.

    Regards,

    Jocelyn

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 01, 2013 at 05:27 AM

    Hi Swathi,

    I am adding up points with Jocelyn.

    In simple words,Basically Check FM nothing but Condition check to trigger workflow or not.(For Eg i can trigger workflow only for XX Purchase order types)

    1. SWE2 transaction,Shows list of events with Workflows.Here only we will enter Check Funtion module.
    2. Sample check FM : check function modules ( SWE_CD_TEMPLATE_CHECK_FB ) in the function group SWE_TEMPLATE .
    3. 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.
    4. If you are validating some condition,Based on condition pass or failure,
    • If the check function module terminates without an exception, the receiver function module is called by the event manager.
    • If the check function module terminates with an exception, the receiver function module is not called. Exceptions are not treated in different ways.

    SAMPLE Custom Check FM:

       DATA : FLAG TYPE C,

              flag1 type c.

    CLEAR : FLAG,FLAG1.

       SELECT SINGLE zchange FROM Zzpo2 INTO FLAG WHERE ebeln = OBJKEY.

       SELECT SINGLE memory FROM ekko INTO FLAG1 WHERE ebeln = OBJKEY.

    * Checking flag

       IF FLAG = 'X' or flag1 = 'X'.

         RAISE NOT_TRIGGERED..

       ENDIF.

    SWE2 Entry screen shot:




    Regards,

    Ragav


    Untitled.png (27.8 kB)
    Untitled.png (27.8 kB)
    Add comment
    10|10000 characters needed characters exceeded