转 Using \"Check Function Module\" in Workflow
Using Check Function Module in SAP Workflow
By Geethanjali K, Kaavian Systems from link
Following is a custom function module created for our demo purpose, which will check the conditions before triggering the workflow.
FUNCTION ZGEE_SALES_ORG. *"---------------------------------------------------------------- *"*"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(RESULT) TYPE C *" TABLES *" EVENT_CONTAINER STRUCTURE SWCONT *" EXCEPTIONS *" NOT_TRIGGERED *"----------------------------------------------------------------
TABLES: VBAK. DATA VKORG LIKE VBAK-VKORG.
SELECT SINGLE VKORG INTO VKORG FROM VBAK WHERE VBELN = OBJKEY.
IF VKORG = '3000'. RAISE NOT_TRIGGERED. ENDIF. ENDFUNCTION.
Now go to transaction SWE2 and insert your object type, event, and the receiver type.
Double click on your entry, following screen appears:
Provide the name of the customized function module name created earlier in the check function module field.
Now workflow is triggered only when the sales order is created with the sales organization 3000.
相关推荐
82550698 2020-11-09
mnm0 2020-11-08
workflow 2020-03-03
Charliewolf 2020-01-10
86256839 2019-12-07
87347969 2018-11-04
workflow 2014-05-26
86256839 2013-11-19
82550698 2013-10-26
86256839 2013-10-15
workflow 2013-08-15
80276730 2013-08-15
80276730 2013-08-13
87347969 2013-08-13
workflow 2013-08-13
mnm0 2013-08-07
87347969 2013-08-07
87347969 2013-06-03
82550698 2013-06-03