HI,
I have one issue, Need your suggestions.
In my workflow user decision has to go to Two users one by one, Once completed a user it has to go to another use.
I was used Step type bock , and input parameter is User name.
Working fine. But Now i would like to run this work flow from Se38 I hope this is possible.
I am using the below code for running the Workflow.
DATA:return_code TYPE sy-subrc,
workitem_id TYPE swr_struct-workitemid,
new_status TYPE swr_wistat.
DATA:BEGIN OF it_swr_cont OCCURS 0.
INCLUDE STRUCTURE swr_cont.
DATA:END OF it_swr_cont.
DATA:BEGIN OF it_swr_messag OCCURS 0.
INCLUDE STRUCTURE swr_messag.
DATA:END OF it_swr_messag.
REFRESH:it_swr_cont.
CLEAR:it_swr_cont.
it_swr_cont-element = 'USLIST'.
it_swr_cont-value = 'USPMGSRI'.
APPEND it_swr_cont.
it_swr_cont-element = 'USLIST'.
it_swr_cont-value = 'USGEM-MM01'.
APPEND it_swr_cont.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = 'WS95100027'
IMPORTING
return_code = return_code
workitem_id = workitem_id
new_status = new_status
TABLES
input_container = it_swr_cont[]
message_lines = it_swr_messag
.
BREAK-POINT.
IF sy-subrc EQ 0.
ENDIF.
Return message is::
Task started under work item ID 000000388640 (current status: Completed)
If i check the swi1 ,log it is saying workflow is completed, Please have a look on below attached image.
I checked in forum, before starting from se38 , the workflow has to set General task, i was set to general task.
And somebody said "You do not wish to set as general task then assign a particular set of users who could execute the workflow"
May i know how could assign the Agents.
Note:I have one alternative, In workflow Container field Agents list if i make two agents as Initial Values , then run the Se38 Working fine,
But My question is, why i am not able to pass Agents to the Workflow, using Se38 .