Set Decision Step outcomes Runtime .

Hi Friends ,
I have one decision Step in my Workflow,  i want to set the outcomes of the decision in runtime . it may be two or more than two outcomes , how to do it in runtime,  Is there any Function module available .
Pls give suggestion .
Thanks and Regards
Gokula Krishnan R.

Hi ,
My problem is not executing the Decision Step in workflow . you mentioned
0001 for Approve,
0002 for Reject,
0003 for Review,
This is the outcomes, how to create this in runtime.
I am Looking for function module or Logic to Create this outcomes through Progam..
because i have number of outcomes in table , i have to get those outcomes and i want to set it in Existing Decision step in workflow .

Similar Messages

  • Decision Step outcomes in English language only

    Hi,
    My issue is little bit different, In my workflow template (WF) i have one user Decision step and currently outcomes are coming in Logon language. but my requirement is to display in English language only. I am working on 4.6c version. When i try to maintain translation by SWDD->extras->translation->translation.this is in display mode and i am not able to change. is something with authorizations??.
    Please help me thanks a lot in advance,
    Mohan

    I think you can directly change the outcome from table SWD_TEXT.
    I think you just click in stead of double clicking which will open the particular step and follow the path Extras->Translation->translation.
    Thanks
    Arghadip

  • Set Decision Step in WF via Terminating Event

    Hi All,
    I have a custom Work flow in which I am trying to terminate a Decision Step via a terminating event.
    Following Pre- requisites have been set:
    1) In the Control task for the decision step I have assigned the terminating event.
    2) Required linkages have been maintained via SWE3 transaction.
    ISSUE: When the terminating event is raised then the Workitem for this steps gsts completed but workflow ends with an ERROR --> "No Successor for the terminating event defined".
    Please let me know if any of you is familiar with the issue or have any inputs.
    Thanks in advance..

    Hi Sourabh,
    There would be some binding problem going with Decision step while using Terminating event maintained at
    the Task of the Decision step.
    Rather go with FORK step with two parallel branch and 1 necessary branch. Specify the approval step in one
    branch and wait for the release step event in another branch.
    Hope this way would solve your issue.
    Good luck
    Narin

  • Decision Step Outcome

    Hi Folks,
    We are using webdynpro application to approve the workitem in UWL. This is a standard decision step and we have made a custom screen in webdynpro with approve and reject buttons Once approver clicks on approve or reject button, we are populating container fields  _WI_Result  and _Result as '0001' for approved and '0002' for rejected.
    The issue that  we are facing is , for some scenarions, even though the value in container is populated as '0002', but in workflow log it is showing decision step as approved. As a result of this, despite rejection , worklow is going to next step approval. Please provide your inputs how to tackle this.
    Please note we are facing this issue for some scenarios only, for rest of instances, the decision is populated correctly for both approved and rejected workitems.
    Regards,
    Sangvir

    We are using FM  'SWW_WI_CONTAINER_MODIFY' to update the container field for above mentioned values. Could that be issue that it is not updating values in database container correctlt.
    Would using sap_wapi_write_container be a better approach here?

  • How to disable the  Options for a decision workitem at runtime

    I want to  disable the  Options (in this  case, Approve  and Reject ) for a decision workitem  at runtime (depending on a condition).

    Hi Dhavalshree,
    As vijay have mentioned, I will not be possible to Disable option of a decision step at runtime.
    You can get this functionality by following the steps mentioned below
    1)     Have one more step (CONDITION STEP) before this decision step in workflow definition
    2)     In the condition step, with the step name say (approve or reject)
    3)     In the condtion tab, define a flag say &YFLAG&
    4)     Write the expression to this flag as &YFLAG& = Y
    5)     Define two outcomes for this condition step i.e. True and False
    6)     Under u2018Trueu2019 give the outcome name as APPROVE
    7)     Under u2018Falseu2019 give the outcome name as REJECT
    8)     Based on the path have two different decision steps in each path of condtion step
    9)     In the Approve Pathu2019s decision step define only one option i.e. Approve
    10)     In the Reject Pathu2019s decision step define only one option i.e. Reject.
    Hope this will help you.
    Regards,
    Deepa Kulkarni

  • Setting Priority Dynamically in Decision Step

    Hi Experts,
    My requirement is to set priority of the user decision based on a container element value.
    Depending on the container element values, some times the workitem should be created with priority 5 (medium) and some times it should get created with priority 4 (High).
    Please let me know how can we pass priority dynamically to the user decision step.
    Thanks in Advance,
    Siva Sankar.

    I think you can use FM
    SWW_WI_PRIORITY_CHANGE
    Thanks
    Arghadip

  • Calling Transaction through User Decision step in workflow

    Hi all,
    Pls help me calling a transaction through User Decision step in workflow. I have attached two buttons to my User decision and the one of the outcomes to a task where I am calling the transaction through a method of BOR. But the problem is I am unable to see the transaction when I press the button on my User Decision at test run.
    Can you ppl let me know how can I achieve this?
    Pls reply ASAP...
    Thanks
    Sangharsh

    Hello Sangharsh ,
    Please Check the paramater of of the method which you define.
    e.g. I define CALL_TCODE_CJ03 method
          which have the parameters FLAG,ProjectDefinition,WBSElement2,User
          with export, import checkbox.            
    Pass the paratmeres in programs
    e.g.
    BEGIN_METHOD CALL_TCODE_CJ03 CHANGING CONTAINER.                      
    DATA:                                                          
          FLAG(1),                                                        
          PROJECTDEFINITION TYPE PROJ-PSPID,                              
          WBSELEMENT2 TYPE PRPS-POSID,                                    
          USER TYPE USR21-BNAME.                                                                               
    SWC_GET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_GET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_GET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.                
      SWC_GET_ELEMENT CONTAINER 'User' USER.                                                                               
    GET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      GET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                                                                               
    SET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      SET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                             
      CALL TRANSACTION 'CJ03' AND SKIP FIRST SCREEN.                                                                               
    SWC_SET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_SET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_SET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.    SWC_SET_ELEMENT CONTAINER 'User' USER. 
    END_METHOD.
    I hope it will help you.
    ***Assigning points is the way to say thanks in SDN.***
    Minaxi Shah

  • Cancel and keep workitem in ready state in user decision step

    Hi,
    In a user decision step,there is a default option 'Cancel and keep the work item'.
    Now clicking on this option, the workitem goes into "Inprogress state"
    whereas i want to keep the workitem in "ready state"  after i click on the option 'Cancel and keep the work item'.
    I am trying to modify the Process method of Decision Object type to incorporate this funcationality by using FM "SAP_WAPI_PUT_BACK_WORKITEM.
    but im getting the error that this FM cannot be used at runtime.
    Place where im trying to call this FM:
    After the FM'SWU_PROCESS_MANUEL_DECISION'
    I am getting the value of RESULT.
    If result is SPACE or sy-subrc is not 00 then i am calling this Fm which takes Wi_id of the userdecision as input.
    Kindly help
    Regards

    Hi,
    Let me ask you this. Why you need to have this in "Ready" state, Not in "IN PROCESS" state. Anyway, the witem is still there in the user's inbox, and if you have any deadline monitoring, then this is also taken care with "Cancel and keep xxxx". So, i think, functionally you'll still be better with the existing functionality.
    And, with all this, if you are still trying to change, then i think it's NOT possible. If i understand correctly, you are trying to use the FM "SAP_WAPI_PUT_BACK_WORKITEM" within the PROCESS method. And, if you understood the functionality of how this works, you are trying to set the status of the SAME witem for which you are executing the PROCESS method.
    THe way i understand the behind-the-scenes process, once you make a decision and save, this method is the one which in turn sets the witem status. And within that, you CANNOT capture the status as it is yet to be posted to the Witem tables.
    Probably, after this decision step, use a different background task with the above FM to set the witem status to "Ready", BUT NOT IN THE SAME METHOD of PROCESS.
    Also, it's not advisable to change this std. method.
    Hope this helps you. Reply,if you need more info.
    venu

  • Probelm with decision step type

    Hi,
    I am using the decision step type to display release and reject the options to the approver . i am using the latest end tab to escalate( forward) the workitem to next available approver .( deadline monitoring 30 min) .
    workitem is generating in the 2nd available approver inbox after 30 min  . but the same workitem is still available in the 1st approver  inbox ( of course it display the message the following deadline was missed and latest end reached) .
    But even after the 2nd approver gets the workitem in his inbox  ,the  1st approver is able to execute the same workitem by ignoring the message .
    Please can any one explain me what is reason behind this.
    Please can any one helping me how can i delete the workitem in the 1st approver  inbox once the workitem is created in the 2nd approver inbox  .

    Just follow the steps
    1)You can use Latest End Tab in a Step which is attached to a task. Use Modelled deadline. Using this another branch is created from the step.
    2)Activate the Outcome Processing obsolete for the Step that needs to be sent to the Manager.
    3) Now put a process control in the branch that has been created due to modelled deadline. Use "Set Workitem to Obsolete" in the Function and provide the Step number in which the deadline step is incorporated.
    4) Now create another step at the branch Processing obsolete of the step that has the deadline and copy the above step with deadline removing the deadline part. This step is only for 2nd approver.
    <b>Reward points if useful</b>
    Thanks
    Arghadip

  • Looping a single branch in User Decision Step

    Hi All,
    Can anyone tell me is looping possible for a single branch in user decision step in a workflow?
    If yes, How?
    I want like to loop the step cancel and keep workitem inbox.
    Whenever the user clicks cancel and keep workitem in inbox in a user decision and again executes the WI i would like the workflow to start execution from the step just above the user decision step, i.e; Display PR.
    This is my requirement. Tell me how can i implement it?
    Thanks,
    Raj

    Hi,
    instead of doing so, you could try to enter that method as "secondary method" or "before method" within the tab-strip "Methods".
    If you used your own coding for a decision, you could enable the exception 8015 of the method's result, which is the cancel-button. If you did so, you can enable that outcome in the workflow-activity's definition.
    Best wishes,
    Florin

  • User Decision step in UWL

    Hi,
    I have a 3 user decision steps in my Customised workflow which uses the task TS00008267. Each task has different decison text and outcome. When this is executed through UWl the outcome does not appear as they are in SBWP.
    Does this need and Portal Configuration?
    Thanks & Regards

    Hi,
    There are two thing you need to do.
    First, you need to configure the SWFVISU.
    Run Tcode SWFVISU.
    here, select "Task Visualization' and maintain your standard task ( TS ) with ABAP web dynpro option.
    Now selct your entry and click on Visualization Parameters as mentopn below.
    APPLICATION ( WD application name )
    DYNPARAM
    NAMESPACE
    SYSTEM_ALIAS
    Second, ask Portal team to chagne the XML code for the above standard task and application ( i.e. WD appilcation which will be launced on clicking the task ).
    From the next run of the workflow, WD applcitoon will be lauched from the protal.
    for the old workitem this will not work.
    Note : If u do not configure SWFVISU then WD application will not lauch but user will get SAP gui screen for processing it.
    xlm code must be changed corresponding task for both case.
    Thanks and ragards,
    SNJY

  • Terminate loop in user decision step

    Dear Experts,
                         I have a user decision step in my workflow; which has two buttons e.g; approve and reject buttons. this step is in the loop. I want to terminate the loop when user click on Approve button. How I should capture the ID of approve button. OR there is some other idea to terminate the loop; as I don't have any other condition to stop the loop.
    Regards,
    Sohail

    Hi Sohail,
    Create one workflow container (e.g. APPR_FLAG) of type CHAR1. Then just after APPROVE branch of user decision step create one 'container operation'  step and set the APPR_FLAG to X. finally in you loop end condition put terminating condition as APPR_FLAG = X. So this your loop will terminate once qgent clicks on APPTOVE button.
    Regards,
    Ibrahm

  • Adobe form as attachment to user decision step

    Hi,
    i need to add adobe form as attachement to user decision step in workflow.
    1. i created activity step which call business object method with parameters workitem id
         i am using FM  SAP_WAPI_ATTACHMENT_ADD’  which will return attribute id
         i am passing that attribute with document id to 'ZSOFM'
            ZSOFM <-----------------------------------ZSOFM (Method to task)
          Bindings 'Attach_objects'  <------------- ZSOFM(Task to Workflow).
    2. i created user decision step
        Bindings  'Attach_objects' --------------------> 'Attach_Objects'( Workflow to user decision task).
    but when we execute first activity step in background i am not getting any PDF output .but when we  execute same method from class i can see pdf data is coming is it due to user name WF-Batch.
    when i execute activity step in back ground which will have sy-uname as WF-Batch i am not getting any PDF output data.
    please help how to solve .
    Thanks,
    Phani

    In transaction SWO1 create a z-object lets say zmyobjpdf (you might want to use it as a sub object of your standard object without delegation since they will probably have the same key).
    create a method in that object calling the adobe form.
    set it as the default method in the object header.
    now create an instance of the zmyobjpdf in the workflow for example as an attribute of the original object) and transfer it to the decision task.
    It will be displayed as an attached object pressing it will call the default method - your adobe form.
    If your question was about how to create a function module to display the form see SAP Library - PDF-Based Forms

  • Displaying report using decision step

    Hi ,
    in the decision step .i am calling the custom report in the methods before workitem execution. when i execute the workitem from the inbox first it is displaying the report after i click back button ( or cancel) button the report is displaying again. I am not getting  why program is displaying the report again.
    this is code :
    BEGIN_METHOD REPORT CHANGING CONTAINER.
    SET  PARAMETER ID 'BES' FIELD OBJECT-KEY-PURCHASEORDER.
    CALL TRANSACTION 'Y0024' and skip first screen.
    END_METHOD.
    please can any one help in solving the problem.
    advance thanks
    paveee

    Hi Paveee,
    Search this forum. I think this problem has been addressed before.
    By the way, you have a question similar to this still open if that question is answered, please close the thread by marking it answered.
    Regards,
    Martin

  • Handling decision step when no agents found

    Hi Experts,
    I have copied the standard decision step and also made it as a General Task. As in few scenarios, the users can have multiple managers, I have used multiline container element in the agent assignment under 'Expression'. This all works fine if atleast one agent is found.
    Though not normal, I need to handle scenario where no agent is found.
    Currently my workflow is sending workitem to all users whenever no user is found which is not ideal.
    I expected the workflow would stop saying no agents found, but curently the workflow doesnot stop at decision step.
    Is there any possibility where we can hold the workflow at decision step when no agents is found.
    Please help.
    Note: we have cleanup reports run by administrator to complete all the workflows with no agents.
    Thanks in advance,
    Cay.

    Hello,
    "So I want to know if it is possible in any way to hold the workflow at decision step without skipping the decision step or erroring out the workflow"
    There is nothing wrong with having it go into error status - that would alert the workflow admin that something has to be done, and it's easy to locate the workitem (with SWI2_DIAG). You can also easily set up the system to mail the workflow admin when this happens.
    But anyway, if that's what you really want, you could change the task so that it's not a General Task and define the possible agents more restrictively so that it will just end up under the category "workitems without agents". You'll have to research how to do this, I almost always use General Task.
    regards
    Rick Bakker
    hanabi technology

Maybe you are looking for