Delete char from op concern

Hi All,
We have added a char to our op concern in dev client.
However no data is associated with this char.
Is it possible to delete this char. If so how?
Thanks,
Reddy

Hi Reddy,
Delection of Characterisitc from Op Concern is possible.
For this, first you need to see all areas where that characteristic has been assigned/used.
Follow the following steps...
Go to KECM transaction code, click on "Where used list" on the left side navigation, give the characteristic (which you want to delete) on  the right hand side, then "Execute". The system will display where-all that characterstic has been used (forms, reports etc).
Delete that characteristic from all those areas of assignment and save.
Now, come to KEA0, in Data Structure, you will be able to remove that characteristic from your Operating concern.
Try and reply
Srikanth Munnaluri

Similar Messages

  • Delete char from string

    hi,
    i have field like that 12-3456
    and i wont to delete '-'  to have 123456
    what is the best way to do that?
    Regards

    Hi,
    TRANSLATE field USING '- '.
    CONDENSE field NO-GAPS.
    The TRANSLATE command replaces al '-' with blanks and the CONDENSE, NO-GAPS compresses the string to remove all spaces/blanks.
    Cheers,
    Aditya

  • How to remove the Char.from one Operating Concern

    Hi Guys,
    How to remove the Char. from one Operating Concern.
    I have created one Char. (WWDOC) and moved to Operating Concern (OOCC). Operating Concern is in red status.
    Now, i want to remove that new assigned Char. (WWDOC)from the operating concern (OOCC). I did't find any option in the menu also.
    Appreciate your help.....
    T&R
    VVR

    Hi Sasi,
    Iam not able to push back that char. from my operating concern. In help it is given you have to delete the data contents in the table before pushing back. Please let me know if any other option available.
    Thanks for your reply.
    VVR

  • Delete a char from string ?

    Hi,
    I want to delete a char from string. i used the following function.
    String f = formulla.replace('[','');
    The above function doesnt work as it tells me to put a space or some char in 2nd parameter which i dont want. i just want to delete all occurences of some specific char in a string.
    Any suggestion.
    Thanks alot.

    u can do:
    String before;
    char charToReplace;
    StringBuffer tempBuf = new StringBuffer(before);
    for (int i=0; i<tempBuf.length(); i++)
            if (tempBuf.charAt(i)==charToReplace)
                  tempBuf.deleteCharAt(i);
    String after = tempBuf .toString(); HTH
    Yonatan

  • Delete last char from a console window.

    Hey all, could be a silly question.......
    Is it possible to delete a char from a console window?
    e.g.
                     System.out.print("-");
                   System.out.print("|");
                   System.out.print("/");
                   System.out.print("\\");I'm trying to give the illusion of the line spinning, but cant delete the last printed character. I've tried adding "\b" but with no joy.
    And help would be nice, as it's the little things that always take the longest!
    T.

    @Op. You can use JCurses if you accept that your code might not execute on all platforms.
    http://sourceforge.net/projects/javacurses/

  • How to delete images from folder which are not in the database

    I am created windows form
    i wont to delete images from the folder where i have stored images but i only want to delete those images which are not in the data base.
    i don't know how it is possible . i have written some code
    private void button1_Click(object sender, EventArgs e)
    string connectionString = "Data Source";
    conn = new SqlConnection(connectionString);
    DataTable dt = new DataTable();
    cmd.Connection = conn;
    cmd.CommandText = "select * from tbl_pro";
    conn.Open();
    SqlDataAdapter da = new SqlDataAdapter(cmd);
    da.Fill(dt);
    int count = Convert.ToInt32( dt.Rows.Count);
    string[] image1 = new string[count];
    for (int i = 0; i < count; i++)
    image1[i] = dt.Rows[i]["Image1"].ToString();
    string[] image2 = new string[count];
    for (int i = 0; i < count; i++)
    image2[i] = dt.Rows[i]["Image2"].ToString();
    var arr = image1.Union(image2).ToArray();
    string[] arrays;
    String dirPath = "G:\\Proj\\";
    arrays = Directory.GetFiles(dirPath, "*", SearchOption.AllDirectories).Select(x => Path.GetFileName(x)).ToArray();
    int b= arrays.Count();
    for (int j = 1; j <= b; j++)
    if (arrays[j].ToString() != arr[j].ToString())
    var del = arrays[j].ToString();
    else
    foreach (var value in del) // ERROR DEL IS NOT IN THE CURRENT CONTEXT
    string filePath = "G:\\Projects\\Images\\"+value;
    File.Delete(filePath);
    here error coming "DEL IS NOT IN THE CURRENT CONTEXT"
    I have to change anything .Will It work alright?
    pls help me
    Sms

    Hi Fresherss,
    Your del is Local Variable, it can't be accessed out of the if statement. you need to declare it as global variable like below. And if you want to collect the string, you could use the List to collect, not a string.  the string will be split to chars
    one by one.
    List<string> del=new List<string>();
    for (int j = 1; j <= b; j++)
    if (arrays[j].ToString() != arr[j].ToString())
    del.Add(arrays[j].ToString());
    else
    foreach (var value in del)
    string filePath = "G:\\Projects\\Images\\" + value;
    File.Delete(filePath);
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I currently have an iPhone 5, 16gb. I Do Not want to Loose any photos or albums by deleting them from my phone and not backing them up correctly. My iCloud backup is only storing my "Photo Stream" and I can not locate them in iTunes after I sync/Back up.

    I currently have an iPhone 5, 16gb. My storage is almost full on my phone. There are only 80 mg available. I am new to icloud and also have always had trouble navigating around iTunes. (Even after endlessly reading through support and help topics as well as calling)   My concern is about Not Losing any of my photos if I delete them from my phone. I have to delete a large portion of my camera roll as well as the Album Folders I have created. Although it would be great if there was a way to just keep my albums still. I have already backed them up to an external hard-drive, my computer and a geek stick. I'm not trying to be too paranoid about these photos, but, they are all of my 3 children. There are over 4000 pictures stored on my phone. Some photos go back as far as 2009.   Can you offer any information about backing up my Camera Roll, not just "Photo Stream", and albums I've created On my phone? I read that it's good to back photos up on both iTunes as well as icloud. I even purchased extra icloud storage to back them all up.   I do regularly back up/sync, my phone to my computers.   However, I cannot even locate where they are stored on iTunes, let alone look at them. And as far as my iCloud backup, it only stores the new pictures from "Photo Stream".   Please offer any advice you may have. I do not use up a lot of storage on my phone other than Photos and Contacts (it's a work phone).   I would definitely be able to sleep better knowing my children can one day see these pictures of themselves. I appreciate your time. Thank you,

    First of all, you should always save you photos on computer like any other digital camera.
    Backup on iCloud or iTunes only backup your Camera Roll. The other photos should be already on the computer.
    Note: Photos are not saved in iTunes, it's only a conduit between your iPhone and your photo managing software on computer.
    What computer do you have?

  • If I delete my songs from my "Downloads" folder, have them in my "Trash" and then delete them from my "Trash", will I still be able to play the songs on my iTunes or will they be deleted on my iTunes as well?

    I want to clear some space on my Mac since it is filling up and I don't have much room left on it. I want to delete all my songs from my "Downloads" folder and then delete them from my "Trash" to free up space however, I'm worried that if I do this then iTunes will not play any of the songs I deleted.
    Will I still be able to play my songs on iTunes even if they are not in my "Downloads" or "Trash" folders?
    Thank you.

    All tracks in iTunes (if you use default settings) should be in various artist and album folders in the main media folder in the iTunes folder. You can right click a track to reveal its location in Finder.  If there's a copy there then it doesn't really matter what you do with other copies.
    I have never downloaded from iTunes but I thought it placed files directly in the correct locations, or is this some other downloads folder to which you are referring?
    Normally if you download a file from another source and add it to iTunes by dragging it there, or using the Add To menu item, it places a copy of the file in iTunes.  You can discard the original, but if you're concerned you can check which copy iTunes is actually using as above.

  • T-code for delete file from application server

    Hi all!
    Please, has any t-code for delete file from application server? For upload exist CG3Z, for download has CG3Y. And for delete? Has anyone?
    I need to delete file from application server in QA system and i don't want to create a program for this because i will need to transport a request from DEV to QA.

    I don't have contact with basis team.
    The FM EPS_DELETE_FILE support directory name with max 60 char. My dir. has more than that. I need a transaction for this.
    Anybody know if this transaction exist?

  • Delete mail from iPod Touch but not from webmail

    I like to access my webmail with my Touch but I don't like leaving mail on my Touch. How do I take it off without also deleting it from my webmail account?

    Not possible, that would defeat the convenience of webmail/touch syncing. If your concern is security (ie, someone finds or steals your touch), set the touch to Autolock in Settings. With this feature enabled, someone would need to enter a password to see your email (or do anything else with your touch).
    Michael

  • Delete photo from iPhoto library and HDD

    Hopefully I'm not repeating a previous thread...
    Not being an expert, am I correct in saying that iPhoto only changes its version of the photo when editing it?
    Also, if you delete the photo by moving it to the trash can, it doesn't physically delete it from the HDD? (When you empty the trash can)
    This causes a problem for a few reasons.
    I have just loaded Medialink PS3 which allows the iMac to serve the PS3. (BTW - Good product)
    If you point Medialink to the original HDD folder then this still includes photos I thought I had deleted.
    Also If I want to burn a cd with the photo folder external to iPhoto , the "deleted" photos are also burnt.
    I copied all of the photos from a windows PC, and Picasa allowed you to physically delet from its own folder as well as the HDD.
    Doesn't iPhoto 09 allow this?
    What would iPhoto do if I went through and cleaned up the external folder and deleted jpgs or edited using Canon editing software? If using the external editor, would iPhoto reflect the changes?
    Sorry if this is verbose.
    regards,

    You might want to have a llook at the iPhoto tutorials. They cover a lot of these basics.
    http://www.apple.com/ilife/tutorials/#iphoto-hero
    And the version of iPhoto you are using?
    I'm not at all sure that a Referenced Library is what you want. In fact I strongly recommend against it. But however:
    *How to do it:*
    Simply go to iPhoto Menu -> Preferences -> Advanced and uncheck 'Copy Files to the iPhoto Library on Import'.
    *What Happens:*
    Now iPhoto will not copy the files, but rather simply reference them on your HD. To do this it will create an alias in the Originals Folder that points to your file. It will still create a thumbnail and, if you modify the pics, a Modified version within the iPhoto Library Folder.
    *Some things to consider:*
    1. Importing and deleting pics are more complex procedures. You have to to put the files where they will be stored before importing them. When you delete them you'll need to remove the files from the HD yourself.
    2. You cannot move or rename the files on your system or iPhoto will lose track of them on systems prior to 10.5 and iPhoto 08. Even with the later versions issues can still arise if you move the referenced files to new volumes or between volumes.
    3. Most importantly, migrating to a new disk or computer can be much more complex.
    4. Because iPhoto has no tools for managing Referenced Files, if, for some reason, the path to the photos changes then you could find yourself resolving aliases for +each photo in the Library+ one by one.
    My own opinion:
    I've yet to see a good reason to run iPhoto in referenced mode unless you're using two photo organisers
    If disk space is an issue, you can run an entire iPhoto Library from an external disk:
    1. Quit iPhoto
    2. Copy the iPhoto Library as an entity from your Pictures Folder to the External Disk.
    3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
    4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
    If you're concerned about accessing the files, There are many, many ways to access your files in iPhoto:
    *For Users of 10.5 and later*
    You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    You can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    *For users of 10.4 and later* ...
    Many internet sites such as Flickr and SmugMug have plug-ins for accessing the iPhoto Library. If the site you want to use doesn’t then some, one or any of these will also work:
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. However, if you're using Gmail you can use iPhoto2GMail
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    *If you want to access the files with iPhoto not running*:
    For users of 10.6 and later:
    You can download a free Services component from MacOSXAutomation which will give you access to the iPhoto Library from your Services Menu. Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and later:
    Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    +Some Other Comments+
    iPhoto will not touch any file outside its library. Period.
    It will copy files on import and leave existing files untouched,
    It will delete files within the Library but not outside the Library.
    When you choose to go with a Referenced Library you are deciding that You want to manage the Files. You want to import them from the camera, you want to sort them however you want and you want to delete them yourself. That's the point of a referenced Library.
    I just did a test by editing a photo using Canon Professional and the changes were not reflected in iPhoto. And vise versa.
    The point of iPhoto is that you interface with your Photos via the Application. Like Addressbook for your contacts, iTunes for your Music, it's the go-to app for your Photos.
    So, you want to edit Photos, you go to iPhoto and use the External Editor:
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.
    Note that iPhoto sends a copy+ of the file to Photoshop, so when you save be sure to use the Save command, not Save As... If you use Save As then you're creating a new file and iPhoto has no way of knowing about this new file. iPhoto is preserving your original anyway.
    Regards
    TD

  • Cannot delete user from monitor

    nw 5.1 server sp2a
    WS 98 client 3.40.0.0 or WS XP client 4.83 sp1
    zen 3.0
    I want to delete a suspicios file from a directory on the server.
    After a few seconds I lost connection with server.
    I login again and in MONITOR on the server there are two connection with
    my user name.
    When I want to clear first connection, MONITOR hangs.
    I want to clear first connection from Netware Management Portal, but the
    result was the same.
    Thus, I cannot delete file from the server and I cannot clear connection
    to the server.
    Help
    Doru

    Doru,
    It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at http://support.novell.com in both the "free product support" and "paid product support" drop down boxes.
    - You could also try posting your message again. Make sure it is posted in the correct newsgroup. (http://support.novell.com/forums)
    If this is a reply to a duplicate posting, please ignore and accept our apologies and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Remove Value Field from Operating Concern

    Hi all,
    I created a new value field in DEV and assigned it to the corresponding Operating Concern.
    Now, after some discussions, it is not necessary this value field.
    I want to "un-assign" from the Operating Concern they use.
    No data is being posted to this value field and nothing has been transported to QA yet.
    Is this possible? Any ideas?
    Thanks and Regards,
    Flower.

    I guess you can delete the value field as it was not transported to QA and PRD.
    Here is some information given by SAP.
    Deleting characteristics/value fields from an operating concern
    You can delete characteristics and value fields retrospectively from an operating concern that you have already activated. However, you should only use this deletion function for operating concerns that have not yet been used productively. You should also note that some database systems require the operating concern tables to be converted (database conversion) after the deletion has taken place if data had already been posted to the operating concern. Depending on the data volumes involved, the database conversion can take a matter of seconds or indeed several hours. Moreover, you cannot post data or run reports during the conversion. Due to integration, other applications are also affected when data is postedwith an assignment to profitability segments (such as settlement and direct assignment from FI/MM). If the operating concern has been transported to another system (such as the productive system), then the database conversion must also occur in that target system.
    Depending on the fields that were deleted, the following tables need to be converted (where xxxx = operating concern):
    Characteristics: CE1xxxx, CE2xxxx, CE4xxxx, CE4xxxx_ACCT, CE4xxxx_FLAG, and CE4xxxx_KENC
    Amount fields: CE1xxxx, CE2xxxx and CE3xxxx
    Quantity fields: CE1xxxx, CE2xxxx, CE3xxxx, CE4xxxx, CE4xxxx_ACCT, CE4xxxx_ACCT, CE4xxxx_FLAG, and CE4xxxx_KENC
    Before deleting fields from an operating concern with a large data volume (more that 10 000 records in a table), you should refer to the section "The Database Utility" in the ABAP dictionary documentation. This section describes the database conversion process.
    For database systems that do not require conversion (such as DB2 for AS/400, Informix, MSSQL), it can still take a considerable amount of time for the operating concern to be activated.
    To delete characteristics or value fields, perform the following activities:
    1. Delete the corresponding characteristics and value fields from Customizing in all clients (this includes forms, reports, planning layouts, and so forth). To locate characteristics and value fields, use the appropriate where-used list in the Customizing Monitor. You can access it by choosing Tools -> Analysis -> Check Customizing Settings. You can jump directly from the where-used list to the relevant Customizing transaction and then delete the appropriate field there.
    2. Switch to the screen for maintaining the data structure of an operating concern (Maintain operating concern).
    3. If you need to effect other changes to the datastucture for the operating concern before making any deletions, effect those changes and save the data structure.
    4. In order to be able to select the fields of the data structure, choose Extras -> Characteristics (or Value fields) -> Unlock.
    5. Select the characteristics and value fields to be deleted and remove them from the data structure with the "Reset fields" function.
    6. Reactivate the operating concern. The system starts by checking whether the operating concern contains any data and whether the fields to be deleted are still being used in any Customizing settings.
    7. If none of the fields are still in use, the system then starts the re-activation. If the operating concern does not contain any data or does not require the database system to be converted, the tables are activated. You are then able to activate the environment for the operating concern. In this case, the following activities no longer apply.
    If the operating concern already contains data, a system message tells you that the database needs to be converted. If you proceed, an activation log appears (at the top of the list).
    8. Analyze the activation log. If it only contains error messages telling you to convert the tables, proceed with the next activity.
    You must otherwise remove the cause of the errors before the tables can be converted. In this case, you should answer "No" to the next prompt, which asks whether the conversion transaction should start.
    9. If you still only receive error messages telling you to convert the tables, choose "Back" and start the conversion.
    10. Plan a job for the conversion. A list of the tables to be converted is shown for this. If the tables only contain a small amount of data (less than 10 000 records), then all the tables can be converted in one job. In that case, you can select all the tables.
    For larger tables, conversion should take place in several jobs. However, you should ensure that table CE4xxxx (where xxxx = operating concern) is the last table to be converted.
    Warning. No other changes can be made to the operating concern during the conversion.
    A copy of the table is generated during the conversion. The database system should have sufficient memory available for this copy.
    To schedule conversion as a job, use the "Schedule selections" function. You can display the current status of the conversion by selecting the "Refresh" icon. Tables disappear from the list once they have been converted sucessfully. If a conversion is taking a while, it is also possible to leave the transaction. You can then continue the conversion using DB requests -> Mass processing in one of the following ways:
    With the job overview. You access this by choosing System -> Services -> Jobs.
    Using the database utility transaction. You access this by choosing Utilities -> Database Utility in the ABAP Dictionary menu.
    You can use the status function to call up the status of the operating concern during operating concern maintenance. You need to activate all tables after conversion.
    11. To analyze errors that have occurred during the conversion, you can use the database utility transaction by choosing Extras -> Logs. The log has the same name as the conversion job: TBATG-date. You can also restart the conversion with this transaction.
    For more information on the database utility, choose Help -> Application help while still in the above transaction.
    12. Once you have activated all the tables in the operating concern, generate the operating concern environment from within operating concern maintenance.
    You can then use the operating concern again.
    If you want to transport the operating concern into a different system, see the section "Notes on transport"
    Note
    Hope this helps
    Thanks,
    Reddy
    Edited by: reddy  sap on Sep 11, 2009 6:58 PM
    Edited by: reddy  sap on Sep 11, 2009 7:00 PM

  • ITunes Match deleted songs from my hard drive. I had to re-rip them. How can I stop this from happening?

    iTunes Match deleted songs from my hard drive. How can I prevent this from happening if I try it again?

    iTunes Match can in no way be considered a backup service, this is due to the inexact nature of the 'matching process' (see https://discussions.apple.com/docs/DOC-4112, for more detail).
    Loss of files from a Disk is certainly possible through media failure.  However, the extent of iTunes Match capacity is solely to influence the content of the cloud.  Perhaps there was a coincident, or pre-existing, failure of the disk which was simply exposed by the iTunes Match interrogation of the disk content.
    There are certainly other services which depending upon your goal may work well.  For example, Google Play with gBeats IOS App works very well.  My use of Match is to synchronise across several computers and to drive Apple TV and an IOS device - other IOS devices still use sync for specific music and are complimented by gBeats for access to the full library when local mobile signal strength is high.
    The strong advice to always start with a secure backup remains but if your primary concern is iTunes Match interfering with physical disk content you can relax - it simply does not have this ability.  (Apology to Sherlock, further investigation required).

  • Deleting photos from HD

    I see a lot of threads concerning deleting photos from the HD via iPhoto, but they all seem to be for previous versions of iPhoto, and none of those solutions seem to work for iPhoto 08.
    So... Does anyone know how to delete a photo permanently from the HD through iPhoto 08? The command - delete - empty trash thing does not work here!
    I have the photos stored on my HD in the Pictures directory under Places in Finder. Deleting them via iPhoto seems to be an impossible task!

    jkluker:
    Welcome to the Apple Discussions. How are you determining that the photos are not getting deleted from the library? Is your library a managed library (i.e. the photos are copied into the iPhoto library during import) or a referenced library (photos are not copied during import and only alias files are created in the library). If it's the latter you have to manually delete the "source" photos from the HD. If it's a managed library then you have something wrong with the library.
    First delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your User/Library/Preferences folder and see if that makes any difference. Next, if needed launch iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library. Select the first three options.
    If neither of the above helped create a test library, import a few photos and see if you can delete the photos from it and from the HD in the process. You'll have to open the library package to verify is the photos are truly gone. If they do delete properly your primary library is the problem.
    If you're still having problems log into another account, create a test library and see if photos get deleted completely there. If they do your primary account is the culprit. It could be a preference file other than iPhoto's. Here's how you can check it out:
    Trouble Shooting Preferences
    Go to HD/Users/Your_name/Library. Move the Preferences folder (in its entirety) to the Desktop and make a second copy of it so you have Copy A and B. Now try the the process again and determine if problem is fixed.
    If the problem IS fixed, then go to the new Prefs folder that the OS will have created and open it up.
    Open Copy B on the Desktop and select all of the items inside. Drag them into the open new library folder. When the Copy window comes up check the Apply to All check box and then click on the Don't Replace button as seen here. That will keep the new files created and bring back all of the others.
    If the problem is NOT fixed, trash the new Prefs folder and move the intact Copy A folder back to the Library folder .
    Happy New Year
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

Maybe you are looking for