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.

Similar Messages

  • 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.

  • How to check the locks in a table

    Hi
    Can any one tell me the commands to check the locks and get rid of the locks in a table.
    Thanks and Reg
    Debashis

    v$lock
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/manproc.htm#sthref764

  • 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

  • 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 duplicate entries in internal table??

    Dear Friends,
    How to check duplicate entries in internal table??
    Exp: In my internal table if I am having the same records more then ones then I need to print the error message, here I am using steploop for selecting the values from screen, and the values are coming into my internal table if user enter the same value more then ones I need to print the error message.
    Thanks,
    Sridhar

    Hi,
    After storing the data into internal table say ITAb, move the data into another internal table.
    t_dup[] = itab[].
    LOOP AT itab.
        count1 = count1 + 1.
        itab-count1 = count1.
        MODIFY itab.
    ENDLOOP.
    LOOP AT t_dup.
        count2 = count2 + 1.
        t_dup-count2 = count2.
        MODIFY t_dup.
    ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM itab.
      LOOP AT t_dup.
        record_dup = 'N'.
        READ TABLE itab WITH KEY count1 = t_dup-count2.
        IF sy-subrc = 0.
          record_dup = 'Y'.
        ENDIF.
        IF record_dup NE 'Y'.
          t_dup-message = 'DUPLICATE ENTRY'.
          t_dup-flag = 1.
          MODIFY t_dup.
        ENDIF.
      ENDLOOP.
    Use this sample code.
    Reward pts if it is helpfull.
    Regards
    Srimanta

  • 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 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.

  • 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 go for Multiselection in a table?

    HiAll,
    Can any one tell me how to go for multiselection in a table.
    Regards
    DK

    hi D,
    I asume you are talking about a webdynpro UI element 'Table';
    You can set the property 'SelectionMode' to 'Multi'.
    Here you can find more info:
    <a href="http://aiokeh.wdf.sap.corp:50000/SAPIKS2/contentShow.sap?_SCLASS=IWB_STRUCT&_SLOIO=7C3545415EA6F523E10000000A155106&IWB_INDUSTRY=ERP-BFS&TMP_IWB_TASK=DISPLAY&RELEASE=700&LANGUAGE=EN&_SEQNUM=426&_LOIO=6EAE0E422DFCDC2CE10000000A1550B0&_CLASS=IWB_EXTHLP">http://aiokeh.wdf.sap.corp:50000/SAPIKS2/contentShow.sap?_SCLASS=IWB_STRUCT&_SLOIO=7C3545415EA6F523E10000000A155106&IWB_INDUSTRY=ERP-BFS&TMP_IWB_TASK=DISPLAY&RELEASE=700&LANGUAGE=EN&_SEQNUM=426&_LOIO=6EAE0E422DFCDC2CE10000000A1550B0&_CLASS=IWB_EXTHLP</a>
    Best regards,
    Joris

  • How to check for the variable passed to a function inside a component

    I'm trying to pass a variable to a function inside of a
    component in a conditional statement.
    How to check the existance of this variable inside the
    function so that I can use the right <CFarguments>:
    in aForm.cfm I have:
    <cfinvoke component="#application.cfcroot#.business.Order"
    method="selOrderItems"
    returnvariable="q_OrderItems"
    OrderItemAbbreviation="Min"></cfinvoke>
    <cfset MCompIDs = ValueList(q_OrderItems.OrderItemID)>
    <cfif listFind(MCompIDs,attributes.CompID)>
    <cfset isM = true>
    <cfelse>
    <cfset isM = false>
    </cfif>
    <cfinvoke component="#application.cfcroot#.business.Order"
    method="selOrderItems"
    returnvariable="q_OrderItems"
    OrderItemAbbreviation="SMEnroll"></cfinvoke>
    <cfset SM_CompIDs =
    ValueList(q_OrderItems.OrderItemID)>
    <cfif listFind(SM_CompIDs,attributes.CompID)>
    <cfset isSM = true>
    <cfelse>
    <cfset isSM = false>
    </cfif>
    <CFIF isSM>
    <cfset temppath = frmcreator.buildFrm(isSMFlag=isSM)>
    <CFELSE>
    <cfset temppath = frmcreator.buildFrm(isMFlag=isM)>
    </CFIF>
    On aFormComp.cfc where the function is,
    I checked the existance of isSMFlag this way and I got error
    saying that :
    Context validation error for tag CFARGUMENT.; The tag must be
    nested inside a CFFUNCTION tag.
    How can I properly check the existance of isSMFlag inside the
    function so I can use the right cfarguments?
    <CFFUNCTION NAME="buildFrm" access="public"
    returntype="String" output="No">
    <cfif StructKeyExists(arguments, "isSMFlag")>
    <CFARGUMENT NAME="isSMFlag" REQUIRED="YES"
    TYPE="NUMERIC">
    <cfelse>
    <CFARGUMENT NAME="isMFlag" REQUIRED="YES"
    TYPE="NUMERIC">
    </cfif>
    ........ etc
    </CFFUNCTION>

    <CFFUNCTION NAME="buildFrm" access="public"
    returntype="String"
    output="No">
    <cfif StructKeyExists(arguments, "isSMFlag")>
    <CFARGUMENT NAME="isSMFlag" REQUIRED="YES"
    TYPE="NUMERIC">
    <cfelse>
    <CFARGUMENT NAME="isMFlag" REQUIRED="YES"
    TYPE="NUMERIC">
    </cfif>
    ........ etc
    </CFFUNCTION>
    NOT this way, that is for sure.
    The <cfargument ...> tag is for defining the arguments
    a function
    accepts either optional or not, but they are not required.
    Give this a
    try to see the differences.
    test.cfc
    <cfcomponent>
    <cffunction name="a">
    <cfdump var="#arguments#">
    </cffunction>
    <cffunction name="b">
    <cfargument name="foo">
    <cfargument name="bar">
    <cfdump var="#arguments#>
    </cffunction>
    </cfcomponent>
    test.cfm
    <cfset something = createObject("component","test")>
    <cfoutput>
    #something.a("blue","green")#
    #something.b("blue","green")#
    </cfoutput>
    Not tested or debugged so watch out for typos.

  • 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

Maybe you are looking for

  • IMessage says that my Apple ID password is incorrect, so I changed it and it continues to give me the same message. What is the problem?

    I have an iPhone 5 and it kicked me out of iMessage. When I went to reactivate it, it told me that my username or password was incorrect. So I changed my password. Still said it was incorrect. However, I can login to iTunes (and here) with the same p

  • Why is the PAR file located in portalapps, pcd and temp folders???

    Hi all - I downloaded the com.sap.portal.runtime.logon.par.bak file to make changes to the logon page.  I renamed the PAR file after it was downloaded, made my changes, and exported back into the portal.  Everything is fine....I just have a question

  • Can't close web pages.

    After just doing the ios 5 update, i no longer have web pages button on my navigation bar so I cannot close web pages. Anyone else have this problem?

  • Video playback too bright

    My 3G Nano was working fine until today. I put it on pause for a bit, fell asleep, and when I woke up and went to replay, the playback is mega bright. I can't see much on the screen. If I was watching TV, I'd change the brightness, but I am a doofus,

  • Few problems... HELP PLEASE!!!

    Two things... one, my ipod will not connect to my computer. I haven't had this problem before. I can't even plug it in to restore the ipod to delete all files to start over. Two, how do you put your ipod into disk mode? A tech said I may have a corru