How to find out the agent without executing a step

Hussain, Forhad forhad.hussain at salford.gov.uk
Fri Aug 14 06:17:10 EDT 2009


Rick thanks for your reply.

I have created a new task with my method but this has left me confused. I created a new task in pftc inserted my method.
My first question is do I make this a background task? I then created a step in my workflow with the new task with my method. This is the part I find confusing.

When I test my wf and view technical details for the step with my method, the container tab shows ActObject and this is filled with the WF initiators us ID. It also brings in ActTask, ActWild and ActPlvar these have no values set. My question is where do I find the agent that the method is suppose to work out based on the rule 00000168.

I've outlined below how I created my method. Any help would be much appreciated.

Thanks

Forhad

create new method with FM as template - choose RH_GET_ACTORS - in properties select synchronous - create method parameters ActObject, ActTask, ActWiId, ActPlvar as import.
when I click program this the code it automatically generates. From researching and help from SAP WUG I found out that I only need to pass ACT_OBJECT & ACTOR_CONTAINER parameters to the FM. So I commented out all the other parameters.

BEGIN_METHOD RHGETACTORS CHANGING CONTAINER.
DATA:

lt_agents type standard table of swhactor,
benefitsagenst type standard table of swhactor,
lt_holders type standard table of swhactor,
wa_lt_agents   type swhactor,
Num_lines type i,
ACTOR_TAB type standard table of swhactor,
destn type rfcdes-rfcdest.

swc_container lt_container.
swc_clear_container lt_container.

CALL FUNCTION 'RH_GET_ACTORS'
    EXPORTING
      ACT_OBJECT = 'AC00000168'
   
 TABLES
      ACTOR_CONTAINER = lt_container
      ACTOR_TAB = lt_agents
    
EXCEPTIONS
      NO_ACTIVE_PLVAR = 01
      NO_ACTOR_FOUND = 02
      EXCEPTION_OF_ROLE_RAISED = 03
      NO_VALID_AGENT_DETERMINED = 04
      NO_CONTAINER = 05
      OTHERS = 06.
  
CASE SY-SUBRC.
    WHEN 0.            " OK
    WHEN 01.    " to be implemented
    WHEN 02.    " to be implemented
    WHEN 03.    " to be implemented
    WHEN 04.    " to be implemented
    WHEN 05.    " to be implemented
    WHEN OTHERS.       " to be implemented
  ENDCASE.
END_METHOD.




 

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Rick Bakker
Sent: 14 August 2009 01:52
To: SAP Workflow Users' Group
Subject: Re: How to find out the agent without executing a step

Hello,

You would create a custom task (TS....) to call this method, and then create a step in the workflow to call the task.

The step can then pass the agents back to the workflow.

regards
Rick Bakker
Hanabi Technology

On Thu, Aug 13, 2009 at 2:15 PM, Hussain, Forhad<forhad.hussain at salford.gov.uk> wrote:
> Hi,
>
> after I create the method, do I create a standard task in PFTC using 
> the method I have created? is this this task then to be used in the wf 
> as a step to find the agent?
>
> Thanks
>
> Forhad
> ________________________________
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On 
> Behalf Of Sue Doughty
> Sent: 31 July 2009 13:06
> To: SAP Workflow Users' Group
> Subject: RE: How to find out the agent without executing a step
>
> Forhad,
>
>
>
> This is what I do in the method.  Lt_container really doesn't contain 
> anything.  Lt_agents will contain the entries found.
>
>
>
>
>
> BEGIN_METHOD GETBENEFITSAGENTS CHANGING CONTAINER.
>
> DATA:
>
>       lt_agents      type standard table of swhactor,
>
>       benefitsagenst type standard table of swhactor,
>
>       lt_holders     type standard table of swhactor,
>
>       wa_lt_agents   type swhactor,
>
>       num_lines      type i,
>
>       ACTOR_TAB      type standard table of swhactor,
>
>       destn          type rfcdes-rfcdest.
>
>
>
> swc_container lt_container.
>
> swc_clear_container lt_container.
>
>
>
> *Get Benefits agents based on Rule 90100005
>
> CALL FUNCTION 'RH_GET_ACTORS'
>
>   DESTINATION destn
>
>   EXPORTING
>
>     ACT_OBJECT                = 'AC90100005'
>
>   TABLES
>
>     ACTOR_CONTAINER           = lt_container
>
>     ACTOR_TAB                 = lt_agents
>
>   EXCEPTIONS
>
>     NO_ACTIVE_PLVAR           = 1
>
>     NO_ACTOR_FOUND            = 2
>
>     EXCEPTION_OF_ROLE_RAISED  = 3
>
>     NO_VALID_AGENT_DETERMINED = 4
>
>     OTHERS                    = 5.
>
>
>
>
>
> Regards,
>
> Sue T. Doughty
>
> SAP Workflow Specialist
>
> Old Dominion Freight Line, Inc.
>
> 500 Old Dominion Way
>
> Thomasville, NC 27360
>
> Phone:  (336) 822-5189
>
> Toll Free (800 ) 432-6335, ext. 5189
>
> Email:  sue.doughty at odfl.com
>
> ________________________________
>
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On 
> Behalf Of Hussain, Forhad
> Sent: Friday, July 31, 2009 6:02 AM
> To: 'sap-wug at mit.edu'
> Subject: How to find out the agent without executing a step
>
>
>
> Hello All,
>
>
>
> I am using the standard rule 00000168 (superior users as) to find the 
> WF initiators manager, but I would like to find out this agent before 
> the step is executed. This is because I would like to escalate the 
> work item to the manager's manager if a deadline is reached - meaning 
> I would be able to use the agents id in the processing obsolete branch 
> instead of the WF initiator to find the next level of approver.
>
>
>
> After researching on SDN and SAP WUG, I think I need to use a Method 
> that executes function module RH_GET_ACTORS and that I only need to 
> pass ACT_OBJECT & ACTOR_CONTAINER parameters.
>
>
>
> I filled the ACT_OBJECT with the rule 00000168, but I am unsure what 
> parameter should be passed for ACTOR_CONTAINER. Please can anyone 
> advice me on what value should be passed and if I am one the right line.
>
>
>
> CALL FUNCTION 'RH_GET_ACTORS'
>
>>
>
>>
>
>>
>
>>  EXPORTING
>
>>
>
>>    ACT_OBJECT                = 'AC00000168 '
>
>>
>
>>  TABLES
>
>>
>
>>    ACTOR_CONTAINER           =
>
>
>
>>  EXCEPTIONS
>
>>
>
>>    NO_ACTIVE_PLVAR           = 1
>
>>
>
>>    NO_ACTOR_FOUND            = 2
>
>>
>
>>    EXCEPTION_OF_ROLE_RAISED  = 3
>
>>
>
>>    NO_VALID_AGENT_DETERMINED = 4
>
>>
>
>>    OTHERS                    = 5.
>
>
>
>
>
> Thanks
>
> Forhad
>
>
>
> Forhad Hussain
>
> SAP Developer
>
> SAP Team
>
> Customer & Support Services
>
> Salford City Council
>
>
>
> DISCLAIMER: The information in this message is confidential and may be 
> legally privileged. It is intended solely for the addressee.
> Access to this message by anyone else is unauthorised. If you are not 
> the intended recipient, any disclosure, copying, or distribution of 
> the message, or any action or omission taken by you in reliance on it, 
> is prohibited and may be unlawful.
> As a public body, Salford City Council may be required to disclose 
> this email [or any response to it] under the Freedom of Information 
> Act 2000, unless the information in it is covered by one of the exemptions in the Act.
> Please immediately contact the sender if you have received this 
> message in error.
> For the full disclaimer please access http://www.salford.gov.uk/e-mail.
> Thank you.
>
> DISCLAIMER: The information in this message is confidential and may be 
> legally privileged. It is intended solely for the addressee.
> Access to this message by anyone else is unauthorised. If you are not 
> the intended recipient, any disclosure, copying, or distribution of 
> the message, or any action or omission taken by you in reliance on it, 
> is prohibited and may be unlawful.
> As a public body, Salford City Council may be required to disclose 
> this email [or any response to it] under the Freedom of Information 
> Act 2000, unless the information in it is covered by one of the exemptions in the Act.
> Please immediately contact the sender if you have received this 
> message in error.
> For the full disclaimer please access http://www.salford.gov.uk/e-mail.
> Thank you.
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
>

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug

DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee.

Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful.
As a public body, Salford City Council may be required to disclose this email [or any response to it] under the Freedom of Information Act 2000, unless the information in it is covered by one of the exemptions in the Act. 
Please immediately contact the sender if you have received this message in error. 

For the full disclaimer please access http://www.salford.gov.uk/e-mail.  Thank you.




More information about the SAP-WUG mailing list