How to lock workitem

Hi All,
Could any one help me how to lock the workitem if it is being edited by other user form portal UWL .
Thank you,
Harsha

Hi,
Please user the below FM to lcok the workitem in back end.
DEQUEUE_E_WORKITEM
ENQUEUE_E_WORKITEM
When user opens the workitem through the UWL it does not lock it. To lockunlock the workitem please use the above FMs,
Sample Cope :
CALL FUNCTION u2018ENQUEUE_E_WORKITEMu2018
EXPORTING
* MODE_SWWWIHEAD = u2018Eu2019
* CLIENT                             = SY-MANDT
WI_ID                                = u2018000000068635u2018
* X_WI_ID = u2018 u2018
* _SCOPE = u20192u2032
* _WAIT = u2018 u2018
* _COLLECT = u2018 u2018
EXCEPTIONS
FOREIGN_LOCK              = 1
SYSTEM_FAILURE        = 2
OTHERS                               = 3.
As a result of that workitem will be locked to process by another user and you can find and entry in SM12.
Please see below link.
http://www.genipole.com/tutorials/lockunlock-the-workitem/
Thanks and regards,
SNJY

Similar Messages

  • How to lock record in a remote database ???

    Hi All!
    How to lock record in a remote table ??? Is it possible to lock by using the RPC ??? What are the options available ??
    thanks
    Sanjeeb Bose
    HCL Infosystems Ltd
    Kolkata India

    DBLinks may be one option...
    --Shirish                                                                                                                                                                                                                       

  • How to lock multiple user for a transcation code at same time is der any tc

    how to lock multiple user for a transcation code at same time is der any tc
    suppose i hav 15 user and i want to lock 10 user for mm02 who can i to it

    Basis can do a export and import transport, still if don't have connection between boxes.
    or
    check this
    http://www.sap-basis-abap.com/abap/copy-program-variants-from-one-to-another.htm

  • How to lock the Printer of LaserJet Pro 500 Color MFP m570dw

    how to lock the Printer of LaserJet Pro 500 Color MFP m570dw

    You can set a control panel lock security level and password for your HP LaserJet series printer. To lock your printer, follow below link:
    http://h20564.www2.hp.com/hpsc/doc/public/display?​docId=emr_na-bpl03612

  • File Lock - How to lock and unlock a file ? Can we do that for an FTP File?

    Hi All,
    I like to retrieve a file from the FTP server using Apache Commons Net libraries.
    for example if the file size is 20MB. When the file is in the progress of copying or transferring from the FTP server i need to lock the local file which is in our local directory so that no other process will use the same local file which is in the process of copying otherwise partially copied files will be used by another process.
    the file should be locked when it was in the progress of copying from the server. I have an automatic process which will access file objects at certain time and try to process the files.
    I like to know the simplest and easiest way to lock and unlock a file object locally which is trying to copy a file from the FTP server which is of huge size.
    And also i like to know how to lock and unlock a file in general?
    Thanks,
    J.Kathir

    we can set it read only only when it complete finishing the writing.
    can we able to make the file as read-only while transferring data to file.
    How to achieve it ? pls give me some sample code

  • I'm trying to loack a document with mac os x 10.6.8  They only have infor. on how to lock it with lion 7.0 on the help button.  Can I lock it with snow leopard?

    I'm trying to lock a document with mac os x 10.6.8  I only found infor. on how to lock a document with os x lion 7.0 on the help button.  Can I lock it with 10.6.8 operating system?

    Thank you.  I did what you suggested and it worked. 

  • How to lock a drive and/or folder if there is no lock icon in the get info field?, how to lock a drive and/or folder if there is no lock icon in the get info field?

    how to lock a drive and/or folder if there is no lock icon in the get info field?, how to lock a drive and/or folder if there is no lock icon in the get info field?

    You can create an encrypted disk image.
    http://www.macworld.com/article/1154559/password_protect_folders.html

  • How to make like Encarta encyclopedia and basic screen settings and how to lock the documents in the entire data.

    dear guys how can i make like a off line Encarta encyclopedia and basic screen settings and how to lock the documents in the entire data in visual studio.                 
       thank you. 
                                                              Million
    Getu

    Dave,
    I will +1 Pixelan's products. They are great, simple, and have about the best support that I know of. When you explore, say Pixelan's SpiceMaster, dig deeply. Things appear rather mundane, on the surface, but there is so very much power lurking, just below the surface. I could almost imagine a 1000 page manual to cover every possible aspect of that program... Every time that I use it, I learn something new, and wonderful.
    Good luck,
    Hunt

  • How to lock Profit Center in SAP B1 8.8 PL10

    Hi All,
                I am Using Profit cneter feature as Location for one of my client. Totally there are 12 locations( Profit centers). Now I got a situation where I need to lock few Locations (Profit Centers). Bcoz they are non Operative as of now.
                Somebody please let me know how to lock profit center in SAP B1 8.8 PL 10.
    Thank you,
    Dasari.

    Try this for A/R Invoice:
    if @object_type = N'13' and @transaction_type in (N'A', N'U')
    BEGIN
    If exists (Select T0.DocEntry From INV1 T0
    Where T0.DocEntry=@list_of_cols_val_tab_del and T0.Project
    in ('P1', 'P2'))
    Begin
          Set @error = 13
          Set @error_message = 'Project Code inactive!'
    End
    END

  • Does anyone know how to lock a specific application, such as e-mail in Ipad?

    I have my company email in my Ipad and I want to lock it in order to prevent whoever uses my Ipad to login to my email. Does anyone know how to lock a specific application or it cannot be locked?

    There is a somewhat clunky way to do it. First, go into your mail (Settings - Mail/Contacts/Calendars) and turn off (dont' disable) any accounts you don't want to be seen. Then go into Restrictions - Accounts and select "Don't Allow Changes." This will prevent anyone from turning the mail back on. When you're ready to turn it back on, go into Restrictions and either Disable Restrictions or go into Accounts and select Allow Changes.

  • How to capture workitem number

    Hi Experts,
    We have custom workflow for creating material master. The main workflow contains different sub workflows and tasks. The workflow has 4 levels approvals and it has been triggering from Z transaction using event.
    We have the requirement for report to know the Overview of all material requests currently open; (at which specific step are they pending?), Daily Overview  of  all requests currently open for more than 24 hours at a specific department: including assigned user.
    But this data we are not capturing in the Z-tables. We can get it from workflow standard tables like SWWWHEAD. For all these standard table required workitem id which is unique and will dynamically generates the number.
    My question is how to capture workitem number. Is there any function modules/reports/process to get the workitem number specific to object type/object key?
    Thanks in advance.
    Cheers,

    Hi ,
    You can use the standard WAPI for getting the workitemids for specific material nos . But when you are going to  develop report for multiple material nos then you need to call the SAP WAPI in side LOOP and END LOOP , which will affect the performance  of the report .If the no of entries is less to be displayed in the report then you can use the SAP WAPI . Other wise you can try the below code for better performances -
    Get all your material nos in one internal table  say ITAB1 .
    IF ITAB1 IS NOT INITIAL .
        SELECT   top_wi_id wi_rh_task instid FROM sww_wi2obj INTO TABLE
        itab2  FOR ALL ENTRIES IN ITAB1
          WHERE instid = ITAB1-instid
                      AND catid = 'BO'
                      AND typeid = 'BUS1001006'
                      AND wi_release = '700'
                      AND wi_reltype = '99'
                      AND removed = '   ' .
    ENDIF .
    You will get the  workitemid of workflow specifc to all  materials in the internal table ITAB2 - The field is - top_wi_id
    Just try this out . Hope it may help you .
    Regards
    Prabhudutta
    Edited by: Prabhudutta Behera on Mar 13, 2009 12:20 PM

  • How to Lock a data base table for write access.

    Hi All,
    I have a requirement where in I have to insert a bunch of data into a standard table using some function module. I want to lock the table for the others to insert/modity the records during my insertion. Please help me provide the procedure how to lock a table for write access for others.
    thanks and regards,
    Naresh

    Hi,
    See to this link it may help you.
    http://help.sap.com/saphelp_47x200/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/frameset.htm

  • How to lock a function while it is in processing?

    i am using threads to write my game server side. anyone have any idea on how to lock a function while it is in process? then it wl continue after a process. appreciate very much

       public void run() {
            try {
                char charBuffer[] = new char[1];
                // --- while we have an incoming stream
                while(in.read(charBuffer,0,1) != -1) {
                    // --- create a string buffer to hold the incoming stream
                    StringBuffer stringBuffer = new StringBuffer(8192);
                    // --- while the stream hasn't ended
                    while(charBuffer[0] != '\0') {
                        // --- add the character to our buffer
                        stringBuffer.append(charBuffer[0]);
                        in.read(charBuffer, 0 ,1);
                    if(stringBuffer.toString().equals("IP")){
                        getMachineId(this.getIP());
                       } else{
                        // --- analysis the XML
                        parseReceivedXML(stringBuffer.toString());
            } catch(IOException ioe) {
                server.writeActivity("Client IP: " + ip + " caused a read error "
                        + ioe + " : " + ioe.getMessage() + "and has been disconnected.");
            } finally {
                killClient();
        }above is my run() code. i want to lock the function parseReceivedXML() and release it to the waiting thread after a thread finish process. i want the threads queue up to run in this function. please help

  • How to lock sap users in os level

    Dear consultants,
    how to lock the sap users in OS level.please tell me any one.

    Hi Pradeep,
    The table is usr02. The command is as below:
    update <schema>.usr02 set uflag=128;
    in case you need to mention any particular user to be locked, mention in the where clause.
    Before using this command, use the select statement to check the current status of the users.
    Regards,
    Meenu Hans

  • How to lock wbs element

    Hi all,
    I would like to seek your help on how to lock wbs element in a report program. Is there any bapi or function module for that? The requirement is to lock the wbs element when the user process/run that particular WBS. If the user exit to the report program, then that is the time that the other user can be able to process the WBS.
    Please help. Thanks in advance.

    There is no BAPI or function module to lock on unlock a WBS element.Goto Tansaction CJ02,put in the WBS element and repsetive project.
    in CJ02, go to EDIT->STATUS->LOCK/UNLOCK.
    Hope this clarifies your query.
    Regards,
    teja

Maybe you are looking for

  • Apple user

    After upgrading to Mac OS X 10.7.5 I cannot use Safari application.  Error message states:  You can't use this version of the application Safari with this version of Mac OS X. You have 5.0.6 I have gone to system preferences and Upgrade software.

  • What happened to my TV show?

    I bought a TV season, but once I watch an episode, I can't find it in my library again.

  • I got a Itunes card for Christmas and every time I try to redeem it, it says that I am not activated. What should I do? :/

    I just want to know how to fix this problem

  • USB mic not working

    Hi All. I'm new to Archlinux and I have the following issue with my USB WebCam (Microsoft VX-1000) : I can't get no sound out of it. Both the video and audio devices are detected and proper modules are loaded (gspca and snd-usb-audio). Video works fi

  • URGENT HELP - DO NOT DISCONNECT!!

    Hi all. I've read the backposts on this and tried, but its not helped. Just plugged my iPod in to update and it came up with the usual "do not disconnect" sign on the iPod, however iTunes did not recognise that the iPod had been plugged in. Went thro