Complete workitem in a step

Hi,
Team.
Customized workflow .
I have a module pool form, where click of a button the workflow is triggered, and approval is sent to the user R3 inbox.
for approval the user clicks on the work item in R3 and the module pool form pops up.
My issue is  On click of Approve & Reject Button. the status of approval or rejection has to be captured and next approval process is started.
As it is under R/3 process, so I have used a FM "SAP_WAPI_WORKITEM_COMPLETE" to capture the status
and i am sending the status from the form to container in the workflow -and then the approval process continues.
while using the FM "  SAP_WAPI_WORKITEM_COMPLETE " i have to pass the workitem id to the function module.
Can any one tell me where should i capture the work item id from and how do we pass the value to the workflow container. so that the status is used in the workflow.
please tell me how should i get the work item ....!
thanks in advance.
shankar

Hi,
Follow the below steps,
1. As you have mentioned that you are trying to trigger the workflow on click event of a button or in PAI modules. I hope you might be using a SAP_WAPI_START_WORKFLOW Function module to trigger the workflow. This function module will retun the top workitem ID.
2. Based on the parent worktiem ID you have to fetch the dependent workitems  now to get the dependent workitems  of the top workitem make use of the function mocdule SAP_WAPI_GET_DEPENDENT_WIS and read the result table for dialog workitem  with key workitem type for W .
Once you have the workitem ID pass the same to the SAP_WAPI_WORKITEM_COMPLETE, but here a small suggestion that if you are using a copy of the standard decision task TS00008267 then instead of  SAP_WAPI_WORKITEM_COMPLETE make use of SAP_WAPI_DECISION_COMPLETE, but the above two steps remain same even in the case of SAP_WAPI_DECISION_COMPLETE.
Regards
Pavan
Edited by: Pavan Bhamidipati on May 30, 2011 2:38 PM

Similar Messages

  • Disable Complete Workitem Popup

    Hi,
    PO Release WF has been developed in the Dev server. A custom decision step is being created from the std one. The Confirm End Processing Checkbox is unticked.
    In the Dev server when the task appears in the SBWP, on clicking any action TAB for eg.. display PO the corresponding PO gets displayed, etc. Now in this case d Complete Workitem Popup does not appears.
    When transported the workflow to QAS along with the characteristic, on clicking the action tab like Display PO; first the Complete Workitem Popup Appears  which shld not. Also in QAS all d tasks are checked, none has the Confirm End Processing Checkbox ticked.
    Need to disable this Complete Workitem Popup.
    Appreciate ur reply.
    Regards,
    Punit

    Hi,
    Check that the changes are in QAS. Maybe you transported the workflow but not the task (that includes the "Confirm end of processing" checkbox). Also, create new test cases - the existing workflow instances might still work in the old way. (I am assuming that you made changes recently.)
    Regards,
    Karri

  • UWL: No automatic refresh after completing workitem in iView

    Hi,
    our system is EP 6 SP2 P4 HF 7 with CM HF 6.
    We have configured a workitem launched by an individual iview - this works fine.
    For execution of this workitem we call SAP_WAPI_CREATE_EVENT and save values in simple_container. After this SWW_WI_ADMIN_COMPLETE is called to complete the workitem to be cleared from UWL inbox.
    If I refresh the tab manual all works fine - the completed workitem is not more there. But with automatic refresh this executed workitem is still listed.
    Do you have any idea what we are doing wrong?
    Configuration in uwl.standard:
      <Views>
        <View name="myWorkItemView" selectionMode="SINGLESELECT" width="98%" supportedItemTypes="uwl.task.webflow.DE9_TS99500153" columnOrder="detailIcon, subject, priority, creatorId, createdDate, dueDate" sortby="createDate:descend, priority:descend" tableDesign="STANDARD" visibleRowCount="20" headerVisible="yes" tableNavigationFooterVisible="yes" tableNavigationType="CUSTOMNAV" actionRef="" refresh="60" dueDateSevere="86400000" dueDateWarning="259200000" emphasizedItems="new" displayOnlyDefinedAttributes="yes" actionPosition="top">
    I appreciate your help,
    thanks in advance,
    Thorsten Bingmann

    Hi Ross,
    concerning our problem (no WI completion by auto refreshing UWL) we have yet no solution. SAP Support told us to configure the cache lifetime of UWL to smaller size, but alas this does not solve the problem.
    As you mentioned the blank webgui screen: I think this behaviour is by design. Calling an ITS transaction there's no other way to end the ITS session as of using the back or return button and get an end of session. The given status (WI new status: completed) indicates that UWL and ITS process the WI correct.
    A smarter way to execute the concerning WI ID is to configure it in the xml file as generic decision task. Then you'll get an inline rendered java iview with decision "accept" or "decline" and the new status will be shown in UWL. This will take place of (standard) ITS configuration. Please have a look at the HowTo Guide of UWL.
    Hope it helps,
    regards,
    Thorsten Bingmann

  • How to delete a completed workitem logically or completely

    Hi buddys,
    Any one kindly help me how to delete a completed leave request work item completely or logically.
    For example: An employee has allpied for leave and that has been apoproved by his/her manager and the same has been updated in the backend.  Now the workitem status is completed. Now I need to delete the completed workitem either completely or logically.
    I went to SWia and gave the workitem number and followed the procudere, but it is not happening.
    Any one tell me how to delete this workitem
    Regards
    Siri

    Try through T.code SBWP.

  • Complete workitem and proceed further.

    Hi All,
    My Scenarion is:
    I have an Activity->Task, in which i am using a standard BOR 'FORM' to open approval screen, but in this BOR we do not have any events.
    Now i want to use terminating event within this task.
    I tried to use my custom BOR for this purpose but it is not allowing me to select the custom BOR, instead by default it is selecting BOR FORM when i am selecting WIOBJECT_ID as element within terminating event tab.
    I tried to achieve this in another way also:
    In my Approval Activity, i am using certain conditions within Conditions Tab-> Complete Workitem ( i am cecking REQ_Status = 'A').
    That means if this condition satisfy my workitem should get complete.
    Now after raising my requisition, initially value for container element REQ_Status is blank (initial), now with the help of function SAP_WAPI_WRITE_CONTAINER i am setting the container element REQ_Status = 'A'.
    And then i am executing report RSWWCOND (Job for condition evaluation).
    Then according to my knowledge my workitem should get completed, but nothing is happening and my workitem is still in ready status only.
    Can you please help me to solve this problem.
    I want to complete this workitem, and my workflow should proceed further.
    Any other suggestions are also welcome.
    Regards,
    Amar

    Hi,
    So is there any way to solve my problem?
    I want to forcefully complete approval activity, depending upon input from some other system.
    Earlier i thought of using terminating event at this task level.
    But as the standard  BO used in this task do not have any key fields so i can not use terminating event too.
    I tried to use conditions also within this Activity to complete workitem, but it also didn't worked for me, as after reaching condition also my approval activity was not completed.
    I forcefully ran the report RSWWCOND (For Condition evaluation), but with no luck.
    Amar
    One more thing, now i checked table SWW_CONTOB, in this table for every WI we have 2 entries, one with element WORKITEM and another with element _WORKITEM, having different values in OBJKEY.
    For WORKITEM element entry we have parent WI ID in OBJKEY field, and for _WORKITEM element entry we have WI ID as objkey.
    So can i use these OBJKEY for my purpose?
    If yes then which OBJKEY entry?
    We have one BO as WORKITEM, where key field is WI ID, so can i use this BO to terminate my Approval activity using WI ID as OBJKEY.
    Is this the right way, or it has any other impacts?
    Amar
    Edited by: amarjyotisingh on Sep 2, 2011 6:35 AM

  • I phone6 128 will not complete sync . stops at step 6 of 6

    i phone6 128 will not complete sync . stops at step 6 of 6

    Update your iTunes to the newest version.
    Try different USB cable, Different USB port.
    Should solve it.
    If not, try other computer!

  • WF: Problem in raising event of a class in ABAP code to complete workitem.

    Hi All,
    I'm developing a workflow of Hiring Eform.
    In this workflow we have created a step for some data processing and also set termination event for the task inorder to complete the task.
    Now problem is that how to trigger the event of this class in the abap code so that the workitem will be completed.
    As far as i know i have used following function module to raise a event for BOR. but is there any way to raise/trigger the event of Class.
    For BOR: SAP_WAPI_CREATE_EVENT

    [Note 1322202|https://service.sap.com/sap/support/notes/1322202] provides SAP_WAPI_CREATE_EVENT_EXTENDED which can do classes.

  • Error Handling in workitem---user decision step

    HI Experts,
    I have created work item through user decision step. In that decision i have given Approve & Reject Option
    now when user click on Approve that i need to do some validation based on this i need to give error also at same time i dont want to complete that workflow...i want that after getting error user must recity that error and than come back again to inbox and execute that workitem... I tried it but i am not able to do this...can anybody pls provide the hint for this requirement.
    Thanks & Regards,
    Taran

    Hi Pavan,
    I am confused i your third point.
    . In the Approved branch of the Decision step check for the condition , if it fails then raise the exception.that you have define in the Point 1. in the exception branch insert the logic so that the condition becomes true, after that step insert one more decision step.
    how i 'll raise the raise the exception do i need to create and task or any other step.
    also can you please explain below point in detail.
    in the exception branch insert the logic so that the condition becomes true, after that step insert one more decision step.
    also i am working into SAP CRM 2007 web UI environment.
    Please advice.
    Thanks,
    Taran

  • Agents of a completed workitem.

    Hi experts,
    If i have to find the agents of workitem I can get it from SAP_WAPI_GET_WI_AGENTS. But when the workitem is completed this fm does give me the resposible agents since its a runtime one.
    I want to find who all were the responsible agents of a workitem which has been completed considering passive substitutions also.
    Your hep is appreciated.
    Regards,
    Karthik

    Rick Bakker wrote:
    Hello,
    >
    > "Typically, I tend to retrieve my agents and store them in the container prior to delivering the task "
    >
    > That's what I do too. SAP has enough tables, no need for any more custom ones!
    >
    > regards
    > Rick Bakker
    > hanabi technology
    As an aside, I have approval steps that are optional and role-based via cost center.  So I must populate an actor-tab container element prior to the step to know whether to actually deliver it or move on.
    ...not to mention how helpful this container table can be when debugging recipient problems after the fact

  • Maximize window in executable attachment + complete workitem automatically

    Hi!
    Workflow for purchase requisition release is created as copy of standard workflow WS00000038 and everything works OK.
    We are using program RSWUWFML2 to send work tasks to users.
    In step considering Release Requisition TS00007986 we are sending executable work item to managers. That shortcut have windows size Normal Window.
    How we can set that executable item has windows size Maximized through RSWUWFML2?
    Steps TS00008014 and TS00008018 that informs users that requisition is approved or rejected are send to users also. (Step send mail is not option as we don't want to forward all items to users). Problem is that sometimes users don't execute that info workitem so they are not closed.
    Is there any job we can schedule to automatically complete that tasks or we can setup in task something to do that? (Let say if task is not executed 24h we can close it).
    I know that with SWIA we can execute tasks but that requires manual work every time.
    Best Regards,
    Nenad

    Hi Nanad,
    You can set the deadline monitoring for your Task.
    Set the latest end - 1 day for the task. Then in the latest end outcome you can use the process control step to kill the work item.
    So if the manager didnt take action for a day, the deadline is triggered and the work item will be completed automatically.
    Thanks,
    Viji.

  • Error while completing Wait for event step

    Hi Gurus,
    I have a Workflow developed which has a "Wait for Event" step.
    In that step,I am facing a problem .It seems the step is not getting completed properly.
    When I check in SWEL it shows the Event is triggered.But the next which is a 'Send Mail' step is not getting executed.
    The Event shows action status as "Receiver started correctly".
    When i executed "Complete Manually " in SWIA,it executed correctly and also the further steps got executed.
    What could be the issue ?
    Many Thanks in advance !
    Regards,
    Ameya Kulkarni

    Hello Ameya !
                     To one of my replies to this thread you have stated that no container elements are configured to wait for event step.
                     Without business object,event and container element with object reference, wait for event will not fire.
                     When the user changes the status in KO02, event fires and is seen in SWEL.But, if it should reflect in workflow, afore- mentioned details needs to be configured in wait for event step.
                    Have you configured this wait for event step with event 2 ?
    Regards,
    S.Suresh

  • PROJECT  COMPLETED. DID "PUBLISH" STEP.  WHAT'S NEXT FOR DVD???

    I completed my project and want to make a DVD. I next completed the "Publish" step. I understand iMovie '09 now has a simple way to make the finished DVD. What do I do after the Publish step is completed???
    Thank you!

    I don't think I worded the question properly. This is what I've done:
    1. Completed the project
    2. Clicked on "SHARE"
    3. Clicked on "iDVD"
    4. Screen says, "Preparing Project"
    5. This "preparation" takes about 1 hour and 20 minutes.
    _**BELOW IS WHERE I NEED THE HELP**_
    6. Next I'm ready to make the DVD. I understand with iMovie '09 it is very easy
    to create the DVD.....but I'm not sure what to do now.

  • HT4527 I completed all of the steps to transfer my library from one computer to another through home sharing, but the "Import" button is faded like I cannot use it and it won't let me import and complete the final step. How do I fix this?

    Its in the title.

    Nothing in the instructions about transferring via "HomeSharing" states to use the Import button.
    Have you actually read the instructions?
    What specific step are you having an issue with?
    The article from which your question was posted provides details on how to transfer the iTunes library multiple ways, did you try one of the other methods?

  • Attaching workitem to mail step

    Dear all,
    I am working on a scenario in which when ever Notification of Type 'N' is created , a workflow get triggered and the workitem goes for approval to a authorized person, now that person can  attach a note to that workitem and make rejection or approval at his wich.
    Now i want to send a mial to the user in SAP inbox only which should have the attachment that the approver has ,made..
    Is it possible if yes then please guide me.
    Thanks and Regards,
    Rachit khanna

    Hi Rachit,
    There are 2 options.
    One is adding the container element to the body of email sent to workflow.
    That is the reject reason entered by the manager is stored in a varaible and you can import that data into a container element and that container element can be added at task level to the body of mail, which will appear in the body of mail.
    Second option is using a SELFITEM-NOTE_CREATE instead of giving the manager an option to enter the reason.
    Allowing him to Enter the subject and body of the mail, which will be mandatory. You need to import attachment from the approval task to workflow and then that attachment to be exported to the mail task, which will have the attachment to the mail sent.
    Let, me know if you need more description or any other clarifications.
    bye,
    Sudhir.

  • Complete 1 or 2 step backup option

    A way to back up the files needed to transfer projects from one system to another or being able to reinstall the projects when your forced to redo your system due to crashes/virus's/etc...

    Al, Save As.
    Bill, having an option to show Encore where you've moved the files to might be an option but the simple answer is not to do it. Premiere offers this option because it's a different type of application and it's common for video footage to come and go, be copied elsewhere, be stored on external drives, etc. The Encore project directories don't contain any 'user serviceable parts' as it were so it's not really the same thing.
    If you need to move your project use the 'Save As' option and you can put it wherever you like.
    Jon

Maybe you are looking for

  • Rental lock up

    i just downloaded a rental movie, but started the video about half way through the download.  Everything was fine until the movie locked up (froze) and became unresponsive.  Even iTunes became unresponsive.  i had to force quit to even use my Mac. no

  • QUestion about Java and GC

    Hello, I have a question regarding the garbage collection in java When can GC be called upon a class? Right now, I have a linked list of entities which when an entity is removed, it simply removes the reference of that monster (thus meaning the monst

  • Is Snow base station (M8440, dual ethernet) capable of WPA2 ??

    Am about to buy an Airport base station (snow/M8440) off eBay. Does anyone know if this base station is capable of WPA or WPA2? I will be using it with a Titanium G4 867mhz and 10.4.9. I probably won't buy it if it is only capable of WEP. Thanks.

  • Display R/3 Screen Transaction in Webdynpro

    Hi, I want to display R/3 Transaction Screen ex: se38 in webdynpro when i click a button. also is it possible to set parameters for such transaction. regards, Ganesh.D

  • Table Entry length

    HI all,              Please let me know the logic when user enters value in ZTABLE and he should be able to enter only either 6 or 8 digits of value else throw a error message.I have created a event generator for the same but m not able to find how t