Doubt in Check Function module

Hi all,
I have created a parameter(mulitline) for an event (in SW01) and I am using a check function module to check the conditions.
My problem is I am able to get the '_EVT_OBJECT' (object instance) in the check FM and not able to get the event's parameter (which i created for that event) in the check FM. In the log it says, "Container element xxxx doesnot exists".
May I know whether is it possible to send the event parameter to the Event_container of the check FM. Please help in this regard. As I am placing a breakpoint in the check FM but it doesnot stops.
P.S. I am using ZBUS2012 (delegation of BUS2012) and I redefined the event "Changed" and I added a multiline parameter with respect to DB field.
Regards,
V Kumar

Hi,
I am using a macro.
SWC_GET_TABLE EVENT_CONTAINER 'IM_NETWR' T_NETWR.
IM_NETWR is my mutiline element for the event "Changed". It will have the old and new value of the net price. I need to trigger the workflow if there is a change in price.
I Know it is possible with SWEC, but i need to validate some condition, which i am not able to give in SWEC, so I am using Check FM. Please help.
If i use both SWEC and check FM whether it will give any problem?
Regards,
V Kumar
Edited by: V Kumar on Aug 14, 2009 1:37 PM

Similar Messages

  • How do I "see" a check function module in the debugger?

    I am correctly starting a custom workflow based on an event raised by standard SAP code in transaciton QE51N.
    I have to write a check function module to interrogate the event and start/not start
    the workflow because the same event is raised by SAP code in transaction QA02, and I have to be sure to start the workflow only if the event is raised in QE51N, not QA02.  (I also have to check some other properties of the QALS row for the inspection lot.)
    I know how to code the check function module, but if I need to debug it, how do I "set-up" for seeing the check function module in the debugger?
    I'm sure this is an obvious question and that I'm missing something simple.
    So thanks in advance for the answer.
    djh

    Dear DJH,
    Put a break-point in the function module and process the transaction. It will stop at runtime.
    Hope this will help.
    Regards,
    Naveen.

  • Error messages in CRM2007 web ui from check function module

    Hi Experts,
    I want to display a warning/error in CRM webUI from my check function module. Moreover, in CRM GUI if i write a message like
    MESSAGE ID 'ZCRM' TYPE 'W' NUMBER '000'
                    WITH 'Warning Message'.
    it exits the transaction.
    Can anyone please suggest how do I go about this.
    Warm Regards,
    Abdullah

    Hi Dhawani,
    Hi Pavan,
    Can you please elaborate...how this will help??
    Thanks
    Dhwani
    I dont know the specific reason but internally there may some inconsistancy but i faced the same error and i tried with saving it in the package.
    Thanks

  • Read workitem Container Value in Terminating event Check Function Module

    Hi
    I have some problems reading work item data / values of a work item container element in a check function module on a terminating event – Do any of you know if this is possible, and if so, how it’s done ?
    In My scenario I have created a multiline approval step for my business document, one task pr Line Owner.  The Event Approved is defined as a terminating event for this task, and the line owner is passed to the task container.
    Now, when I raise the event, with the line owner as an event parameter, I would like to check if the line owner on the raised event, matches the line owner in the task container in question in a check fm. But here I faced the problem, that only event data, and not work item data, are passed to the Check Function module.
    Regards,
    Morten Nielsen

    Hello Morten, hello Arghadip,
    in the instance linkage's check function module (entered via transaction SWEINST) you'll have the workitem-id in the system event parameter EVTRECEIVER_ID
    With this number you can use the frame work in order to read the work item container.
    This is a sample coding, how you access the correct work item container using SAP Enterprise and it's new OO frame work, which checks on the terminating event of BUS2105.Released the correct release code for a work item.
    INCLUDE <cntn01>.
    INCLUDE <SWFCNTN01>.
    INCLUDE RSWEINCL.
    *** Read workitem instance and container from event
           DATA: wi_id            TYPE swwwihead-wi_id.
           swc_get_element EVENT_CONTAINER evt_receiver_id wi_id.
           IF sy-subrc <> 0.
              MESSAGE E015(ZPREL) WITH evt_receiver_id
                                           RAISING wrong_call.
           ENDIF.
           DATA: lv_wi_handle    TYPE REF TO if_swf_run_wim_internal.
           DATA: ls_context      TYPE sww_wimctx.
           DATA: lv_wi_container TYPE REF TO if_swf_cnt_container.
    *    - set context
           ls_context-do_commit  = ' '.
           ls_context-called_btc = 'X'.
           ls_context-exec_user  = sy-uname.
           ls_context-fbname     = 'Z_CHECK_RELEASE_CODE'.
           CLEAR lv_wi_handle.
           CALL METHOD cl_swf_run_wim_factory=>initialize( ).
           CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
                   EXPORTING
                      im_wiid             = wi_id
                      im_read_for_update  = ' '
    *                 im_enqueue_owner    = fb_name
    *                 im_wait_for_enqueue = 'X'
                      im_context          = ls_context
                   RECEIVING
                      re_instance         = lv_wi_handle.
    *** This check is only done for workitem linkage TS90100081
           IF lv_wi_handle->m_sww_wihead-wi_rh_task <> 'TS90100081'. "#EC_SYNTEXT
              EXIT. "Let event pass, as this is an instance linkage to another workitem
           ENDIF.
           DATA: releaseCode_wi        TYPE t16fc-frgco.
    *    - read releaseCode from workitem container
           lv_wi_container = lv_wi_handle->get_wi_container( ).
    *    - perform binding event container -> workitem container
           swf_get_element lv_wi_container 'RELEASECODE' releaseCode_wi.
          DATA: e             TYPE REF TO cx_swf_run_wim.
          CATCH cx_swf_run_wim INTO e.
             RAISE WORKFLOW_RUNTIME_ERROR.
       ENDTRY.
    *** From here on, the variable releaseCode_WI hold the
    *** container element RelaseCode of the work item, that
    *** is going to be terminated...
    *** Further coding from here as appropriate...
    Best regards,
    Florin

  • Check Function Module is not working

    Hi All Expert,
    I'm new in workflow and  develop custom workflow for Transaction FB65 ( Vendor Credit Memo) and using business object FIPP , event CREATED.
    Actually  requirement is that when user  click on park button in FB65 then should  be trigger workflow only for particular vendor code .
    Now my workflow is working fine for all vendor code.
    For particular vendor code, I have created an new entries in  SWE2 and assigning a check function module to that
    Refer Link :         http://www.****************/Tutorials/Workflow/checkfunctionmodule/demo.htm
    and also same entries create in SWETYPV But Check Function Module is not working before workflow trigger.
    Appreciate your help and support.
    Regards
    Saurabh

    Hi
    : Check FM  : ZWF_DR_CR_MEMO 
    SourceCode :
    FUNCTION ZWF_DR_CR_MEMO.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(OBJTYPE) LIKE  SWETYPECOU-OBJTYPE
    *"     VALUE(OBJKEY) LIKE  SWEINSTCOU-OBJKEY
    *"     VALUE(EVENT) LIKE  SWETYPECOU-EVENT
    *"     VALUE(RECTYPE) LIKE  SWETYPECOU-RECTYPE
    *"  EXPORTING
    *"     REFERENCE(RESULT) TYPE  C
    *"  TABLES
    *"      EVENT_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOT_TRIGGERED
    BREAK-POINT.
    TABLES : VBSEGK.
      DATA : LV_VEND TYPE VBSEG-LIFNR.
      CLEAR : LV_VEND.
      SELECT SINGLE  LIFNR FROM  VBSEGK INTO LV_VEND WHERE BELNR EQ OBJKEY.
        if sy-subrc eq 0
          IF LV_VEND = '0000120510'.
            RAISE NOT_TRIGGERED.
          ENDIF
      endif.
    ENDFUNCTION.

  • How to use Check Function Module???

    Hi Friends,
    How to use Check Function Module in Workflow???
    My requirement is to trigger the workflow at the last line item of the Material Document.
    Rewards for sure for helpful answer.
    -Satish

    Hi Satish,
    You know, the real power of forums like these is the search functionality. First you locate the correct forum, you succeeded in that and then you locate the search field and type in your question. In your case "check function module"
    I suggest you do this right away and be amazed at all of the answers about his topic. Maybe you'll even find some topic about exactly the same issue with a different solution than check function modules and on top of that you learn something this way. Talk about win-win situation
    Kind regards, Rob Dielemans

  • Issue in Check Function Module

    Hi All,
    Am doing a custom Workflow for Goods Movement.
    In my Workflow am using the Triggering event "created" of Business Object "/SAPCEM/02".
    I need to trigger my Workflow only for specific "Movement Type" (Eg. 551).
    The Event Container is having only the values Material Document & Year. I have created a check function module in which I built the logic to get the MovementType(BWART) from table MSEG for the Material Document & raising exception in case of other than 551.
    But the function module is not working as I expected. The problem is the MSEG table is not getting updated with the new Material Doc, while the Check Function Module is being called. (MSEG is updated after Check FM, it seems).  So no record in MSEG for our MaterialDoc during the call to check function module. So the query always fails.
    I need to restrict my workflow for specific Movement Types(MSEG-BWART).
    Could you please advice me in this ?
    Regards,
    Anbarasan K

    I have absolutely no idea if this works, but you could try to place a check FM on the event only in transaction SWEINST with a wait up to 1 second statement in it.
    Maybe, just maybe then you can properly use the check FM on the event-->WF in SWE2.
    Alternatively if you are of the opinion that the data should be updated when the event is triggered you could raise an OSS message (obviously search OSS first to see if this has come up previously)
    Kind regards, Rob Dielemans

  • Check function module & start condition

    Dear friends
    Could any1 of u tel me th exact diff bet th both..
    In whic case u go for check FM and in whic case u ll go for start condition.
    regards
    sakthi

    Hi Sakthi,
    Basically both serve the same purpose that is perform some checks based on conditions which when satisfied trigger the workflow.
    However, a start condition is configured within the header of the workflow itself. Hence, the fields which we can use as part of the start condition are what are available in the workflow containers, mostly attributes of the business object being used.
    Whereas in a check function module, we can program very complicated calculations and validations, by using SELECT queries etc. which are not possible in start conditions.
    Hence basically, difference between them is the start condition is restricted in its use and can implement simple checks, whereas a check function module can be more complex.
    Cheers,
    Aditya

  • Check function module

    hi friends
    what does the check function module and receiver function module do?
    what is the usage of these function module?
    Explain details
    Regards
    vijay

    Hi,
    Using check function module you can trigger the work flow under some conditions.
    For example you are using PO workflow. If plant 1000 means only you want to trigger the work flow means you can write the code in ordinary Function module and then you can make it as a check function module.
    Start condition and the check function module has the same functionlity.
    SWW_WI_CREATE_VIA_EVENT is the Receiver function module, which is responsible for triggering the workflows (for all Workflows in SWE2). This will be assigned automatically when the linkage (SWE2) is created. This function module is common for all.
    Edited by: Viji on Mar 27, 2008 1:37 PM

  • Start conditions and check function modules

    Hi,
    When we apply start conditions to any particular even linkage you will find check function module as SWB_2_CHECK_FB_START_COND_EVAL. However, what if i want to implement both a custom check function module AND start conditions ?
    My requirement is to implement both start conditions and check function module.
    Is this possible ?
    Thank you,
    Nikhil.

    Hi,
    You can use both of the things, however its advisable to check all start conditions if you are using check FM.
    This is interface for custom  check FM,once you have the key value, you can put all the checks here
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(OBJTYPE) TYPE  SWETYPECOU-OBJTYPE
    *"     VALUE(OBJKEY) TYPE  SWEINSTCOU-OBJKEY
    *"     VALUE(EVENT) TYPE  SWETYPECOU-EVENT
    *"     VALUE(RECTYPE) TYPE  SWETYPECOU-RECTYPE
    *"  EXPORTING
    *"     REFERENCE(REFERENCE) TYPE  C
    *"  TABLES
    *"      EVENT_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOT_TRIGGERD
    Hope this helps.
    Regards,
    Sangvir Singh

  • CU65 Variant Function cannot be released - check function module interface

    Hi ,
    Getting this error while Releasing the variant Function in CU66. Function Module trigerred by this function is of the same name as well as correctly acitvated and released , but while releasing the Function I get this error :  'Function cannot be released - check function module interface' . Following are two characeteristics that are maintained in the variant function :
    1. Customer_Type
    2. Maintenance_Contract
    While executing the Function Module alone I get Raise Inernal Exception i.e it is not identifying the argument name 'Maintenance_Contract' in the FM 'CUOV_GET_FUNCTION_ARGUMENT' exception
    Below is the code for reference . Pls point out if any mistakes :
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(GLOBALS) TYPE  CUOV_00
    *"  CHANGING
    *"     REFERENCE(ZQUERY) TYPE  ZQUERY
    *"     REFERENCE(ZMATCH) TYPE  ZMATCH
    *"  EXCEPTIONS
    *"      FAIL
    *"      INTERNAL_ERROR
    " Data Declaration
    DATA : l_main LIKE CUOV_01-atwrt,
             l_cust LIKE CUOV_01-atwrt.
    " Get value of Input Characteristic Maintenance Contract
      call function 'CUOV_GET_FUNCTION_ARGUMENT'
        exporting
          argument            = 'MAINTENANCE_CONTRACT'
       IMPORTING
          SYM_VAL             = l_main
        tables
          query               = ZQUERY
        EXCEPTIONS
          ARG_NOT_FOUND       = 1
      if sy-subrc <> 0.
      RAISE INTERNAL_ERROR.
      endif.
      " Get value of Input Characteristic Customer Type
      call function 'CUOV_GET_FUNCTION_ARGUMENT'
        exporting
          argument            = 'CUSTOMER_TYPE'
       IMPORTING
          SYM_VAL             = l_cust
       tables
          query               = ZQUERY
        EXCEPTIONS
          ARG_NOT_FOUND       = 1
      if sy-subrc <> 0.
      RAISE INTERNAL_ERROR.
      endif.
       IF l_main EQ 'NO'.
        IF l_cust EQ 'CURRENT'.
          l_cust = 'NEW'.
        ELSEIF l_cust EQ 'VAR CURRENT'.
          l_cust = 'VAR NEW'.
         ENDIF.
         ENDIF.
    " Set value for the output characteristic
         call function 'CUOV_SET_FUNCTION_ARGUMENT'
           exporting
             argument                      = 'CUSTOMER_TYPE'
             vtype                         = 'CHAR'
             SYM_VAL                       = l_cust
           NUM_VAL                       =
           tables
             match                         = ZMATCH
           EXCEPTIONS
             EXISTING_VALUE_REPLACED       = 1

    ZMATCH and ZQUERY are two table types created in SE11 , both of type CUOV_01.

  • Difference between check function module and start condition

    Hello Rob,
    In  previous answer u said thr is no difference between check function module and startcondition but there is a difference between checkfunction module and start condition.
    Before the workflow is triggering can u able to check the conditions in startcondition.The startcondition can check the condition only after the workflow has been triggered.
    But in check function module u can check the condtion before the workflow got triggered.

    Kjetil,
    Dont' fall for it, these two (unless deephak and catherina are the same person...)  are just spamming the forum.
    <a href="https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3206751">https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3206751</a>
    <a href="https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3206440">https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3206440</a>
    <a href="https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3207214">https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3207214</a>
    <a href="https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3207179">https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3207179</a>
    As you've correctly established, even the SAP documentation contradicts their nonsense. A start condition is implemented as a check function, so there is no difference; and NO workflow is started at any time if they fail.
    Cheers,
    Mike

  • Doubt in RFC Function module

    Hi,
    I am creating one RFC in that i need to declare one import parameter whose length is is.
    when i am giving like i_exclide like kna1-loevm is not accepting.
    when i am declaring like i_exclude like char1.
    it is giving error like reference parameters are not allowed in RFC.
    anybody can tell me how to declare.
    thanks,
    maheedhar

    Hi,
    Go to se37,
    Give ur RFC function module and click change.
    Go to "Import" tab , you can find a checkbox "Pass Value" , check this checkbox.
    Now you try to compile the code , you wont get that error.
    Reward points for useful answer.
    Thanks,
    Jey

  • Doubt in the function module POPUP_GET_VALUES

    Hi,
    i am using the function module POPUP_GET_VALUES. I am giving the table name and field name but the field name shows in display mode i am not able to enter any values in the given popup. What is the problem

    Hi,
    U can go through the FM documentation:
    Dialog box for the display and request of values, without check
    Preliminary comment
    This function module has been released.
    The documentation is being revised so that it conforms to the requirements for released function modules.
    Function
    This function module sends a dialog box and includes the fields specified in the FIELDS interface table. The fields specified in the FIELDS table must be defined in the ABAP Dictionary.
    If no text is specified for a field, the ABAP Dictionary key word is displayed. The key words and fields can be displayed normally or highlighted. You must also define whether the fields are ready for input or not, and whether they are mandatory or not. Defaults can be defined for the fields.
    After the display, the values entered by the user in the date and time fields are checked for formatting and plausability. Otherwise, the values entered are returned to the user unchecked.
    The function module can be used, for example, to:
    Display information
    Request values which do not need to be checked
    Request values to limit data accesses ( from - to)
    Support prototyping
    Examples
    For examples, see the program RSSPO410.
    Notes
    Conversion exits are handled normally.
    References from CURR and QUAN fields are handled if the reference fields are also specified. The display of the reference fields can be suppressed.
    If a currency field (type CURR) is specified, then the field assigned in the ABAP Dictionary for the currency key (type CUKY) must also be specified. The display of the currency key field can be suppressed (if filled initially).
    Dates are checked according to the definition in the user master data.
    Times must be entered using the '__:__:__' template.
    F1 help and F4 help are supported.
    Each field can be specified once only. Repeated fields or field groups are not supported. Table names preceded by an asterisk are an exception to this.
    Only fields wih the ABAP type C, N, T, D, P, or Integer are permitted.
    No updates are performed.
    A maximum of ten fields can be displayed in a dialog box. If there are more than ten fields, a dialog box with a scroll bar is sent. You can use the POPUP_GET_VALUES_SET_MAX_FIELD function module to change the maximum number of fields in a dialog box.
    If you use this function module, remember that ABAP Dictionary tables are sent implicitly using variables. A cross-reference across tables used in programs cannot determine these tables. For this reason, declare the tables under TABLES in the calling program.
    Hope this helps.

  • Doubt in using :Function Module : MS_CONVERT_TO_OTHER_CURRENCY

    Hi ,.
    In the Function Module :MS_CONVERT_TO_OTHER_CURRENCY.
    I have to export following parametes:
    DATE            
    FROM_CURRENCY   
    FROM_AMOUNT     
    TO_CURRENCY     
    COMPANY_CURRENCY
    RATE  (optional)    .
    Here my doubt is :what is the purpose of COMPANY_CURRENCY .What value i have to populate here , how i have to find the  company currency?
    I think we have to find this COMPANY_CURRENCY  based on the sales organization.
    Please update me regarding this COMPANY_CURRENCY .
    Thanks,
    Suresh.

    Have you tried using 'CONVERT_TO_FOREIGN_CURRENCY' instead?
    DATA: v_amount TYPE p DECIMALS 2.
    CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
    EXPORTING
    date = sy-datum
    foreign_currency = 'INR'
    local_amount = '1.00'
    local_currency = 'USD'
    IMPORTING
    foreign_amount = v_amount
    EXCEPTIONS
    no_rate_found = 1
    overflow = 2
    no_factors_found = 3
    no_spread_found = 4
    derived_2_times = 5
    OTHERS = 6.
    IF sy-subrc = 0.
    WRITE: / 'US dollar to Indian rupees - ', v_amount.
    ENDIF.

Maybe you are looking for

  • Ipod Shuffle is not recognized on Windows Laptop

    Hello, since last week my 3 month old Shuffle is not recognized on any Windows Laptop. In addition it is not seen as a device, so I can't follow the hints you gave on this site. When I connect it the orange light is turning on and out. The battery is

  • Invoice block when no GR

    Hi Folks, I would like to block an invoice for payment, when no GR has been made and we do not want to use GR based IV!!!! I tried to mess around with tolerance DQ, without success. I tried to set the tolerances to 0 but no block is set. Any ideas? T

  • Can't use phone abroad

    Hi, I've just arrived in the Canary Islands and can't get any mobile network. I understand I may need to enable something to allow me to use my phone abroad. Please can someone tell me what I need to do in order to be able to make and receive calls.

  • Can i update my G5 power mac from OSX 10.4.11 to mountain lion, can i update my G5 power mac from OSX 10.4.11 to mountain lion

    i need to update my Power mac G5 to mountain lion, so i was wondering i am able to purchase mountain lion and update from there if I'm running OSX 10.4.11, or do i need to go from a newer version of software?

  • Query runs for ever

    I have three summary tables which are yearly,monthly and daily. The yearly table has year and some aggreagted facts. The monthly table has year,month and some aggregated facts while day table has year,month and day and some aggregated facts. I ran a