Mass delete WHERE in RANGE TABLE??

hi
is it possible to do mass delete from a custom table
       DELETE ZDATABi WHERE FIELD1 in RANGE_FIELD1
i don't want to select in ZDATABi INTO AN_ITAB where field in  RANGE_FIELD1 then use that same AN_ITAB again
<removed>
Edited by: Thomas Zloch on Mar 17, 2010 12:43 PM

Hello Newbie,
Why don't you try it out yourself ? There is nothing in the SAP documentation which states that you cannot.
BR,
Suhas

Similar Messages

  • Mass delete incorrect entries in TimeEvent table

    Hi All
    Please if any body can help out, we have an interface for uploading time entires (time IN and time out) into SAP. By mistake some wrong entries are uploaded in the system, we can delete entries one by one using PA61 list entry. but is there any way of mass deleting these entries for all the relevant employees for infotype 2011 (timeevent table).
    Thanks for your help in advance
    C

    Hi C,
    should you not have authorisation to use &sap_edit,please use debugger and please find the steps below
    1. SE11->Data dictionary ->
    2. Choose the table entry
    3. After choosing the table entry ,enter /h and press enter  to start the debugger session(debugger switched on) message will populate in the status bar. after you enter /h and message gets populated, press enter one more time
    4.place a breakpoint in end form.to place breakpoint,just double click and red button pops up near the line .to remove just double click or shift+f2
    5.now double click on the line which says code=show and it will move to the variable on the right hand side
    6.now click on the pencil and icon will change to view
    7.now if you want to insert choose INSR or DELE based on what you are trying to do with table entries.i m trying to insert values.
    8.now click f8
    And you wll be able to do the amendments
    http://www.blogger.com/posts.g?blogID=851689076743960139&searchType=ALL&page=1
    hope it helps
    No Worries
    KG
    Edited by: SAPenjoy:) on Aug 29, 2010 12:59 PM

  • Deleting data from a table where there are no indexes on the table

    Hi
    We have one interface program for one time process.When I was testing the process it was taking too much time to load the data around 1000 records.
    it happens in 2 steps
    1 puts into stage table
    2 puts into base table
    in the process/package I have delete statement that deletes data from stage table before each process.
    Stage table did not have any indexes but the base table has(obvisiosly)
    any idea?
    please help me on this.
    Thanks,
    Y

    Hi,
    Please post the application/database details along with the OS.
    Is this interface program a seeded or custom one?
    Please enable trace on this concurrent program as per (Note: 296559.1 - FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12) and generate the TKPROF to find out why it takes that long to load/delete the data.
    Thanks,
    Hussein

  • Mass deletion of document number ranges intervals for several company codes

    Dear experts,
    We are running version ECC6 and are about to go-live a lot of company codes simultaneously. We would like to delete satndard number ranges intervals for these company codes.
    Is there a way to delete the number ranges intervals (which have not been used) for several company codes at the same time ? I'm looking for a transaction or a program similar to OBH1 (used for the creation of number ranges ).
    Thanks in advance for your help.
    Best Regards,
    Steven

    Hi
    I am also not aware of such T.code to delete number ranges for a company code.
    Alternatively, you can go to FBN1 in change intervals mode.
    From the Menu Select all and Press Shift + F2 (Delete interval).
    Ofcourse, this have to be done individually for each co. code.
    Regards

  • Problem with a mass delete operation

    Hello,
    This questions concerns Oracle v10g.
    A table is used to record user login information and other connection related details such as IP address, date of connection, time of login, time of logout etc. from a web-based application.
    This table becomes quite large (3 million records+) and is purged once per month of all records older than 3 days old.
    The purge is done with a simple delete based on the date of connection CDAT and the column DISX (disconnection=True/False)
    DELETE FROM LOGTAB where CDAT < sysdate-3 and DISX='T';The columns CDAT and DISX are indexed. This delete operation can tale up to 10 minutes.
    Sporadic problems arise during this delete operation when users connect or disconnect : for those users trying to disconnect, the resulting UPDATE operation on the table currently being deleted seems to hang.
    For the users trying to login, there can be a delay (as the INSERT is in suspense). In the worst case all sessions become blocked until the DELETE is finally commited thus rendering any connection impossible for the duration.
    There is no conflict between the data being deleted and the data being UPDATED or INSERTED.
    The DELETE should only lock the rows that match the WHERE clause, so where is the contention arising from? Could this be index contention?
    Is there a better way to manage such mass deletes on such high transaction tables? Partitions?
    Thank you in advance.

    Have you considered partitioning this table? It would of course depend on whether most queries are looking at the columns you mention, but it would mean you could truncate the partitions older than 3 days ...
    create table LOGTAB
    (   cdat        date not null,
        disx        varchar2(1) not null,
        col1        varchar2(100)
    PARTITION BY RANGE (cdat)
    SUBPARTITION BY LIST (disx)
    SUBPARTITION TEMPLATE
        (   SUBPARTITION sptn_T VALUES('T'),
            SUBPARTITION sptn_Default VALUES(DEFAULT)
    (   PARTITION ptn_20110808 VALUES LESS THAN (TO_DATE('09/08/2011','dd/mm/yyyy')),
        PARTITION ptn_20110809 VALUES LESS THAN (TO_DATE('10/08/2011','dd/mm/yyyy')),
        PARTITION ptn_20110810 VALUES LESS THAN (TO_DATE('11/08/2011','dd/mm/yyyy')),
        PARTITION ptn_20110811 VALUES LESS THAN (TO_DATE('12/08/2011','dd/mm/yyyy')),
        PARTITION ptn_MaxValue VALUES LESS THAN (MAXVALUE)
    insert
    into
        LOGTAB
    SELECT
        TO_DATE('08/08/2011','dd/mm/yyyy'),
        CASE
            WHEN mod(rownum,2)=0 THEN
                'T'
            ELSE
                'S'
        END,
        'Blah'
    FROM
        dual
    CONNECT BY
        LEVEL <= 10
    insert
    into
        LOGTAB
    SELECT
        TO_DATE('09/08/2011','dd/mm/yyyy'),
        CASE
            WHEN mod(rownum,2)=0 THEN
                'T'
            ELSE
                'S'
        END,
        'Blah'
    FROM
        dual
    CONNECT BY
        LEVEL <= 10
    insert
    into
        LOGTAB
    SELECT
        TO_DATE('10/08/2011','dd/mm/yyyy'),
        CASE
            WHEN mod(rownum,2)=0 THEN
                'T'
            ELSE
                'S'
        END,
        'Blah'
    FROM
        dual
    CONNECT BY
        LEVEL <= 10
    insert
    into
        LOGTAB
    SELECT
        TO_DATE('11/08/2011','dd/mm/yyyy'),
        CASE
            WHEN mod(rownum,2)=0 THEN
                'T'
            ELSE
                'S'
        END,
        'Blah'
    FROM
        dual
    CONNECT BY
        LEVEL <= 10
    SQL> select * from logtab where cdat=to_date('08/08/2011','dd/mm/yyyy');
    CDAT      D COL1
    08-AUG-11 T Blah
    08-AUG-11 T Blah
    08-AUG-11 T Blah
    08-AUG-11 T Blah
    08-AUG-11 T Blah
    08-AUG-11 S Blah
    08-AUG-11 S Blah
    08-AUG-11 S Blah
    08-AUG-11 S Blah
    08-AUG-11 S Blah
    SQL> select table_name,partition_name,subpartition_name from user_tab_subpartitions;
    TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME
    LOGTAB                         PTN_20110808                   PTN_20110808_SPTN_DEFAULT
    LOGTAB                         PTN_20110808                   PTN_20110808_SPTN_T
    LOGTAB                         PTN_20110809                   PTN_20110809_SPTN_DEFAULT
    LOGTAB                         PTN_20110809                   PTN_20110809_SPTN_T
    LOGTAB                         PTN_20110810                   PTN_20110810_SPTN_DEFAULT
    LOGTAB                         PTN_20110810                   PTN_20110810_SPTN_T
    LOGTAB                         PTN_20110811                   PTN_20110811_SPTN_DEFAULT
    LOGTAB                         PTN_20110811                   PTN_20110811_SPTN_T
    LOGTAB                         PTN_MAXVALUE                   PTN_MAXVALUE_SPTN_DEFAULT
    LOGTAB                         PTN_MAXVALUE                   PTN_MAXVALUE_SPTN_T
    10 rows selected.
    SQL> alter table logtab truncate subpartition PTN_20110808_SPTN_T;
    Table truncated.
    Elapsed: 00:00:00.03
    SQL> select * from logtab where cdat=to_date('08/08/2011','dd/mm/yyyy');
    CDAT      D COL1
    08-AUG-11 S Blah
    08-AUG-11 S Blah
    08-AUG-11 S Blah
    08-AUG-11 S Blah
    08-AUG-11 S Blah
    Elapsed: 00:00:00.00Not sure if it's suitable for you or not but it could be an option...
    HTH
    David

  • Mass deletion of parked LIV invoices

    Hey Guys:
    I want to Mass delete the parked EDI LIV invoices. I have implemented note <b>971193 - FIPP: Mass deletion of parked documents</b> which is pulling data from FBV0...which is not the place where parked EDI LIV invoices are in.
    I have found a table RBKP which is having my parked LIV invoices document numbers.
    Can some of you give me a solution from where exactly we can mass delete these parked LIV invoices which have not touched the F1 yet.
    Thanks
    Gitaa

    hi Gita,
    If you want to Mass reversal then go to Tcode F.80.
    Thanks
    Ranjit

  • Mass delete the parked EDI LIV invoices

    Hey Guys:
    I want to Mass delete the parked EDI LIV invoices. I have implemented note <b>971193 - FIPP: Mass deletion of parked documents</b> which is pulling data from FBV0...which is not the place where parked EDI LIV invoices are in.
    I have found a table RBKP which is having my parked LIV invoices document numbers.
    Can some of you give me a solution from where exactly we can mass delete these parked LIV invoices which have not touched the F1 yet.
    Thanks
    Gitaa

    Have you tried Mir4

  • Mass Deletion of Sales Orders

    Hi Gurus,
       I have some unused old sales orders which  affects the MRP run , to rectify this we want to delete or archieve the old SOs. How to do Mass deletion or Archieve the unused SOs?
    Kindly help to resolve .
    Thanks in Advance,
    Regards,
    Joseph

    hello again, Joseph.
    until someone comes up with a standard solution, i believe what ABAP will do is to come up with a customized table that will show all sales orders with status 'not yet processed' (from table VBUK) within a date range.  when the list is called, you will be enable to enter a value in the field 'reason for rejection' (field name ABGRU).
    when you have entered a reason for rejection, the sales orders are effectively closed (completed) and a subsequent transaction based on these orders cannot be done.  you can ask ABAP to use an available user exit to further prevent the re-opening of these orders.
    regards.

  • Mass Delete of Unreleased Transports

    Mass Delete of Unreleased Transports
    Hi,
    I have to delete ~2000 unreleased transports.  Could you advise any way to mass delete transports?
    Regards,
    Vivian

    Hi Vivian,
    When you go to Transaction code : SE10, in the menu you find an option 'delete' ,where it prompts you to palce cursor on a particular request and then delete ....but its quite complicated for thousands of records ...for that u can go to delete and enter your range of transport requests which you want to delete.
    Hope it helps u to solve the issue.
    Regards,
    Hema.

  • CC 5.2_09 Rule Architect Tab - Risks - Delete .... Mass Delete Option?

    I have an opportunity where I'd like to mass delete my risks and rules and reload them.  During an SP update, our Basis team appended to our rules with the SAP "out-of-the-box" rules.  I'd like to get to the point of deleting everything (rules and risks) and start over.  Does anyone have an option available to do this so that I can reload everything from scratch?  We only have CC/RAR and FF/SPM in use right now, so no other module will be affected.
    Thanks,
    Greg

    If you want to remove ALL CC data, you'll have to remove all data from all CC tables in SQL.  If you only want to remove select amounts of data, you might want to open an SAP ticket to get the most updated script for your release and flavor of SQL, but here's a sample script:
    DELETE FROM SAPSECDB.VIRSA_CC_ACTRULE
    DELETE FROM SAPSECDB.VIRSA_CC_ALLASTRUN
    DELETE FROM SAPSECDB.VIRSA_CC_ALLISTDTL
    DELETE FROM SAPSECDB.VIRSA_CC_ALTCDLOG
    DELETE FROM SAPSECDB.VIRSA_CC_AUTHMAP
    DELETE FROM SAPSECDB.VIRSA_CC_CRACT
    DELETE FROM SAPSECDB.VIRSA_CC_CRACTT
    DELETE FROM SAPSECDB.VIRSA_CC_CRPRM
    DELETE FROM SAPSECDB.VIRSA_CC_CRPROF
    DELETE FROM SAPSECDB.VIRSA_CC_CRPROFT
    DELETE FROM SAPSECDB.VIRSA_CC_CRROLE
    DELETE FROM SAPSECDB.VIRSA_CC_CRROLET
    DELETE FROM SAPSECDB.VIRSA_CC_DATAEXD
    DELETE FROM SAPSECDB.VIRSA_CC_FLDMAP
    DELETE FROM SAPSECDB.VIRSA_CC_FUNCACT
    DELETE FROM SAPSECDB.VIRSA_CC_FUNCPRM
    DELETE FROM SAPSECDB.VIRSA_CC_FUNCSYS
    DELETE FROM SAPSECDB.VIRSA_CC_LASTRUN
    DELETE FROM SAPSECDB.VIRSA_CC_LSYSGRP
    DELETE FROM SAPSECDB.VIRSA_CC_ORGUSERS
    DELETE FROM SAPSECDB.VIRSA_CC_PRMRULE
    DELETE FROM SAPSECDB.VIRSA_CC_SUPP_DET
    DELETE FROM SAPSECDB.VIRSA_CC_SUPP_HDR
    DELETE FROM SAPSECDB.VIRSA_CC_SUPP_TEXT
    DELETE FROM SAPSECDB.VIRSA_CC_SYSCRACT
    DELETE FROM SAPSECDB.VIRSA_CC_SYSHMAP
    DELETE FROM SAPSECDB.VIRSA_CC_SYSRULE
    DELETE FROM SAPSECDB.VIRSA_CC_SYSSAPOBJ
    DELETE FROM SAPSECDB.VIRSA_CC_SYSUSR
    DELETE FROM SAPSECDB.VIRSA_CC_TEXTKEY
    DELETE FROM SAPSECDB.VIRSA_CC_USRMAP
    DELETE FROM SAPSECDB.VIRSA_CC_XSRULEMAP
    DELETE FROM SAPSECDB.VIRSA_CC_XSYSGRP
    DELETE FROM SAPSECDB.VIRSA_CC_SYSTEM
    DELETE FROM SAPSECDB.VIRSA_CC_SYSTEMC
    DELETE FROM SAPSECDB.VIRSA_CC_SYSTEMT

  • Mass Deleting Supporting Documents

    Hi,
    We have over 6000 WMF loaded as supporting documents. We had problem in displaying those WMFs and had to convert them to JPGs and loaded all those JPGs to PLM. Since we don't need all of those WMFs now, how can we delete them in mass.

    Hi
    The function of mass deleting supporting documents is not available. But you can generate scripts to get mass deleting done.
    Due to that I don’t know the exact objects you want to delete, only valuable scripts can be supplied.
    Suppose you want to delete supporting documents, whose pkid starts with 1014, you need to generate following scripts:
    delete DrlAttachmentReference where fkOwner in (select a0.pkid from attachments a0 where a0.fkSpec = '1014351bc57a-1c92-4bd3-ad8f-e9d0ee4e594d');
    delete attachments where fkSpec = '1014351bc57a-1c92-4bd3-ad8f-e9d0ee4e594d';
    delete gsmProductFactSheet where fkSupportingDocument = '1014351bc57a-1c92-4bd3-ad8f-e9d0ee4e594d';
    delete from gsmSupportingDocAttributes where fkAttrParentID = '1014351bc57a-1c92-4bd3-ad8f-e9d0ee4e594d';
    delete SupportingDocuments where pkid = '1014351bc57a-1c92-4bd3-ad8f-e9d0ee4e594d';
    Note: 1014351bc57a-1c92-4bd3-ad8f-e9d0ee4e594d is a sample pkid in my local server. In your case, it should be replaced by the supporting document’s pkid you want to delete.
    With current spec, you can get all supporting documents’ info easily from table SupportingDocuments:
    select * from SupportingDocuments
    where fkSpec='CurrentSpecPKID '
    Please backup your DB before you run any script.
    Thanks,
    Sherry

  • Mass deletion of POs

    Hi,
    I want to delete POs for particular materials at item level in mass.
    Means suppose in one PO we have 4 materials at item level as 10,20,30,40.
    And I want to delete PO items for 10 and 30 for one PO and for another 20 and 40.
    Then how to do this in MEMASSPO transaction as there I have not found any combination of POs with item levels.
    We will have to enter POs and item levels separately which will may pick materials that I donu2019t want to delete in the particular PO.
    Please assist me how to tackle this issue.

    Hi:
    You can do the mass deletion in MEMASSPO traxn code however in your case you wanted to delete some of the items in the PO and which will different in different PO's i.e. item 10 and 20 in PO no X and item 40 and 60 in Y PO. So you have two options:
    1.MEMASSPO: Mass deletion
    Here you select the "Purchase Order item" in tables tab,then you would enter the PO document numbers,system will lists all items in the PO however here you have to manually remove the all other line items which you  don't wanted to delete,this is lot of manual work too.
    2.WRITE "BDC":
    You can have a BDC which would select the PO range as well as the PO line item numbers form the XLS file.
    I would suggest you to go with BDC for this mass deletion.
    Hope it would help you.
    Cheers
    Rahul
    Awards plz.if helpful.

  • HR - delete rows from internal table

    Hello everyone,
    First of all sorry for my bad english.
    I am programming in the HR module. My program has a selection-screen where the user enters a date.
    In my program I do GET pernr, and my declared infotypes automatically get their data.  The thing is, now I want to delete the rows that do not correspond to the date in the selection screen.
    My date is stored in a range.
    thanks in advance

    For example try like this,
    delete itab where lgort not in r_lgort[].
    or you can loop the internal table and process the records which matches the date in the range table.

  • Mass delete records in SAP

    Hi,
    I am just wondering if anyone can tell me how to mass delete the record in SAP. I mistakenly uploaded like 500 values in a wrong table and want to delete them.
    Thank you in advance,
    Sunny

    Hi,
    If u want to delete records in ZTEST table.
    Then u can do as
    Select * from ztest into table i_ztest.
    if sy-subrc = 0.
    Delete ztest from TABLE i_ztest.
    endif.
    Or if u have any dtae field in the table can do as
    TABLES SBOOK.
    DELETE FROM SBOOK WHERE CARRID = 'LH'      
    similarly u can give the where conditon with the specified date.
    Do a COMMIT after u delete.
    Also check
    http://help.sap.com/saphelp_46c/helpdata/en/7e/c81e1f52c511d182c50000e829fbfe/frameset.htm
    http://www.sapdevelopment.co.uk/abap/bypass/bp_updtable.htm
    Thanks & Regards,
    Judith.

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

Maybe you are looking for