Own Rule (Role) definition

Mark Pyc Mark.Pyc at boots.co.uk
Fri Jan 2 05:10:04 EST 2004


G'day Peggy,
 
RH_SAP_ORG_OBJEC_ACTORS_GET is the function module used behind an 'Organizational Data' type rule. If
you want to code your own solution that will read through user
authorizations you will need to create a 'Function to be Executed' type
rule as you've said. When I create these I tend to copy the function
behind the standard Rule 168 which is SWX_GET_MANAGER to get the correct
interface:
 
*"       TABLES
*"              ACTOR_TAB STRUCTURE  SWHACTOR
*"              AC_CONTAINER STRUCTURE  SWCONT
*"       EXCEPTIONS
*"              NOBODY_FOUND
 
Basically the logic is standard for all Rule functions. Declare some local
data and then read your container - eg.
 
* Get the org-object under consideration.
  SWC_GET_ELEMENT AC_CONTAINER 'ORG_OBJECT' ORG_OBJECT.
* Get the org-object-type and the org-object id.
  SWC_GET_ELEMENT AC_CONTAINER 'OTYPE' ORG_TYPE.
 
In your case you will probably just pass in the sales Org. Once you've got
this information you perform what ever logic is necessary and then load
the determined agents into ACTOR_TAB. If you can't find appropriate agents
raise NOBODY_FOUND.
 
Have fun,
Mark
 
 
 
 
 
Peggy Stammler <PStammler at de.imshealth.com>
Sent by: SAP Workflow <Owner-SAP-WUG at MITVMA.MIT.EDU>
02/01/2004 09:46
Please respond to SAP Workflow Users' Group
 
 
        To:     SAP-WUG at MITVMA.MIT.EDU
        cc:
        Subject:        Own Rule (Role) definition
 
 
Hello,
 
we are not using HR and I would like to define/program a own rule to
determine the responsible agents for the workflow step at runtime. In the
SAP Glossary and Help I found that this is possible, as well on the SAP
Course BIT601 they said that this is possible, but I can't find how I have
to do that. In TR PFAC I can select Role (rule) definition Type: function
to
be executed. SAP automatically fill into function:
RH_SAP_ORG_OBJEC_ACTORS_GET. What do I have to do? Do I have to write my
own
function module and insert this here?
 
In principle: Is it possible to write a own rule like: get all SAP users
with role (PFCG) Y_WF_XY_User and Sales Organisation = vbak-vkorg and
replace with this rule the maintenance of an organisational plan? To
maintain an organisational plan is double work for us and we don't need an
org.plan.
 
Thanks for your comments and help.
 
Wish you all a nice, happy and prosperous New Year.
Peggy
 


More information about the SAP-WUG mailing list