Regarding Approver agent determination

Hi,
        I am new to SRM and i have a requirement to change the Workflow which is trigerred whenever a shopping cart is created and mail is sent to the approver for approval of the same.
       Here on creation of shopping cart i need to do some changes while determining the approver and i dont know exactly in where is this approver determined. Business object BUS2121 has been customised.
       Can any one please let me know the place exactly where this Approver Agent is determined, i need the method and the business object.
Regards,
Ravi G

Hi,
Whcih Workflow are you using for the Shopping cart approval?Based on the workflow used,teh agent determination varies e.g. for the Std 1step  ,2 step approval workflow,agent assignement is done at the task level but for N step approval workflow the agent determination is done thorugh the BADI "BBP_WFL_APPROV_BADI".
See teh foll link for more details:
SRM Business Workflow
http://help.sap.com/saphelp_srm50/helpdata/en/8b/4fa9585db211d2b404006094b92d37/frameset.htm
Setting Up SAP Business Workflow
http://help.sap.com/saphelp_srm50/helpdata/en/ee/277e3c281f1817e10000000a114084/frameset.htm
Related links ->
Re: SRM workflow doubts....
Triggering SRM workflow from a  web-based form (HTML)
Workflow debugging
Re: Triggering an alert
Depending on the Approval Workflow, you are using, there are Binding Events under the Triggering Events tab of the Workflow inside the Workflow Builder (Transactions - SWDM / PFTC ).
There the event can be defined, depending on the Business Object Type methods avaiable in SWO1 Transaction for BUS2121 in our case. (SAVED => Reqt cov. request Shop. cart created )
Refer to this link for more details.
http://help.sap.com/saphelp_srm50/helpdata/en/2c/e68d406b305537e10000000a1550b0/frameset.htm
BR,
Disha.
<b>Pls reward points for useful answers.</b>

Similar Messages

  • Change Approval Agent in Workflow WS10400002 (SRM)

    Hi Gurus,
    My expertise in Workflow is very low and I have a requirement where I need to copy standard Workflow WS10400002 to a Z one and change the Approval Agent Determination. They do not want to use the Organizational Structure or Roles for this but instead they would like to have a Z table with the different users and determine the agents using ABAP. Is this possible? If so, how can I achieve this (I am not interested in the ABAP Code itself, but how can I call a routine or FM or program from the Step)?
    I searched the Web and SDN but only found explanation on how this works in standard workflow.
    Any help will be much appreciated.
    Regards,
    Ernesto.

    Hi Ernesto,
    You might get more help by posting your question in the workflow forum:
    SAP Community Network Forums » SAP NetWeaver » SAP Business Workflow
    Brenda

  • SRM 7.0 WF: SC_RR_PURCHASING_GROUP Agent Determination

    Does anyone know which set of criteria is used by the SC_RR_PURCHASING_MANAGER Resp. Resolver Name function to determine the agents list?  I am getting mixed results, including non-manager users in different org units appearing in the results list.  The descrption of the RR_PURCHASING_MANAGER function looks more like what I need however the notes say its not for Shopping carts.
    Is it manger of the org unit that is Responsible for both the Org Unit of the originator, and the Product category? (Responsibilty Tab).  Or it is the PRCAT attribute? Or some other combination?  I am not seeing a pattern.  
    What I am trying to accomplish is to have the final approver on the shopping cart be the manager of the purchasing group, I am not concerned with the product category selected as the purchasing agents process by department not product category.
    Thanks in advance.
    J

    I have about 8 levels.  I haven't fully cofigured all of them yet but the core ones are in place.  The RR_MANAGER and RR_MANAGER_OF_MANAGER agent determination based on org assignments work correctly.
    First is Department manager must approve, agent determination via RR_MANAGER (works)
    Next is Purchasing Manager if > 5K, agent determination via RR_ROLE (role assignment, works)
    Next is Director if > 25K, agent determination via RR_MANAGER_OF_MANAGER (works)
    Next is Budget Manager if its an Asset, agent determination via RR_ROLE (role assignment, not working yet)
    Next is Finance Director if > 100K, agent determination via RR_ROLE (role assignment, works)
    Next is IT Asset manager if PRCAT is for computer equipment, agent determination via RR_ROLE (role assignment, not configured yet)
    Next is Fleet manager if PRCAT is for Vehicle, agent determination via RR_ROLE (role assignment, not configured yet)
    Final Approver is the Purchasing Agent,  This should be the agent (Head of Org Unit) of the Purchasing Group that the end user department is assigned under, however using SC_RR_PURCHASING_GROUP, I get the expected purchasing agent, the director of the end user department, the manager of the end user department and an end user in a different org unit as posisble agents.
    When I set the Resp. Resolver Name for the final step to RR_PURCHASING_GROUP, I get the message 'An Exception has Occured' and the cart is lost.  This is the resovler role that is stated as not working for shopping carts.
    Thanks
    Jon

  • Purchase Requistion - Agent Determination using responsibilities - Issue

    Hi Everyone,
    I am new to workflow. I am having an issue wrt Purchase Requistion - Agent Determination using responsibilities.
    Created some 30 to 40 resposibilities with combination of inputs - R1, P1 & Cost Center
    Checked rule with responsibilities in Simulation mode and for the given inputs shows correct output.
    Same config is present both in DEV and ACP. Simulation works fine in both systems.
    But when I created Purchase Req. in DEV and save it. Workitem is generated for the correct agent. But when I do the same test in Quality, it fails and created Workitems for several agents.
    Checked container info. in both systems,no.of agents is the ONLY difference (i.e. 1 in DEV and 30+ agents in Quality).
    Put shred some light on this issue.
    Workflow Used: BUS2009
    Task : TS00007986
    Thanks a ton in advance.
    Regards,
    Krishna

    Hi,
    Open the workflow (WS*******) with SWDD and see the bindings for the rule in the approval step (using TS00007986). Do they look the same in both environments? Are you passing the same parameters for the rule?
    Another thing that you should check is a possible authorisation error. Maybe the users are not authorised to execute the needed functions for finding the agent inside the rule (common problem).
    Also try to read the technical workflow log (Start a workflow, open SWI1 and drill-down to the workflow log). Can you see some error messages there? You will probably find a message saying that "cannot execute agent rule" or something like that. It is WF behaviour that if it cannot find an agent it will send the work item to all possible agents (unless otherwise configured).
    Regards,
    Karri

  • Agent determination best practices

    Hi, workflow dev team!
    Another question about workflow best practices.
    I build a workflow, the first step of each workflow, at least as I see it, is to determine agents for all steps in the workflow and store it in multiline WF-container. After that, to use this WF-container data to execute a step inside of workflow.
    The questions are:
    1. Suppose, I filled a WF-container with a list of all possible agents and their position (in order to supply more user-friendly approve/decline notifications) for the different steps inside of this workflow (username & position). As I understand, I can access to specific line of multiline container with &AGENTS[&INDEX&]& inside of EXPRESSION field (not via ABAP-code in method of class), but how can I access specific column of the WF-container? E.g. &AGENTS[1]& will return «USJOHN — Junior Manager», is it possible to retrieve username and position from multi line and pass it to the task as two separate container elements?
    2. Is it possible to query specific line of multiline container element according to some logical condition inside of EXPRESSION field (not via ABAP-code in method of class) or in order to do this I have to implement that logic inside of ABAP class method?
    And the last question, probably, less connected to the questions asked above.
    3. If I need to define agents for the task, what is the best approach to do that:
    — define the task as General Task and insert the relevant agents as multiline container element via EXPRESSION field;
    — to play with Agent Assignment (try to implement agent determination logic there) and not to define the task as general one.
    Thanks.

    Ronen already had great input, but here are some additional points:
    -In general I would try to avoid some kind of "Let's get all the agents at the beginning of the workflow into a multiline container, and try to pick up the correct ones for the individual steps" approach. Of course if your aim is just to display the list of agents somewhere (task description etc.,), then this might be OK approach.
    -Rules are better than expressions in agent determination (at least in most cases). If the approvers change during the process, you can (as an WF admin) just click the "Execute agent rule again" functionality, and the system will find the correct new approver for the work item. Otherwise you need to go to manipulate the container element(s) (and first figure out that who is the approver).
    Answer for 3: You don't need to use only expressions/container elements. Try to check if you can use rules. In some rare cases you might consider of using the tasks' agent assignment (the same place where you set the task as general task). Let's say that you want to send the work item to all users that have certain authorization role. Now you can set the role as a "restricting entity" at the task level (=same place where you set the general task). This will mean that only the users who have the role are the possible agents for the task. And now if you leave the agent determination part at the workflow template empty (no expressions, no rules etc), you are done!
    Regards,
    Karri

  • Agent determination failed in Standard Workflow.

    Hi Experts,
    I am new to workflow and we are trying to implement the standard HCM process of Transfer.
    The worflow is giving this error.
    Error when processing node "000000032"
    which further says Agent determination failed for step "000000032"
    Pls help and guide what can be done to resolve it.
    We have checked the Org Structure.
    Regards,
    SV

    Hi,
    Thank you for your reply,
    Which std workflow you are using ?
    We are using the WF WS17900427.
    Are you using portal to trigger the workflow and webdynpro screen for approval or adobe form for approval ?
    Yes
    If the agend resolution is getting failed. What role number ?
    Rule ID 17900012.
    Have your tested individually from PFAC t-code. Is it giving the correct agent from there. check from there.
    Testing individually (onclick of Stimulate rule resolution).
    Runtime Error MOVE_CAST_ERROR
    Exception     CX_SY_MOVE_CAST_ERROR
    Regards,
    Sanjyoti.

  • Agent determination for workflow

    Hi everyone,
    I have a classic issue: I'm trying to assign a workflow task to an agent. The agent should be determined from the container element "APPROVER". In the task I've entered the expression &APPROVER&; however, I'm receiving error "Agent determintaion for step 4 failed..." "Result of agent determination does not agree with agents of task". And, yes, I've made sure the APPROVER element is of type Import and has a proper value.
    I don't get this; I thought setting the agent to the value of the container element should do the job? After all, the container element "APPROVER" comes up in the F4 search help under the Decision tab of the task... what's wrong here?
    The WF works fine if I set the "WF_Initiator" as the agent, however. But, this is a bit limiting in the long run...
    Regards,
    Trond

    Hi Ravi,
    this is what I actually did... but I found another post, with a reply from Ramki Maley, advising me to make the APPROVER of type SWHACTOR. That helped!
    Thanks anyway,
    Trond

  • Agent determination for SRM WF

    Hi All,
    I have developed a custom WF i.e. copy of 2 step Invoice approval WF.
    For agent determination, I have put in logic for Adhoc agent, which is working fine.
    My query is that I can have multiple agents for a particular step, which I am able to see when referring to approval preview.
    However when i try to change one of the entries for agent , system replaces <i>all entries</i> with changed entry for an agent.It does not change the one particular agent out of these multiple agents.
    Wanted to know is it the std behaviour that at the time of changing the agent, evenif we have multiple agents , it will be chaged to only one agent - which is being replaced ?
    Awaiting your inputs.
    Regds,
    Akshay

    Hello Abraham,
    To understand what's happened, you will need to debug /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP and /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID methods from /SAPSRM/CL_IM_WF_RR_PGRP_SC implementing class (interface for BAdI definition /SAPSRM/BD_WF_RESP_RESOLVER from enhancement spot /SAPSRM/BD_WF_AGENTS )
    If mapping between area and item is correct, see why purchasers from purchasing group(s) are not correctly found by debbuging /SAPSRM/IF_WF_AREA~GET_RESPONSIBLE_APPROVERS method from implementation /SAPSRM/CL_WF_AREA_PURCH_GRP.
    Regards.
    Laurent.

  • PO Agent Determination

    Hi Workflowers!
    I would like to know 2 things:
    1. Is there a standard rule for agent determination for Purchase Orders? I know the standard workflow is WS20000075, but how does it determine the Agent who is supposed to receive mail reminding them to  approve? Is there also a standard rule for Deadline monitoring (Requested End) for PO?
    2.Is there a standard Reservations workflow? Is there a standard rule for agent determination and deadline monitoring for this workflow?
    Thank you in advance.

    Hi,
    WS20000075 this std. Workflow for the PO this has multiple levels of approvals, Depends on the no. of approvals it will flow.
    The approver can be picked using the User Exit M06E0005 (EXIT_SAPLEBNF_001 - User Exit ZXM06U51), here you have to write logic to pick the Approver.
    The approval workitem comes to SAP Inbox, once the approver click the workitem it will open the Transaction, there the user can approve.
    To see the status of the Workflow, Go to ME23N, in the top left a button, Service Object, click on that, a drop down appear in Workflow > Workflow Overview, you can see the status here.
    [Deadline monitoring|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/303617cf-73dd-2a10-c993-cc6303585176] is not available in the std. workflow, you can configure it to the PO workflow. Copy the std. to your custom workflow and modify the custom workflow.
    Regards,
    Surjith

  • SWI1_RULE - Agent Determination

    Hi Everyone,
    I have a problem where a workitem is not finding an Approver. After I run SWI1_RULE for the workitem then it is routed to the correct approver, which is fine. However I keep having to run SWI1_RULE each time for the same workflow problem to push the workitem through to the approver.
    Everything in the system is set up fine in terms of Org Data and the buffers are being refreshed fine - we've started refreshing after all changes and can rule the buffer out as a problem. The WF-BATCH user authorisations are all fine too.
    I'd be interested to know what you think of this problem and maybe you have an idea about the workflow cannot send the workitem to the approver and thus I keep needing to use SWI1_RULE each and every time.
    Many thanks for your time
    Kind Regards
    DK

    Hi,
    Is this problem happening for new workflow instance also?
    it looks like, you might be checking with old workitems ( which were created before any change to rule definition), because SW1_RULE is nothing but reexecuting the agent determination rule again, there should not be any difference when it is executed by Workflow runtime or by using SWI1_RULE.
    Regards
    Krishna Mohan

  • Conditions for contract workflow approval  agent.

    Y'all,
    I would like to know if its possible to have conditions in the WS14000088 contract workflow to assign the approval agent/user depending on contract values, for example i mean:
    "if the contract has an specific value at item level then assign the approval to the business unit manager... or if the contract has an specific value at header level then assign the approval to the category manager..." etc.. etc..
    Is it possible? if yes, how do you commit it into the system?
    Regards,
    Gerardo.

    Hi Jerry,
    Yes it is possible to have a conditions to assign and determine the approval agents depending on the value of the contract.
    Goto tcode SWDD and for the appropriate task in the workflow 'WS14000088' create the condition. The work item for this step can be executed when this condition for work item generation is met. If there is a requested start for this work item, this is checked separately when the condition is met.
    Reward points if the answer is helpful.
    Regards,
    Andy.

  • Agent determination issue

    Hello Experts,
      We have developed one custom workflow a year back and last two months we are seeing the issue with Agent Determination randomly.  We created a position with 3 users and assigned the Position to the Agent Assignment.  Some times the work item sent to other users other than 3 users assigned to the position.  We are not able to trace it, why it's behaving like this.  Any help would be appreciated.
    with best regards
    K. Mohan Reddy

    If this happens randomely then we can only assume
    Please check the wflow log from SWIA whether someone has forwarded the workitem?
    There can be also change in Position assignment, Substitute getting maintained.
    Also check whether the users are maintained in the Task level if it is General forwarding Not allowed task from the task attribute.
    Thanks
    Arghadip

  • Agent determination problem

    I have a workflow that has been in production for almost a year.  We are in the middle of integration testing for another rollout and I'm getting agent determination errors in this workflow.  There are three steps involved.  The first two use the exact same rule.  The first of these two works fine.  When it tries to run the rule again for the second step, it gets no agent found.  If I test the rule it works.  If I restart the workflow, it works.  When it moves on to the third work item using a different rule, it errors out no agent found.  When I test this rule, it works.  When I restart at this step, it also works.
    This is a new integration client that was copied from production.  I've performed the standard workflow customization like I always do.  I've run several other workflows and only notice the agent determination problems in this one.  The workflow hasn't changed in months although there have been some user security changes...I'm not sure how that could really affect the agent determination during the creation of work items. 
    One thing that might be important...userA created the first workitem and the agent determination resolves to userB.  When userB executes the first work item and completes, the second work item should also resolve to userB using the exact same rule.  This fails.  I restarted it using my account and it resolves to userB.  UserB executes work item #2 and work item #3 should resolve to userC but the agent determation fails again.  I don't know whether the work item agent is "used" to perform the creation of the next workitem or not but this is the only difference between the first two work items and one works while the other does not.
    It's almost like userA can perform the agent determination but userB cannot.  I can't manually execute the agent determination as userB so I ran se37 as myself in debug and changed SYST-UNAME to userB and it worked fine and returned userB as the agent.  That would seem to eliminate security as an issue with the agent determination.

    Hi,
    Are you absolutely sure that it is not an authorisation issue? Can you give SAP_ALL (and the possible structural authorisations) to all the users that are involved in the process? (I don't think that changing sy-uname in debug mode to another user really is a correct way to try to prove whether this is an authorisation issue.)
    The agent determination of the following step is executed by the previous WF agent, if there is no background steps between. So if the previous agent doesn't have enought authorisations, the agent determination will fail.
    Regards,
    Karri

  • Agent Determination for Service Entry (BO-BUS2091)

    HI,
    I am new to workflow and facing below issue.
    I have created a workflow for Service entry sheet approval (BO- BUS2901) and I am having an issue with the agent determination. I am using my own Ztable to determine the possible agents.
    I am using the following code in the FM of the rule I created for determining the agent:
    FUNCTION ZME_SRV_REL_GET_RESPONSIBLE.
    *"*"Local Interface:
    *"  TABLES
    *"      ACTOR_TAB STRUCTURE  SWHACTOR
    *"      AC_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
    INCLUDE <cntain>.
    TABLES: essr_rel, essr,zmm_service_mail.
    DATA: object TYPE swc_object.
    DATA: BEGIN OF essrkey,
    lblni LIKE essr-lblni,
    END OF essrkey.
    DATA: verak_user TYPE csks-verak_user.
    REFRESH actor_tab.
    CLEAR actor_tab.
    swc_get_element ac_container 'service' object.
    if sy-subrc eq space.
    essrkey-lblni = object-objkey(10).
    select single * from essr where lblni = essrkey-lblni.
    select single * from zmm_service_mail
    where frggr = essr-frggr
    and frgsx = essr-frgsx.
    if essr-frgzu eq ' '.
    verak_user = zmm_service_mail-pernr1.
    elseif essr-frgzu eq 'x'.
    verak_user = zmm_service_mail-pernr2.
    endif.
    actor_tab-otype = 'us'.
    actor_tab-objid = verak_user.
    append actor_tab.
    endif.
    ENDFUNCTION.
    When I debug, sy-subrc = 8 at swc_get_element ac_container 'service' object.
    What could be the problem?
    Note- I have gone thru below thread but still I am unable to find the error.
    http://scn.sap.com/thread/2017416

    Hi,
    You should re-read the thread that you quoted above. The mighty Sue Keohan suggested a solution.
    Instead of trying to pass a service *object*, and then extracting the key, you can just pass the key itself.  It has type EESSR-LBLN1.
    swc_get_element ac_container 'service_key' lv_service_key.
    if sy-subrc eq 0.
      essrkey-lblni = lv_service_key.
    (etc)
    cheers
    Paul

  • Agent Determination for Service Entry

    Hi Guys,
    I created a workflow based on BO BUS2901 to send approval notification to an approver and I am having an issue with the agent determination. I am using the cost centre owner from the PR associated with the PO for the service entry as the approver.
    I am using the following code in the FM of the rule I created for determining the agent:
    FUNCTION ZME_REL_GET_RESPONSIBLE.
    *"*"Local Interface:
    *"  TABLES
    *"      ACTOR_TAB STRUCTURE  SWHACTOR
    *"      AC_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
      INCLUDE <cntain>.
      TABLES: eban, essr_rel, essr, ekpo, ebkn, csks.
      DATA: object TYPE swc_object.
      DATA: BEGIN OF essrkey,
               lblni LIKE essr-lblni,
               ebeln LIKE essr-ebeln,
            END OF essrkey.
      DATA: verak_user TYPE csks-verak_user, kostl TYPE ebkn-kostl.
      REFRESH actor_tab.
      CLEAR actor_tab.
      swc_get_element ac_container 'ServiceEntry' object.
      IF sy-subrc EQ space.
        essrkey-lblni = object-objkey(10).
        essrkey-ebeln = object-objkey+10(10).
          select * from ekpo where ebeln = essrkey-ebeln.
            select single * from ebkn where banfn = ekpo-banfn.
              kostl = ebkn-kostl.
          endselect.
        select * from csks where kostl = kostl.
          verak_user = csks-verak_user.
        endselect.
        actor_tab-otype = 'US'.
        actor_tab-objid = verak_user.
        APPEND actor_tab.
      endif.
    ENDFUNCTION.
    When I debug, sy-subrc = 8 at swc_get_element ac_container 'ServiceEntry' object.
    What could be the problem?
    Thanks
    Regards

    Hi Sarvesh, T
    This thread was already answered some time ago.  Please open a new Discussion marked as a question.  If the thread you originally posted to has material related to your question, include a link.  Your content is attached below to make it easy for you to simply paste it into the new Discussion.  It is recommended to read the Rules of Engagement and other documents in the Getting Started link at the top right.   If you have any questions, feel free to respond to this DM (Direct Message) and I will be happy to try to assist.
    Rgds,
    Jocelyn (SCN moderator)

Maybe you are looking for