Execution of work item programatically

Hi All,
I need a function module which can execute a work item programmatically. like if the work item has two user decisions say approve or reject...
programatically if i pass the value it should be executed with that value....
Thanks,
Siddarth

Thanks for your quick reply,
But I have already seen this... this asks the user to select the decision...
but what I want is even the decision i.e. approve or reject should be passed through the FM and that will execute it automatically without asking the user for selecting the decision...
Thanks,
Sid
Thanks Sanju,
I found the funcion module by my own, which does the task....
FM : SAP_WAPI_DECISION_COMPLETE
Edited by: Siddharth Chordia on May 8, 2009 12:18 PM
Edited by: Siddharth Chordia on May 8, 2009 12:19 PM

Similar Messages

  • RBBP_OFFLINE_EVAL No e-mails exist for execution of work items

    Hi ,
    We are trying to implement SRM offline approval. The system is able to send the email to the approvers, but when they click on approve, the work item does not get updated.
    When i try to run report RBBP_OFFLINE_EVAL it says that No e-mails exist for execution of work items. No Work Item Found for Processing. What do i need to check to resolve this. If I approve thru SRM, it is working.
    Thanks,
    Jograd

    Hi
    refer related links too
    SRM : Offline approval process
    Offline approval not working?
    Check WF-BATCH user id has email ID?
    regards
    Muthu
    Edited by: muthuraman on Aug 18, 2008 8:00 AM

  • Execution of work items

    Hello,
    we have some unprocessed work items in workflow with status Error. we would like to post, is there any standard job to process all Errro items at a single time !!
    Regards,
    Ramesh.

    Hello,
    This transaction  SWPR didn't pick up the work items, we executed through SWI1 still the process and workflow log did not completed. Below error has occured  "Fork from node 362 has not been released again yet"
    Please suggest
    Regards,
    Ramesh.

  • Collect Idocs - Work Item Execution Time

    I have created an integration process that includes a collect process which follows the BpmPatternCollectTime pattern. Everything works great. I have one question though. When monitoring the process in SXMB_MONI and looking at the technical details for the collect block work item the execution time continues to grow, despite the work item having a status of completed with a creation date and latest end date. Why does this work item's execution time continue to grow, despite being in a completed status? Will this cause a problem? Does the SWWCLEAR job clean this up? I don't want to have workflow items out there with execution times climbing into days. I fear that will cause a performance issue, even though they show as completed status. By the way, this is in a PI 7.1 environment.

    hi Chris,
    >>>Your blog does provide some interesting points when collecting to generate a single file.
    file is only of of 5 possibilities that mz blog mentiones
    the point is that BPM is the worst approach out of those 5 and all other 4
    can easily replace your BPM IDOC collect pattern
    this way not only the vendor's system will work more efficienlty but also yours
    but you will do as you like/prefare and you can come back
    to the forum everytime you get an issue with a BPM - no problem
    Regards,
    Michal Krawczyk

  • Invalid execution GUID. Work item could not be completed.

    Hi People,
    Lately, users have been complaining a lot of Invalid execution GUID. Work item could not be completed. What does it mean exactly, in a general sense, as I know it depends on the error. But what is the general consensus of such an occurence?

    John,
    check this link
    http://mailman.mit.edu/pipermail/sap-wug/2007-February/025056.html
    Thanks
    Bala Duvvuri

  • Not navigating to display/edit screen on execution of a work item

    Hi Friends,
    I have created a work flow to display/edit a material, but on execution of the work item I am not navigating to the material EDIT/DISPLAY transactions. Can someone please let me know where I am going wrong
    Many thanks,
    Balaji

    Hi,
    Drill down to the code of the method in your task, and copy past it here. Or if it is a standard method, just tell us the business object & method. Otherwise it might be possible to help you.
    Regards,
    Karri

  • Work item 000000001881: Work item or task TS20000797 locked for execution

    Hello Gurus I need your help, I'm trying to configure a WF for ECM (Engineering Change Management) but I can't do this work at all it give this error and I don't know what to do... any suggestion?
    Work item 000000001881: Work item or task TS20000797 locked for execution
    Thanks in advance

    Hi,
    I'm trying to configure a WF for ECM (Engineering Change Management)
    While  testing you're getting this error right. 
    Check using the  Same Object key are you testing in another session.
    Regards,
    Surjith

  • Error:Work item 000000001099:Object FLOWITEM method EXECUTE cannot be execu

    Hello experts,
    I have created a Sales order workflow whr after creation sales order will go to 1 person inbox and he will check the SO thoroughly and thn i hv added a user decision step for APPROVED or REJECTED for same person.
    Now after creation of sales order it goin to the person inbox for checkin SO but when he is saving it thn decision screen with button APPROVED or REJCTED is not coming and m getting error :Work item 000000001099: Object FLOWITEM method EXECUTE cannot be executed. and error: Error when processing node '0000000024' (ParForEach index 000000)
    i checked the agent mapping for both step....and thr is no error in agent mappin...in both steps i have mapped same rule with responsibility IDs
    PLz suggest urgently wht can be cause of error.
    Regards
    Nitin

    Hi Nitin,
    I think this seems to be an agent assignment issue.
    To debug this issue go to the workflow log and check if the agents are correctly being picked by the rule or not. Simulate the rule and check for the agents being picked.
    In the workflow log, check the agent for the User Decision step. If there is no agent found then there might be some issue with the data passed to rule.
    Hope this helps!
    Regards,
    Saumya

  • How to get work item details programatically ?

    Hi All,
    I have a list of work items (process instances) and I want to retrieve each item details such as: attachments, notes, id, ...
    All the items are filtered and represented as Fuego.Papi.Instance:
    Fuego.Papi.Instance[] inst = busProcess.getInstancesByFilter(filter : instFilter);
    But the work item details are inherited from Fuego.Lib.ProcessInstance. So, how to get the item details from inst[] ?
    Would appreciate any help, may be Dan will have an advise ?
    Regards,
    Kim

    If you have instances returned by your filter, you could extract variable information for each instance by doing something like this:
    for each inst in getInstancesByFilter(ps, filter : instF) do
        // here's how to get the value inside a primitive instance variable
        orderAmtObj as Object = getVar(inst, var : "orderAmount")
        // here's how to get the value of attributes inside a complex BPM Object instance variable
        //    - in this case this is an "order" object with two attributes (customerName and amount)
        orderObj as Object = (getVar(inst, var : "order"))
        xmlObject = Fuego.Xml.XMLObject(createXmlTextFor(DynamicXml, object : orderObj, topLevelTag : "xsi"))
        logMessage "The value of the order object's customer name is: " +
               selectString(xmlObject, xpath : "customerName")
        logMessage "The value of the order object's order amount is: " +
               selectNumber(xmlObject, xpath : "amount")
        // here's a rather uninspired way to retrieve who the participant is that was assigned the instance
        logMessage "The participant assigned to this instance is: " + inst.participantId
    endInside the above "for" loop, you could retrieve these predefined variables (this example assumes you use "inst" in your "for" loop):
        objRet as Any
        objRet = inst.getVar(var : "PREDEFINE_ACTIVITY")
        logMessage "Activity name = " + objRet using severity = DEBUGSubstitute "PREDEFINE_ACTIVITY" in the above logic to get this information:
    PREDEFINE_PRIORITY (priority)
    PREDEFINE_ACTIVITY_DEADLINE (activity.deadline)
    PREDEFINE_CREATION_TIME (creation.time)
    PREDEFINE_PROCESS_DEADLINE (deadline)
    PREDEFINE_DESCRIPTION (description)
    PREDEFINE_PROCESS (process)
    PREDEFINE_RECEIVED_TIME (receptionTime)
    PREDEFINE_PARTICIPANT (participant)
    PREDEFINE_COPY (id.copy)
    PREDEFINE_STATUS (status)
    Similarly, you might want to try to get instance information using the Fuego.Papi.VarDefinition object a try. Never used it, but the logic might be as simple as:
        logMessage "who created? = " + inst.getVar(Fuego.Papi.VarDefinition.CREATOR_ID) using severity = DEBUG
        logMessage "does it have attachments? = " + inst.getVar(Fuego.Papi.VarDefinition.HAS_ATTACHMENTS) using severity = DEBUG   
        logMessage "does it have notes? = " + inst.getVar(Fuego.Papi.VarDefinition.hasnotes) using severity = DEBUGDan

  • Urgent help req : work item id not getting passed in the method

    Hi ,
    I have created a subtype zcats of business object CATS and delegated it .
    I have created a new method Approve1 ( with attributes  SYNCRONUS & DIALOG )  in zcats which is similar in coding  to Approve method of CATS ( DIALOG) .
    I have include the method Approve1 of business object zcats in a standard task .
    The problem is that when the eorkflow gets triggered ,  the workitem id is not getting passed in the method APProve1 of zcats.
    Can someone please help me with this .
    Points would surely be awarded .

    BEGIN_METHOD APPROVE1 CHANGING CONTAINER.                 
      DATA: WORKITEMID_IMP LIKE OBJECT-KEY-ITEMID.              
      DATA: WI_CHCKWI LIKE SWWWIHEAD-WI_ID.                     
      DATA: WORKITEM TYPE SWC_OBJECT.                           
       <u> WORKITEMID_IMP = OBJECT-KEY-ITEMID</u>.                     
        SWC_GET_ELEMENT CONTAINER '_WORKITEM' WORKITEM.         
        SWC_GET_PROPERTY WORKITEM 'WorkitemReference' WI_CHCKWI.
        IF SY-SUBRC EQ 0 AND NOT WI_CHCKWI IS INITIAL.          
          WORKITEMID_IMP = WI_CHCKWI.                           
        ENDIF.                                                  
        CALL FUNCTION 'CATS_WF_APPROVAL'                        
          EXPORTING                                             
            WORKITEMID_IMP = WORKITEMID_IMP                     
          TABLES                                                
            CONT_IMP = CONTAINER.                               
      END_METHOD.                                               
    hi ,
    the above is the code in the method .
    At the first step of execution underlined above , the work item id is appearing blank .
    I think that the value is not passed to the container , but i am not sure og how to pass data to this conatiner

  • Workflow is in process due to locking of work item

    Hi,
    I checked for one invoice document, workflow is in process. I saw it is stuck in one send mail step and analyse the workflow log, it is showing work item is locked against execution. I tried to execute the work item using SWIA, still it is not going to completed status still it is in ready status.
    Can anybody tell me how to complete this work item so that workflow will be completed?
    Best Regards,
    Padhy

    Hi,
    It's resolved.
    Thanks

  • Function module to identify users - fowarded work items

    Hi
    Pls can anyone suggest an appropriate function module to identify the users of the forwarded work items?
    The onyl input i have is the user name.
    the scenario is :  UserA had fwd'ed a workitem XYZ to UserB and I need to find programatically all the details and the user of the workitem XYZ like who had forwarded to UserB. Since i dont have the work item number or dont want to restrict with date range, i wish to get this info purely with the user id only. pls can anyone suggest some functions?

    Hi Prabhu
    First, get the Work item IDS:
    Go to table SWWUSERWI, supply USER_ID as your User (User B) and FORWARDED flag = 'X'.
    You will get all workitems forwarded to THAT user (USER_ID) - User B
    Now Get "Who dared to forward them to me (the user which you have" :
    Now use FM SWL_WI_GET_HISTORY , supply WI_ID as fetched above
    You will get the History in table HISTORY. From this table, keep only records where WI_ID matches the above, METHOD = 'SWW_WI_FORWARD'
    You will be left with step history for that WI ID where it was forwarded. The field METH_USER will contain the user name of the guy (culprit) who forwarded the WI
    Regards,
    Modak

  • How to transfer GOS attachment to my work item

    Hi Friends,
      I have the following requirement. The user while creating a Appropriation request in tcode IMA1N will create an attachment using Generic Object Services(GOS). once he saves my workflow will trigger and it will go to approval. I need to show the attachment created using GOS in my Work item. How to achieve this. Please advice.

    I have some annotations:
    The object type ARCHIVE is for archived Data Files from the DataArchiving. The object type for ArchiveLink documents is  IMAGE
    The default method is  .Display   to display the document.
    The GOS-Attachment is not a SAP ArchiveLink document. This attachment is stored in SOOD and linked via the GOS-relationship table SRGBTBREL
    The business object, that can be used here is: SOFM
    The object instance needs to be found with a custom self-made background method, to find the correct link and create an object instance.
    After that, this instance can be used as a secondary method in the work item's execution or attached to the ADHOCOBJECTS as already mentioned here.
    Good luck,
       Florin
    P.S.: Similar reply cross-posted to SAP-WUG

  • Error in Fork Step causing issue in generating next work items

    All,
    We have ECC 6.0 with the following SP:
    SAP_BASIS     700     0012     SAPKB70012     SAP Basis Component
    SAP_ABA                     700     0012     SAPKA70012     Cross-Application Component
    I have this strange issue. In one of my custom workflows, i am using a Fork step with 02/ 02 necessary outcomes. In branch 1, i am sending a mail to a user's e-mail id. In branch 2, i have 3 activity steps for another user. Step 1 is to display an invoice and step 2 is a user decision to apprve/deny this invoice.
    I know that during runtime, at the Fork step, the work item for branch 1 and the 1st work item for activity step 1 in branch 2 get generated almost simultaneously(though with some small time difference). This is OK. But the issue is, when the sendmail in branch 1 errors out due to some error, and when step 1 is finished successfully by another user, the work item for 2nd activity step in branch 2 is not getting created.
    As i understand, in the Fork, the 2 branches, execution should be independent of each other, that means, the work item creation and execution of branch 1 and 3 steps in branch 2 should be happening independently. But, this doesn't seem to be the case.
    I understand when the sendmail in branch failed, the wflow is set to 'Error' Status.But there is already an open workitem for step 1 of branch 2. When this workitem is completed successfully, I expect the work item for 2nd step should get generated.But this is not happening. But, when i restart the whole workflow using SWPR, it generates the witem for 2nd step in branch 2. And still the wflow is in 'Error' status.
    When the user finishes the 2nd workitem of branch 2, the next work item for 3rd step is not getting generated. Instead i needed to restart the whole wflow again and this time, it generated the 3rd witem in ranch 2.
    To my understanding, when a Fork is there, if i specify 02/02 outcomes necessary, these 2 branches should go in parallel, both creation and execution of workitems, until they are joined. And at this point, if the whole Fork step is successful, then workflow will proceed further with steps below the Fork. Shouldn't this be the case ?
    Anybody had similar issue? Pl share your thoughts on this. I'd really appreciate if somebody can clarify whats going on in the above case and how to fix this.
    Thank you in advance
    Regards,
    venu
    Edited by: Venugopal Jogi on Jun 10, 2009 5:58 PM

    Hi Arghadip,
    Thanks for your reply. You said
    "When a Workflow goes into error the processing should stop whether it is in same branch or in different.".
    If this is correct, then as i explained earlier, when i restart the workflow without fixing the errored branch, then also, the next work item should not be created..Right ? But, it is. I didn't fix the errored branch but simply restarted the workflow. Then it created the witem for 2nd step, in the branch 2 that is not errored.
    How can this be, the branch 1 is still in ERROR status only. So, can you pl clarify if something else might be going on here.
    Also, fixing the issue is fine. But, the SendMail step in branch 1 is just an information only and per business requirement, this should not be holding up the approval process. And if we don't process the invoice in time, just because of some informational mail errored out, this will not be a feasible solution to the client,Right ? That's the whole reason i am using Fork step, so that they both proceed parallelly (independently).
    If step 1 is a pre-requisite for step 2, then it makes sense to fix error in step 1 so that we can proceed with step 2.
    Any other thoughts on this.....
    Regards,
    venu

  • Urgent - How to get a pop up after executing a work item?

    Hi Gurus,
    I am working on a PO Approval workflow which is designed to approve multilevel POs depending upon its amount.
    Now the requirement is that I need to provide a pop up with list of second level approvers to the user immediately when the user executes the work item of first level approval in his/her SAP Inbox.
    Waiting for responses ASAP. Let me know if scenario needs to be clarified in more depth.

    Hi Shaurya
    You can create a method to send a second workitem to the agent with a list of agents for the second level, and pass the selection back to your workflow container.  Set the new task as "Advance with Dialog" and you should be fine.
    Alternately you could set your new method as a secondary method AFTER workitem execution call, but don't forget to check the result of the first approval so the popup is only involed if they have approved the first step.
    Regards

Maybe you are looking for

  • Subtitles are not getting displayed while playing movies

    Hi, Recently I have upgraded with Max OS X 10.6 Snow Leopard. After this upgrade whenever I play movies in my VLC player, I am getting a message as "freetype: failed to load font file /System/Library/Fonts/LucidaGrande.dfont" and then the subtitles a

  • (Urgent help needed) how to read txt file and store the data into 2D-array?

    Hi, I have a GUI which allow to choose file from the file chooser, and when "Read file" button is pressed, I want to show the array data into the textarea. The sample data is like this followed: -0.0007     -0.0061     0.0006 -0.0002     0.0203     0

  • Can i use an OTG for my iphone 4s?

    CAn i use an OTG on my iphone for usin flash drive..

  • FI Report Issue

    Hi, My requirement is i am having FEBEP and FEBKO tables , i want to fetch LIFNR AND KUNNR ,XBLNR , From which table i need to fetch these values and after FF67 transaction processing  which tables are updated can any one know ?

  • How should we use the membership in mvc4?

    In mvc4 how can I use the membership provider explain withan example and post a the link if the video is available ?