Better Delete Logic??

Hi All,
I have requirement to write a function module to delete records from 125 Y(custom) tables
This is my scenario.
delete from y100 where docno eq v_docno.
if sy-subrc eq 0.
  delete from y101 where docno eq v_docno.
  if sy-subrc eq 0.
     ......... " Keep this loop all remaining 125 tables
  else.
    rollback.
else.
  rollback.
endif.
I know i can do this using lot of IF statements, I want know any other better way to do this?
Please don't suggest to use lot of IF statements.

Hi ARS,
May we can do this way.
v_table = 'Y100'.
do 25 times.
  delete from v_table where docno eq v_docno. 
  if sy-subrc ne 0. 
     flag = 'X'.
     exit.
  endif.
v_table = v_table + 1.
enddo.
if flag = 'X'.
rollback.
endif.
Ali.

Similar Messages

  • How to delete logical component

    How to delete logical component in solution manger 4.0
    Am deleting one system eatery in landscape components that time giving one warning?
    Is there any option for deleting logical components?
    Please give any solution for deleting system& logical components
    Warning is
    (Delete a system despite use
       You want to delete the system PRD, but it is still being used.
       You cannot delete the system as long as it is still used in logical
       Components. The where-used list tells you the logical components which
       Use the system. To delete the system, remove it from all logical
       Components first.
       You can only delete the system if it is used in system groups. The
       Where-used list tells you which system groups use the system.
       Warning
       If you delete the system despite use in system groups, you can no longer
       Access it in applications (e.g. in the Project Administration, if it is
       Used in a system group of type Project Landscape).

    Dear Kiran,
    Firstly find out where the system PRD has been added as an Logical System in an Logical Component. Remove the assignment and you should be able to delete the System.
    Similarly for deleting an Logical component find out which solutions are referring to the logical component and deassign the Logical Component from the Solutions. You can then safely delete the Logical Components.
    You can use the Where Used List button which looks like 3 arrow starting from an single point to different directions to find out the assignments.
    Hope that this helps .
    Regards
    Amit

  • Can I delete logic pro 9 and keep all the loops for logic pro X

    I am running out of space on my computer and I want to delete as much as I can. I need to know if i delete logic pro 9 will i lose all apple loops for logic pro X.

    This is not the right forum for your question.
    Re-post the question here.
    Russ

  • If I delete logic pro 9 will I lose all the loops for logic pro X?

    I want to make space on my computer and right now I have logic 9 and logic X both installed. I think I heard somewhere that if you delete Logic 9 than you delete all of the loops in Logic X, is this true?

    If you mean... delete the Logic Pro 9 app then no you wont lose any loops... However, the LP9 app is small and really won't save you that much space if you delete it..
    If you mean uninstall Logic Pro 9 plus all it's content after installing LPX then yes, you could lose some loops/content because the LPX installer takes notice of any LP9 content you have already installed.
    In otherwords, don't try and uninstall LP9 and it's content after installing LPX

  • How to Delete Logic Pro X Additional Content

    Is there Anyone out there who knows how to delete the additional content on Logic pro X once it has been installed.
    These are the following things I have tried:
    I have tried uninstalling Logic pro X - No result - The space the additional content took up is still taken up. (by what I don't know)
    I have read every possible article on the matter - Still No Result -
    I have tried using AppCleaner to delete Logic Pro X - No Result - Logic pro X is deleted but the additional content still remains.
    I even went as far as using my time machine to back up the information on my laptop - to see if it would back up the 50GB worth of date - Guess what - It did back it up. but its no where to be found on my HD.
    The additional content takes up 50GB+ worth of space and for some reason won't GO AWAY!!!
    SOMEONE HELP ME PLEASE!!

    I have read every possible article on the matter - Still No Result -
    A simple google search for " Where is Logic Pro's additional content stored " brought up the info almost instantly.....
    The content is stored in multiple locations...
    Where is Logic pro additional content stored?
    Thanks to CCT & viento10 for the info......

  • Getting Back Deleted Logic Folder

    Hi. I need help bad!!!! A friend used my mac and in deleting some picture files, he accidently highlighted my logic folder and deleted it. He also cleared the recycle bin.!!
    Is there any way for me to get back my folder? I have/had a LOT of songs in the folder and I'm devastated.

    Sorry to see your problem. The advice here is good.
    For the future, I strongly recommend regular backups of projects to CD or DVD, it might seem an expensive ongoing cost, but data recovery servics are very expensive. you could have burned 400 to 500 DVDs for what that kind of recovery could cost you.
    For the future i recommend the following:
    Keep your Logic projects in your user Music folder.
    create a new user account for anyone who uses your computer and don't let anyone log on in your name.
    If you want to share work with someone else on your machine put a copy in your public folder, log out and let them pick up the copy. That way no-one but you ever gets into your user account.
    Yowever much you trust someone they can make mistakes. Itf you erased your own Logic folder you would kick yourself, but this kind of thing can put friendships under severe strain. To me this is not a matter of trust but of common sense.
    Out of interest though, how did he delete Logic files when he was deleting photos? Surely they are not in the same folders. Did you have everything in your documents folder?

  • Deleting Logic 9 after logic X

    I just installed Logic X and downloading extra content. Is it ok to delete Logic 9 now

    yes.
    however It's definitely okay to use both programs on the same machine, especially if you work with 32-bit plugins.

  • Delete Logic Studio 8 after upgrade to 9?

    I just upgraded Logic Studio 8 to 9. When I now look in my Applications folder, I see:
    Logic Node 8.app
    Logic Node.app
    Logic Pro 8.app
    Logic Pro.app
    Also:
    MainStage1.app
    MainStage.app
    Should I have uninstalled 8 prior to installing 9? I want things as cleaned up as possible.
    Thanks.

    As we say here 'The only one thing for sure is Copernicus's death'. You can of course delete the L8 related apps to make room on your disk with no harm to your installs, but... If you encounter problems with older projects behaving oddly with l9, don't blame us. Leaving the apps will do no harm or problem, as Mike said. I found that autofilter sounds different in one project opened in L9 and L8 for comparison. For now, that's the only issue I encountered. If I were you I would have deleted something else instead. For example look in your mail folder and clean it up (don't forget to rebuild mailboxes afterwards). Mine oscilates by 1GB but when I find some time I bet it can be reduced by half.
    Message was edited by: samplaire

  • Which one is better (Delete Or Trim) in a collection

    Hi All,
    I want to know whether Delete is better or Trim is better when we are using Nested tables.
    In Oracle doc it is mentioned that Delete will remove the data but the place holder will be there, where as TRIM will remove the placeholder also.
    Does this mean we can conserve memory more when we use TRIM rather than DELETE.
    Appreciate your valuable response.
    Thanks,
    MK.

    Text from documentation
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/collection_method.htm
    DELETE
    This procedure has three forms. DELETE removes all elements from a collection. DELETE(n) removes the nth element from an associative array or nested table. If n is null, DELETE(n) does nothing. DELETE(m,n) removes all elements in the range m..n from an associative array or nested table. If m is larger than n or if m or n is null, DELETE(m,n) does nothing.
    TRIM
    This procedure has two forms. TRIM removes one element from the end of a collection. TRIM(n) removes n elements from the end of a collection. If n is greater than COUNT, TRIM(n) raises SUBSCRIPT_BEYOND_COUNT. You cannot use TRIM with index-by tables.TRIM operates on the internal size of a collection. If TRIM encounters deleted elements, it includes them in its tally.
    Usage Notes
    In general, do not depend on the interaction between TRIM and DELETE. It is better to treat nested tables like fixed-size arrays and use only DELETE, or to treat them like stacks and use only TRIM and EXTEND.

  • How much better is Logic Pro?

    Would it be a real disadvantage to get logic express over Logic, i mean has it still got all the loops, synths, drum machines and actual audio recording capabilities?
    Thanks

    Pro is much better imo, but depending on your budget and needs you might not need it. What I did was to purchase Logic Express first, learned it, liked it and then upgraded from Logic Express to Logic Pro once I found that I wanted the plugins and some options found in pro, this winter. That's a good route since it doesn't cost much more (Express$ + Upgrade$ ~= Pro$) and allowed me to have a much better idea for why I wanted Pro. I might have chosen not to buy it if I found so, but I did (and a the extra time accumulating money helped :-))

  • BD54 not allowing to delete logical system

    Hi,
    We did system refersh from Prod to Quality and further we found that while starting BDLS it was not allowing to do so. We got message like <Target> logical system already existing . Further checks revealed that in BD54 that our quality system's logical client entry was already there which would normally come after running BDLS post DB refresh activity for System refresh). Because of this issue we are unable to dlete the quality entry in BD54 and to further start our BDLS acitivty.
    Please to confirm us as we are stuck.
    Thanks & Regards,
    Ashish Robinson
    SAP BASIS Support

    Hi ,
    Thanks all. I resolved my issue.
    Solution:
    1) Removed quality system RFC "STQCLNT002" from SM59 just to b sure nothing was blocking
    2) Also entry of STQCLNT002 needs to be removed  from BD97.
    3) Further if you try to use ENTER when you try to delete entry inBD54 of quality it won't allow ,how many time you may try pressing enter to get away with the warning message. So solution here is to further double clieck on that warning message (in BD54) and see where its blocking . It will show you some method where its blocking .
    4) To locate the method use txn BD64 and scan through the entires to get to the affected link (here it was STQCLNT002).
    5) Be careful, do not delete the entry of STQCLNT002 itseld but actually the corresponding leaves of the methos needs only to be removed to over come the blocking in BD54 (where we wanted to remove the entry of STQCLNT002).
    6) Now goto BD54 and and you can easily remove entry of STQCLNT002.
    7)Now BDLS would easily start.
    Regards,
    Ashish Robinson
    Please grant me point if you find the answer useful. It surely did work for me absolutely fine.

  • RAID configuration, better to logically split RAID5 or RAID1 with SQL?

    I want to setup a new SQL server with SQL 2008 R2.  I have to use this version due to the application support behind it.  I have a question regarding best practice with disk setup on a physical server. 
    Here is my proposed setup, but the application owner had some questions.
    RAID1 - 2 x 146GB drives - OS drive
    RAID1 - 2 x 146GB drives - tempdb
    RAID1 - 2 x 146GB drives - translog
    RAID5 - 3 x 900GB drives - database location
    The owner was wondering if I could logically split up the RAID5 into 2 logical partitions with their own drive letters on the OS.  They want a separate volume for SQL flat file backups.  Of course this is possible, but I was wondering what option
    they would be better off with.  Here are my two ideas, which one would be better?
    Option 1: Split RAID5 physical into 2 logical, have 1 logical be used for the database, and 1 used for the backup.
    Option 2: Split one of the RAID1 pairs into two logical volumes, and have the tempdb on one of these logicals, and the translog on the other.  This would then free up one pair of RAID1 drives to be used for the flat file backup.
    Which of these two options would be a better configuration?  Assuming that the application owner does not wish to purchase 2 more drives.  

    Selecting appropriate RAID disk type must not go by standard rule like below ones:
    User DB Data Disk: Raid 5
    User DB Log Disk: Raid 10
    Sys DB Disk: Raid 5
    Sys TempDB Data Disk: Raid 10
    Sys TempDB Log Disk: Raid 10
    Local Backup: Raid 5 is also ok if you can't afford Raid 10.
    Best way will be to monitor the environment for disks performance and check is its capacity to support your application. In one of our case, we had to go for Raid 10 for even database data disk too as Disks Usage was like that.
    Usually keep data and backup on separate disks will be much better as risk is there if disk goes down then your data and backup both gone, So no for option 1. Again same answer for Option 2.
    Go for separate disks and if you have to have these files on same disk to start with then you can start but you can decide latter on by seeing usage pattern and same approach goes for any data\log disk, but for backup please be double sure of.
    Santosh Singh

  • Process Control workflow - want to delete logical steps against one SC

    Workflow issue : Process control workflow
    In my scenario when requestor is creating a SC then workflow goes to buyer for assignment of supplier but when buyer himslef is creating a SC and forgot to attach supplier then workflow goes to error....i checked in SWIA its an error.....
    i come to know tht we can logically deleted those steps , so that when buyer open a SC in edit mode and assign Supplier then workflow will behave as normal.
    Please let me know where i can logically deleted the steps for particular work item ID.
    Smriti

    Hi ,
      Yes - what Masa suggested is the correct and the SAP Best Practice, I'll do the same. you can implement the BAID BBP_DOC_CHECK_BADI , where you check whether the requester is Buyer or not, if the requester is buyer , you can get the assigned role from BUS4101 by passing the user id or calling the FM 'BAPI_USER_GET_DETAIL'. if the  'ACTIVITYGROUPS'
    table from FM ''BAPI_USER_GET_DETAIL' has an entry 'SAP_EC_BBP_PURCHASER' then the requester is a buyer. you can write your logic after that to make sure the SC has assigned supplier or not. if the SC is not assign the supplier then raise the error message.
    Saravanan

  • Deleting Logical system from BD54

    Hi ,
    I have created 2 logical systems in BD54. now I want to delete that logical systems. When I am trying to delete that logical systems..i am getting the msg " Logical Systems <Logical System Name> must not be deleted".
    Whats the problem nd how to delete it.

    Hi Vijay,
    Goto-BD54--> Click on the Position -->provide you logical system name..Then press enter
    Select logical system which you want to delete----> press Minus symbol in the application tool bar --> enter.
    Thanks,
    Nelson

  • Recovering Deleted Logic Pro 8 Project files with .logic extension

    I've been trying to recover a project file I accidentally deleted from Logic Pro 8 for a few days now. I'm using FileSalvage and all that comes up are the older Logic files with the .lso extension - some from as far back as 9 months ago. But no files with the .logic extension have appeared.
    The file I'm looking for was dragged into my trash on November 2 from my media drive (internal HDD #2) and I have barely used that drive since because I don't want to fragment the deleted file.
    I realize that the new .logic files are bundles and when I show package contents, there are 2 files that show up.
    Any ideas on how I can recover this file?

    I was waiting for some ******* to respond to my post with a lecturing. Thanks for not disappointing me Christian.
    I back up all 4 of my internal drives several times a day with SuperDuper. I also back up off site with Carbonite.com It's saved me from hard drive failure once. This is the first time in over a decade that I cannot find a file that I suspect I deleted by accident. That's a pretty good track record. I'm doing the best that I can with what I have.
    Now here's a strategy for you to keep you "on the clever side" Christian: If you don't have a solution to a problem posted on here, don't bother posting your judgmental and arrogant ******** without knowing the entire situation of the person who's asking for help.

Maybe you are looking for