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

Similar Messages

  • Agent Determination using a Rule

    Hi All,
    I tried finding related threads, but was not able to find anything that exactly matches this issue.
    I have an Activity type task to which I have assigne a rule for agent determination. I am assigning the SAP userid to the actor_tab in the function module. This is the code I am using:
      ACTOR_TAB-OTYPE = 'US'.
      ACTOR_TAB-OBJID = 'AJOHN'.
      APPEND ACTOR_TAB.
    But, when I try to simulate the rule in PFAC, it says "no agent found". What am I doing wrong?

    I created a function module called ztest_rule in se37 and put your exact code.  I then created a rule called ztest_rule in PFAC and chose Agent Determination: Function to be executed and entered ztest_rule as my function module.  When I hit the little abacus and then the wrench in PFAC to test, it returns  US  AJOHN.

  • Agent determination using attribute

    Hi all,
    My scenario is to find agent from a z table which has organisational unit number with prefix O.
    I created a attribute in business object and programed accordingly that it finds the correct org number for the key field. I had done a self test and it is able find correctly.
    Now i have called the attribute to workflow and event container using the same type it is able to get the value, i have done the bindings also. Using expression in the agent assignment i used this variable directly likes this &org_U& here the value now would be O 5981001 which has a business partner under and user below business partner... my problem is if the business partner is not there my workflow works if the orgunit has a business partner then it is not passing the work item....
    Thanks
    Annamalai

    In the table HRP1001 you retrieve all the agent that is assigned to the Organization unit and append the SAP User ID concatenated with US to a container element. You then use this container elementas an Expression. This will surely work.
    <b>Reward  points if useful</b>

  • Agents determination using Organization chart

    Hi,
    I have a Organization chart.
    and I assigned a Job in that Organization chart to the Agents assignment in TASK.
    Job Is assigned to a user ( US.....)
    I am not knowing how to get that agents So as to start the task.
    I am taking about the AGENTS field in the control tab of the ACTIVITY
    Regards

    Hi,
    In my Scenario I have an Org Object.
    In my Org Object there are two positions.
    1 Manager
    2 Admin
    Both the positions are assined a Job and  User  each.
    Now I want the person in the Manager position must be Doing the activity,
    Your Questions
    You tell me who are the possible agents?  -
    > the person in Position assigned ( Manager in this case )
    Whats their Position? -
    > The position which is assigned( Manager in this case)
    How you identify them?----> This is what I am asking you
    To whom you need to send the workitem?-------> Manager in my case
    Regards

  • SRM Contract alert management Workflow - WS10400022 Agents determination

    Hi Experts,
      I am trying to implement Alert management for SRM Contracts that are expired/ or the threshold is exceeded.
    All the necessary configs are done and the event linkage is also done for the workflow Template WS10400022.
    The task used in this workflow TS10407926, for agent determination, used the expression &Agents_0001.Agents&
    This container value is neither passed from the event linkage binding.
    Can anyone explain how this agent determination is done for this workflow?
    Your replies are very much appreciated
    Cheers,
    Prem.

    Hello,
    OK, i did not see the event linkage between event and workflow...
    Currently, &Agents_0001.Agents& is not populated with data coming from the event:
    Event is managed by BBP_EV_API_EVENTS_SAVE function modul, and inside this FM by CL_BBP_EVENTS class.
    Maybe you should open an OSS message and check all OSS notes dealing with BBP_CONTRACT_CHECK report.
    Regards.
    Laurent.

  • Agent determination issue with no error, cant use SWPR?

    Hello gurus.
    We currently have 81 invoices that have workflow status "in process". However, the last line of this status is "agent determination issue". I've assigned the appropriate user in PFOM and i want to restart the workflow item, but i cannot use SWPR.
    Normally it should be in error and you can use SWPR, and that fixes everything- however why is the workflow still "in process" and not in error? and how can i complete the workflow item now that the agent has been assigned? do i just create a new workflow using SWUE and delete the old one? Many thanks.

    Hi,
    OK then try like this , as you said you do not have authorizations to SWI1_RULE right so do teh below steps,
    1. Execute SE37 and execute the fucntion module ALINK_CALL_TRANSACTION.
    2. Now mention the txn name as SWI1_RULE.
    3. Now you should be able to see teh initial screen of the txn.
    4. Now enter teh workitem ID which is in ready state not the top workitem ID, the workitem for which the agent is not assigned. Click F8.
    5. Now choose that workitem ID and click CTRL + SHIFT + F11.
    it should re evalutae the agents, if this is also not determing then make a note of the RULE ID from activity step and open the txn by using the above function module and try to simulate the rule or please let us know what is the rule type.
    Regards
    Pavan

  • 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 issue in a workflow

    Greetings everyone!
    I'm configuring some business scenario with the help of a business workflow in SAP CRM 7.0 I'm using activity step and want to determine agents using standard SAP rule 10000162 ("Employees for responsible org. unit"). I've tested the rule outside of the workflow and it's working fine, but  in workflow it fails to determine an agent.
    In a log I see following errors:
    Agent determination for step '0000000023' failed;
    Result of agent resolution does not agree with agents of task;
    I've made some tests depending on what assignment task has:
    1. When it is a general task, work item was created for a workflow initiator even though rule failed to determine an agent.
    2. When it is a task with general forwarding with assigned position(s), which rule will never determine, work item was created for holder(s) of that position(s).
    3. When it is a task with general forwarding with no assignments, workflow could not determine an agent as expected.
    I've also debugged functional module for that rule and it determines appropriate agent but then do some check with the help of RH_TASK_AGENT_CHECK function and returns an error.
    Can someone help me with this problem? Is it some standard expected behavior or not?
    Maybe something wrong with the org. plan?
    All answers are appreciated.
    Thanks in advance,
    Alex.

    Hello Rick and Eddie.
    I've tried to assign user directly instead of position to a task with no help. I get the same result.
    I've tried to set a task as a general task and made the rule to fail if there is no resolution and it fails.
    I've tried to assign position or user directly to activity in a workflow and it does work but that's not what I need in my scenario.
    As I said earlier I've tried to debug that rule invoked from a workflow. I will post some screenshots for you.
    I set a task as a general task and assigned rule 10000162 (ABBR="PARTNER_1", Name="Employees for responsible org. unit") to activity step in a workflow and here is what I get:
    1. Function CRM_ORGMAN_ORGOBJECTS_FIND_2 gets called by the rule and resp. sales org. unit is passed there ([screenshot1|http://www.picdrop.net/?v=debug1.png])
    2. Next function CRM_ORGUNIT_GETEMPLOYEES gets called passing id of a resp. sales org.unit without a type.
    3. Next RH_STRUC_GET gets called and returns result table with position and central person for that position ([screenshot2|http://www.picdrop.net/?v=debug2.png])
    4. In the end of CRM_ORGMAN_ORGOBJECTS_FIND_2 function only central person in inserted to the actor_tab ([screenshot3|http://www.picdrop.net/?v=debug3.png])
    5. After CRM_ORGMAN_ORGOBJECTS_FIND_2 ends we appear in a RH_GET_ACTORS function where we can see that agent check is performed if act_task is not initial. I assume that check is not performed if we do a simulation of a rule ([screenshot4|http://www.picdrop.net/?v=debug4.png])
    6. Then RH_TASK_AGENT_CHECK function gets called for every record in a actor_tab. In out particular case it's one record. ([screenshot5|http://www.picdrop.net/?v=debug5.png])
    7. Inside that function checks act_wi_id (activity work item id?) if it's initial and get exluded agents. It is initial in my case ([screenshot6|http://www.picdrop.net/?v=debug6.png])
    8. Then function tries to read table with keys equal to type and id of found agent and errors there, perhaps because there is no record in that table ([screenshot7|http://www.picdrop.net/?v=debug7.png])
    That error results in overall agent determination failure.
    Hope this screenshots will help to identify a problem.
    Why read table results in an error and because of that all rule fails?
    Regards,
    Alex.

  • Agent Determination Rule using Function Module

    Hi all,
    I am trying to create a custom agent determination rule using function module. But my rule is not getting invoked when the workflow is executed.
    I created a custom rule and linked my function module (with proper signature).
    FUNCTION 'ZRULEXXX''
    ""Local Interface:
    *"  TABLES
    *"      AC_CONTAINER STRUCTURE  SWCONT
    *"      ACTOR_TAB STRUCTURE  SWHACTOR
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
    And I am hard coding some values into table ACTOR_TAB
    REFRESH ACTOR_TAB.
    CLEAR ACTOR_TAB.
    IF SY-SUBRC NE 0.
        RAISE NOBODY_FOUND.
      ELSE.
        ACTOR_TAB-OTYPE = 'US'.
        ACTOR_TAB-OBJID = 'XXXX'.
        APPEND ACTOR_TAB.
        ACTOR_TAB-OTYPE = 'US'.
        ACTOR_TAB-OBJID = 'XXXXXX'.
        APPEND ACTOR_TAB.
      ENDIF.
    But a worklist item is not being created for the users appended to ACTOR_TAB.
    Is there anything am missing. Please let me know.
    Thanks in advance
    Regards
    Raju

    Hi,
    Change it to following code. It will work.
    REFRESH ACTOR_TAB.
    CLEAR ACTOR_TAB.
    *IF SY-SUBRC NE 0.
    *RAISE NOBODY_FOUND.
    *ELSE.
    ACTOR_TAB-OTYPE = 'US'.
    ACTOR_TAB-OBJID = 'XXXX'.
    APPEND ACTOR_TAB.
    ACTOR_TAB-OTYPE = 'US'.
    ACTOR_TAB-OBJID = 'XXXXXX'.
    APPEND ACTOR_TAB.
    *ENDIF.
    Regards,
    Vaishali.

  • The relationship between production order and purchase requistion After running MPS

    Dear Experts:
         I met a issue . My users want to know the relationship between production order and purchase requistion . In my company we create production order and  purchase req. by  running MRP. our operations are:
    1. T-CODE: MD41  create planned order .
    2. T-CODE: CO41 convert planned order to production order .
    3. T-CODE: MD15 convert planned order to purchase Requisition.
      but I can't  find the  relation of them. would you like to give me some advices? thank you very much.

    Hello
    On the standard MTS process there is no link between the requirement (STO) and the replenishment element (production order).
    See the below extraction from note 12955:
    There is no index that the system could use to determine which issue element (sales order, planning, reservation, dependent requirement, ...) is covered by a certain receipt element (purchase order, production order, purchase requisition, planned order, stock level ...).
    A production order, for example, can be created to cover several different requirements, even when you are using lot sizing procedure EX.
    You can use transaction MD09 or MD04to determine the pegged requirements, but they are calculated dynamically and there is not fixed link between requirement and receipt.
    BR
    Caetano

  • Responsibility rules : Agent determination only works after restarting the WF

    Hi Experts,
    We are facing a very strange issue related to agent determination in one of our custom workflow:
    For agent determination we are using a responsibility rule with two parameters "Company code" and "Plant".
    The responsibility rule works well and returns the agents for all the company code.
    Recently I have added few company codes to this responsibility rule in the same way we used to maintain and simulate it . It returns the correct agent for newly added company codes but at run time the agent determination is getting failed and the WF goes into an error because of it. However when i restart the WF via SWPR it works well and the agent determination works well either.
    This is only happening for newly added company codes the old ones agent determination work well at the run-time.
    Pls suggest what could cause this problem. If there is a problem in responsibility rule then why it works after restarting from SWPR.
    Thanks in advance. The helpful/correct answers will be rewarded.
    Regards,
    Him

    Hi Rick,
    Thanks for replying.
    1. Can you replicate this problem in the test system?
    Yes I could replicate this issue in test system and it works fine there.
    2. Is this a true responsibility rule or does e.g. a function module get called?
    We have a responsibility where several responsibilities have been added with two parameters "company codes" and "plant". Every responsibility has a POSITION assigned into it and this position contains the related users.
    This responsibility rule is getting called in one other rule with FM. Here in this another rule we are calling the responsibility rule by using the standard FM  RH_GET_ACTORS to fill the ACTOR_TAB.
    I have tried to simulate both the rules and it returned correct agents but failing at run time.
    Regards,
    Him

  • Sales order released from Credit block, but Purchase Requistion not created

    Hi,
    In third party sales scenario based on Scheduline Line category configuration purchase requistion creates when the order is created. If order is blocked for credit check then purchase requistion will not be created until order released from credit.
    Here my scenario is
    I have two users like A and B. When A releases the order from credit block by using transaction VKM1, Sales order releasing from credit and creating Purchase requistion. But, if the order is released by B, Sales order is getting released from credit but purchase requstion is not getting created.
    There is no issue from security side, we activated trace and analysed everything it is not security issue.
    Thanks and Regards
    Alokam Chandra Sekhar

    Hi Lakshmi,
    Thanks for reply. I followed your instructions, pls find my observations below.
    1. Can you check the below settings:
    What is the Credit status in the header status tab page of the sales order for the B's sales order?
    Is it "Not approved or releasedu201D If it is not approved, you might have released the sales order in VKM3, but you might not have saved it.
    Reply: We are releasing order through VKM1 and after releasing the order the status is showing as "Released".
    2. Did you use the same material for B's Sales order? If it a different material check the Item category and Schedule line category whether these are same with A's sales order.
    Reply: Both the orders has same information, like material Item category and scheduline category
    3. Check in the Schedule line tab page --> Procurement button whether you have maintain vendor, Source determination and Info record.
    Source list has been verified through ME03 transaction and vendor data maintained correctly.
    I really appreciate your time and efforts on this.. looking forward some more suggestions...
    Thanks and Regards
    Alokam Chandra Sekhar

  • PR Overall Release Workflow - Agents Determination Failed

    Dear All WF Experts,
    I have used the standard workflow WS20000077 for PR Overall Release. I have assigned the agents to the task TS20000159 by position maintained in the Workflow Organizational Management Structure. The agents' names are showing correctly in the task's agent settings.
    However,  when I execute the workflow, the error 'Agent Determination Failed' for that step (TS20000159). I have checked the agent settings in workflow and SPRO, they look fine. Could anyone please kindly give me advices how to solve this error? Thank you so much.

    Hi, to all the experts who have helped me all these while,
    Thank you very much for spending time helping me to go through this issue.
    Yesterday, I ran through the coding for the function module for the rule AC20000026 again. I found out that there is one part of the coding which is causing the failure of determining an agent. The code disregard the company code for overall release of Purchase Requisition while the business requirement involves company codes in every PR created. Thus, by changing that code, the problem is solved.
    The snippet of code of function module (ME_REL_GET_RESPONSIBLE):
       CASE t16fc-frgwf.
    * keine Ermittlung
          WHEN space.
            RAISE nobody_found.
    * Ermittlung ¨¹ber T16fW
          WHEN '1'.
            IF eban-gsfrg EQ space.
    *     Einzelpositionsfreigabe Banf
              SELECT SINGLE * FROM t16fw WHERE frggr = eban-frggr
                                           AND frgco = rm06b-frgab
                                           AND werks = eban-werks.
            ELSE.
    *     Gesamtfreigabe Banf
              SELECT SINGLE * FROM t16fw WHERE frggr = eban-frggr
                                           AND frgco = rm06b-frgab
                                           AND werks = space.
    There is always a value in werks in my business scenario...
    SELECT SINGLE * FROM t16fw WHERE frggr = eban-frggr
                                           AND frgco = rm06b-frgab
                                           AND werks = space.
    So, by changing it to
    AND werks = eban-werks
    it will work, however, I think it's better to just remove the If statement
    IF eban-gsfrg EQ space.
    , since it has no effect anymore.
    I hope this would give a hint to all the rest who might be facing the same problem as well.
    Thank you very much,
    YL

  • Error in resolution of rule ... for step - Agent determination for failed

    Dear Experts,
    in SRM 7.0 CS, i have come accross the following workflow error:
    I have extended my existing organizational plan for a new site (new CoCo, Plant, Purch Org and Purch Gr). But when i use my test users with this site, i receive a workflow error, that has the following wording in SWI2_DIAG:
    Error handling for work item 000000055347
    No links corresponding to the specified data could be determined
    Error in resolution of rule 'AC40000138' for step '0000000293'
    Agent determination for step '0000000293' failed
    Error during result processing of work item 000000055357
    Error when processing node '0000000293' (ParForEach index 000000)
    Error when creating a component of type 'Step'
    Error when creating a work item
    Error when processing node '0000000293' (ParForEach index 000000)
    Work item 000000055356: Object FLOWITEM method EXECUTE cannot be executed
    Error handling for work item 000000055355
    Can you maybe help me understand, what this error means and how to resolve it?
    Thank you very much!
    P.S. my test users work fine if i drag them to another location in my organizational plan. And also if i take other test user from locations where everything works fine and drag them to this "problem" location, than the same workflow error occures.

    Remove the user from the PPOMA node and add him again.. Sometimes this will solve the issue..
    Thanks!!
    Bharath

  • 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

Maybe you are looking for

  • Explode  SD Free good  determination + BOM in sales order

    Hi! I create for material sales bom + free good material (Tcode VBN1 and I tried to explode both of them in sales order, It didn't happend. when i did order for this item, just the bom exploded, without the free good. i need to explode both of them P

  • Trace source of rapidly growing tablespace

    A tablespace which has about 24 datafiles of 1GB each is growing fairly rapidly and I would like to know if it is easy and quick to evaluate the cause. I appreciate I could gather details of all tables in the tablespace and monitor their size over a

  • Mixed Content Error in Application Preview

    Apologies if this has already been addressed. I searched the messages but didn't find one covering this issue. When I run a UI5 application in preview from the Web IDE I am getting the following error when I try to call an OData service via HTTP. Mix

  • AII Test Tool

    Hello,         PML messages sent from AutoID test tool do not reach AII. I am trying to send the PACK command. The logs slg1 and all the Queues donot show anything. I am not getting any error messages in the test tool. I have configured the RFC for A

  • Photoshop Elements 11 keeps crashing

    So i just bought Photoshop Elements 11 today.  I installed it, and all went well.  But now when i try to open photoshop elements editor it gives me a "adobe photoshop elements 11 has stopped working" screen and then closes immediately after.  What is