Regarding deleteing a block of data

Hi All,
I want to delete a record and have create a form with a block named
'BLOCK_DELETE'.
In this form ,I have added 3 text items...i.e empno,name,dob to be deleted from the database.
I have added a button "DELETE" ,which when pressed calls the when-button-pressed will delete the data because i have written following code
begin
     delete from emp
     where
     emp_no = :emp_no ;
commit;
--commit_form;     
     exit_form;
end;
I get a confirmation the following info
'Transaction Complete: 1 record saved and applied'
but when I check the database ,the record is present ...
i tried commit_form did not work
how can i go about this. I need to close the form as well.
cheers
s

If your block is a database block and you want to
delete the record displayed, why don't you use the
DELETE_RECORD built in instead of your code?
Hi Torsten,
I am bit new to forms and was not aware of DELETE_RECORD builtin .
Now i have replaced the above code with
begin
Delete_Record;
commit_form;     
end;
this has been written in the when-button-pressed trigger...
this has not helped me either....any suggestion ?
Regards
s

Similar Messages

  • Regarding Deletion or Archiving the Data based on Account Group

    Hi All,
    How to find the solution for Deletion or archiving the vendors in different SAP servers which is haviing account group.
    And tell me what is use for SARA Tcode?
    Please send documents or links..
    Can anyone help us ....its Urgent.....
    Thanks,
    Raj..

    hi,
    F58A - Archiving of Vendors.
    u can find all database tables for a particular object using SAra tcode.
    reward if hlpful.

  • Index Range Scan / Deleted Leaf Blocks

    Hello guys,
    i have such a scenario on a big index / table which i can not reproduce on my test database, so i need to know how oracle handles the index range scan.
    For example:
    TABLE TAB with the following columns NR (number), I_DATE (date), TEXT (VARCHAR2(50))
    INDEX I_TAB on the column I_DATE.
    Now the index has blevel 2 and many leaf blocks. And now my question.
    Query: SQL> SELECT * from TAB WHERE I_DATE < 10.10.2004
    The index had stored some values which are a less than 2003 but these ones are already deleted (so the leaf blocks are gone to the freelist), but it was not reorganized.
    The execution plan is a INDEX RANGE SCAN on the INDEX I_TAB. Does the branch block still have pointers to the deleted leaf blocks which contained only 2003 values before (and so the INDEX RANGE SCAN scans all these blocks too) or are the pointers to these leaf blocks deleted in the branch block?
    Thanks and Regards
    Stefan

    You can verify it by yourself. See following:
    SELECT count(*) FROM index_test;
    ==> 1569408
    SELECT count(*) FROM index_test WHERE id <= 2;
    ==> 12
    -- Delete all except first 12 rows
    DELETE FROM index_test WHERE id > 2;
    -- Query and SQL Trace
    BEGIN
    FOR C IN (SELECT /*+index(index_test index_test_idx) deleted */ * FROM INDEX_TEST WHERE ID < 1000000) LOOP
    NULL;
    END LOOP;
    END;
    SELECT /*+index(index_test index_test_idx) deleted */ *
    FROM
    INDEX_TEST WHERE ID < 1000000
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.00 0.00 0 3490 0 12
    total 3 0.00 0.01 0 3490 0 12
    ==> 3490 logical reads only for 12 rows and range scan??
    -- Index tree dump
    ALTER SESSION SET EVENTS 'IMMEDIATE TRACE NAME TREEDUMP LEVEL 67513'
    ----- begin tree dump
    branch: 0x1000124 16777508 (0: nrow: 6, level: 2)
    branch: 0x100b1ca 16822730 (-1: nrow: 557, level: 1)
    leaf: 0x1000125 16777509 (-1: nrow: 512 rrow: 12)
    leaf: 0x1000126 16777510 (0: nrow: 484 rrow: 0)
    leaf: 0x1000127 16777511 (1: nrow: 479 rrow: 0)
    leaf: 0x1000128 16777512 (2: nrow: 479 rrow: 0)
    leaf: 0x1000139 16777529 (3: nrow: 479 rrow: 0)
    leaf: 0x100013a 16777530 (4: nrow: 478 rrow: 0)
    branch: 0x100b401 16823297 (0: nrow: 558, level: 1)
    leaf: 0x100b1c9 16822729 (-1: nrow: 449 rrow: 0)
    leaf: 0x100b1cb 16822731 (0: nrow: 449 rrow: 0)
    leaf: 0x100b1cc 16822732 (1: nrow: 449 rrow: 0)
    ==> leaf:3488, branch: 7
    This means that almost all the branch and leaf nodes are read only for 12 keys.
    You can cross check this with the result of "10200" event which traces cr reads. You would find out that the blocks that are read by the query are exactly same as all the index blocks.
    This is what you mean? that the deleted leaf blocks(which contain no actual data) are read by range scan? Through the simple test, the anwer is "yes".

  • Problem about Asset Deletion and Blocking

    Hi Gurus:
    I want to know what difference is between deletion and blocking of fixed asset? Please give me some more information, thanks!

    Hi,
    Please refer to the following explanation:
    Asset blocking: Set the blocking indicator in the asset master record. Once the blocking indicator is set, you can no longer post acquisitions to this asset. The idea behind this, for example, is to prevent future postings to an asset under construction once the project is complete. After approval, the asset can be unblocked and reuse it again.
    Asset deletion: You can delete an asset master record to which no postings have been made, directly online, without archiving. In addition, it is also possible to manually delete old assets (legacy assets from your previous system) during the asset data transfer process.
    Hope can help you!
    Regards
    Tao

  • Procedure to delete base on a date

    I'm trying to create a procedure to delete all the rows that are < than the date received by parameter.
    Need some help since I'm not sure how can I compare the dates, in the table the field is defined as date also the param that I'm receiving.
    After that I would like to display the number of rows deleted by the procedure.
    create procedure xx (param in DATE)
    AS
    BEGIN
    DELETE
    FROM Exhibicion
    WHERE EXHFCH < param
    thanks for the help.

    Dario
    It would looks something like
    create or replace procedure xx ( the_date in date ) is
    begin
      delete from Exhibicion
      where date < the_date;
      dbms_output.put_line( 'Rows deleted '|| sql%rowcount );
    end;
    /Note, I have not actually run/testing this code, but it should be close.
    Regards
    Bob.

  • How to delete or Update the data in the MEAN table

    Hello Gurus,
    I would like to delete or update the data in the MEAN table...how to do it.
    Precisely I would like to change the status of Main EAN Indicator (field HPEAN).
    Kindly let me know ??
    Rehards
    Senthilll

    programmatically, you may use [BAPI_MATERIAL_SAVEDATA|https://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata&cat=sdn_all] [EAN|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=bapi_material_savedata+ean&adv=false&sortby=cm_rnd_rankvalue]
    Regards,
    Raymond

  • Is it possible to change PO item that is flagged for Deletion or Blocked ?

    other than to unflag the item.
    What I'm trying to determine is:  if the deletion flag is set or an item is blocked, is it correct to say that the date last changed (EKPO-AEDAT) is the date that the item was flagged for deletion or blocked ?  (I'm assuming only manual setting of the indicators and not update via a program method).
    Is there any way to effect EKPO-AEDAT after an item is flagged for deletion or blocked, without unflagging/unblocking ?
    (ECC 5.0 system)

    Hi,
    Once the PO line item is deleted, no changes other than reseting the delition indicator can be done. So EKPO-AEDAT will not be affected if a PO line item is deleted.

  • TABLE SIZE NOT DECREASING AFTER DELETION. BLOCKS NOT BEING RE-USED

    Hi ,
    Problem:
    Table size before deletion: 40GB
    Total rows before deletion: over 200000
    Rows deleted=190000 rows
    Table size after deletion is more (as new data was inserted meanwhile).
    Purpose of table:
    This table is a sort of transaction table.
    Whenever an SR is raised by CSR, data gets inserted into this table and is removed when the status is cleared.
    So there is constant insertion and purging will happen on this table.
    We are using ASSM and tablespace is LOCAL.
    This Table has a LONG column also.
    Is this problem because of LONG column ?
    So here there are 2 problems.
    1) INSERTs are not using the space created by DELETE.
    2) New INSERTs are taking much more space then expected ?
    Let me have your suggestion
    Thanks,

    I think when you do DELETE it removes the data but
    it's not releasing any used space and it's still
    marked as used space. I think reorganizing would help
    to compress and pack all block and relase any unused
    space in blocks. Why do you think that? Deleting data will create space that can be reused by subsequent insert/ update operations. It is not going to release space back to the tablespace to make it available for inserts into other tables in the tablespace, but that's not generally an issue unless you are permanently decreasing the size of a table, which is pretty rare.
    Would you also please explain about different about
    LOB and LONG ? or point me to any link which explain
    baout it.From the Oracle Concepts manual's section on the LONG data type
    "Note:
    Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead. LONG columns are supported only for backward compatibility.
    Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases."
    LONG was a very badly implemented solution to storing large amounts of data. LOBs are a much, much better designed solution-- you should always be using LOBs.
    Justin

  • How to remove a block of data in memory?

    hello:
    there is a block of data in memory, now i should add 4 bytes in them , so i should remove some data behind, i don't know what function i should use?
    i think remove some data from one place to another is copy data from one place to another , is that ok?
    Best regards!
    future

    I have some records in the internal table t_int1. I want to retrieve some set records from that table and put them all in some other table, based on a single field which is not a key. Can i use READ statement to achieve this.
    Could you please let me know any simple way of doin this.
    Answer :
    data:
    itab2 like standard table of  t_int1 with header line.
    Loop at t_int1.
    read table t_int1 with index 1.
    check ur condition----
    check each line and insert it ---work out the syntax for this
    IF t_int1-xyz = data1
    append  line of t_int1 to itab2. or try insert
    cnt = cnt + 1   -
    u will get no. of records added to next itab.
    else.
    cnt1 = cnt1 + 1 -
    u will get no. of records not added to next itab.
    endif.
    end loop.

  • Deleting other Company Code data

    Hello
    Has anyone any good experience in deleting other Company Code datas. We had in mind archiving but seems it is more like"mission impossible" due to many opened documents whivch prevent to come to the customer in order to be deleted.
    I know SAP SLO service, but it is much too expensive. Also we are not such perfectionist as they are.
    Does anyone knows some  product which could help us in this regads
    Thank you in advance
    Jan

    Hi Jan,
    You can use SAP Landscape transformation tool .Refer to SAP help for more details on the same.
    Deletion of a Company Code - Overview of SAP Landscape Transformation - SAP Library
    Additional information can be found in below SCN thread
    How to delete a Company Code with all custumizings?
    Hope this helps.
    Regards,
    Deepak Kori

  • Limiting, not blocking, Cellular Data Roaming

    I'm trying to find out a way that allows us to supply our staff with iPhones, but limit liability with regards to overseas data roaming.  The problem is probably quite common-- our staff travel a fair bit, so we have a cellular data plan that gives them a fixed cap of free of world-wide data roaming.  Our Telco isn't great at blocking the data from overrunning, as they say their info only gets updated daily, so overages could happen for an entire day before it was blocked.
    We educate the users about how to avoid going over that limit, and largely that's successful-- but occasionally, as I'm sure everyone has experienced at one point or another, someone forgets to flip the switch, or installs a new app without thinking, and then quickly they can run up a tremendous data bill.
    Is there a way in Apple Configurator, or on the device itself, where I could set up a rule limiting roaming data?  Ideally I just want to tell the Configurator "Please limit these users to 500mb roaming data per month, then turn off and lock roaming data".

    Static Vagabond wrote:
    Is there a way in Apple Configurator, or on the device itself, where I could set up a rule limiting roaming data? 
    No

  • How to delete all previous icloud data from current icloud after sighning in with the current icloud account

    so i sighned into someone elses device with the current icloud account and i sighned out. Some of the icloud data from the other device is now on mine. All i want to know is how to delete all the icloud data in my current icloud account from the other icloud account

    Hello ,
    I had the same problem and i have done everything manually.
    It's a shame that Apple doesn't put a "Reset to factory Settings" button or simply "Delete all data from iCloud.com". That way, it would be much simpler for everyone including myself.
    Winston Churchill is right unfortunately . Happy deleting !
    Kind Regards,
    Moonburn

  • Block description data in Blocked sales order

    Hi!
      Can any one tell me the blocked description data i.e. the tables that hold the blocked FAFSK field description.
    Thanks
    Imran.

    Hi
    It is the FAKSP field for block
    See the tables <b>TVFS and TVFST</b>
    following are the different reasons for blocking
    01    Calculation missing
    02    Compl Confirm Missng
    03    Prices incomplete
    04    Check terms of paymt
    05    Check delivery terms
    08    Check credit memo
    09    Check debit memo
    41    not yet completed
    42    no price agreement
    43    new price as of....
    50    Authorisation Req
    51    Rejected
    Reward points if useful
    Regards
    Anji

  • How to connect, add delete and modify sqllite data base.

    dear friends,
    i am developing a stand alone project, in that i want to
    store the datas in the local machine using sql lite. Iam new to
    Flex. i know air and flash very well.. any body can help me, how to
    connect, add, delete and modify the data in sql lite. i want to
    store users option in local machine.. i got struct up. i have to
    finish my project...pls..
    thanks and Regards,
    Syed Abdul Rahim

    Hi,
    Please find details on how to access SQL Lite database from
    AIR applications at the URL below.
    http://livedocs.adobe.com/flex/3/html/SQL_01.html
    Hope this helps.

  • Can we use idoc technique to change or delete the vendor master data?

    Hi,gurus,
    Can we use idoc technique to change or delete the vendor master data?You know we can create vendor data using idoc CREMAS03 as the receiver adapter,but when change or delete the specified vendor data,must we use RFC adapter technique?
    Another question:I found the bapi which creates a vendor master data doesn't have the parameter account group,then we turned to idoc technique.But which adapter should I use when change or delete the vendor data?
    Thanks in advance.

    Hi,
    >>>I found the field of the segment of deletion flag at different level,and very appreaciate your help.
    yes - LOEVM  - but remember this will not delete the record but only mark it for deletion
    >>>It's a long time to wait for your new blog,what new and interesting things do you find?
    at least 4 new in my head - 2 simple but important and 2 new + I'd also like to write something for XI guys about
    BO data integrator which can also work as EAI tool (BTW I know it's ETL) but how knows when they will appear
    Regards,
    Michal Krawczyk

Maybe you are looking for