<html><div style='background-color:'><DIV class=RTE>
<P>THANKS. YES IT WORKS LIKE YOU DESCRIBE&nbsp;!!! :-)</P>
<P>Whats the thinking here? First make a object of the purchasing group, then use the object ID and send this into the CALL FUNCTION 'RH_GET_ACTORS'. Hmm..nice of SAP to document this FM. </P>
<P>I used this function and it works, but its more cleaner to use the intended FM.</P>
<P>CALL FUNCTION 'RH_SAP_ORG_OBJEC_ACTORS_LIST'&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; EXPORTING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; ACT_OBJTYP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = w_OBJTYP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"T024&nbsp;<BR>&nbsp;&nbsp;&nbsp; ACT_OBJKEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = w_objkey&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"BAM<BR>&nbsp;&nbsp; ACT_BEGDA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = SY-DATUM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp; OBJTYP_NOT_VALID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp; NO_ACTOR_FOUND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp; OTHERS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR><BR><BR></P></DIV>
<DIV></DIV>&gt;From: "Schmidinger, Heinz (Unaxis IT BZ)" &lt;heinz.schmidinger@unaxis.com&gt;
<DIV></DIV>&gt;Reply-To: "SAP Workflow Users' Group" &lt;sap-wug@mit.edu&gt;
<DIV></DIV>&gt;To: "'SAP Workflow Users' Group'" &lt;sap-wug@mit.edu&gt;
<DIV></DIV>&gt;Subject: AW: CALL FUNCTION 'RH_GET_ACTORS' . How does it work?
<DIV></DIV>&gt;Date: Tue, 8 Feb 2005 11:52:13 +0100
<DIV></DIV>&gt;
<DIV></DIV>&gt;Hi Tom,
<DIV></DIV>&gt;
<DIV></DIV>&gt;here a lite bit of code:
<DIV></DIV>&gt;
<DIV></DIV>&gt;INCLUDE: &lt;cntn01&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;data: o_t024 TYPE swc_object
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , t_actors TYPE TABLE OF swhactor.
<DIV></DIV>&gt;
<DIV></DIV>&gt;swc_container ac_cont.
<DIV></DIV>&gt;
<DIV></DIV>&gt;swc_clear_container ac_cont.
<DIV></DIV>&gt;
<DIV></DIV>&gt;swc_create_object o_t024 'T024' f_ekgrp.
<DIV></DIV>&gt;
<DIV></DIV>&gt;swc_set_element ac_cont 'ORG_OBJECT_ID' o_t024.
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;PERFORM get_actors TABLES ac_cont
<DIV></DIV>&gt;
<DIV></DIV>&gt;t_actors
<DIV></DIV>&gt;
<DIV></DIV>&gt;USING 'AC00900010'.
<DIV></DIV>&gt;
<DIV></DIV>&gt;-------------
<DIV></DIV>&gt;
<DIV></DIV>&gt;FORM get_actors TABLES pt_cont STRUCTURE swcont
<DIV></DIV>&gt;
<DIV></DIV>&gt;pt_actors STRUCTURE swhactor
<DIV></DIV>&gt;
<DIV></DIV>&gt;USING ps_role LIKE zwf_banf_agents-ac_object.
<DIV></DIV>&gt;
<DIV></DIV>&gt;DATA: lt_actors TYPE TABLE OF swhactor
<DIV></DIV>&gt;
<DIV></DIV>&gt;.
<DIV></DIV>&gt;
<DIV></DIV>&gt;CALL FUNCTION 'RH_GET_ACTORS'
<DIV></DIV>&gt;
<DIV></DIV>&gt;EXPORTING
<DIV></DIV>&gt;
<DIV></DIV>&gt;act_object = ps_role&nbsp;&nbsp;" 'AC00900010'
<DIV></DIV>&gt;
<DIV></DIV>&gt;search_date = sy-datum
<DIV></DIV>&gt;
<DIV></DIV>&gt;TABLES
<DIV></DIV>&gt;
<DIV></DIV>&gt;actor_container = pt_cont
<DIV></DIV>&gt;
<DIV></DIV>&gt;actor_tab = lt_actors
<DIV></DIV>&gt;
<DIV></DIV>&gt;EXCEPTIONS
<DIV></DIV>&gt;
<DIV></DIV>&gt;no_active_plvar = 1
<DIV></DIV>&gt;
<DIV></DIV>&gt;no_actor_found = 2
<DIV></DIV>&gt;
<DIV></DIV>&gt;exception_of_role_raised = 3
<DIV></DIV>&gt;
<DIV></DIV>&gt;no_valid_agent_determined = 4
<DIV></DIV>&gt;
<DIV></DIV>&gt;no_container = 5
<DIV></DIV>&gt;
<DIV></DIV>&gt;OTHERS = 6.
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;Regards
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;Heinz
<DIV></DIV>&gt;
<DIV></DIV>&gt;-----Ursprüngliche Nachricht-----
<DIV></DIV>&gt;Von: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu]Im Auftrag von
<DIV></DIV>&gt;H C
<DIV></DIV>&gt;Gesendet am: Montag, 7. Februar 2005 15:05
<DIV></DIV>&gt;An: sap-wug@mit.edu
<DIV></DIV>&gt;Betreff: CALL FUNCTION 'RH_GET_ACTORS' . How does it work?
<DIV></DIV>&gt;
<DIV></DIV>&gt;I have 2 Qs. I am a NewBe, and I have used a lot of time on this, and I am
<DIV></DIV>&gt;giving in...
<DIV></DIV>&gt;
<DIV></DIV>&gt;1. I am trying to use this rule for Purchasing group.
<DIV></DIV>&gt;
<DIV></DIV>&gt;When I try the rule, AC00900010, in transaction PFAC, it returns the
<DIV></DIV>&gt;agents set up to for my purhcasing group
<DIV></DIV>&gt;
<DIV></DIV>&gt;When I run my method (I have added to a object) with the function,
<DIV></DIV>&gt;'RH_GET_ACTORS' , it fails, and I get a exeption 3 every time. The error
<DIV></DIV>&gt;message saying "Objekttype is not valid as SAP-org.objekttype".
<DIV></DIV>&gt;
<DIV></DIV>&gt;I have checed table T7791 and here I do find OBJTYP = T024.
<DIV></DIV>&gt;The only thing I send in to the function is the rule and the
<DIV></DIV>&gt;(ACTOR_CONTAINER) purchasing group.
<DIV></DIV>&gt;"BAM" is one of my purchasing groups)
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;How do I get this to work, what am I missing ???
<DIV></DIV>&gt;
<DIV></DIV>&gt;************************
<DIV></DIV>&gt;swc_set_element ac_container 'T024' 'BAM'.
<DIV></DIV>&gt;
<DIV></DIV>&gt;CALL FUNCTION 'RH_GET_ACTORS'
<DIV></DIV>&gt;&nbsp;&nbsp; EXPORTING
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ACT_OBJECT = 'AC00900010'
<DIV></DIV>&gt;&nbsp;&nbsp; TABLES
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ACTOR_CONTAINER = ac_container
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ACTOR_TAB = ac_agent
<DIV></DIV>&gt;&nbsp;&nbsp; EXCEPTIONS
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;NO_ACTIVE_PLVAR = 1
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;NO_ACTOR_FOUND = 2
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;EXCEPTION_OF_ROLE_RAISED = 3
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;NO_VALID_AGENT_DETERMINED = 4
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;NO_CONTAINER = 5
<DIV></DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;OTHERS = 6
<DIV></DIV>&gt;************
<DIV></DIV>&gt;
<DIV></DIV>&gt;2. I just want to get agents based on a rule.
<DIV></DIV>&gt;If I create an activity and use the AC rule 'AC00900010'. How do I get my
<DIV></DIV>&gt;agents with this activity in a background job. Is it posible ? How wil the
<DIV></DIV>&gt;task look like (containers, object, - method used) ?
<DIV></DIV>&gt;
<DIV></DIV>&gt;Please advise, Tom
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;&nbsp;&nbsp; _____
<DIV></DIV>&gt;
<DIV></DIV>&gt;Skaff deg en e-postkonto MSN Hotmail
<DIV></DIV>&gt;&lt;http://g.msn.com/8HMAENNO/2752??PS=47575&gt;&nbsp;&nbsp;Med markedets beste SPAM-filter.
<DIV></DIV>&gt;Gratis!
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;_______________________________________________
<DIV></DIV>&gt;SAP-WUG mailing list
<DIV></DIV>&gt;SAP-WUG@mit.edu
<DIV></DIV>&gt;http://mailman.mit.edu/mailman/listinfo/sap-wug
<DIV></DIV></div><br clear=all><hr>Skaff deg en e-postkonto <a href="http://g.msn.com/8HMBENNO/2752??PS=47575" target="_top">MSN Hotmail</a> Med markedets beste SPAM-filter. Gratis!</html>