AW: CALL FUNCTION 'RH_GET_ACTORS' . How does it work?
Schmidinger, Heinz (Unaxis IT BZ)
heinz.schmidinger at unaxis.com
Tue Feb 8 05:52:13 EST 2005
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!
More information about the SAP-WUG
mailing list