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