How to lock a specific record

Let’s say I need to lock a specific record from a form so nobody could even select this record from database.
How do I do this?
Thank you in advance

Add a default_where property for your block that will eliminate this record from being selected.
For example:
set_block_property('emp','default_where','ename!='SCOTT');

Similar Messages

  • 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 lock the perticular record in table with some of fields

    Hi,
    I have one Doubt please clarify me.
    How to lock the record in table with perticular fields combination please give me example of code.
    Thanks,
    Hari.

    Hi,
    IT LIKE this....
    This is the function mode that you have to create for locking the contents of you internal table.
      CALL FUNCTION 'ENQUEUE_EZHFINDID'
       EXPORTING
         mode_zhfindid        = 'E'
         mandt                = sy-mandt
         ownid                = w_display-ownid
      X_OWNID              = ' '
      _SCOPE               = '2'
      _WAIT                = ' '
      _COLLECT             = ' '
       EXCEPTIONS
         foreign_lock         = 1
         system_failure       = 2
         OTHERS               = 3.
      CASE sy-subrc.
        WHEN 1.
          w_flag_lock = c_x.
         CLEAR w_okflag.
          MESSAGE e265 WITH w_display-ownnum.
      ENDCASE.
    Jayant Sahu.

  • How to lock a specific text message so it wont be deleted

    I would like to lock a specific someoen sent me but if i delete the rest of the the thread i wont that line will still be there. I used to do it on androind phone wasnt sure if iphone could do that as well.

    That is not a feature of the iPhone. Submit your feedback requesting such a feature directly to Apple using the appropriate link on the Feedback page:
    http://www.apple.com/feedback
    Meanwhile, you could always copy the message you want to save (tap and hold the message, select Copy) and save it to Notes or somewhere else.
    Best of luck.

  • How to lock a specific files on a shared network usb drive connected to an airport extreme on a mac running lion?

    Is it possible to lock a specific files on a shared network usb drive connected to an airport extreme on a mac running lion?

    Here is one from Pondini, who was the foremost Time Machine expert in the world.
    http://pondini.org/TM/Airport.html
    And another from Apple. Info near the bottom.
    AirPort base stations: About USB disks
    And another miscellaneous from Apple:
    AirPort base stations: Time Machine hard drive compatibility

  • How to insert a specific record into alv

    Hi everyone,
      here is my problem:
        I put an ALV GRID control in my screen , it display some records.
        and I create a new button on the toolbar, and in the "handle user command class" , I need to
    select a record from DB table into a work area.
        after I select the record I need, here is the key question:
          *I want to insert the record into the ALV at a specific row position which the user decided,
    what should I do?*
      METHOD HANDLE_ON_USER_COMMAND.
        CASE E_UCOMM.
          WHEN CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
          WHEN 'FC_ASSIGN'.
    ***I do some selection here  
            select %%%$$%%%^&&** into GS_HOLIDAYS.
    *** after the selection, what should I do then????
    *** I want to insert the work area GS_HOLIDAYS into ALV at a specific position
    *** e.g.  into the 3rd row.
    *** how can I achieve that????
    ***call a method or something??????I don't know    
          WHEN 'FC_DELETE'.
          WHEN OTHERS.
        ENDCASE.
      ENDMETHOD.
    pls don't let me go through the programs in package "SLIS",because I have already done that and
    I haven't solved my problems yet.
    Thanks for your help.

    All u need to do is on user command for inserting new records u just insert a blank record in your internal table that u are displaying with required style informaion for making it editable and then refresh alv display by method REFRESH_TABLE_DISPLAY.
    Thanks & Regards,
    Vivek Gaur

  • How can I update specific records in a tabular form

    I have a form with two blocks. One is a "simple form" and the other block is "tabular".
    In the "tabular form" I have some data (codigo, descripcion, importe)
    I want to update the item "importe" acording to specific values given in the "simple form". What I don4t know how to do is tell the form which record I want to update.
    Hope to be clear.
    Versnica

    Versnica,
    as i understood u got two blocks and u need to update that record in second block which value matches to block one .
    eg
    u can "A" item in values "Value1" in block 1 and there is record in block two with item "B" has same value "Value1". then u can use
    procedures like NAME_IN(<<item A>>) = NAME_IN(<<item B>>) then update the record in second block .
    see whether it helps for not ? otherwise u can send me forms on [email protected] so that i can have a look .

  • How to lock a table/record from being read

    Hi,
    We are facing a problem executing a backend operation due to the presence of 2 JVMs.
    We have a set of batch jobs that needs to run on a daily basis. We are using a flag in a table to check if any job is currently running, based on which the job is kicked off.
    The problem comes up when the 2nd JVM tries to read the same data present in the table and kicks off the job, which it shouldnt.
    Currently this is how i am implementing it:
    SELECT COUNT(1) into l_status FROM Log_Table
    where job_status is NULL
    FOR UPDATE;
    IF (l_status = 1) THEN
    UPDATE Log_Table
    SET Job_Status = 'In_Execution'
    WHERE Job_status = NULL; -- Only 1 rec will contain this field as NULL
    END IF;
    COMMIT;
    l_status decides whether the job should run or not.
    SELECT..FOR UPDATE does not stop the 2nd JVM from reading the data (or will it?). The 2nd JVM will just wait for the lock to be released, execute the UPDATE without knowing the current value of Job_Status and then start the batch job. Correct me if my knowledge of SELECT FOR UPDATE is wrong.
    What can be done to completely avoid the 2nd JVM from intervening?
    Solutions would be much appreciated.

    I have dealed with your problem. Please checkout thread Is it possible to pevent select operation on a table?

  • How to lock a specific map with a password in FINDER?

    I don't use a password on my mac because you have to fill it out the whole time for ridiculous reasons. But I have one map, with all my financial numbers and invoices, that I want to secure with a password.
    How to do that?
    I already tried some things but can't figure it out.
    Thanks in advance!

    not sure what you mean by a map here. if you use a blank admin password (a mistake IMO), pretty much your only option is to create an encrypted disk image using disk utility and put whatever you want protected inside. when the image is unmounted, the only way to mount it is by entering the password you set at the image creation time.

  • How to Copy the specific record of one table to other table(same structure)

    Hello,
    i have develop a form and some buttons on it. Suppose that Form is based on TABLE_1, which has the fiollowing structure.
    ( Bill_No Number(5),
    Bill_Date Date,
    Bill_amount Number(6),
    Description Varchar2(60)
    My requirement is when i save the any record and after that i want to copy all the contents of that record to Table_2.
    On the form there is a button named as Let say "Copy current Record to Table_2". So when i press the button, the record is copied from Table_1 to Table_2.
    (Note: - Table_2 has the same structure as Table_1.)
    Please help me to solve this problem.
    Thanks in advance.

    i would prefer a pure database-solution, means put a database-trigger BEFORE INSERT FOR REACH ROW on your table 1 and do the insert there.
    If you do it in PRE-INSERT-Trigger in forms it will work for data entered via forms-application, but what happens if data is inserted via a different frontend?
    CREATE OR REPLACE TRIGGER TRG_TABLENAME_BRI
    BEFORE INSERT
    ON TABLENAME
    FOR EACH ROW
    BEGIN
      -- Do your insert here
      INSERT INTO TABLE2 (
        COL1,
        COL2
      ) VALUES (
        :NEW.COL1, -- (or OLD.COL1)
        :NEW.COL2  -- (or OLD.COL2)
    END;
    /Edited by: aweiden on 22.09.2008 08:08

  • 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 display/navigate to specific record in a table with more then thousand records

    Hi,
    there is a task that I do not know how can be resolved.
    There is a query that returns around 1 - 2 thousand records. And all those records have corresponding weight assigned.
    After query executing it is necessary to navigate to the records with the highest weight assigned. It can be first record, it can be a record at the end or in the middle of the row set from thousand records.
    I have used "DisplayRow"=selected or the code below, but it does not work properly ... when the record that we navigate is in the middle of record set from 2000 records, then users have to scroll down to it.
    And I need to position to that specific record after query is executed.
    So I used the code below:
    public void onButtonClicked(ActionEvent actionEvent) {
    DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator = bc.findIteratorBinding("ViewVIIterator");
            Row row = iterator.getCurrentRow();
            String bestPosition = (String)row.getAttribute("BestPosition");
            iterator = bc.findIteratorBinding("DetaillVIIterator");
            ViewObject vo = iterator.getViewObject();
            vo.setWhereClause(some_conditions);
            vo.executeQuery();
            RowSetIterator rowSet = iterator.getRowSetIterator();
            Key key = null;
            while (rowSet.hasNext()) {
                row = rowSet.next();
                if (row != null && ((String)row.getAttribute("weight")).equals(bestPosition)) {
                    key = row.getKey();
                    Key rowKey = row.getKey();
                    ArrayList tableRowKey = new ArrayList();
                    tableRowKey.add(rowKey);
                    this.getRangeTable().setScrollTopRowKey(tableRowKey);
                    break;
    After the code above I getting the row selected or set as a current, but in case of 2000 records, when my record is in the middle of this record set, I need to scroll down to this record to see it.
    And I wanted that I will be navigated to my record with records above and below.
    What am I doing wrong above?
    Thanks
    Alexander

    Hi Timo!
    thanks for the reply.
    version info:
    Oracle JDeveloper 11g Release 2 11.1.2.3.0
    Studio Edition Version 11.1.2.3.0
    Build JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1
    IDE Version: 11.1.2.3.39.62.76.1
    Product Version: 11.1.2.3.39.62.76.1
    1. sorting order is already applied and we to position to a specific record in af:table.
    From another side the task can rephrased: I need to position to a specific record and I need to be able to show 500 records before and 500 records after.
    So where clause can be like:
    :bestPosition > position - 500 and :bestPosition < position +500.
    2. I tried to apply your second approach and found that record is selected, but I need to scroll to it down. It happens when first 20 records are displayed in af:table and my record is 480 records below ...
    Alexander

  • How to get info who is locking a specific row in the RDBMS 9i?

    Hi,
    could some one please helop me with this? I would like to know the Oracle user name of the user who is locking a specific row in my table. I can display all locking requests with the following SQL statements. What I could not igure out how to find the rownum that is being locked by others?
    SELECT *
    FROM v$lock lk, v$session s , DBA_OBJECTS ao, wf_users wu
    WHERE lk.lmode > 1
    AND s.username IS NOT NULL
    AND lk.SID = s.SID
    AND ao.OBJECT_ID(+) = lk.id1
    AND s.username = wu.NAME(+)
    AND ao.owner = USER
    AND ao.object_name = 'BWF_IKTATASI_ADATLAPOK';
    Thank you in advance,
    Tamas Szecsy

    I'm not sure what's happening with your app. I wrote on up to see if it could handle the CTRL-C. Seems to work fine. Do you have any other JMenuItems with the same accelerator?
    import java.awt.event.*;
    import javax.swing.*;
    public class Copy extends JFrame {
         public Copy() {
              this.initMenuBar();
              this.setSize(400, 300);
              this.setVisible(true);
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         private void initMenuBar() {
              JMenuBar menubar = new JMenuBar();
              JMenu edit = new JMenu("Edit");
              JMenuItem copy = new JMenuItem(new CopyAction("Copy"));
              edit.setMnemonic(KeyEvent.VK_E);
              copy.setMnemonic(KeyEvent.VK_C);
              copy.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK));
              edit.add(copy);
              menubar.add(edit);
              this.setJMenuBar(menubar);
         public static void main(String[] args) {
              new Copy();
         private class CopyAction extends AbstractAction {
              public CopyAction(String label) {
                   super(label);
              public void actionPerformed(ActionEvent e) {
                   System.out.println("Action Performed.");
    }

  • How can I know that record(s) are locked?

    Hi,
    I am querinh the table for updating.
    How can I check particular record or set of records if those records are locked?
    Any help are welcome.
    Thank you.
    Dmitry

    Please add some details:
    - Locked with what, locked with search my iPad?
    - Do you mean just normal locked (with a code/password every time you want to use your iPad)?

  • How to lock the record in the Form

    .How to lock the record
    That is In my customized form if user query the record in one of our Customized form and the system automatically should prevent by quering the same record by other user for the same form .The message to be displayed as locked by another user .
    For example in standard form the same option is available.
    Form Name:GMEBCHED.FMB
    Module:ORACLE PROCESS MANUFACTURING(OPM)
    Could you pls help us how to implement the same for our Customized form .
    Appricaiate your help .
    Regards,
    Radha krishnan

    Hi,
    I tried to put the code under Post-Query trigger. Since user can input the selection criteria in the form. After the form open, after I input the "Update user" ID (this is in the non-base table block), the oracle message prompt: FRM-40653: Record not reserved for update or delete. Try again later..
    So, is there any method to solve it?
    Thanks a lot.
    Regards.

Maybe you are looking for

  • Error while activating transforamtion

    Hi, Facing error while activating the transformation Error is : No source parameter is used. No target field is assigned. We are getting the data from the flat file,  i had tried assiging the fields in the transformation. but those are the amount fil

  • Word count and my ActionPerformed

    I am having a little trouble with my program and was wondering if anyone could spot the mistake... I am trying to make a simple application that will count the number of words in a text field via click of a button and display the results. import java

  • JMS Receiver Adaptor error

    Hi, I am facing issue in JMS receiver adapter can you please give me some suggestions. JMS adaptor: Message processing failed. Cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at ABC_JMSRe

  • Final Cut Pro Compatibility

    I'm looking to buy FCPX for my 2010 macbook pro. It has a 2.66 GHz core 2 duo processor and 4GB 1067 MHz of memory. Would FCPX work alright on my macbook? I don't remember what the mac OS was when I bought it (lion, snow leapord, flamingo) but I have

  • QM Information system

    Hi, We have below given requirements on QM. Requirements: u2022     Print the inspection results in a table or chart and mail to customer u2022     Download the inspection results to Excel and create a chart manually The basic questions is which stan