Query in Workflow - Rule

Hello Expert,
I want to know how to figure out the entire process done by the rule. as in what are the tables , fields are included/attached with a particular rule.
e.g. Rule : 00900010.
Now, in this rule, how to determine the entire process? How does this end up returning a org unit/position?? What are the tables it goes through? How does it function??
Please Explain..
Thanks!!
Regards,
Sam

Hi Sam,
Well, what happens is you pass the parameter purchasing group and the role gets an instance of the business object T024 (Purchasing Group).  One of the attributes of this object is agents - that is people linked to the purchasing group using something like transaction PPOMA.  The code called by this attribute is:
* Put the object under consideration into the container for  attribute
*  evaluation.                                                     
swc_set_element ac_container 'ORG_OBJECT_ID' self.                        
swc_container_to_persistent ac_container.                               
* Get the agents corresponding to this
* object.                                                          
  call function 'RH_SAP_ORG_OBJEC_ACTORS_GET'                                  
       tables
          ac_container     = ac_container                                           
            actor_tab        = rh_agents                                         
      exceptions
          no_active_plvar  = 1
          objtyp_not_valid = 2                                                      
         no_actor_found   = 3
              others           = 4.                                                                         
* Put the result into the container.                                        
  object-agents[] = rh_agents[].                                          
  swc_set_table container 'Agents' object-agents.  
What this means is that the org object is the purchasing group, and the function uses the organisation hierachy and relationships to return those poeple with an assigned relationship to the purchasing organisation.
This is passed back to the rule and thus to the workflow as an internal table of the structure swh_actor.
So in this case there is no function module or responsibility, the rule is just getting ALL agents with a relationship to the purchasing group.
Regards
Gareth
Message was edited by:
        Gareth Ellem

Similar Messages

  • Unable to evaluate workflow rule - Value too long for field

    Need help with a workflow error for a record update before the record is saved. There are 3 calculations that would be done in a particular order - all on number fields. Each time, I am overwriting existing values. The individual numbers could have up to 6 decimal spaces. When I try to update one or more fields that contain the calculation, I get an error message saying that the system is unable to evaluate the workflow rule - value too long for field (zNum6).
    This same calculation is fine when a new record is entered and the calculation is done as a default field value.
    Any ideas?

    I actually had to use a ToChar function at the beginning of the calculation and #### to indicate the number of digits to make this work. Oracle Help Desk provided the answer - quickly.

  • Query on Workflow/SRM

    Hi All,
    I have a query on workflow/SRM.
    Recently our client upgrade from 4.6c to ECC 6.0 and we are facing with the below problem after the upgrade.
    Users create Purchase Orders through shopping carts in SRM system; requisitioner will receive a notification mail on creation of PO in the backend system. When the shopping cart is converted as PO (after releasing from sourcing), a workflow is getting triggered in backend ( ECC 6.0) which sends the PO notification mail to the requisitioner. In that notification mail, the Cart No and Cart Description is missing for the PO. This issue occurs only after the upgrade. We have analysed, it is because of the delay to update the PO number on the shopping cart, which happens with the help of batch job “CLEAN_REQ_REQ_UP” which is running for every 5 minutes in SRM system.  To confirm this we had included Wait Statement in the workflow function module which will delay the work flow by 5 minutes and the workflow is running fine now. But I want to know whether the above change will affect the performance of the production system, since this make the workflow wait for every PO. Also as an alternative we are thinking of manual triggering of workflow using batch jobs instead of automatic.
    Please advice which is better in terms of system performance and maintenance.
    Regards,
    Rag

    I'll suggest to add a background step to verify if the PO has been created instead of waiting. BCOZ if the PO has been created and it is in last few seconds of next scheduled run of the this report, it has to still wait for atleast 5 minutes.
    Regards, IA

  • Query Regarding Workflow........plz help its urgent.

    hi friends
    Here is my query in Workflow
    I would like to know when a work item gets triggered.?
    I know that its a run time object,but i want to know is there any such condition which must satisfy before any work item gets triggered,or is there any process that helps to triggered a work item.
    Thanks in Advance
    mrutyun^

    hai
      for a workitem should be triggred, we dont want any thing.
    if workflow is triggred using event then, the following steps which is designed below is executed.

  • Create opportunity using workflow rule

    Hi,
    Is there a way to create an opportunity record using a workflow rule.
    We want to be able to create a service opportunity to be triggered automatically by the sales person by either updating a flag or check box which inturn triggers
    a workflow rule that can create an opportunity.
    I am aware of using a web link to copy an existing opportunity.
    Any ideas ?
    Thanks
    Swami

    At this time this is possible by using Integration Events and using web services. CRMOD does not support Workflows that will automatically create an opportunity using a workflow

  • Workflow rules doesn't work for existing record!!?!?!?

    Hi all,
    I've created one workflow rule to update value from one filed to another. Here is my expression:
    [<QuickSearch1>] <> [<plStatus_ITAG>]
    and my action is
    field name = "*Status" (QuickSearch1)
    Value = <plStatus_ITAG>
    and I tick on the Overwrite the existing value
    This is work for new record, but for the existing one the field value doesn't chnage. Any suggestion??
    Thanks
    Note

    The syntax should be: PRE('< QuickSearch1>') <> [<QuickSearch1>] for the condition.

  • Help writing a workflow rule

    Hello Experts!!!
    I need help writing a workflow rule condition to trigger the workflow. What I am aiming for is an email to be sent out when an opportunity is marked Closed/Won. But it can only be of a certain opportunity type (we use three options) and opportunity sub-type (we use two options) (these are custom fields we use)
    Below are the fields that need to be used:
    [<SalesStage>] = Closed/Won
    [<OpportunityType>] = Acute
    [<plOpportunity_SubType_ITAG>] = Tech
    Thanks Again!!

    Hi
    Try:
    [<SalesStage>] = Closed/Won AND [<OpportunityType>] = Acute AND [<plOpportunity_SubType_ITAG>] ='Tech'
    Note that in case of picklists it is recomended to use the lookup value and not static text like 'Tech', but both will work.
    Good luck
    Guy

  • How to write workflow rules/expressions/SQL

    Hi all.
    We are recent users of CRM onDemand, we would like to write some workflow rules but cannot seem to find any information on how to do this. The help section is limited in answers, and some of the questions here are also not specific to what we would like to do.
    Does anyone have any advice on books, web sites, etc. on where to find the knowledge we need on how to write the workflow rules and use SQL and expressions in CRM on Demand?
    Thanks in advance!!

    For your first case:
    1. You cannot create a workflow in r15 for activity but in R16 you can
    Create new to create a workflow
    Name: Auto email send
    record type: activity
    trigger: when new record saved
    rules: put your rules by clicking on the fx icon i.e this is where you are entering the rule saying the owner is different from the person who is creating the activity or the delegated field is filled (another way of looking at it)
    then save the workflow
    In the actions section
    choose the action "Create Email Notification"
    In the To: Section choose "Relative User on Record" and Choose "Activity Owner"
    Save it. Make sure both the workflow and activity are marked active.
    2. In your second scenario:
    How do you expect to create an account and automatically populate the Sales rep's name - not sure
    But you can create an opportunity and auto fill with the Account Owner's name by using this in the field validation (you do not need the workflow), you can use the FieldValueJoin function.
    Hope this helps - btb there is no book you can go thro the help and you will find some directions

  • Workflow Rule Condition : impact of the "LookupValue"

    Hello,
    I would like to know something about he "LookupValue" (eg.1) impact in the "workflow rule condition". What is exactly the role of the "LookupValue"? Does it have an impact if I decide to delete it and just write the value needed (eg. 2) ?
    eg.1 : ... =LookupValue("OCC_CUST_LOV_OPTY_4", "Value Needed")
    eg.2 : ... =("Value Needed")
    Could someone help me?
    Thanks and regards.
    Edited by: user5840933 on 5 mars 2009 03:44

    Hi !
    The lookupValue function is very useful. Imagine you created 10 workflows with a condition such as : PICKLIST="Value".
    Then imagine you have to modify the "Value" of this picklist in "Value2" for example. This means you will have to update your 10 workflows to put "Value2" instead of "Value".
    Using the LookupValue function, it will automatically get the picklist value based on the code corresponding to the value.
    LookupValue(PICKLIST, "A") will return the value corresponding to the code "A", no matter what the value is.
    In the expression builder, after chosing the field in the picklist, click on the link "Get acceptable values". Then click on a value and the LookupValue function will appear in your expression.
    Hope this will help, feel free to ask more !
    Max
    [See Mike L announcement|http://forums.oracle.com/forums/ann.jspa?annID=883]

  • Help with applescript/workflow/rule that would unflag mail when read (...)

    Here's my scenario:
    I have quite many mail.app rules that automatically filter and file incoming mails from newsletters, SNS, work, friends etc. and they all go in specific mailboxes (200+)
    I also have some rules that I trigger using MailActOn.
    Since with Lion theres now 6 different flags (and that you can rename them) I've included them in the rules actions and set them up to the following categories:
    - To Do
    - To Do Later
    - To File
    - News
    - Personal
    This actually allows me to have these smart mailboxes to appear only when they are flags active.
    Now for the first three I want to keep the flags permanently until I'm actully done with them.
    But for the "news" and "personal" ones I want to have them "unflag" once I read them.
    So to recap, is there a way to systematicall/periodically unflag messages when they are read from specific mailboxes or if they are flagged with a particular flag?
    I'd really appreciate if someone would help me out figure out an adequate solution to what I'd like to achieve.
    I'm not sure if a kind of a combination of either applescript/workflow/rule would actually make it work...

    Here's my scenario:
    I have quite many mail.app rules that automatically filter and file incoming mails from newsletters, SNS, work, friends etc. and they all go in specific mailboxes (200+)
    I also have some rules that I trigger using MailActOn.
    Since with Lion theres now 6 different flags (and that you can rename them) I've included them in the rules actions and set them up to the following categories:
    - To Do
    - To Do Later
    - To File
    - News
    - Personal
    This actually allows me to have these smart mailboxes to appear only when they are flags active.
    Now for the first three I want to keep the flags permanently until I'm actully done with them.
    But for the "news" and "personal" ones I want to have them "unflag" once I read them.
    So to recap, is there a way to systematicall/periodically unflag messages when they are read from specific mailboxes or if they are flagged with a particular flag?
    I'd really appreciate if someone would help me out figure out an adequate solution to what I'd like to achieve.
    I'm not sure if a kind of a combination of either applescript/workflow/rule would actually make it work...

  • Query  Of workflow Related to SE38

    I  have one Query ,
    If User   Excecuted   any report through SE38  ,   mail automatically goes to ABAP user , so that he can view whcih report is excuted by which User ,
    Is it  Possible  , If   Yes  how can  I   do this  using Workflow .?
    ASAP

    Hi,
    There is already some of tables which keeps record of the t-codes executed by the user
    by giving the login id you can fetch all the data, currently I don't remamber the table name but there is table, this will solve your problem.
    Regards
    Bikas

  • Purchase order release workflow rule

    Hi ,
    I have made a zcopy of standard workflow(WS20000075) for PO release. My requirement is that there are three level of approvers who have to release the PO. MM consultant says he will assign the approvers for all three levels from SPRO. As per the std workflow there is only one level of approval as far as i have understood .every time if approver rejects the po the mail should go to outlook also , to initiator and the next approver . 
    standard rule 20000027 is taken care for all three levels of approvals ..what is the binding for rule to workflow?
    from workflow side what are the customize things should i follow..i am new to this MM workflow can u please guide me ..
    thanks,
    sandeep chennoju .

    Hi Sandeep
    The requirement changed!!!! :-)
    Okay...for the email on DEADLINE BREACH
    1) You Do not need the fork in the deadline branch
    2) Instead, call an Activity Step which calls a method -> Input:  WF Initiator (full US + Username), PO Number and the Current Release code
    3) In the method coding, call rule 20000027 using FM RH_GET_ACTORS, get the agents (with OTYPE) for the PO and Current Release code
    4) Now Fill an internal table (of type TSWHACTOR) with OTYPE and OBJID returned from the above Function Call
    5) Append WF Initiator to this table -> OTYPE = US and OBJID = username
    6) So you have a table with CURRENT Approvers and the Initiator
    7) Pass back this table to task and workflow
    8) Now use a mail step, Set Recipient Type as 'G' (org Object) and EXPRESSION = that TABLE passed from above call (type TSWHACTOR)
    9) Ensure that the settings are done for SO16 -> Tab Mail Sys Grp -> Send to users home address is selected (in each client – this is not transported, hence maintain in every system once)
    10) Ensure that the users have their email ID maintained in User Master (SU01) and the communication Method Set as INT (OR Email is maintained in HR Master Infotype 0105 - if your setup is using that)
    11) Ensure Job SWWDHEX is running periodically in the background
    12) Ensure Basis Settings and send job are in place to send outbound emails
    What will happen when the deadline gets over:
    1) SWWDHEX job will pick up the item and the control will come to deadline branch
    2) The new step/method will get the agents of Current release code using the FM Call; it will also add WF Initiator to the list
    3) The mail step will send to the ORGNIZATIONAL Objects (the Usernames, Positions passed to it in table of type TSWHACTOR)
    4) SO16 settings will ensure that the mail is sent to the email address
    5) Email address is picked up by the system automatically from User Master or HR Info type 0105 (order is really not known)
    6) Basis settings and send job will send the email out of the system
    I hope I was able to get your requirements right this time and these will not change :-)
    Regards,
    Modak

  • Error handling in Workflow rules to determine agents.

    Hi there,
    I have a rule, if it fails. I need to send a SAP mail. Or skip that particular user decision step... Please.let me know what ahould be done for this.
    Thanks,
    Sukumar.

    Basically you need to execute the rule already before the actual decision step. What kind of rule do you have? If it is based on a function module, you can copy the code from the function inside your own method, and then use this method in a separate background step before your decision step. And if the agent cannot be determined you can skip the step, or whatever you want. And if you are familiar with ABAP OO and how to use it in workflow, you can include the above-mentioned logic inside a functional method of a class, and then use a condition step (with the functional method) instead of  the separate background step.
    Also, if you are not using a rule that is based on a function module, you can always find a way how to programatically call the rule in your code. There are lots of examples in SDN (or WUG).
    Regards,
    Karri

  • How to use bind variables in "query result" "validation rule"

    I have created a validation rule on my entity object. rules=compareValidator attribute=InvoiceNumber operator=NotEquals queryResult=SELECT ...
    In this query, I would like to reference entity attributes from the current instance of the entity when the value fires, for example SELECT invoice_number where invoice_id != :invoiceId
    How can I reference a bind variable inside the query result compare validator validation rule?
    THanks,
    Jerry.

    bump

  • Query required for rule

    Below is the condition for which a query is to be written.
    as of now this the query i have written. am getting the orderids which satisfy this rule but the output should include all those orderids which already satisfy the rule.(i.e the current o/p contains those orderids which share a common circuitid and have same start and end dates. the output required should include this as well as those orderids tat do not share circuitids.
    or
    the o/p should contain those orderids which do not fall into any of these categories)
    The Rule:
    For the Entity Circuit Orders if the Circuit Id is same for two different order IDs then the Order Start Date for the Order Id having Order Status as Installed should be same as the Order End Date for the Order Id having Order Status as Retired.
    Tthe query:
    select order_id from managed_element1 where order_status = 'I' and order_start_date in
    (select order_end_date from managed_element1 where circuit_id in
    (SELECT circuit_id FROM managed_element1 where order_status='R' GROUP BY circuit_id))

    The data is as below
    Order_id circuit_id start_date end_date order_status
    ORDER_67 BORDER_2 03/05/06 05/09/06 R
    ORDER_7 BORDER_6 10/26/06 I
    ORDER_11 BORDER_7 12/05/06 12/06/07 I
    ORDER_1 BORDER_2 05/09/06 05/19/06 R
    ORDER_2 BORDER_2 05/19/06 I
    ORDER_3 BORDER_3 04/03/06 05/20/06 R
    ORDER_4 BORDER_3 05/20/06 I
    ORDER_5 BORDER_4 02/05/06 05/06/06 R
    ORDER_6 BORDER_4 05/05/06 I
    ORDER_7 BORDER_5 10/22/02 02/23/03 R
    ORDER_8 BORDER_5 02/23/03 I
    ORDER_9 BORDER_6 03/12/06 09/26/06 R
    ORDER_10 BORDER_6 09/26/0610/26/06 R

Maybe you are looking for

  • I wanna get all my music off my ipod without downloading a bunch of stuff what can i do?

    ok so here is the deal i have a ipod touch which just got cracked screeen because i have younger sibling but another thing is does any one know were and how much to fix them ..... MY MAIN THING IS ..my computer was acting up and i had to crash it and

  • Computer Not Turning On w/ Power Chord

    My G4 went to sleep w/o warning (the same issue as this thread post?!?!) and now WILL NOT WAKE UP?! (yes I am aware of this "defect" via other posts). Any idea why? Here's what I tried to troubleshoot: 1. A diff power chord 2. Taking battery out and

  • Help with Importing and Editing an Image

    Hello All, I am working on a project where I need to import an image into LabView and edit it. The gist of my program is that I want to create a VI that generates an interactive floorplan. I want to be able to import the bitmap or png into my file so

  • Conversion Exit on ALV fieldcatalog ?

    Hi all, I have an editable ALV grid and one of the column displays a field which is of the floating type. Now instead of the regular 1.2870001E+00, can I make it display 1.28 ( Decimal rounded to 2 decimal places). I am trying to modify the fieldcat.

  • How do you see a pages code?

    Hi, I am on a Mac and I know if I hit Command + Option + A it will pull up an activity page which shows the content of a page.  I see .gifs and . jpgs and .css.... I am curious if I click on the .html page is there a way to see their code? Thanks, Ga