SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Windows, Windows Phone, SAP and ABAP, like SAP UI5, Screen Personas, etc.




CRM Companies List
Web Based CRM Software


You are not one of the possible agents of task 'WSxxxxx'

SAP Workflow configuration of Agent Assignment for task attribute as "General Task" or "no general task" option can cause error during execution of the Workflow using ABAP SAP_WAPI_START_WORKFLOW function module.
You are not one of the possible agents of task 'WS90900061'

While debugging an ABAP application where a SAP Workflow was called using SAP_WAPI_START_WORKFLOW ABAP function module, I see that although sy-subrc is initial I got an informative message "You are not one of the possible agents of task 'WS90900061'" within the returned message_lines table parameter.

Here is the ABAP code block where I call SAP workflow item using SAP_WAPI_START_WORKFLOW function module.

call function 'SAP_WAPI_START_WORKFLOW'
 exporting
  TASK = 'WS90900061'
* LANGUAGE = SY-LANGU
* DO_COMMIT = 'X'
* USER = SY-UNAME
* START_ASYNCHRONOUS = ' '
* DESIRED_START_DATE =
* DESIRED_START_TIME =
* DESIRED_START_ZONLO = SY-ZONLO
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* WORKITEM_ID =
* NEW_STATUS =
 tables
  INPUT_CONTAINER = LT_INPUT_CONTAINER
  MESSAGE_LINES = LT_SWR_MESSAG
* MESSAGE_STRUCT =
* AGENTS =
.

This message informs me about the real reason which causes workflow to execute successfully:
You are not one of the possible agents of task 'WS90900061'

In order to correct this issue, follow the below listed steps:

Open the related workflow using SAP Workflow Builder.
Use SE80 transaction, display related package.
Then open node Business Engineering > Workflow templates The target workflow will be listed under the workflow templates. Double click on the workflow to display details.

ABAP SE80 transaction for SAP Workflow templates

When the Workflow template is displayed, press Workflow Builder button on Basic data tab.

SAP Workflow Builder

When SAP Workflow Builder is displayed on the screen for the related task, follow the below menu path.
"Goto > Basic Data (Ctrl+F8)"
Workflow basic data

When the work item data is displayed, again using menu selections follow:
"Goto > Agent Assignment for task (Shift+F9)"
Agent assignment for task in SAP workflow

This selection will display "Maintain Agent Assignment" screen.
Press on "Attributes..." button from top menu.
workflow agent assignment attributes


agent assignment for no general task option

Change Task information from "No general task" to "General Task" and press Transfer button to complete the error correction process.

general task option for agent assignment in SAP workflow

After above steps are completed and task is saved as general task, when you execute the workflow MESSAGE_LINES will not include an error data like returned at first as "You are not one of the possible agents of task 'WS90900061'"






SAP Tutorials

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table






Related Articles and Tutorials(http://www.kodyaz.com/sap-abap/you-are-not-one-of-the-possible-agents-of-task-wsxxx.aspx)
How to Read SAP Workflow Container Contents using ABAP Function Module
SAP Workflow error: You are not one of the possible agents of task 'WSxxxxx'


Copyright © 2004 - 2017 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems