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
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.
djhDear 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,
AbdullahHi 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 its 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 NielsenHello 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
SaurabhHi
: 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. -
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 KumarHi,
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 -
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.
-SatishHi 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 KI 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
sakthiHi 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 -
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 = 1ZMATCH 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 -
What is the difference using start condition and check function module
what is the difference between using start condition and check function module
That's new to me, I thought a start condition was evaluated before the workflow started, and thus now workflow work item is available. That's why I think the only situation in which start conditions/check functions can't be used, is when the availability of a workflow log for investigation of exactly what stopped the workflow is a requirement.
I suppose the <a href="http://help.sap.com/saphelp_46c/helpdata/en/4c/86bf43feca11d2a64f0060087a79ea/frameset.htm">SAP documentation</a> is in need of an update. -
Check function modules in Workflows
Hi,
The requirement is that, I need to trigger a workflow based on a condition ,if the condition is true then WF 1 has to be triggerred if not then WF2 has to be trigerred, the requirement is that i need to implement check FMs for this, can anybody send me sample code on how to do this? and give me the step by step approach of how to configure this in the transaction SWETYPV and SWB_COND. please its urgent.
Regards
Narendiran RathinaveluHi,
First create the two workflows. When you create a workflow if the WF is error free an automatic entry is made in the view of the tcode SWETYPV . now goto the tcode SWB_COND here goto the dropdown business objects and select all object types and then click the button in the application toolbar create new start condition.when u do that a new screen appears.Here u will find all the workflow templates.Click the template which u want to add a new condition to trigger.when u click it a new screen appears here u add the condition to trigger the workflow.
Hope this helps.
Reward useful answers.
Regards,
Shrita. -
Functional module table parameters values not getting displayed in Java sys
Hi,
We are calling the Table parameter through Java code from functional
module ZCRM_ICSS_PROJ_CUST_USR is not giving any rows value .If I execute
the same functional module with passing the import parameter value User
id: MLDL010 its giving value in CRM.
I am checking Function module( Remote enabled ) in Debugging mode,
before displaying values it is raising message like
SY-MSGNR - 005
SY-MSGTY - CRM_LINK
in T100 Table
SPRSL : EN
ARBGB : CRM_LINK
MSGNR : 005
TEXT :'No Links corresponding to the specified data could be determined'
Is that related to any communication problem CRM & JAVA ICSS System ?
Regards,
Pavan.The message in simple English just means that "You are doing something really bad" !!! It is absolutely not the communication problem, but understanding problem.
Though you may be executing the same function using SE37 or in the webshop application through JCo, the runtime context is different and without knowing what exactly your Z rfc is doing, it is very difficult to help. To start with, the userid - that is who is running the RFC is different in both situations. In SE37, it is the logon user and in the web, depending upon whether the connection is stateless or stateful, it could be the anonymous ICSS user or the logged in user. Here again, if you have used UME, it is the user id and if you have used ALIAS user, then it is the alias user id. This is just an example. Your runtime context can be different due to many other reasons too.
So, to make this simpler - what is that you are trying to do?
BTW, try not to create multiple threads for the same issue..
Maybe you are looking for
-
I need help with this script please ASAP
So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if y
-
How big a deal is the shared memory for video editing
Hi, It looks like the portable Mac I have been waiting for has been released. The one thing that I am wondering about is the shared video? memory. How big a deal is it? It looks like it should not be an issue with iMovie. How about FCE? With the Macb
-
Is there a way to display external HTML content inside a SWF movie?
IE if i wanted to have an 800x600 flash movie that i could display cnn.com or something of that sort. Is it possible?
-
My computer crashed and for reasons unknown to me, Mozy didn't back up my Mozilla Firefox files, which I realize are hidden but are no where to be found on Mozy's backup. All I have is my iphone that does have Firefox on it and a new computer. Howeve
-
How can I convert NIDAQ32.bas to *.vb?
I'm using Data Acquisition (PCI-6040E) and version NI-DAQ 6.9.3 that supported Window XP but not mesurement studio. This interface card works good for Microsoft Visual Basic 6.0 but Microsoft Visual Basic .net not works with it because VB.net is not