AW: CALL FUNCTION 'RH_GET_ACTORS' . How does it work?

Dart, Jocelyn jocelyn.dart at sap.com
Mon Feb 14 01:46:38 EST 2005


Hi Tom, 
 
In our own defense - it's nothing to do with how RH_GET_ACTORS work and everything to do with how that particular SAP Org Object based rule resolution works - i.e. you have to pass an purchasing group object as the starting criteria for that rule, not a purchasing group id.   
 
RH_GET_ACTORS just lets you call the rule in background - you still have to provide the starting criteria in the correct format exactly the same as if you had bound the rule into a workflow. 
 
Regards,
Jocelyn. 


________________________________

	From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of H C
	Sent: Tuesday,8 February 2005 10:23 PM
	To: sap-wug at mit.edu
	Subject: RE: AW: CALL FUNCTION 'RH_GET_ACTORS' . How does it work?
	
	

	THANKS. YES IT WORKS LIKE YOU DESCRIBE !!! :-)

	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. 

	I used this function and it works, but its more cleaner to use the intended FM.

	CALL FUNCTION 'RH_SAP_ORG_OBJEC_ACTORS_LIST'    
	  EXPORTING                                     
	    ACT_OBJTYP             = w_OBJTYP          "T024 
	    ACT_OBJKEY             = w_objkey           "BAM
	   ACT_BEGDA              = SY-DATUM            
	   ACT_ENDDA              = SY-DATUM            
	  TABLES                                        
	    ACTOR_TAB             = ac_agent            
	EXCEPTIONS                                     
	   NO_ACTIVE_PLVAR        = 1                   
	   OBJTYP_NOT_VALID       = 2                   
	   NO_ACTOR_FOUND         = 3                   
	   OTHERS                 = 4                   
	
	
	

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

________________________________

	Skaff deg en e-postkonto MSN Hotmail <http://g.msn.com/8HMBENNO/2752??PS=47575>  Med markedets beste SPAM-filter. Gratis! 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20050214/78000c94/attachment.htm


More information about the SAP-WUG mailing list