Logic for workflow

Hi All,
Kindly help me out with the logic building for this scenario:
There is a customized workflow attached with Purchase Requisition approval. This workflow has an Org structure based on departments. The approver is determined based on admin id or the workflow initiator.
Issue is : if the same user has to create a PR for different department, he/she will have to login with the admin's id for that department.
Requirement : Same user should be able to create PRs for any department.
So, is there a way of adding this condition with minimum change ?

Hi Ameekar
As I understand it, your problem is that the current agent determination process is to select the appropriate approver based on the particular department creating the requsition.
One solution might be to change the agent determination for the approval task to select the approver based on an Organizational Unit rather than by department.
Org units are sort of free standing HR groupings.  You can create an Org unit.  Assign people to the Org unit and then designate that org unit as the agent for the approval task.  Thus in your case you could create an org unit of Approvers then assign multiple people to it and requsitions would be routed to the org unit for approval regardless of Department.
Some things to consider:
1. Everybody in the org unit will see the task in their worklist - first one to open it reserves it and others cannot work on it unless it's replaced back into the worklist
2. It's nice for when people go on vacation, automatically takes care of the workload by allowing others to execute workitems
3. It has the ability to deal with part time people.  When you assign a person to an org unit you can specifiy their hours of availability or the percentage of their time involvement - system automatically takes this into consideration.
Hope this helps,
Brent

Similar Messages

  • How to do IF THEN  ELSE logic in Workflow?

    I need to do "if then else" logic in Workflow. The key part of the probem is that there are several "else" (elsif) possibilities, so I can't use a Boolean or Yes/No as a return result code. When I use a function, I can't see a way to "check" the value before it passes to a next process. HELP!

    Whether you are using a function as your comparator or the Standard WF Compare Operators, this can be done. I will explain two scenarios, one with your own written functions as the comparator and the other using the standard Compare Text function.
    Create a PL/SQL procedure that returns a boolean. In this procedure you would pull two attributes from the workflow, the test case and the value you want to compare to. You would check to see if they are equal and return true, otherwise false. I do not know what you are trying to compare in your if statement, but whatever it is, if its true, return true, otherwise false.
    Now in the workflow, you would put a couple of these in your process diagram representing each if statement. Set the two (or more) attributes in the Node Attributes tab of each function node to the values you want to compare. For the first node, have the <true> transition go to whatever you want done and then to an END node. Have the <default> or <false> transition point to the next function node you have. Do the same for each one except at the last one, its only transition would be <default> and that would go to END. This way if the first function resolves true, it will do whatever should be done and then skip the rest of the conditions. If its false, it will go to the next conditional. The last one will be gotten to only if every other conditional was false that would be your final else statement.
    To do this with the Compare Text option, have the same set up in your workflow diagram exception have the <EQUALS> be your true path and the <DEFAULT> transition go to the next compare text node.
    -->O-{default}->O-{default}->O->default
         |                 |                 |             |
        true           true            true           |
         |                 |                 |             |
      doWork     doWork     doWork      else
         |                 |                 |             |
          ---------------->---------------->------------|
                                                          |
                                                      end

  • WHY do we set up a RFC connection for workflows

    Guys please tell me why do we setup a RFC connection for workflows.
    I am getting few dumps for function module IDOC_ERROR_WORKFLOW_START_R in transsactional RFC connection.
    Looks like it is because of temporary disconnection.
    i want to know what is the relationship of RFC with wirkflows.
    Thanks in advance

    Quoting text in automatic WF customizing transaction (SWU3):
    Function
    The workflow runtime system always executes its tRFC (transactional RFC) calls on the logical destination WORKFLOW_LOCAL_xxx (xxx stands for the three-digit number of the client).
    The workflow runtime system only operates within one client. The naming for the logical destination guarantees that these names are unique across the system.
    If you carry out this activity automatically, the logical RFC destination WORKFLOW_LOCAL_xxx is created (if it does not already exist). The user WF-BATCH (system user) is assigned to this destination.
    If you belong to the SUPER user group, and the WF-BATCH user does not exist, it is created and automatically gets the maximum authorization of the current user (SY-UNAME). This function is to be performed once by a user who belongs to the SUPER user group.
    If you perform this activity manually, you can maintain another system user and another password.
    In SWU3 you can configure RFC destination.

  • Logic for carry forward of previous stock to current period stock.

    Hi Experts,
    Client is using already MC.9 for see the stock analysis report, however as per there requirement we are exploring BOM as well as fetching quantity from table level as well. in my report I am experiencing  difficulty to carry forward previous period closing stock quantity to current period stock quantiy, if there is no received for current period, however the same is happens in MC.9
    Could any one tell me what is the logic behind MC.9 which is do carry forward previous period closing  stock to current period stock quantity in report.
    As per the requirement I am using S031, S032,S033, however unable to get logic for carry forward the previous month stock quantity to current month.
    have a requirement of creating a report of showing material stock period wise for each plant in below mention format.
    Header 1
    Header 2
    Header 3
    Header 4
    LFGJA/LFMON
    ROH (MT)
    HALB (MT)
    FERT (MT)
    11.2013
    100.000
    121.000
    121.00
    12.2013
    50.000
    12.000
    123.00
    01.2014
    23.231
    .23.234
    45.342
    02.2014
    23.231
    34.094
    45.098
    03.2014
    34.098
    98.983
    00.000
    04.2014
    00.000
    69.093
    98.098
    05.2014
    00.000
    89.098
    00.000
    For Example Break up of ROH material plant wise in below mention format.
    LFGJA/LFMON
    WERKS
    MENGE (MT)
    11.2013
    P001
    30.000
    11.2013
    P002
    50.000
    11.2013
    P003
    20.00
    Thanks in advance,
    SKN

    Hi,
       The last period closing stock = current period opening stock. You may get the details from MBEWH and S032 tables. Refer the doc: Material Stock and Valuation History tables - how to read them
    Regards,
    AKPT

  • In MVC, do i need a View or Page with flow logic for POPUP window

    Hi All,
    I have the below scenario using the MVC pattern.
    I have a main view with 3 trays, each tray has two buttons, for example first tray has Create Order button. When I click on this button, I need a popup window to come with a tableview and a button(Create), where I select some rows and click on the button Create  to create order.
    But as per the MVC pattern I canu2019t call the view (popup) from another view(main view).  So should I create a VIEW or PAGE WITH FLOW LOGIC for the popup? .
    I need 6 popup to be called from the main view and once the function is done close the popup.
    Please suggest me the flow for this scenario.
    Cheers,
    Srini.

    Srini,
    1. You can call the view in pop-up because you will be calling the controller using open.window.
    Here is the sample code:
    method DO_REQUEST .
      data:
            li_vw           type ref to   if_bsp_page,
            lv_form_field   type          string,
            li_md           type ref to   zcl_model01.
      dispatch_input( ).
      li_md ?= get_model( 'm01' ).
      lv_form_field = request->get_form_field( 'invoice_create' ).
      if lv_form_field is initial.
    *------ Request to display main page
        li_vw = create_view( view_name = 'main.htm' ).
        li_vw->set_attribute( name = 'model' value = li_md ).
        call_view( li_vw ).
      elseif lv_form_field eq 'true'.
    *------ Request to display Invoice page in pop-up
        li_vw = create_view( view_name = 'invoice.htm' ).
        li_vw->set_attribute( name = 'model' value = li_md ).
        call_view( li_vw ).
      endif.
    endmethod.
    Layout:
          function do_Invoice()
          { var s=0; r=1; w=300; h=300; x=screen.width/2;
            x=x-w/2;
            var y=screen.height/4;
            y=y-h/2;
            popUp=window.open('main.do?invoice_create=true','win','width='+ w
            +',height='+ h +', left=' + x +',top='+ y +');
    Option2:
    Ofcourse you can't bind the model in page becos those are 2 different things. But all you need to do is access the model to get some value. To know how to access the model from Page w/flow logic look at [this link|Passing model reference to a page in a Popup].
    Raja
    Edited by: Raja Thangamani on Apr 14, 2009 11:22 AM

  • How can I see that a file has been sent for workflow?

    How can I see that a file has been sent for workflow?
    During the workflow phase, the file is locked for workflow. But when the file has been approved (or denied) it will have the same status as it did before the workflow process (unless you trigger the workflow by changing its location).
    You can see the workflow history in the "My Request" view, but this way of determining whether a file has been approved seems complicated.
    Best regards
    Magnus

    Hi,
    Thanks for the transaction code, but my question is not answered yet.
    For example, I use STMS_IMPORT in the Development environement to see the list of the transport that has been made in that environement.
    I now have a list of these transports, with a status. But I wanna know if that transport that has been created in the Development environement has been moved to the Sandbox environement.
    STMS_IMPORT shows me only the list of transports that has been created in that environement. It doesn't tell me if a transport in DVL has been moved in the QAS, SANDBOX or PRODUCTION environment.
    Thanks again,
    Julien

  • What is the logic for 2LIS_17_I3HDR to pick a order as completed on time?

    Hi, Experts:
    I am working on PM using 2LIS_17_I3HDR to load data. In 2LIS_17_I3HDR, there is a field called "orders completed on-time". I am wondering what is the logic for 2LIS_17_I3HDR to identify if an order was completed on time. I would assume it compares some kind of completion/finish date with a planed/schduled comletion/finish date. Would someone please tell me what fields in what table or in transaction IW39 DOES does 2LIS_17_I3HDR  use for this?
    Many thanks!
    Jenny

    Hi, Ram:
    Thank you for the reply!
    The key figure is ZHLAFIH_TGERL (Number of On-time Closed Orders). I saw some SAP programs refering to its component type "DZHLAFIH_TE" too.
    Thanks,
    Jenny
    Edited by: Jenny Chen on Dec 2, 2009 7:53 PM
    Edited by: Jenny Chen on Dec 2, 2009 7:55 PM

  • Best practice for workflow triggering from Web Dynpro UI

    Hello, workflow community!
    I'm working on a task which allow to trigger the workflow by clicking a button in Web Dynpro UI. As always, there are multiple ways to do that, for instance, to use SAP Workflow API (SAP_WAPI_START_WORKFLOW) or to raise an event upon the button click, which will be caught by workflow template.
    In my opinion, the optimal solution is to call FM, which will call ABAP-class, raising an event, which, in turn, will be caught by workflow template. In this case, FM will service kind of wrapper, where we can implement some additional checks if needed.
    But the question is what approach is the best practice — to raise an event or use SAP_WAPI_*?
    Thanks.

    let combine, use SAP_WAPI_CREATE_EVENT
    usually I would not recommend creating a workflow directly (SAP_WAPI_START_WORKFLOW) since when I look for workflows in a system I usually start from SWE2 (the event linkage) which uses events so the workflow you start by SAP_WAPI_START_WORKFLOW will not be seen there, also SWE2 gives you better control for starting the workflow, you can easily deactivate an event linkage. finding where you called the workflow by SAP_WAPI_START_WORKFLOW will be more difficult and deactivation will require a code change.
    so use events, and start them by SAP_WAPI_CREATE_EVENT
    Also pay attention that you have a check function module option in SWE2.

  • I am considering buying a new MAC laptop to run LOGIC for composition and band live/recording, but which one is best as I do not want to spend too much money? Does it have a line in and how do you monitor sound? Will I need adaptors and a interface?

    Can anybody help?
    I am considering buying a new MAC laptop to run LOGIC for composition and band live/recording, but which one is best as I do not want to spend too much money?
    Does it have a line in and how do you monitor sound?
    Will I need adaptors and an interface?
    Also, I am guessing as Logic only runs on MAC surely then they would not the best spec to recommend to run it?
    I see all the upgrades as additional memory or a faster process?
    Is a retina screen necessary, and why flash based storage against a 1TB hard drive, and a i5 instead of an i7
    The main reason for this purchase is to play live and use backing tracks and record found sounds and make creative songs.
    I hope you can provide some valuable feedback, as I am a longtime MAC user and see upgrades and changes happen regularly but the most important thing is the songs not the equipment.
    I have £500 already and willing to add another 500 to 700 pounds, then software extra.

    Can anybody help?
    I am considering buying a new MAC laptop to run LOGIC for composition and band live/recording, but which one is best as I do not want to spend too much money?
    Does it have a line in and how do you monitor sound?
    Will I need adaptors and an interface?
    Also, I am guessing as Logic only runs on MAC surely then they would not the best spec to recommend to run it?
    I see all the upgrades as additional memory or a faster process?
    Is a retina screen necessary, and why flash based storage against a 1TB hard drive, and a i5 instead of an i7
    The main reason for this purchase is to play live and use backing tracks and record found sounds and make creative songs.
    I hope you can provide some valuable feedback, as I am a longtime MAC user and see upgrades and changes happen regularly but the most important thing is the songs not the equipment.
    I have £500 already and willing to add another 500 to 700 pounds, then software extra.

  • Custom Approval Screen required for workflow to be executed via CRM Web UI

    My requirement is to create a custom approval screen for workflow. I am Not aware as to how to create a custom approval screen for workflow that could view via CRM Web UI and Execute the workitem as well.
    Experts please help me with the creation of a task with custom approval screen.

    Hi Surjith, thanks for your answer but is not the right one.
    This is an standard method and is working fine, I think the problems must be in some setup I have to do but I'm missing.
    Thanks a lot.
    Regards
    Felipe

  • How to use Start Task Group for Workflow Interface

    Hi all,
    anyone who can tell me how to use the Interface IFWFTSKGRP (Start Task Group for Workflow Interface)?
    As far as I understood the documentation it can be used to restrict the selection of workflows that can be started in the Generic Object Services. But the question is how to implement it.
    Best regards,
    Carsten
    Edited by: Carsten Drewes on Jun 10, 2009 10:30 AM

    Hi, Carsten,
    (probably it's a bit too late to post an answer after 3 years , but I'll post it in case someone else needs it)
    You should implement GetTaskGroup method.
    The code should return id of the task group (otype TG, mantained in PFTC) that holds the list of workflow definitions.
    Here is a sample implementation. It's taken from FORMABSENC business object. It belongs to SAP demo workflow "Notification of Absence". I suppose it should be present in most systems and you can see it in action.
    begin_method gettaskgroup changing container.
    DATA: taskgroup LIKE rhobjects-object.
    *- set task group
    taskgroup = 'TG70000023'.
      *- set result
    swc_set_element container result taskgroup.
    end_method.

  • Edit option not enabled for workflow content from within Content Presenter in Webcenter Spaces

    I have a webcenter spaces portal page with a content presenter displaying a html page using the default out of the box template. The html page is located in webcenter content / UCM under a folder on which the " All Reviewer" seeded workflow is enabled. The issue i am seeing is when the file is in workflow the edit option is not being enabled even though the reviewer should be able to edit/approve the content in this step. The other functions like workflow approve or reject and switching between workflow version and published version are all enabled. Also when rejected the content does not show edit option from the content presenter (cntrl-C option) for the original author to make any updates.
    What would need to be done to enable editing from within the content presenter for workflow content?
    Thanks for your help

    Hi Sreedhar
    We are using WCP 11.1.1.8.5
    To recreate the issue
    1)  Login to WCC Portal: Spaces as admin user , create a New Page under a webcenter spaces portal
    2)  Under the space , Pages Section , select the page and click edit
    3) In Design mode , choose Content Management and Add Document Explorer and Add Content Presenter on the page
    4)  The Document Explorer will default to the Current Space/portal directory under MyWebcenterSpaces in UCM
    5) Create a directory "content" under the Portal space using the document explorer.
    6) Right Click on Content folder and choose details. In Details view , go to File->workflow settings and pick a seeded workflow -> MyWCSAllReviewer. Add a user as workflow approver
    7) After workflow is enabled on this folder upload a basic html page with simple text into this folder
    8) Now in the design mode choose edit in the content presenter and select the "single content view" with default template to display an Image or HTML. Click browse and select the html that was added to workflow
    9) Save the Page and view the portal. Workflow should now be enabled for any content changes to that html page.
    10) Click Cntrl-shift-c in portal/space as an authenticated user with edit access to content and make an edit to content , this will trigger worklow . The author currently will see edit option get disabled once content enters workflow
    11)  Login as approver to the portal and cntrl-shift-C to the portal and workflow options(approve and reject) are enabled but the edit option is not. If you reject content , the author should be able to edit content in the content presenter mode, this also is not available. The issue is the content is now no longer available for editing from wthin content presenter if it is in workflow to either the approver or the original author depending on workflow step. If you check the same content under the document explorer the option to edit is enabled. Is this a bug /issue with content Presenter or some option needs enabled?

  • Logic for making ASN as an attachment to a email?

    hi all,
    can anyone help me trying to write a logic for making the Advanced Shipment Notification as an email attachment after having converted it into pdf format?
    I need logic for:
    1) Initially converting it into pdf
    2) Making the pdf as an attachment and not as a general email content.
    Thanks & Regard/Aryan

    Dear Aryan,
    This conversion to pdf can be done by using program RSTXPDFT4, and for the pdf to be sent as attachment you need to contact your technical team as they will write a script for that, scheduling of the same can also be done.
    Reward Points if it helps,
    Regards,
    N

  • Reminder mail for workflow approval

    Hi All,
    We have a scheduled task which sends Reminder mails for workflow approval which has been pending for more than 5 days.
    Recently I created new workflow definitions and reminder task stopped sending mails.
    I checked task and it has IapiTaskIfc Class com.frictionless.custom.wkfreminder.sendWorkflowReminder.
    How to check this class and do i need to make changes somewhere else to send reminder mails?
    Regards,
    Prabhat

    Hi Prabhat,
    I am working on creating a scheduled task for sending reminder emails. I need help on IapiTaskIfc Class com.frictionless.custom.wkfreminder.sendWorkflowReminder. Can you please share sendWorkflowReminder class to me, so that I can get idea about the code written for sending reminder emails? It would be great help.
    To check the class, you need to get the jar from server and decompile it. You can get some idea by looking at the java class file then.
    Thanks,
    Saloni

  • Where to see the logic for 0FYEAR (SAP Exit)

    There is already an SAP exit 0FYEAR. There is a requirement to make ZFYEAR1 just like 0FYEAR. So, i want to see where the code (logic) for 0FYEAR is present so that i can write the the same for my custom variable(ZFYEAR1) in CMOD. Can anyone help me with the name of the program?

    Include ZXRSRU01 --> Function Module EXIT_SAPLRRSO_001
    or
    Search for Function Module RSVAREXIT_ [variable name]
    Variable Name = 0FYear

Maybe you are looking for

  • Replacing ProBook 640 G1 HDD to SSD

    Hi all, I have a HP ProBook 640 G1 and would like to replace the HDD with a 500GB SSD. - Is this possible? - If yes, what specs/kind of SSD to look for to buy? - Best reliable brand of SSD forum members have experienced/recommend? - What is the best

  • Switch off imac internal display

    Hello, i bought an 24" external monitor yesterday. I want to use that external display only. How can i switch off the internal display of my imac? Lowest brightness and a black desktopbackground are not very satisfying to me . Thank you for any ideas

  • Problem in producing some xml strings

    Dear all, I got a problem in producing some xml string. I use the DocumentBuilderFactory and DocumentBuilder to build a xml document. Instead of saving to a file, I need to make it into a string then return it to the caller. I have tried to use the T

  • Import books.xml from bookstore

    How to import books.xml from distribuitor with request via htpp ?

  • Customizing headres and footers in Datagrid

    Hi,      How to customize headers and footers in Datagrid. Is there any example available. Regards, Jayagopal.