on 05-18-2010 4:05 PM
Hello All,
I am calling a workflow using FM 'SAP_WAPI_START_WORKFLOW' from se38 abap program.
My workflow consists of simple user decision to approve and reject.
From my t.code SWDD if I execute the workflow, it will take me to test workflow screen and there again I have to execute once more to see the mail with approve and reject button in my inbox of bussiness workplace.
But when I call the worflow using the above FM it does not work.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = 'WS99000093'
language = sy-langu
IMPORTING
return_code = p_subrc
workitem_id = p_workitem.
It doesn't get triggerred I guess. Is there something to do with the double execution as above which takes place when we do it manually ( one normal execution of workflow and another test workflow).
Help Appreciated.
Regards,
Mac
Hello,
Have you set WS99000093 to General Task? Do a search if you don't know how to do this.
By the way, the recommended approach is to not start workflows directly, if it can be avoided.
Use SAP_WAPI_CREATE_EVENT instead to create an event which triggers the workflow.
regards
Rick Bakker
Hanabi Technology
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
solved myself
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you can just debug and check what message is being thrown from the Function Module.
Just run the Function module from SE37 itself and check what message is thrown.
Thanks
Arghadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just put a breakpoint to the code and check what error message the SAP_WAPI_START_WORKFLOW returns. Probably you can solve the problem then by yourself, and if not, post the error message here.
Some probable reasons:
-WS99000093 has not been set as "general task" (check this in PFTC in "Agent assignment").
-something wrong in the agent determination?
Regards,
Karri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.