How to check for locks on a material - without using Enqueue function

Hi
    We have a requirement in which - we need to check the lock ( exclusive ) on a material before we call the BAPI to update the material.
I don't want to actually lock the material before calling the BAPI - the BAPI itself acquires the lock as a part of its processing. All I want to do is to check whether lock on a material exists before calling the BAPI - thus avoiding any lock related issues on the material in the BAPI call.
How do we just merely check whether material is locked - any standard function module /SAP tables where in material lock is stored that we use/interrogate ?
Correct answers will be promptly rewarded.

Hi ,
      There is standard function enqueue_read ,based on material number .
Pass the material number to FM ENQUEUE_READ if sy-subrc = 0 then material is locked otherwise not .
Please reward if useful.

Similar Messages

  • How to check for locks on a table inside a program?

    Hi Gurus,
    Kindly let me know how to check for a lock on a particular table inside a program.I know that we can see locks on table held by a user from transaction SM12 but my requirement is to check for lock on MARA/MARC/MARV if lock exist then bypass my code else do the code.
    Kindly suggest or give code to check for a lock on a particular table.
    Thanks in advance
    Sudipto

    FAQ.  Locked.

  • How to check for physical damage on a disk using the Command Line

    I have a startup disk that I suspect of physical damage. The symptoms is that the server (10.4.7) would "hang" randomly, about once a day. I have already changed it and restored from a backup, and now everything is fine. However just out of curiosity are there any command line utilities to do a physical surface scan of the drive, like TechTool Pro but included in Mac OS X Tiger?
    G4 Dual 1.42 Ghz   Mac OS X (10.4.6)  

    Extract from the Command Line Guide for Tiger Server:
    Checking for Disk Problems
    You can use the diskutil or fsck command (fsck_hfs for HFS volumes) to check the physical condition and file system integrity of a volume. For more information, see the related man pages.
    MacBook Pro   Mac OS X (10.4.7)  

  • How to wait for a Process to complete without using wait,notify methods

    I have created a new Process using run.exec() method using a cmdline String array in the format "java, class name, 4 command line arguments" to be passed to the main method of that class. But I have a maximum limit of the no. of processes to be created e.g. 5. So whenever I create a process, I use a static semaphore class to decrease the count, and increase it again when the process ends; so when the 6th process wants to start it will be suspended until another process is complete. My problem is how do I communicate to the calling class that the process has ended. I don't want to create any threads as that will defeat the purpose of creating separate processes. I have tried Process.waitFor() method but it doesn't work.

    you could add a iamfinished method to the class where you store the counter and thread calls it if it is finished.

  • Can't get Firefox to load at all after trying fixes from support web site. Have checked for lock file, processes running, reboot, reinstall. NO JOY.

    I'm running Vista for operating system on an HP laptop that's about 2 years old. I've installed all current updates.
    I've always used Firefox. It started crashing and creating processes but not launching. Went to support and scoped it out -- there was a lock file my profile directory. I deleted it, and Firefox started loading.
    Used it a few times -- closed the app each time on exist as per suggestions on support site info. One time -- back to square one, wouldn't load, just created a process. Reboot, ending process, checking for lock file, reinstalling -- all unsucessful.

    Brian
    Below is from using a SIP build.  It does offer G722, but it's way down on the list so it's never used...
    m=audio 32678 RTP/AVP 0 8 18 102 9 116 101
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:102 L16/16000
    a=rtpmap:9 G722/8000
    a=rtpmap:116 iLBC/8000
    a=fmtp:116 mode=20
    a=rtpmap:101 telephone-event/8000
    Taking Sreekanth's suggestion to try a Skinny build, I get the following when I make a call.  It offers codecs in the order I SET THEM AND ONLY THE CODECS I SET!  YAY!
    m=audio 19374 RTP/AVP 9 0 101
    a=rtpmap:9 G722/8000
    a=fmtp:9 bitrate=64
    a=rtpmap:0 PCMU/8000
    a=rtpmap:101 telephone-event/8000
    Using a Skinny build on the phones also solved other issues.  The phones use G711 when the whole path supports G711 and G722 when the whole path supports G722.  It doesn't always use G722 and rely on transcoding for the call paths that can't use it.  It's fantastic..  The phones also receive the QoS tagging that I set and that seems to result in better audio quality than on the SIP builds, which never did get those settings.  Finally, it even solved a slow Exchange 2013 answer issue I have been experiencing for quite some time.  I practically fell out of my chair when I saw everything that was fixed just by switching...
    Cisco, PLEASE FIX YOUR SIP BUILDS!  It's insane how the SCCP builds work perfectly and the SIP builds don't, especially with how much these phones cost..  I was thinking of possibly acquiring some 9951s, which are SIP only.  I'm a little leery about that at this point.  If they have the same kinds of issues as the SIP builds for the 7975g, there's no SCCP alternative to use..
    Sreekanth
    Thank you for suggesting a Skinny build..  That was about the only thing I didn't try.  I am happy beyond belief that this is working so well now, even though the SIP builds should be just as well developed as the SCCP ones.

  • How to check the Lock Entries Dynamically

    Hi
    I have a list of Objects in an internal table and i want to know which one of these objects are locked by another users.
    I am using SAP standard Lock object 'EPNODE' and its FM 'ENQUEUE_EPNODE ' to Lock the entries.
    Please suggest how i can find among a list of objects, which one are locked.
    Please suggest any transparent table which hold lock entries or any Function Module which check for lock entries.
    Thanks in adavance

    Hi
    Just double click on the FM, it will take you to SE37
    click on IMPORT tab there you find import parameters against which there is the associated type
    you need to declare your variables(parameteres) according to these associated types
    whatever the FM it may be, the process is same
    Hope this would solve your problem
    Regards
    Ramchander Rao.k

  • How to check blocking locks

    I have a query as to how to check for blocking locks in the database. I am trying to check it from TOAD but the session of TOAD is hanging. I hope, my question is clear.
    Please, help in solving the doubt.
    regards

    Hi user574290,
    Here is other script:
    clear screen
    set serveroutput on
    BEGIN
    dbms_output.enable(1000000);
    for do_loop in (select session_id, a.object_id, xidsqn, oracle_username, b.owner owner,
                    b.object_name object_name, b.object_type object_type
                    FROM v$locked_object a, dba_objects b
                       WHERE xidsqn != 0
                        and b.object_id = a.object_id)
    loop
        dbms_output.put_line('.');
        dbms_output.put_line('Blocking Session   : '||do_loop.session_id);
         dbms_output.put_line('Object (Owner/Name): '||do_loop.owner||'.'||do_loop.object_name);
        dbms_output.put_line('Object Type        : '||do_loop.object_type);
         for next_loop in (select sid from v$lock
                         where id2 = do_loop.xidsqn
                             and sid != do_loop.session_id)
         LOOP
              dbms_output.put_line('Sessions being blocked   :  '||next_loop.sid);
        end loop;          
    end loop;
    END;
    /Best Regards,
    Francisco Munoz Alvarez
    www.oraclenz.com

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • How to check for the sub folder in the document library Is already Exist using CSOM?

    Hi,
    My requirement is to create the  folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
    I able to check for the parent folder.
    But cant able to check the subfolder in the document library.
    How to check for  the sub folder in the document library?
    Here is the code for the folder
    IsFolder alredy Exist.
    private
    string IsFolderExist(string InputFolderName)
    string retStatus = false.ToString();
    try
    ClientContext context =
    new ClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
                context.Credentials =
    CredentialCache.DefaultCredentials;
    List list = context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
    FieldCollection fields = list.Fields;
    CamlQuery camlQueryForItem =
    new CamlQuery();
                camlQueryForItem.ViewXml =
    string.Format(@"<View  Scope='RecursiveAll'>
    <Query>
                                            <Where>
    <Eq>
    <FieldRef Name='FileDirRef'/>
    <Value Type='Text'>{0}</Value>
                                                </Eq>
    </Where>
    </Query>
                                </View>",
    @"/sites/test/hcl/"
    + InputFolderName);
                Microsoft.SharePoint.Client.ListItemCollection listItems = list.GetItems(camlQueryForItem);
                context.Load(listItems);
                context.ExecuteQuery();
    if (listItems.Count > 0)
                    retStatus =
    true.ToString();
    else
                    retStatus =
    false.ToString();
    catch (Exception ex)
                retStatus =
    "X02";
    return retStatus;
    thanks
    Sundhar 

    Hi Sundhar,
    According to your description, you might want to check the existence of sub folder in a folder of a library using Client Object Model.
    Please take the code demo below for a try, it will check whether there is sub folder in a given folder:
    public static void createSubFolder(string siteUrl, string libName, string folderServerRelativeUrl)
    ClientContext clientContext = new ClientContext(siteUrl);
    List list = clientContext.Web.Lists.GetByTitle(libName);
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =
    @"<View Scope='RecursiveAll'>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name='FSObjType' />
    <Value Type='Integer'>1</Value>
    </Eq>
    </Where>
    </Query>
    </View>";
    //camlQuery.FolderServerRelativeUrl = "/Lib1/folder1";
    camlQuery.FolderServerRelativeUrl = folderServerRelativeUrl;
    ListItemCollection items = list.GetItems(camlQuery);
    clientContext.Load(items);
    clientContext.ExecuteQuery();
    Console.WriteLine(items.Count);
    if (0 == items.Count)
    //create sub folder here
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to run MRP for Bulk Material without using LTP

    Hi, how can I run MRP for BULK material without using LTP.
    Thanks in advance
    BK

    Hi,
    Use trasnsaction code OPPQ and goto BOM Explosion and selection depends on
    Field selected
    No dependent requirements are created for informational purposes for bulk material items in the plant selected. This can improve system performance.
    Field not selected
    Dependent requirements are created for bulk material items in the plant selected. These dependent requirements are displayed in the planned order for informational purposes only. They are not considered in the net requirements calculation; that is, they are not included in material requirements planning (MRP) and are not displayed in the stock/requirements list
    Reg,
    Deepak.
    Edited by: deepak k b on Nov 11, 2008 6:56 AM

  • How to check for sql errors

    if an sql statement is coded
    how to check whether the sql has executed without errors
    exception is one thing
    is there any other way or means for this
    if so, can any one help in this regard

    For Checking the SQL error you can trap the error number and error message and log into any table by following way
    CREATE OR REPLACE PROCEDURE FOR_ERROR_LOG as
    v_err_num NUMBER (20) := 0;
    v_err_msg VARCHAR2 (100) := NULL;
    BEGIN
    SQL statements like select, insert, update.
    EXCEPTION
    WHEN OTHERS THEN
    v_err_num := SQLCODE;
    v_err_msg := SUBSTR (SQLERRM, 1, 100);
    INSERT INTO error_table VALUES ('FOR_ERROR_LOG',NULL, v_err_num, v_err_msg, SYSDATE);
    COMMIT;
    END ;
    /

  • How to check for updates on SCM packages?

    Hey guys,
    I wondered for some time now how to check for updates on SCM packages, i.e. -git
    or -svn ones. Updates for binary packages are automatically updated by pacman,
    no problem there. Checking for updates on non-SCM packages from the AUR is
    easily done with one of the various helper tools available (personally, I use
    slurpy).
    However, SCM packages can change without their PKGBUILD changing, so I'm not
    notified that I should recompile and update them.
    Is there a "proper" way of doing this? Am I missing something?
    Thanks in advance!

    If your system is booting then u can say that your bootblks are installed.Usually BootBlks are present in 0 & 1 slice of UFS Filesystem
    /usr/platform/platform-name/lib/fs/ufs
    directory where ufs boot objects reside.
    An x86 FDISK partition for the Solaris software begins with a one-cylinder boot slice, which contains the partition boot program (pboot) in the first sector, the standard Solaris disk label and volume table of contents (VTOC) in the second and third sectors, and the bootblk program in the fourth and subsequent sectors. When the FDISK partition for the Solaris software is the active partition, the master boot program (mboot) reads the partition boot program in the first sector into memory and jumps to it. It in turn reads the bootblk program into memory and jumps to it. Regardless of the type of the active partition, if the drive contains multiple FDISK partitions, the user is given the opportunity to reboot another partition.

  • How to check for impacts due to upgrade

    We are plannining to upgrade from 4.7 to ECC6..How to check for impacts on FTP'S,shell scripts and RFC's etc due to the assesment..Please suggest

    Hi,
    FTP's and Shell scripts are OS dependant not SAP or Database dependant so there will be no change at all unless you upgrade OS too. RFC's are not afected as per guides, notes and my experience.
    I´m doing an upgrade from 4.6C to 6.0 with connections with at least 10 systems and none of them had an issue during tests
    Good luck

  • How to check for bootblk on Disk

    Does someone know how to check for bootblk on solaris disk.

    If your system is booting then u can say that your bootblks are installed.Usually BootBlks are present in 0 & 1 slice of UFS Filesystem
    /usr/platform/platform-name/lib/fs/ufs
    directory where ufs boot objects reside.
    An x86 FDISK partition for the Solaris software begins with a one-cylinder boot slice, which contains the partition boot program (pboot) in the first sector, the standard Solaris disk label and volume table of contents (VTOC) in the second and third sectors, and the bootblk program in the fourth and subsequent sectors. When the FDISK partition for the Solaris software is the active partition, the master boot program (mboot) reads the partition boot program in the first sector into memory and jumps to it. It in turn reads the bootblk program into memory and jumps to it. Regardless of the type of the active partition, if the drive contains multiple FDISK partitions, the user is given the opportunity to reboot another partition.

Maybe you are looking for

  • Bridge CS2 not showing all images

    After a crash of my PC (Windows XP  Home), I had to re-install Photoshop CS2.  Now, however, when I'm  trying to review images in Bridge (in filmstrip view) only some of the  thumbnails appear as photos; the remainder appear only as icons.  There  ap

  • Mms are not displayed correctly

    Hello to all. I have an iphone 4s with 5.01 and I can and receive mms correctly. There is only one problem: I can see only a small preview of the file. When I try to open it I got a black screen. I have this problem only with photos, for videos every

  • Reg parameter filtering ./.

    Hi. This is ranganadh, i am generating very simple report, but under laying it has very huge table and lot of joins .. but i have a proper indexing to get results much faster .. i have taken new report, and given oracle command for data source, i wan

  • Software updates- Security&safari 3.1 update... does not boot

    hi everyone, i'm trying to help my room mate out with a problem. he has a mac mini intel 1.66ghz. he does have 2gb ram installed by a apple certified tech a month ago and it is problem free. here's the dirty stuff. so first off, he has a western digi

  • DFF Segments not appearing

    Hi I have added a couple of segments to the Job Attributes and deployed it successfully. However when I go back to the Manage Job screen I cannot see the two segments that I have created. I am assuming after deploying the DFF the segments should be s