'How to' Workflow Macro Question
Rivera, Raul
Raul.Rivera at absu.accenture.com
Mon Jan 17 14:43:21 EST 2005
Hello everyone,
We are in 4.6c
I am revising an existing custom workflow by moving most of its complex
start conditions from the workflow to a Check Function Module (FM).
The 'start conditions' were built as a series of tasks and conditions in the
WF that terminate the WF if a condition isn't met. As such, I would like to
REUSE the existing BOR methods in the Check FM.
One such method is an instance INdependent synchronous method. For testing
purposes, I create an instance of the object, set the import parameter value
and then execute the method (see the code snippet below). This approach is
ugly but it does give me the expected result.
My question is
How do you call an instance independent method from your check FM
without creating an object instance?
SWC_CONTAINER container.
SWC_CREATE_CONTAINER container.
* create an object instance
SWC_CREATE_OBJECT workItemObj 'WORKITEM' '000000599006'.
* set the import parameter
SWC_SET_ELEMENT container 'Agent' initiator.
* execute the BOR method
SWC_CALL_METHOD workItemObj 'ZGETAGENTORGUNIT'
container.
* read method export parameter
SWC_GET_ELEMENT container 'ErrorFlag' errorFlag.
IF errorFlag EQ 'X'.
RAISE DO_NOT_START_WF.
ENDIF.
Regards,
Raul Rivera
More information about the SAP-WUG
mailing list