Job as responsible agent

Maorriyan maorriyan_santoso at yahoo.com
Mon Jan 17 06:21:48 EST 2005


Hi Richard & every body,
Sorry for late reply.
We're not maintaining any organizational structure, so
my approach is create link between job (C) to SAP Id
(US). I was creating the relation ship using expert
mode (PO03) and subtype A/B038.
I have a method to determine agent and here's the
code:

constants: c_c(2)  type c value 'C',
           c_space type c value ' '.

DATA: BEGIN OF ijob OCCURS 0,
       job LIKE wfsyst-agent,
END OF ijob.

DATA: BEGIN OF izsgmmpwf01 OCCURS 0,
        werks LIKE zsgmmpwf01-werks,
        mtart LIKE zsgmmpwf01-mtart,
        sttxt LIKE zsgmmpwf01-sttxt,
        agr_name LIKE zsgmmpwf01-agr_name,
        agr_name_appr LIKE zsgmmpwf01-agr_name_appr,
END OF izsgmmpwf01.

LOOP AT izsgmmpwf01.
*  SELECT single objid INTO ijob-job
*         FROM hrp1001
*         WHERE otype = 'C'
*         AND plvar = '01'
*         AND rsign = 'B'
*         AND relat = '038'
*         AND istat = '1'
*         AND infty = '1001'
*         AND subty = 'B038'
*         AND sclas = 'US'
*         AND sobid = izsgmmpwf01-agr_name.
*    CONCATENATE c_c ijob-job INTO ijob-job SEPARATED
BY c_space.
*    APPEND ijob.
*  ENDSELECT.
*ENDLOOP.

And my possible agent is using AG Role.
When I execute this task it's coming with an error
message, "Agent determination error"

 --- Richard Marut <rvmarut at earthlink.net> wrote: 
> Maorriyan,
> 
> Are you assigning a user directly to a job? What
> relationship are using? I
> looked at the allowed relationships and none of look
> like they would be
> suitable to assign a user directly to a job.
> 
> What I would do is start with a position and set up
> a relationship to a job
> where the position is described by job (B 007). Then
> I would add a user as a
> holder (A 008). This way when you specify the job at
> the task, SAP would
> resolve the job to the position to the user.
> 
> Don't forget to add the position to an
> organizational unit.
> 
> Richard...
> 
> -----Original Message-----
> From: sap-wug-bounces at mit.edu
> [mailto:sap-wug-bounces at mit.edu] On Behalf Of
> Maorriyan
> Sent: Tuesday, January 11, 2005 9:45 AM
> To: SAP Workflow Users' Group
> Subject: RE: Job as responsible agent
> 
> Hi Sheldon,
> I have no problem with object type 'US'. It's
> working
> at the moment. As I mention in previous e-mail,
> instead of assign object type 'US' as my responsible
> agent, I want to use job (object type C) as my
> responsible agent.
> I already assign at least two user is (object type
> US)
> to single job (object type C). But when I assigned
> this job id as my responsible agent, it come with
> error 'Result of agent resolution does not agree
> with
> agents of task'. It seems that agent responsible is
> not part of possible agent.
> My possible agent is AG-Role that contains same user
> id that link to the job.
> Any idea?
>  
>  --- Sheldon Oxenberg <soxenber at scsnet.csc.com>
> wrote:
> 
> > Hello Maorriyan,
> > 
> > If you append all of the type 'US' user id's into
> a
> > MULTILINE container
> > element of type WFSYST.ACT_AGENT, you can then
> pass
> > this container
> > element as your responsible agent(s).
> > 
> > Sheldon
> > 
> > 
> > -----Original Message-----
> > From: Maorriyan
> [mailto:maorriyan_santoso at YAHOO.COM]
> > 
> > Sent: Sunday, January 09, 2005 10:02 AM
> > To: SAP Workflow Users' Group
> > Subject: Job as responsible agent
> > 
> > Hello all,
> > I have background task to determine agents. It's
> > starting from get the AG-Role base on plant and
> > material type, then I get the user id. But I don't
> > want to assign this user id directly as my
> > responsible
> > agent. I need to notified more than 1 users for
> the
> > same notification. Since we're not implementing HR
> > module, what's I'm thinking of is, assign several
> > sap
> > id to job (object type C) and pass it as my
> > responsible agent.
> > My question is:
> > It is possible to make job (object type C) as my
> > responsible agent where my possible agent AG-Role.
> > User id that I assigned in a job is belongs to
> > AG-Role
> > as well.
> > I believe many of you done this before, if we can
> > share same experience, I'll appreaciate it.
> > 
> > 
> > =====
> > Maorriyan
> > 
> >
>
________________________________________________________________________
> > Yahoo! Messenger - Communicate instantly..."Ping" 
> > your friends today! Download Messenger Now 
> > http://uk.messenger.yahoo.com/download/index.html
> > _______________________________________________
> > SAP-WUG mailing list
> > SAP-WUG at mit.edu
> > http://mailman.mit.edu/mailman/listinfo/sap-wug
> > 
> > _______________________________________________
> > SAP-WUG mailing list
> > SAP-WUG at mit.edu
> > http://mailman.mit.edu/mailman/listinfo/sap-wug
> >  
> 
> =====
> Maorriyan
> 
>
________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping" 
> your friends today! Download Messenger Now 
> http://uk.messenger.yahoo.com/download/index.html
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
> 
> 
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>  

=====
Maorriyan

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html


More information about the SAP-WUG mailing list