Deletion in one shot.

Hi Guys,
i hava requirement after a condtion check ...if it becomes true ..i have to delete all the rows from that table.
can any body suggest me the statement which do this..
i got syntax from documentation like this.
To DELETE all the lines..
where condition must use a itab which is empty..
then u r able to delete all the lines in one shot..
But i need a simple soltuion.
any body help me plz.
i appreciate ur help in advance.

strange....
read this...
DELETE dbtab - cond
Syntax
... WHERE sql_cond.
Effect
The WHERE addition uses a logical expression sql_cond to specify which rows in the database table are deleted. The same applies to the logical expression sql_cond as for the WHERE condition of the SELECT statement. If there is no row in the database that satisfies the WHERE condition, no row is deleted and sy-subrc is set to 4. <b>If no WHERE condition is specified, all rows are deleted.</b>
Note
As of Release 6.10, specifying the WHERE condition is optional. Prior to Release 6.10, you had to specify the WHERE condition in this variant of the DELETE statement and you could not use dynamic logical expressions.

Similar Messages

  • How to delete multiple InfoObjects in one shot?

    Hello Experts,
    Is there any way to delete a bunch of InfoObjects / ODSs in one shot?
    Scenarios:
    1. We have thousands of custom IO which are no use any more and we want to get rid of these IO to save space. How to do it?
    2. We have thousands of custom ODS too which need to be deleted. We want to delete ODS which are not used any more and also the InfoObjects in ODSs which are not used by any other ODS or any other places. How do I do that in one shot?
    BTW way our BW is 3.1 version but will be upgrading soon.
    Regards,
    Mau

    Hi,
    goto RSD1 and mark the option "Free Selection of IObjs"
    Hit the Maintain button In the next screen Select your IObjs to be maintained (at this stage the system will lock the selected IObj !!)
    In the next screen mark the IObjs you want to delete
    Then Menu Characteristics / Delete (shift + F2)
    this should work.
    Alternatively, try developping an ABAP based on function module RSDG_IOBJ_MULTI_DELETE.
    hope this helps...
    Olviier.

  • Deletion of multiple sale orders at one shot

    Hi Friends,
    Can anyone tell me how to delete multiple sale orders at one shot?
    Friendly
    Rama Rao

    Hi
    Try doing it through LSMW, I used LSMW for deleting deliveries in mass and it worked
    Anurag

  • Delete a list in one shot

    Hi,
    I'm using Hibernate 3 with Oracle 10, and in my next query I delete a list of objects one by one; I was wondering if it's possible to optimize my delete method so I delete the complete set of objects in one shot instead iterating my list of retrieved objects.
    Please consider that I'm requested to maintain an ORM style so writing a delete sentence is not an option.
    Thanks a lot.
    public void deleteClientOrder(final Address userAddress, final ClientID clientID) throws HibernateException {
    HibernateCommand command = new HibernateCommand() {
    public Object execute(Session hibernateSession) {
    List<String> list = hibernateSession
    .createCriteria(ClientOrder.class)
    .add(eq("userAddress", userAddress))
    .add(eq("clientID", clientID))
    .setProjection(Projections.projectionList()
    .add(Projections.property("id")))
    .setCacheable(false)
    .list();
    for (String persistenID : list) {
    ClientOrder tmp = (ClientOrder) hibernateSession.get(ClientOrder.class, persistenID);
    if (tmp != null) {
    hibernateSession.delete(tmp);
    return null;
    }

    TopLink provides bulk delete operations.
    JPA:
    em.createQuery("DELETE FROM Employee WHERE firstName LIKE 'D%' AND address = :ADDRESS")
         .setParameter("ADDRESS", address)
         .executeUpdate();Native:
    DeleteAllQuery query = new DeleteAllQuery(Employee.class);
    ExpressionBuilder eb = query.getExpressionBuilder();
    Expression fnExp = eb.get("firstName").like("D%");
    Expression aExp = eb.get("address").equal(address);
    query.setSelectionCriteria(fnExp.and(aExp));
    uow.executeQuery(query);Doug

  • Delete all rows on VO at one shot

    Hi,
    I have a VO based on an EO. Now once I get a VO I could see that there are 2 methods:
    1. removeCurrentRow()
    2. remove()
    removeCurrentRow() would delete the current row and also the related row of the table associated with the EO.
    Is remove() the methods to remove all the rows linked to the VO or is there any other method. what does remove() do if not deleting the rows at one shot.
    Thanks,
    Kalyan.

    <p>
    Use this method in your Application Module:
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">public void removeAllRows(){</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   ViewObject vo = getYourViewObject();</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   vo.executeQuery();</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   while(vo.hasNext()){</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">       Row r = vo.next();</font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">       r.remove();
    </font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   } </font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">   getDBTransaction().commit;
    </font></strong>
    </p>
    <p>
    <strong><font face="courier new,courier" size="2">}</font></strong>
    </p>
    <p>
    Kuba
    </p>

  • How do i deleting many backup on one shot ? (Bulk deleting backup)

    Hello,
    I looking for any method for removing old backup on one shot.
    Anyone already done it ?
    Thanks
    Guy

    In the vsphere web client you can go to the restore tab and select multiple backups to delete within each client.  So if you have multiple points in time for one client to delete its quick.  If you want to delete multiple clients backups I'm not aware of a quick way.
    You could script the delete using mccli but it would require some knowledge about how it works that is not documented by vmware and would not be for the faint of heart.  I highly doubt mccli is fully supported by vmware so use at your own risk.  Even if it was supported it would probably still be quicker to delete each backup in the the VDP webclient.  Thinking way outside the box one possible work around would be to create a new VDP appliance and replicate the backups you want to save to it then delete the old appliance.  Although you would probably have to recreate all your backup jobs on the new appliance so I doubt its what your looking for.

  • NEW DEBUGGER: How to delete selected rows is one shot

    Hi Specialists,
    I have a small question. While debugging a program I have an internal table having 300 records .
    Now I wish to delete 290 records during debugger session in one shot instead of choosing 1 by one.
    Is there way I can select & do .
    I searched but could not locate "SELECT ALL " button.
    -Abhinav.

    Hello here is one example
    please follow this formula.
    here selection is in terms of 
    itab-mblnr = itab1-lfbnr.
    itab-zeile = itab1-lfpos . "
    and system delete selected row of itab using
    "DELETE TABLE itab FROM itab."
    IF sy-subrc = 0.
      itab-mblnr = itab1-lfbnr.
    itab-zeile = itab1-lfpos .
      DELETE TABLE itab FROM itab.
      endif.
    Edited by: riten patel on Feb 12, 2010 11:33 AM

  • Safari crashing while deleting emails one at a time

    Once again I am having trouble with deleting unwanted emails. Recently, one of the Apple updates changed the home page that I see my Mobile Me mail on. I can no longe click on "select all" and then delete them all in one quick shot. Now, I must delete them one at a time... which sometimes causes Safari to crash! The last time I posted this problem, I got a lot of snide comments that mobile me has never changed the mail page. I beg to differ. Before the last round of Safari updates, There was a box for "actions" when clicked it offered choices.... including, "select all." Well, that choice has been deleted. Any one know what I am talking about?
    I am using the Safari forum, because the trouble started with Safari's latest round of updates, which effected mobile me's mail page, that I can only access through Safari. If I am mistaken, perhaps someone can direct me elsewhere.

    Hi
    You can now use the same keys as you would for mail (or files) on your Mac - click on the first and shift-click on the last, or click on one message and click cmd-A to select all. Then use your keyboard delete key to delete them.
    Matt
    Message was edited by: Matt Clifton

  • TS1574 My apple macbook pro retina 15'' ME664 has problems with sound.Either there will be no sound at all or at startup there il be very scary and broken sound and afterwards still there would be no sound.Secondly , it does not start in one shot.

    My apple macbook pro retina 15'' ME664 has problems with sound.Either there will be no sound at all or at startup there il be very scary and broken sound and afterwards still there would be no sound.Secondly , it does not start in one shot.atleast 2 to 3 times pressing power button for longer time starts it up and afterwards still there will be no sound. Please help

    This morning i was not able to hear sound on my recently purchased  macbookpro retina 15 inch model.My attempts to resolve this issue by going to system preferences and removing the mute box that was ticked as active. i had downloaded much earlier a mac version of logmein app and noticed that in the sound  box noted above that there was a bar indicating that the default was now to logmein. i had never used this app. Why it started today, i have no idea. I moved the logmein application to trash and deleted the app , however it did not remove the default option which still blocked the sound.
    Going to a macforum gave the tha anser that to remove the logmein app, it first had to be reinstalled a nd them use the uninstaller option ftrom the dropdown menu. for now that has resolved the failure to allow sound oputput.

  • How to copying all pages at one shot?

    Does anybody know of a way of copying all pages at one shot, under a tabset in an application in a workspace to another application in the same workspace instead of doing it page by page?

    There is no Select All option, but you can do it a little faster than opening each email and tapping the Trash icon. In the top rightcorner of the list of email is an edit button. Tap Edit.
    You can then tap each email in the list to select it for deleting and then tap the Delete button at the bottom of the list.
    These screenshots are from my iPad, but it works the same on my iPhone.

  • Somehow I've created 6 color corection tabs for one shot and it's playing havoc - any suggestions? Thx!

    Somehow I've created 6 color corection tabs for one shot in FCE, can't seem to delete tham and it's playing havoc - they seem to be overlaying one another giving a dreadful colour balance - any suggestions? Thx!

    Either:
    Right click on clp in TL and select reove attributes>Filter
    or
    Open clip in Viewer, Click on Filter tab. In Nemeric view, far left for each filter, select and hit delete.
    Good luck.
    Russ

  • Initialize all context values at one shot

    Hi,
    Is there a way i can initialize all the context values of a view. I mean when i click "Reset" all the values should be cleared at one shot instead of setting each value attribute to space.

    Hi Aditya,
    Whether you use wdContext.invalidate() or wdContext.reset(), all the elements of the entire context will be deleted and hence the table will be disbaled since it's datasource node has no elements. Each row of a table corresponds to an element in it's datasource node. If you create n elements for the node, those many rows will be enabled. So when you remove all the elements of the node, all the rows of the table will also be disbaled. So you have two options here:
    1) After removing the elements, create as many of them as required with the default values.
    2) Instead of removing the elments, explicitly access each attribute and set it's value to null or space. It will involve just a for loop:
    IPrivate<View_name>.I<node_name>Element elmt;
    for(int i=0;i<wdContext.node<node_name>().size();i++)
    elmt = wdContext. node<node_name>().get<node_name>ElementAt(i);
    elmt.set<parameter1>("");
    elmt.set<parameter2>("");
    Hope this helps,
    Best Regards,
    Nibu.
    (Please take care to close your solved problem's threads by awarding appropriate points . If you haven't got a solution for your problems, please update the forum on their status. Kindly consider awarding points for helpful answers on SDN !)

  • How to delete the one of cost centers in Splitting Structure(OKEW)?

    Dear All,
    I have a question about Splitting Structure as below? Could I get favor from you? Thanks a lot.
    How to delete the one of cost centers in Splitting Structure(OKEW)?
    Jocha

    Hi Chang
    Welcome to SDN! Its our pleasure to help you here
    Step 1: Select your Cost Center in OKEW which is assigned to the Splitting Str
    Eg: Cost Ctr 1001 is assigned to Splitting Str Z1... Tick the Check box against 1001 under Z1 Splitting Str
    Step 2: Do a Single Click on the text "Non Assigned Cost Centers"
    Step 3: Press Shift +F6 (Or Click on the Assign Button, next to the Pencil icon)
    Br, Ajay M

  • How do I copy photos from my Mac to my iPad without deleting the ones that are there?

    I understand how to sync photos from my iPhoto library to my iPad. I want to copy photos from my Mac to the iPad without syncing, because syncing deletes everything on the iPad that isn't included in my sync selections. In addition,I have several iPhoto libraries and want to copy photos from each of them to the iPad. A further issue is that apparently photos can be synced from only one computer to the iPad -- how would I copy photos from a different computer? (What happens when I buy a new Mac?) I am extremely experienced with Mac, iPhoto/Aperture, iPad, etc. A year or two ago I transferred 1000 photos to the iPad but I don't remember how, and it was probably done with my previous Mac. Now I just want to add some recent photos without deleting the ones that are there. Bottom line: is there a way to add photos to an iPad without syncing and losing what's there?

    You can still sync the photos and keep the photos that are already on the device. You have to include all of the albums or events in the pictures folder that you sync from. If you are using iPhoto, select that in the Sync Photos from drop down menu and then select all of the albums or events that you want to sync. Make sure to check Selected Albums, events, faces and automatically include (no events). Using that option will allow you to choose exactly which albums and events to sync.
    You have to remember that all photos must be included in every sync so you cannot sync photos from iPhoto today and then try to sync photos from another folder tomorrow, or you will erase all of the photos that were synced from iPhoto. You need to maintain one main Photos syncing folder for the photos that you want to transfer to the iPad. You can have subfolders within that one main folder and you can selectively sync those subfolders. You just have to place all of the photos that you want to sync into one main iPad syncing photos folder.
    There are WiFi transfer apps that allow you to transfer photos to the iPad without having to sync with iTunes. I use this one. This app (and others like it) will allow you to use multiple computers to transfer photos.
    Wireless Transfer App Easily send photos to iPhone/iPad ...

  • Close all the open Application in one-shot ?

    Is there are any way to close all the open application in one shot in ipad rather than double-click the home button and close the apps one by one.

    In principle, I agree with you...
    But it appears that reality is not perfect. I observed on iPhone 3 that memory could be pretty clogged from time to time and I needed to restart it to free up memory and get it back to original speed again. It all depends on which apps you are running. Some appears to eat more memory than others. On iPhone 4, it appears to be less of a problem and I have seen that later iOS releases also makes this less of a problem. I only have a first generation iPad, but I have seen that later iOS releases have improved memory handling significantly there as well. However, it appears to be a good idea to reboot the device after a week or two just to flush the memory. I can't prove this theory scientifically, but I do see a difference in memory usage when doing this.
    The reason I actually tried "Process Killer" was a tip that it addressed the problems many of us encountered with the first iOS 5 release: frequent crashes and slow performance. After the pretty quickly released iOS 5 update, that wes pretty much solved, but occasionally killing processes actually helped me at that point, It made both my devices more stable.
    The original question was about battery performance, there I don't think that the amount of processes running is the key. A much better way of getting more out of your battery is shutting off location services in apps where they are not really needed. I would guess that turning off push notofications for as many apps as possible helps as well.
    Also, turn off the Personal Hotspot on iPhone when it's not needed!

Maybe you are looking for