Automatic put back workitem after execution

Hi there,
you might be interested in this short piece of code that could be executed after method execution (as the latest call) to have the currently processed workitem put back again (i.e. available for the assigned user(s) again). After calling this function you should execute the statement
exit_cancelled.
This piece works fine in 6.20
FUNCTION Z_WF_WORKINGWI_PUTBACK.
*"Lokale Schnittstelle:
*"  EXCEPTIONS
*"      NO_WORKITEM_ACTIVE
*"      ERROR_ON_PUTTING_BACK
* written by Florin Wach
   DATA: requesters    TYPE STANDARD TABLE
                            OF SWOTOBJID
                            INITIAL SIZE 10.
   CALL FUNCTION 'SWO_QUERY_REQUESTER'
     TABLES
       REQUESTER       = requesters
     EXCEPTIONS
       NOT_FOUND       = 1
       OTHERS          = 2.
   IF SY-SUBRC <> 0.
      " Laufendes Workitem konnte nicht ermittelt werden,
      " zurücklegen deshalb nicht möglich.
      " Bearbeitung einfach abbrechen, wie sonst im
      " Standard auch
      MESSAGE E003 RAISING NO_WORKITEM_ACTIVE.
   ENDIF.
   DATA: wi_id          TYPE SWR_STRUCT-WORKITEMID,
         new_status     TYPE SWR_WISTAT,
         rc             TYPE sy-subrc.
   FIELD-SYMBOLS: <r>   TYPE SWOTOBJID.
   READ TABLE requesters ASSIGNING <r>
                         WITH KEY objtype = 'WORKITEM'.
   IF sy-subrc <> 0.
      " Laufendes Workitem konnte nicht ermittelt werden,
      " zurücklegen deshalb nicht möglich.
      " Bearbeitung einfach abbrechen, wie sonst im
      " Standard auch
      MESSAGE E003 RAISING NO_WORKITEM_ACTIVE.
   ENDIF.
   wi_id = <r>-objkey.
   CALL FUNCTION 'SAP_WAPI_PUT_BACK_WORKITEM'
     EXPORTING
       WORKITEM_ID          = wi_id
     IMPORTING
        NEW_STATUS           = new_status
        RETURN_CODE          = rc.
   IF rc <> 0 OR new_status+0(5) <> 'READY'.
      MESSAGE E002 RAISING ERROR_ON_PUTTING_BACK.
   ENDIF.
ENDFUNCTION.
Message was edited by: Florin Wach.
comparision new_status w/ +0(5)

Does it work in 4.6C also ?
And 1 more question .
In my work flow i have tasks.
1. This task calls some transaction for editing. This task has been assigned to XXXXX position . This position has 4 agents.
2. Next task: TS00008267 decision making task. The agent can finish this or he can't finish. If he is not finished it goes back to his inbox again.
If he is not finshed the work item i have to put back this WI in all 4 agents.
Do you have some idea on this.

Similar Messages

  • My iPhone will not power off. It automatically turns back on after trying to shut it off. Any Ideas?

    My iPhone 5 will not power off. I hold the power button down and it lets me turn it off but then it automatically turns back on. It is as if I am just restarting it. Any ideas on how to fix it? I already had it exchanged and the replacement is now doing it.

    I had this same problem about a year ago. It is most likely because debris has been caught in the cable connector. Get a cotton bud or something soft so that you don't cause any damage, and gently clean the inside of the dock connector of your phone. Do not use any liquids. Hope this helps.

  • I cannot update apps, after putting in password it automatically goes back like nothing happened.

    I cannot update apps,or order a new app. I put in my password and it automatically goes back to the beginning.

    Kelly...
    Try contacting Apple >  Apple - Support - iTunes Store - Contact Us
    Support links may help also...
    Apple - Support - Apple ID
    Frequently Asked Questions About Apple ID

  • In LR6CC, after using the merge to HDR and the photo returns to LR as a DRG, it is not automatically put into a previously set up stack. For example a stack of three photos. If I use NIK HDR and the photo returns to LR, the stack is automatically changed

    In LR6CC, after using the merge to HDR and the photo returns to LR as a DRG, it is not automatically put into a previously set up stack. For example a stack of three photos. If I use NIK HDR and the photo returns to LR, the stack is automatically changed from 3 to 4. When LR's HDR merge brings a photo back into LR's library, the stack number does not change and the DRG version isn't included in the stack.

    Hi,
    The Ps CS6 public beta version contains the same camera support as found in Ps CS5/5.5 compatible CR 6.6. There will be future updates to CR 7 for Ps CS6 to pick up more camera support. The Nikon D800 NEF files are not supported, yet.
    If you like to work with your D800 files in the public beta build now, you'll have to get the DNG Converter 6.7 from here: http://labs.adobe.com/technologies/cameraraw6-7/
    and convert your files to DNG.
    regards,
    steve

  • I accidentally moved Excel to Trash, after 'put back' it still doesn't open?

    Let me clear, my Excel was working perfectly before I did this.
    I had put the excel shortcut on the desktop, and I moved it to trash because I didn't need the icon on the desktop. I tried to open Exel on the dock, but it didn't open and said that you have to remove it from trash in order to open it. So, after removal from trash (using "put back" option), I clicked on the icon on the desktop now. It didn't open. Even with the dock icon, it displayed this message:
    The error message displayed is:
    "Microsoft Excel cannot be opened because of a problem.
    Check with the developer to make sure Microsoft Excel works with this version of Mac OS X. You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS X.
    This report will be sent to apple automatically."
    Community, please help and advise.
    I am using Microsoft Office 2011.

    When I try to open Iphoto is comes up saying I need to prepare this version of iphoto with an upgrader.  I have installed it many times but it still goes back to the original window telling me I need to upgrade
    But did you run the iPhoto Library Upgrader after you installed it?  The installer will install the iPhoto Library Upgrader in the folder Utilities in the Applications folder. Launch the upgrader and select your iPhoto library. After it finishes, try to run iPhoto again.  (See:  iPhoto '11: About the Library Upgrader)
    Be sure to make a backup copy of your iPhoto library, before you try to open and to upgrade it. That is safer, because in some rare cases the upgrade can corrupt the library.

  • [SOLVED] Automatically put HDD to sleep mode after start

    Hi everyone.
    I use a secondary HDD for backups. It's plugged to my computer permanently but actually it is needed for a few seconds per day. A backup script automatically shuts it down after backing up with `hdparm -Y` to save a power and reduce a noise. And I want to shut down an HDD also every time after the system is started.
    I tryed two ways to implement this.
    1. Udev rule that runs `hdparm -Y` for the device identified by ID_SERIAL_SHORT attribute.
    2. Following systemd service:
    [Unit]
    Description=Put HDD to sleep mode immediately
    After=systemd-udev-trigger.service
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/sbin/hdparm -Y /dev/disk/by-id/ata-SAMSUNG_SP2514N_S08BJ1HL210777
    [Install]
    WantedBy=sysinit.target
    Both methods actually run hdparm, but state of the HDD is active after login (I check it with hdparm -C). It looks like something in systemd "touches" the hard drive and wakes it up back. And I can't find what may access the secondary HDD after udev rules are processed.
    What is correct way to solve the issue?
    Thanks.
    Last edited by dimich (2013-05-03 02:32:38)

    Well, I think you would need to determine everything that might be polling your drives during the boot process, which might be a pretty big task.  Then use that information to determine either when udev should run that command, and use the lexicographically ordered rules to try finding just the right spot (and even then it might just come down to a race).  Or you can use the gathered info to try and make systemd's service dependencies do the work for you.  Either way, I would honestly rather just use a timer.

  • Why does computer turn itself back on after i put it to sleep?

    This computer ( HP Pavilion Slimline model# s5107c, Product # NP212AA-ABA, Software Build 93NAv6PrA3 )  runs on VISTA Home Premium-64.  It had a virus which required the technician to save my files and wipe everything out and then reinstall VISTA and my files.  Since then when I put the computer in sleep mode, it turns itself back on after a few minutes. 
    I can find the settings for having the computer put itself to sleep after so many minutes, but can't find any setting for the computer turning itself back on. 
    Help please.  The computer tech has not been able to help me thus far.
    This question was solved.
    View Solution.

    Found this step online. Hope it works for you. 
    Go to >>> "ScreenSaver" >>> "Change Power Settings" >>> "Change Plan Settings" >>> "Change Advance Power Settings" >>> "Multimedia Settings" >>> "When Sharing Media" >>> and make sure the setting says "ALLOW THE COMPUTER TO SLEEP." 

  • After i erased whole data from the ipod touch 3rd gen. when i put back to sync it. it says in the windows connect to itunes, which i did,i also installed new itunes but still it doesnt recognise . pls help me if u have gone thru same trouble like me.

    after i erased whole data from the ipod touch 3rd gen. when i put back to sync it. it says in the windows connect to itunes, which i did,i also installed new itunes but still it doesnt recognise . pls help me if u have gone thru same trouble like me
    Thanks

    I do not understand what "it says in the windows connect to itunes" means?
    What is "it" and what is "windows"?
    Maybe:
    iOS: Device not recognized in iTunes for Mac OS X
    Or
    See
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or                     
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Features app in the Window Control Panel. Then reinstall all the Apple software components
    - Then do the other actions of:
    iOS: Device not recognized in iTunes for Windows
    paying special attention to item #5
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Also see:
    iPod not recognised by windows iTunes
    Troubleshooting issues with iTunes for Windows updates
    - Try on another computer to help determine if computer or iPod problem

  • Can I put birthdays in iCal 3.0.8 so that they automatically come up year after year?t

    Can I put birthdays in iCal 3.0.8 so that they automatically come up year after year?

    Janet,
    Read: iCal 3.0 Help: Managing birthdays on a calendar.
    Also, consider using: Dates to iCal, by John Maisey.

  • One day i  was just flipping through my ipod i put it on sleep mode then next time i opened it without me doing anything it gave me an option of ''slide to power off'' i pressed cancel then  it automatically went back to sleep mode it is still happening

    One day i  was just flipping through my ipod i put it on sleep mode then next time i opened it without me doing anything it gave me an option of ''slide to power off'' i pressed cancel then  it automatically went back to sleep mode it is still happening my ipod is jailbroken and i didnt fiddle with the settings.. please help.

    If it is jailbroken, we are not allowed to help you with that here.  You'll need to seek out other sources of help.  The jailbreaking could potentially be part of the problem, for all I know.
    BTW, just a pointer...  punctuation is your friend!  Your post was very difficult to read without any.  Many people will simply stop reading and click the "back" button when encountering something like that, which limits availability of help to you.

  • How SCN sync after the tablespace is put back to END Backup mode

    When we put the tablespace in begin backup mode, the scn get forzen and it will not be further updated, until it is put back to end backup.
    Question is : If at the time of being backup , say the snc forzed at 45. Before we put back the tablespace to end back up , we had genrerated 10 SCN. Then the current scn is 55. If we put the tablespace in end backup , does the datafile will start with scn 56 ( by maintaint it previous scn at 45)
    Or after we put back the tsp in end back up , does the datafile will be updated from 46 to 55 , before it is updated with scn 56.
    In the above example i am considering by db has one datafile only.
    Thanks
    Naveen

    Are you implying that the "Checkpoint number" is a different series of numbers --
    seperate from SCNs ?
    Are you implying that when a checkpoint occurs it is this "Checkpoint number"
    that is incremented and written to the datafile headers ?
    There really is no such thing as a "Checkpoint number".
    If you look at the definitions of V$DATABASE , V$DATAFILE and V$DATAFILE_HEADER, you would see that a Checkpoint increments the SCN.
    A header can have multiple entries -- a Checkpoint SCN (called CHECKPOINT_CHANGE#) , ArchiveLog SCN (called ARCHIVELOG_CHANGE#),
    the Current SCN (called CURRENT_SCN), SCN of last Unrecoverable (Nologging)
    (called UNRECOVERABLE_CHANGE#) etc etc. They are all derived from SCNs
    only.
    The SCN is used as the single point of reference. Thus, we can compare
    CHECKPOINT_CHANGE# with CURRENT_SCN with UNRECOVERABLE_CHANGE# etc.

  • Once i go to a place wherein there is no network, my phone says no network, but after i recover my network, its still saying that it still has no service. I try to put to airplane mode then put back to normal. I restart, then the network recovers.

    Once i go to a place wherein there is no network, my phone says no network, but after i recover my network, its still saying that it still has no service. I try to put to airplane mode then put back to normal. I restart, then the network recovers. Do you experience this kind of problem? Any solutions? It seems that upgrades are not a good idea. I have an iphone4s, but with updated 6.0.1...

    try to enter a gift card to cover your previous balance. Once covered it probably will allow you to change payment.

  • Time Display reverts back to automatic time zone setting after I  set it to manual

    Time Display reverts back to automatic time zone setting after I  set it to manual

    That's probably an issue with '''cookies''' rather than with clearing browsing history. Are you clearing your cookies, too?
    If you want to continue clearing your cookies when Firefox closes, look for an extension that will save the cookie for a preference like that one
    [https://addons.mozilla.org/en-US/firefox/search/?q=cookies&cat=all&lver=any&pid=1&sort=&pp=20&lup=&advanced= AMO search for "cookies" extensions]

  • IMac switches back on, after I put it to sleep?

    My system often switches back on, after I have put it to sleep, so have to put it too sleep again, any idea what is going on?

    Go to the Applications/Utilities folder and launch the Console application. When the Console window opens, make sure that 'All Messages' is selected in the left column, then type 'wake' in the filter search box in the upper right corner. You should see a listing of all the wake events recorded by your system, and a coded reason for the wake event. It will help provide clues.
    The following article will help explain the various wake codes and what might be causing the wake event to occur. The article also provides a terminal command providing a different method for pulling up the log entries.
    http://support.apple.com/kb/TS3191
    If you post the offending wake issue log entries then we can provide additional comments/suggestions.

  • I had wiped my memory to fix problems on my computer. After getting it back up to date by installing Lion. I tried using migration assistant to put back my memory. Once i had done so I can't seem to access my memory, and suggestions on what to do?

    Please help

    Like I put back my memory by using migration assistant form my external hard drive, and i dont know how to get to it, so yes storage.

Maybe you are looking for

  • How to insert data in a one-to-many relationship

    How do you insert data into the client, my model entity beans have a one-to-many relationship. PARENT ENTITY BEAN PARENT-ID PARENT-NAME The ejbCreate(Integer parentID,String name) CHILD ENTITY BEAN CHILD-ID CHILD-NAME PARENT-ID(foreign key of PARENTI

  • Information about constraints by using SQL query?

    Hi how can we view all the definition of a constraint by using SQL query. Suppose I create following tables: CREATE TABLE supplier ( supplier_id numeric(10) not null, supplier_name varchar2(50) not null, contact_name varchar2(50), CONSTRAINT supplier

  • Three questions about X-FI XTREME MUSIC.

    Hey guys, So I've bought X-FI XtremeMusic PCI from a second hand yesterday and installed with newest drivers on my windows xp 32bit SP3. Everything seems to be fine. The sound is just brilliant ( for me - audigy user for last uhm... 7 years ). But th

  • Visual studio 2013 update 2 windows 8 windows phone 8 app

    hi i am using Windows 8.1 Enterprise 64 bit os Visual studio 2013 Update 2 I want know how to create Windows 8 app and Windows phone 8 app how to create , its showing only 8.1 templates please Help Me someone

  • Html+Javascript  Download Manager

    How do I set up a html+javascript download manager seeing as in adobe air you cannot download files. But I need this implemented in the project I am building. Is there any commands or anything that can do this. I seen a flex adobe air app that can do