on 09-13-2011 1:28 PM
Hello workflow gurus,
I have a little problem with my workflow. In first task i start an abap class which calls my abap program. This program starts a webserivce which is validating some data of the workflow container. After using the program i want to go to the next task/workitem. In the moment the workitem is still incomplete after finishing my program. So i have to trigger an event which completes the actual workitem an triggers the next one. I thought of using 'SAP_WAPI_WORKITEM_COMPLETE'. Is this right?
Here is the code of the FM.
CALL FUNCTION 'SAP_WAPI_WORKITEM_COMPLETE'
EXPORTING
workitem_id =
ACTUAL_AGENT = SY-UNAME
LANGUAGE = SY-LANGU.
SET_OBSOLET = ' '
DO_COMMIT = 'X'
DO_CALLBACK_IN_BACKGROUND = 'X'
IFS_XML_CONTAINER =
IMPORTING
RETURN_CODE =
NEW_STATUS =
TABLES
SIMPLE_CONTAINER =
MESSAGE_LINES =
MESSAGE_STRUCT =
Which of the parameters i have to fill and what data i have to use for? What shall i set for the workitem_ID?
Please help me.
Many greeting
Sebastian
Hi Sebastin,
Main purpose of the FM to complete Workitem in portal(Example only).
Workitem id is mandatory.
Basic system information is needed for this fm,
Thanks and Regards,
Ragavendran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
One additional hint: If you are able to call the function properly and it seems to return a success message, but still it doesn't get status COMPLETED, it doesn't mean that the function is not working or your code is bad. It seems that sometimes you need to call this function two times in a row in order to change the status to completed.
Regards,
Karri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As you have mentioned that the work item opens a web service. What I would suggest is that instead of completing task by using SAP_WAPI_WORKITEM_COMPLETE try to create a task of the web service you said by using transaction WF_EXTSRV.. once you created a task use this task in the worklfow by replacing the current dialog work item. and by using SAP_WAPI_CREATE_EVENT try to raise event of BOR WEBSERVICE event COMPLETE. for this also you need to pass the work item ID .
Otherwise what I would suggest with your current workflow design is try to create a parameter as work item Id and import this work item Id into the application and pass this to the function module which you want to use SAP_WAPI_WORKITEM_COMPLETE.
Also populate the container elements to the task container based on its value you can decide whether it is approved or rejected.
Regards
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.