Rule Resolution

Hi All ,
I am intrested to create a rule for agent determination using function modules simillar to SWX_GET_MANAGER, i dont know how to proceed it, is it necessary to maintain and use evaluation path for agent determination even though we are using FM's as the rule category.. ?.
Plz post me any tutorial to create rule with function module..
With regards ,
S.Arun..

Hi Arun,
May be you can go thro the SAP Provided rules
00000157 - Superior (Chief Position)
and 00000168 - Superior (as user) for actual agent
to find out how function modules are used in Rules.
Just Choose 'Rule' in the Agents cluster and then enter the rule numbers to view them.
Hope this helps.
Raj

Similar Messages

  • Task rule resolution not working

    Hi Experts,
    I have a created a rule in PFAC to determine possible agents for a task. I have assigned the same under "default rules" tab  of task configuration. Rule container, binding between task container & rule container is also correct & in place properly. The rule standalone when tested (in simulation mode) does give the correct result. This possible agents determination is  to ensure workitems can only be forwarded to set of people(possible agents) who are authorized. So i have set the task attribute also to "General Forwarding not allowed". The corresponding step for this task has been assigned an agent as an "expression" , this expression contains a user "USXXXX" at runtime which is a part of possible agents for a task detemined by the rule as explained above . Still at runtime workflow is unable to detemine the agent for that particular workitem indicating that none of the responsible agent belong to the possible agent. When i checked in detail, i found the that the rule itself fails to get the possible agents at runtime as it showed no possible agents when the workflow log was checked. So that's why there is no common thing between responsible agent & possible agents or intersection of responsible agents & possible agents is nothing. So runtime workflow does not come to know the agent to whom the workitem to be sent to so it creates a workitem with "no agent".
    So kindly guide me why the rule resolution at task level is not happening properly.
    Regards,
    Chetan.

    Hi Chetan,
    My comments are below:
    1. I have an expression to determine an agent at step level ...this agent is a responsible agent.
    Ans. Correct.
    2. To a task corresponding to that step, i have assigned under "Default rules" tab an agent determination rule as default rule
    this rule i have created via PFAC. The list of uwer this rule gives i am considering as "Possible Agents".
    Ans. Incorrect... this is again "Responsible Agent"
    3. The Responsible agent determined by the expression at runtime is the user that is part of list of users determined by the rule
    assigned at task level.
    Ans. No, Resposible Agent is only what is determined by rule or  is a expression. However the agents who receive work item is the intersection of Possible and ResponsibleAgent.
    4. Task attribute is set to "General Forwarding not allowed" to ensure that workitem can only be forwarded to those user
    that rule determines as mentioned in step2 & not to any XYZ user.
    Ans. "General Forarding not allowed" only allows to forward work item to Possible Agents.
    Hope this helps you...
    Regards
    Gautam

  • No error-workitem with rule resolution

    Hi,
    using the Flag "Terminate if Rule Resolution has no Result" in rule definition we expect an error-workitem when agent resolution determines no agent. However only the workflow-frames are set to status error. The WF-protocol shows no error-workitem (SWI2_ADM1 therefore does not work either). The protocol ends with the last (sucessfully executed) step before the rule for agent determination is executed.
    Without the Flag "Terminate if Rule Resolution has no Result" the workitem is send to all possible users (as expected) if no agent is determined.
    We need an error-workitem in SWI2_ADM1 in this case. Any ideas why this is not working? Our Release SAP_BASIS, SAP_ABA: 701.
    Regards,
    Frank

    SWI2_DIAG (for the Workflow frame) shows the following error messages:
    Error in resolution of rule 'AC90000002' for step '0000000270'
    Agent determination for step '0000000270' failed
    --> These entries seem to be OK reagarding the expected error-workitem
    Error during result processing of work item 000000002737
    Error when creating a work item
    Error when creating a component of type 'Step'
    Error when processing node '0000000270' (ParForEach index 000000)
    Error when processing node '0000000270' (ParForEach index 000000)
    --> I can not explain these entries; we don´t have a multi-level-step; it is single approval-step for 1 invoice
    --> Apparently this error does not occur when the flag "Terminate if Rule Resolution has no Result
    " is not set  (in this case the workitem is send to all possible agents without any problems)

  • Direct rule resolution in NW BPM process gateway

    Hi,
    I am currently reviewing BRM in the area of NW BPM and I am wondering whether it is possible to use a rule as expression in a Exclusive Choice Gateway in NW BPM process? Until today I have just seen tutorials where a rule has been used in a mapping step which output has been checked in a Exclusive Choice Gateway.
    Thanks,
    Manfred Maierhofer

    Hi Manfred,
    Rules can be be evaluated directly in an Exclusive Choice Gateway. The Ruleset which you want to use can be configured to return the parameter that you need in the Gateway. For e.g. if you want a boolean in the Gateway, create a Ruleset with return type as boolean and set its result to the boolean parameter that you want to return. Then in the Gateway condition, evaluate the ruleset.
    I have submitted an article to SDN on this which gives a description on how to do this with a sample scenario. I will post the link to the article as soon as it gets published.
    Regards,
    Sowmya

  • Change ruler resolution

    Is there a way to change the pixel resolution of the rulers in AI?
    Let me explain why I want to do this...
    Sometimes I'll drag a layer into Illustrator from Photoshop, resize it, get it to fit in right. Of course, resizing in AI changes the resolution and looks crap. So when it's time replace the image in AI, I open up Photoshop and from there it is a guessing game as to what size to make it. If I could change the resolution of the rulers in Illustrator I could just look at the rulers and resize to that size.

    I usually do things this way:
    Start by placing your original picture (jpg or wotever) into Illy. Scale it as you need.
    With it selected, read off its size in Info and write it down.
    Then open the picture in Photoshop, resize it as per Info and make any other adjustments. Re-save with another name or in another format (for example eps) and place it into Illy. The size will fit exactly with no guesswork involved. Snap it to the corners of the original and you've got your positioning as you want it. Then chuck out the original.
    If the original has a clipping mask, switch off the Illy preview (Cmd-Y), snap the new picture to the original. With it selected Cmd-X, select original, Cmd-F, Cmd-3, delete original, Cmd+Alt-3. Cmd-Y. Bingo.

  • Rule resolution - 00000148 (Person responsible for requisn. release)

    Hello,
    I have maintain release codes in view - V_T16FC and assigned '1' in workflow column.
    I have also maintan view V_T16FW in which i have assigned agent(object type is user).
    But while simulating rule - 00000148 it is showing - "No agent found". Is anything missing other then this? Please help.
    Thanks,
    Sid

    Hi Siddharth,
    I had the exact same problem when I was implementing workflow.  I had the tables set, and even had an ABAPer check the FM and try to debug it.  What fixed it for me was that in the configuration for the PR release, in the Workflow section where you maintain agents, I did not have a plant defined.  When I added and maintained a plant in that table, the simulation started working and determining the agent.  This is odd, because in the FM, there is code to determine even if the plant field is blank.
    Try maintaining a plant and running the simulation again.
    J

  • Simulation Rule resolution problem

    Hi expets,
    I have created ZRule by using Category Function to be executed in that i am using zFunction module.
    When I am trying to simulate the rule it says that no agent found.
    But if I execute the function module individually the result is
      ACTOR_TAB   OTYPE u2018USu2019
                                OBJID = user name   u2018from pa0105u2019
    Please guide me if I am wrong in simulation or FM.

    Hi Viral,
    There is some limitations for the function module which is used in the rule.
    what is the name of your multi line container?
    Try to create the multiline container with the name of AC_CONTAINER and the type of SWCONT.
    Then pass the data's from workflow to this container using binding.
    Also the get table container syntax should be there in rule function module.
    Thanks,
    Viji.

  • Find Rule Resolution for MRP controller group objetct T024D

    Hi,
    I am using FM "RH_GET_ACTORS"  to find the agent corresponding to plant and MRP controller the code
    i am using is as follows,rule i am using is AC20000054
    types: begin of ty_objectkey1,
              Plant       type WERKS_D,
              Controller  type DISPO,
              end of ty_objectkey1.
    data: lt_objectkey1 type standard table of ty_objectkey1,
            ls_objectkey1 type ty_objectkey1 .
    data: lf_T024D type SWC_OBJECT.
    swc_container ac_container.
    SWC_CREATE_CONTAINER ac_container.
    ls_rule-object = 'AC20000054'.
    ls_objectkey1-plant = '5000'.
    ls_objectkey1-Controller = 'A12'.
    SWC_CREATE_OBJECT lf_t024d 'T024D' ls_objectkey1.
    SWC_SET_ELEMENT  ac_container 'ORG_OBJECT_ID'  lf_t024d .
    CALL FUNCTION 'RH_GET_ACTORS'
          EXPORTING
            act_object                = ls_rule-object
          TABLES
            actor_container           = ac_container
            actor_tab                 = lt_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.
        IF sy-subrc <> 0.
    ** Do Nothing*
        ENDIF.
    i maintained entries corresponding to Org Object T024D,but stll i am getting exception 3 in FM can anyone
    guide me regarding the same.
    Rushikesh

    Where did you write this code, since the rule does the job by itself if took care of the PFOM entries.
    Regards, IA

  • Partner determination rules in sales documents

    Good afternoon Experts
    I'm trying to determine responsible agents in a quotation document by using a rule with responsibilities
    ( in the access sequence of the responsible agent partner function). 
    Could someone please confirm how the rule container gets filled?  
    If the rule is based on a post code my understanding is that the post code of the sold
    to party is passed to the rule container and the responsible agent gets
    determined. Passing the post code to the rule container should be in this case hardcoded.
    What happens though if I need to determine the responsible agent based on another
    piece of information like "sales order type", "client tax classification" .
          -  How does the system know how to fill the rule container?
         -   Do  I need to create a new organizational attribute ? 
    On Sap help I've found :
    "If you use rule resolution using responsibilities, you do not have to assign
    attributes in the organizational model, other than the attributes distribution
    channel and division; these are necessary for showing the sales area."
    Where does the sales area come in for partner determination when using rules with responsabilities ? Is there a mechanism like sold to party/document -> sales area -> organisational attribute => attribute passed to rule container? 
    Any input would be appreciated.
    Best regards
    Razvan Zainea 

    Hi Razvan,
    you can use rules in your partner determination access sequence. Most attributes are filled in document processing for the rule container.
    You mentioned postal code. This is filled from the main partner of the document. The main partner of a sales order is the sold-to party, of an opportunity is the prospect, ....
    If you like a different main partner you can do this via process type customizing (field 'partner function ORG').
    If you need to fill your own container values you can use CRM_ORGMAN_BADI method CRM_ORGMAN_ATTRIB_VALUE_FILL.
    Or as mentioned by Shanto you can use your own logic with COM_PARTNER_BADI.
    Best regards
    Marion

  • What are the two different rules for organizational data determination

    What are the two different rules for organizational data determination???

    Hi
    1) Rule type Responsibilities
    want to determine organizational data for individual responsibilities
    have not created an organizational model but want to create one
    have a lot of organizational units and must only assign a few attributes
    2) Rule type Organizational Model
    You would use rule resolution using organizational model if you
    have created an organizational model or have distributed a plan to SAP CRM and also want to use this for determining organizational data
    assign a lot of attributes to the organizational units and these are to be evaluated
    Regards
    Manohar

  • Help needed in Rules in workflow

    Hi all,
             I am beginner in workflow. I was trying to apply custom rules in my workflow design. I did the following steps :
    1.  have created a custom rule through the transaction PFAC_INS.
    2. There I have used a function module for the determination of agent. The custom function module will give me the superior name for an employee.I have used ztables to store the name of the employee and their superiors.
    3. The Rule has been successfully created and has been tested. It is working as required. I have tested it in PFAC itself by using Simulation button.
    The problem I am facing is
    When I am trying to use this Rule in the workflow at the User decision Step it is not working. I have given the Rule number in the Agent section of  the User decision step.
    According to my Workflow design the email should go to the Superior of the employee but instead it is coming to my Inbox.
    Please suggent me what to do.
    Thanks in advance.
    Points will be rewarded for good suggestions.
    Thanks & Regards.
    Reshmi Das.

    Hi Raj,
              I have created a custom rule and its working fine. Please check the following steps:
    The rule I have created gives the superior name of an user/agent.
    Steps:
    1. I have created a ztable( ztest_users)which will contain the name of users and their superiors.
    2. Create a custom function module(ztest_find_superior) which will return back the table containing all the superior information for a particular user/agent.
    Note: This custom function module created should have the same interface as that of the SAP standard function module RH_GET_ACTORS.
    The following table’s parameters have to exist in the custom function module.
                       ACTOR_TAB STRUCTURE SWHACTOR
                       AC_CONTAINER STRUCTURE SWCONT
    Example:
    FUNCTION ZTEST_FIND_SUPERIOR.
    ""Local Interface:
    *"  TABLES
    *"      ACTOR_TAB STRUCTURE  SWHACTOR
    *"      AC_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
      INCLUDE <cntn01>.
      TYPES : BEGIN OF ty_users.
              INCLUDE STRUCTURE ztest_users.
      TYPES : END OF ty_users.
      DATA: org_agent LIKE wfsyst-agent,
                  lt_holders TYPE STANDARD TABLE OF swhactor,
                  lwa_holders TYPE swhactor,
                  lt_users TYPE STANDARD TABLE OF ty_users,
                  lwa_users TYPE ty_users,
                  v_len TYPE i,
                  v_bname LIKE ztest_users-bname,
                  num_lines TYPE i.
    *Read values assigned to the rule criteria
      swc_get_element ac_container 'org_agent' org_agent.
    *Get the superior
      SELECT SINGLE * FROM ztest_users INTO CORRESPONDING FIELDS OF lwa_users
      WHERE bname = org_agent.
    IF NOT lwa_users IS INITIAL.
        REFRESH lt_holders[].
        lwa_holders-otype = 'US'.
        lwa_holders-objid = lwa_users-zsuperior.
        APPEND lwa_holders TO lt_holders.
        APPEND LINES OF lt_holders TO actor_tab.
      ENDIF.
      DESCRIBE TABLE actor_tab LINES num_lines.
      IF num_lines IS INITIAL.
        RAISE nobody_found.
      ENDIF.
    ENDFUNCTION.
    3. Now assign the function module on the rule.
    Goto PFAC_INS  to create the Custom Rule.
    In the rule definition category select Agent Determination: Function to be executed.
    In the Function module field give the name of the function module created (ZTEST_FIND_SUPERIOR).
    Check the Terminate if Rule resolution without result check box.
    4. Create a container element ( org_agent)for the agent or user which will be passed to the function module.
    Type:
    WFSYST-AGENT.
    properties: import.
    5. Test the Rule by the Simulation button on the application toolbar.
    Enter the user name in the Container Element value section and press enter.
    It displays the name of the superior for the agent/user and the Agent Found is displayed in Green color.
    Now you can use this rule in your Workflow definition.
    Thanks,
    Reshmi

  • Agent Determination Rule Not Working

    I have created an new agent determination rule in PFAC.
    The category I used is "Agent Determination: Responsibilities".
    I have also selected the "Terminate if Rule Resolution has no Result" option.
    The container has one element in it which is NOT mandatory called "Clinic".
    I have set up the responsibilities, where there is only one which catches all - In other words, I created a responsibility for Clinic "*". I have also assigned a position as a responsible agent. The position is linked to a person number, and the person has a user-name assigned - All are in the valid period.
    If I test the rule, and do not enter anything for the Clinic, and click the test button, it returns my one agent, which is correct.
    The problem is that in my workflow I have assigned the rule as a responsible agent. At runtime, the workflow falls over saying that the agent determination has failed. This does not make sense, since I have not passed anything in binding to the rule. As mentioned earlier, when testing it works fine. I have tried using the rule with and without binding but it wont work. If I change the step in the workflow to rather use  position, it works.
    Please let me know if you have any ideas - I am really battling with this strange problem.

    I tried deselecting "Terminate if Rule Resolution has no Result" in the rule definition.
    Having done that, the workflow now works correctly - It actually DOES find an agent and the workflow goes on as expected.
    This is really weird, because if the terminate option is selected, it falls over saying that no person was found. Now with the terminate option not selected, it finds the agent - Is this a bug, or am I misunderstanding something???

  • Create multiple rule in single alert category

    Hi All,
    any body tell me can we create multiple rule in single alert category.When i click on a  add rule button in existing category nothing will happen same page will come with existing data.
    Thanks & Regards
    Samarjit

    HI,
    you can define alert category multiple rules.. see the below links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/bb/f0033c128f4a7de10000000a114084/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/45/23827054604aa8e10000000a11466f/content.htm
    You must define the binding from the task container to the rule container for each rule. For further information, refer to Rule Resolution
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4b5aa453d11d189430000e829fbbd/content.htm
    Regards
    Chilla

  • WF problem with rule

    Hi expert,
    i have created a rule with Category = Agent Determination: Responsabilities; this rule doesn't work correctly  only in production and only with some values.
    I have tried the note 855494 but i haven't understand what "The rule resolution is not working in case the container type is an ABAP Dictionnary Data Type." means; can you help me? It is urgent.
    Thanks and regards.
    Antonella

    Hii Antonello,
    U should post this query in <b>BPM and WORKFLOW</b> which is in SAP NETWEAVER.
    There u will find the experts for WF.
    Regards,
    Ashish

  • Workflow Substitution rules - How can I...

    Hello Guru's
    I am relatively new @ workflow and I am implementing some workflow scenario's.
    Two of them: Release Purchase Order & Release Purchase Contract.
    Release Purchase Order:
    Workflow u201CWS2000075u201D -> TS20000166 -> Agent Determination Rule      "Person Resp. for PO Release"
    In the responsibilities tab I have created several Purchase groups:
    - Purchasing Group of 100 to 299
    - Purchasing Group of 300 to 499
    etc...
    I have assigned agent assigment with correct agents. The rule test is doing well !!
    The workflow first looks at the release strategy, then the rule resolution.
    test 1: Release code 20 > PG 100 = Buyer User A untill F.
    test 2: Release code 30 > PG 200 = Lead Buyer A and B.
    test 3: Release code 40 > PG 300 = Purchase Director A.
    My Question:
    But how can I arrange a special substitution for this workflow? Per user you can set the substitution, but that is NOT what I want. What I want is when a PO is created for Lead Buyer of Purchase Group 100 and is pending for release for more then 2 days, it should go to another Lead Buyer of Purchase Group 200 or 300 for release the PO.
    Another one, when the Purchase Manager for Group A has some workitems, after 2 days they should go to another Purchase Manager, e.g. Purchase Manager for Group D. Is there a possibility to arrange that?
    Thanks for you answers!
    Best Regards,
    G. Leurs
    Edited by: G. Leurs on Dec 16, 2009 11:23 AM

    Hi,
      You can acheive your requirement using deadline. substitution is nto required.
    1)Specify the 2days time in the latest end tab
    2) select the modelled deadline in the options below.
    3) in outcomes tab, activate the processing obsolete line
    4) now u can c 3 lines from the task for release
         1) normal flow whn executed
         2) Will check the deadline. Once it is reached it will progress with the steps in processing obsolete branch.
         3) Processing obsolete branch. In this  branch,
               a) place the 'PRocess Control' step to remove the workitem from the preovious user
               b) Include the workitem step to send it to the next person who shld release the PO.
    Hope this helps you.
    Regards,
    Sivagami R

Maybe you are looking for

  • HUGE PROBLEM with sound in DVD Studio Pro 4

    As I imported the soundtrack of the footage that I have (which is about 1h16), the combinaison of my video & the sound is over 4,7 Gig. Therefor, I can't burn it on a DVD. I exported the audio in a lower quality to finally obtain a size of around 210

  • No color on my computer

    The color pops in and out of my imac. any ideas on how to fix it.

  • Thunderbolt Displays Cause Crash

    Hi, I have a macbook pro retina and two of the external thunderbolt displays (daisy chained). Every time that I plug my MBP into the thunderbolt displays while it is asleep and try to wake the computer, it crashes. It sometimes reboots on its own, bu

  • How to change the value to name?

    Dear all I need to change value of SMU2, and I hope I can save the result in different file corresponding to different value automatically by the different path. then I met the problem as what I showed in the VI. I tried to use the "event case struct

  • Display msg when Schedule line is changed

    Hi Experts, I have a requirement that when Schedule line qty is made zero then an error msg should be displayed. Msg should be displayed as soon as qty is made 0 and enter is pressed and at the time of saving it. I have tried to code in User exit fie