SWX_GET_MANAGER and vacant position

Dart, Jocelyn jocelyn.dart at sap.com
Thu Dec 13 21:09:47 EST 2001


Hi Serge,
Responsibility rules let you have default agents using priorities.
 
With function module rules you need to do this yourself.
You can of course create your own function module rule that just
calls other rules using FM RH_GET_ACTORS.  E.g. call 1st rule - if
no valid agent found, call 2nd rule to get default agent.
Whether you have a userid attached to the agent can be tested using
evaluation path SAP_TAGT.
 
Another option is to call the rule as a prior step, and then
have your workflow do something different e.g. notify an administrator
or process owner if no-one was found so they can correct the problem,
or send the work item itself to an administrator/process owner for
forwarding to the correct recipient while they sort out the maintenance.
If you send the work item to the admin/process owner they also have the
option of executing the work item on behalf of the agent if it's urgent.
 
E.g. You could create a virtual attribute based on your user/personnel
object
that returns the userid of the manager using SWX_GET_MANAGER. Then you
could test this value with a condition step in your workflow.
 
I quite like this sort of solution as rule resolution errors are
fairly common and it helps to model the exception as part of your workflow.
 
Don't forget if you want to a new rule to find an alternative person using
your
HR org plan, you can use SAP-defined and custom-created evalution
paths in rules using function module RH_GET_STRUCTURE.  Standard
rule 30000011 gives an example of this.
 
But basically the answer is no you need to either code the default
agent determination yourself, or set up a check for invalid agent in your
workflow.
 
SAP does not provide standard rules to do that as of course everyone's
business rules about who is the default agent are different.
 
Regards,
        Jocelyn Dart
Consultant (EBP, BBP, Ecommerce, Internet Transaction Server, Workflow)
SAP Australia
Email jocelyn.dart at sap.com <mailto:jocelyn.dart at sap.com>
Tel: +61 412 390 267
Fax: +61 2 9935 4880
 
 
 
-----Original Message-----
From: Boulay, Serge
Sent: Friday, 14 December 2001 12:36 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: SWX_GET_MANAGER and vacant position
 
 
Hi Felipe,
 
That is what we are using but the problem is when the position, that is set
as the superior of the employee, is vacant... The workflow comes out in
error... The role 168 does not take care of a vacant position or we don't
know how. The role return the position but it can not get the user...
 
-----Original Message-----
From: J. Felipe Uribe Duque [mailto:FelipeUribe at netscape.net]
Sent: Thursday, December 13, 2001 8:17 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: SWX_GET_MANAGER and vacant position
 
 
Hi Serge,
 
Have you try to use the role 168 (superior of...) in the task to aprove the
expenses?, this role takes as a parameter the employee or  the SAP user or
the position (HR structure) to look for the boss, Obviusly it has to be set
up in the Organizational Structure.
 
If you are not using the Organizational Structure from HR, you are alowed to
create one from Workflow.
 
I hope It helps.
 
Regards.
 
Felipe Uribe.
 
"Boulay, Serge" <serge.boulay at sap.com> wrote:
 
>The place i am working have put in place a workflow for approbation of the
>expenses. The approbator is the manager of the employee. The workflow use
>function SWX_GET_MANAGER to get it... If there is no one on the position
the
>worflow gets in error. We have copied the fonction and make it go to the
>next manager but we where wondering if there is a standard way (create a
>relationship in PD) that the workflow would be able to do it without
>creating a new function?
>
>Serge Boulay
>
>
>
--
 
 
 
 
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop at Netscape!
http://shopnow.netscape.com/
 
Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
 


More information about the SAP-WUG mailing list