Help! IPhoto is full of duplicates!

Not much more to say. I imported from two old machines, I had the bug where the new machine created an old account and then couldn't import properly and created an extra account, I had to transfer everything back to this account, etc.
In the process, I've ended up with too many duplicates to go through. When I started iPhoto, I asked it *not* to import duplicates, but it still did. I'm not done either. I have a few more photo folders to import and I will get many more duplicates from that.
So how do I find and delete all these duplicates?
Is it possible to export everything from iPhoto, run DupeGuru, empty iPhoto, and then import everything back into iPhoto?

"Start over"
So how am I supposed to "Start Over"? My picture files are in iPhoto! And why does iPhoto automatically break itself by automatically doing what it must NEVER do?
"You open (and covert as needed) libraries"
So ... no I just open iPhoto and do what it suggests to start iPhoto, like most other users. I can't open libraries.
"You can export and reimport - but you lose a lot of information and all edit trails as well as all organization and projects"
I lost all organization and projects when iPhoto fouled up the import. How do I get that back?
I need to get rid of the duplicates, organize the files again, and rename some files again. I need to figure out which files iPhoto did and didn't import, figure out which ones iPhoto has that the rest of the pictures folders don't have, and figure out how to fix that. How do I do any of that?

Similar Messages

  • IPad Photo App is full of duplicates

    My iPad 2 photo app is full of duplicates and is not syncing with iPhoto on my Macbook Pro.
    The old OS6 Photo app worked perfectly (and was also much nicer to look at and had more functionality - eg Places view - but I digress)
    With this new photo app, If I delete a photo on Macbook Pro and sync, the photo stays on the iPad.
    Any ideas?

    How did you rebuild your library? By launching iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library?
    You can use Duplicate Annihilator to cull out the duplicates from your library. I'd make a backup of the iPhoto Library folder just in case the results are worse than what you started with. Better safe than sorry.
    Do you Twango?

  • Iphoto - how to identify duplicates?

    When merging events, the old version of iphoto would identify duplicates which then made it easier to delete those duplicates. Having updated to ilife 11, the new version of iphoto does not seem to have this function. I synched my iMac with my Mac book and for some reason, some events were duplicated or even tripliated, thus I need to delete a lot of photos resp. events. I need to make sure that I do not trash singlets...HELP!

    For dealing with duplicates in iPhoto check out Duplicate Annihilator
    How did you sync your iMac and MacBook? iPhoto doesn't have a 'sync' feature. Did you import one Library to another?
    Regards
    TD

  • IPhoto cache full of PDD files?

    I'm trying to clean up my harddisc to make more available space and to help iPhoto run faster. My iPhoto cache is full of photoshop files, a ton of them, all 4KB. Should I empty it?? I don't really understand why there are PDD files in there...

    That's odd. I don't have them in my iPhoto 6 library folder. Nor do they appear in lori_diloreto's diagram of an iPhoto 5 library folder: http://homepage.mac.com/loridilo/.Public/finder.jpg
    If iPhoto is running slowly, perhaps it would help to run a database rebuild. Hold Option and Command while launching iPhoto. Select all 4 options in the dialog box, and leave it to run. For more info, read: http://docs.info.apple.com/article.html?artnum=107947
    If you're feeling brave you could move those .pdd files to your desktop. Then launch iPhoto and see what happens. If it's bad, close iPhoto and put them back.
    Otherwise, heed PhillyPhan's PS and don't use the Finder to remove anything. It can lead to "bleeding ulcers."

  • IPhoto error message, " iPhoto is full"

    I am getting an error message saying "iPhoto is full". Seems impossible as we are talking about some 1000 images total.
    Can anybody help?

    Is that the complete exact error message?
    How much free space do you have on your hard drive?
    LN

  • How do I stop iPhoto 11 from making duplicates when importing whole library from an older MAC?

    I just bought a Mac Mini, and i tried to import the iphoto library from my PowerMac G5 (iPhoto 6).    It duplicates many of the photos so that there more than twice as many photos in the new machine.  I was looking at the photos and some of the duplicates are just resized photos.  I guess older versions of photos.
    Is there a way to just import the latest versions of photos?
    Thanks,
    Tony

    No it's not a good idea.
    Don't change anything in the iPhoto Library Folder via the Finder or any other application. iPhoto depends on the structure as well as the contents of this folder. Moving things, renaming things, deleting them or otherwise making changes will prevent iPhoto from working and could even cause you to damage or lose your photos.
    Don't use copy and paste, try drag and drop.
    If that still fails then rebuild the Library to the new location:
    Download iPhoto Library Manager and use its rebuild function. (In Library Manager it's the FIle -> Rebuild command)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  

  • How do I get online help to display full screen when opened?

    I'm working in RoboHelp HTML 8 developing
    WebHelp. My client wants the help to display full screen (100%) when it's
    opened.
    How do I accomplish this?
    Thanks
    Mendonite

    If your just opening the html file from a link within your site, then you could code the link to open in a new window at full size. This is not done through RH, but instead on the site where its linking to your webhelp index.html page. Its relatively simple, and you can customise things like viewable buttons, scroll bars etc etc.
    have a look here:
    http://www.htmlcodetutorial.com/linking/linking_famsupp_87.html

  • My problem is that my iCal won't sync from my first-generation iPad to my computer, and the computer sends events multiple times back to the iPad... which is now full of duplicate events. I'm NOT on iCloud.

    I'm just an old lady who doesn't know a lot about this stuff, but I do love my iPad and miss my portable calendar! My problem is that my iCal won't sync from my (first-generation, cheaper of the two models) iPad to my computer, and the computer sends events multiple times back to the iPad... which is now full of duplicate events. I'm NOT on iCloud. I've had this problem for nearly a year now. My Really Really Smart son couldn't fix it for me.

    djb53 wrote:
    Can take some time.... how much time?
    There's no simple answer to that. My calendar goes back to 2004 and is moderately busy; it took around an hour. It's possible that you've hit a slow period on the server - it happens.
    In order for it to work, your calendars should show on the MobileMe site, they should be listed under your MobileMe login name in the calendar list in iCal (calendars listed under 'On My Mac' will not sync) and your MM account details have to be entered in iCal Preferences>Accounts (this should have happened by itself).
    If it's not working please see the page I linked to.

  • Why is my contact list now full of duplicates (and quadruplicates) and what can I do about it?

    Why is my contact list now full of duplicates (and quadruplicates) and what can I do about it?
    Most (but not all) of the entries are duplicated, and some are re-doubled. I suspect this is related to using my iPhone (5S) and my iPad (2nd gen), both using IOS7 and icloud.
    I really don't want to have to delete hundreds of contacts manually, and I'm concedrned they'd just reapear if I did.

    http://support.apple.com/kb/ts4147

  • HELP! how to delete duplicates in iPhoto?

    Every time i update iPhoto i get a number of duplicates (it varies from 1 extra to 12!).  This is not surprisingly REALLY ANNOYING.  How can I automatically delete these.  Manually will take weeks!

    Not sure what you are doing but that should not be happening. You need to post exact workflow and details and resolve your actual problem
    In answer to your question Duplicate Annihaliator or DeCloner
    LN

  • Error Fixing..please help me..full marks wud be given........

    I am getting a following error when i run the program in ECC 6.o
    ERROR:" The where condition does not refer to for all entries table..
    program is as follows..full marks wud be given.....
    ***INCLUDE MZSDRETL_RMP_PRICING_ENTRYF01 .
    *&      Form  COMPUTE_SCROLLING_IN_TC
    Vertical Scrolling in table control upon pressing , next page,
    previous page , first page and last page button
         -->P_TC_NAME   table control name
         -->P_OK_CODE   okcode
         -->P_LOOPC     current loop count
    FORM COMPUTE_SCROLLING_IN_TC USING    P_TC_NAME
                                          P_OK_CODE
                                          P_LOOPC.
    -BEGIN OF LOCAL DATA----
      DATA L_TC_NEW_TOP_LINE    LIKE SY-TABIX.
      DATA L_TC_FIELD_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE CXTAB_CONTROL.
    -END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
      IF <TC>-LINES = 0.
        L_TC_NEW_TOP_LINE = 1.
      ELSE.
        CALL FUNCTION 'SCROLLING_IN_TABLE'
             EXPORTING
                  ENTRY_ACT      = <TC>-TOP_LINE
                  ENTRY_FROM     = 1
                  ENTRY_TO       = <TC>-LINES
                  LAST_PAGE_FULL = C_X
                  LOOPS          = P_LOOPC
                  OK_CODE        = P_OK_CODE
                  OVERLAPPING    = C_X
             IMPORTING
                  ENTRY_NEW      = L_TC_NEW_TOP_LINE.
            exceptions
                 no_entry_or_page_act  = 01
                 no_entry_to           = 02
                 no_ok_code_or_page_go = 03
                 others                = 99.
      ENDIF.
    get actual tc and column                                             *
      GET CURSOR FIELD L_TC_FIELD_NAME .
      IF SY-SUBRC = 0.
        set actual column                                                *
        SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
      ENDIF.
    set the new top line                                                 *
      <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM.                    " COMPUTE_SCROLLING_IN_TC
    *&      Form  GET_VALUE_ON_REQUEST
    Call function module to display the region list in form of search help
    FORM GET_VALUE_ON_REQUEST TABLES RET
                              USING    P_C_RET
                                       P_C_DYN
                                       P_DYNNR.
    Call function module to display the data in internal table in form of
    a search help
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                RETFIELD    = P_C_RET
                DYNPPROG    = G_REPID
                DYNPNR      = P_DYNNR
                DYNPROFIELD = P_C_DYN
                VALUE_ORG   = C_VAL_ORG  " Value S
           TABLES
                VALUE_TAB   = RET.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GET_VALUE_ON_REQUEST
    *&      Form  POPULATE_RANGES
          Populate range tables with store grouping data
         -->P_I_STORE_INFO  store grouping entry
    FORM POPULATE_RANGES USING L_REGION_ID
                               L_DIST_ID
                               L_AREA_ID
                               L_STORE_ID.
      CLEAR : R_REGION , R_DIST , R_AREA , R_STORE .
      CLEAR : R_REGION[] , R_DIST[] , R_AREA[] , R_STORE[].
    populate region
      IF NOT L_REGION_ID IS INITIAL.
        R_REGION-SIGN = C_SIGN.
        R_REGION-OPTION = C_OPT1.
        R_REGION-LOW = L_REGION_ID.
        APPEND R_REGION.
        CLEAR R_REGION.
      ENDIF.
    populate district
      IF NOT L_DIST_ID IS INITIAL.
        R_DIST-SIGN = C_SIGN.
        R_DIST-OPTION = C_OPT1.
        R_DIST-LOW = L_DIST_ID.
        APPEND R_DIST.
        CLEAR R_DIST.
      ENDIF.
    populate area
      IF NOT L_AREA_ID IS INITIAL.
        R_AREA-SIGN = C_SIGN.
        R_AREA-OPTION = C_OPT1.
        R_AREA-LOW = L_AREA_ID.
        APPEND R_AREA.
        CLEAR R_AREA.
      ENDIF.
    populate store
      IF NOT L_STORE_ID IS INITIAL.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  INPUT  = L_STORE_ID
             IMPORTING
                  OUTPUT = L_STORE_ID.
        R_STORE-SIGN = C_SIGN.
        R_STORE-OPTION = C_OPT1.
        R_STORE-LOW = L_STORE_ID.
        APPEND R_STORE.
        CLEAR R_STORE.
      ENDIF.
    ENDFORM.                    " POPULATE_RANGES
    *&      Form  GET_TABLE_ROW_VALUES
      Get the field values of the current row of the table
      l_stepl - current row no.
    FORM GET_TABLE_ROW_VALUES USING L_STEPL.
      DATA: L_REPID LIKE D020S-PROG.
      REFRESH I_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-REGION_ID'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-DIST_ID'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-AREA_ID'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-ATTR_VAL'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-STORE_ID'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'ZPRICELIST-ZLIST'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      L_REPID = G_REPID .
    Call function to get the screen data
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME     = L_REPID
                DYNUMB     = SY-DYNNR
           TABLES
                DYNPFIELDS = I_DYNPREAD.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GET_TABLE_ROW_VALUES
    *&      Form  DETERMINE_LEVEL
    Determine the level of store grouping info entered
        Region                  - 1
        Region/Dist             - 2
        Region/Dist/Area        - 3
        Region/Dist/Area/Store  - 4
    FORM DETERMINE_LEVEL USING    P_I_STORE_INFO LIKE I_STORE_INFO.
      IF NOT P_I_STORE_INFO-REGION_ID IS INITIAL
         AND P_I_STORE_INFO-DIST_ID IS INITIAL
         AND P_I_STORE_INFO-AREA_ID IS INITIAL
         AND P_I_STORE_INFO-STORE_ID IS INITIAL.
        P_I_STORE_INFO-LEVEL = C_LEVEL1.
      ENDIF.
      IF NOT P_I_STORE_INFO-REGION_ID IS INITIAL
         AND NOT P_I_STORE_INFO-DIST_ID IS INITIAL
         AND P_I_STORE_INFO-AREA_ID IS INITIAL
         AND P_I_STORE_INFO-STORE_ID IS INITIAL.
        P_I_STORE_INFO-LEVEL = C_LEVEL2.
      ENDIF.
      IF NOT P_I_STORE_INFO-REGION_ID IS INITIAL
         AND NOT P_I_STORE_INFO-DIST_ID IS INITIAL
         AND  NOT P_I_STORE_INFO-AREA_ID IS INITIAL
         AND P_I_STORE_INFO-STORE_ID IS INITIAL.
        P_I_STORE_INFO-LEVEL = C_LEVEL3.
      ENDIF.
      IF NOT P_I_STORE_INFO-REGION_ID IS INITIAL
         AND NOT P_I_STORE_INFO-DIST_ID IS INITIAL
         AND NOT P_I_STORE_INFO-AREA_ID IS INITIAL
         AND NOT P_I_STORE_INFO-STORE_ID IS INITIAL.
        P_I_STORE_INFO-LEVEL = C_LEVEL4.
      ENDIF.
    ENDFORM.                    " DETERMINE_LEVEL
    *&      Form  GET_SY_STEPL
        Get the current record number in the table control.
         -->P_L_STEPL  text
    FORM GET_SY_STEPL USING    P_L_STEPL LIKE SY-STEPL.
      CLEAR P_L_STEPL.
      CALL FUNCTION 'DYNP_GET_STEPL'
          IMPORTING
               POVSTEPL        = P_L_STEPL
       EXCEPTIONS
            STEPL_NOT_FOUND = 1
            OTHERS          = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GET_SY_STEPL
    *&      Form  GET_POPUP_CONFIRM
          Display the popup to confirm the user
    FORM GET_POPUP_CONFIRM USING    P_L_ANS
                                    P_G_POPUP_TEXT
                                    G_LINE_TEXT.
      CALL FUNCTION 'POPUP_TO_CONFIRM'
           EXPORTING
                TITLEBAR      = G_LINE_TEXT
                TEXT_QUESTION = P_G_POPUP_TEXT
           IMPORTING
                ANSWER        = P_L_ANS.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    " GET_POPUP_CONFIRM
    *&      Form  GOTO_SKU_HIER_SCREEN
    Upon user wishes to go to the detail screen , a check is performed
    to determine if any existing promo or pricing is already available
    for the entered store grouping info . If it is available then
    prompt a message to the user 'Already promo exists if  user wants to
    go to the detail screen ?'. If the user presses 'Yes' then then
    detail screen will appear otherwise the header screen will appear
    FORM GOTO_SKU_HIER_SCREEN.
      CLEAR G_CHECK_ENTRY.
    Check the store grouping entries beforr switching to detail screen.
      PERFORM CHECK_STORE_ENTRIES.
      CHECK G_CHECK_ENTRY IS INITIAL.
      READ TABLE I_STORE_INFO WITH KEY REGION_ID = C_SPACE
                                       DIST_ID = C_SPACE
                                       AREA_ID = C_SPACE
                                       STORE_ID = C_SPACE
                                       ATTR_VAL = C_SPACE.
      IF SY-SUBRC = 0.
        DELETE I_STORE_INFO WHERE  REGION_ID = C_SPACE
                            AND    DIST_ID = C_SPACE
                            AND    AREA_ID = C_SPACE
                            AND    STORE_ID = C_SPACE
                            AND    ATTR_VAL = C_SPACE.
      ENDIF.
    perform check for the duplicate store grouping data.
      PERFORM CHECK_DUPLICATE_STRGRP_DATA.
    If any duplicate entry is found then user will be prompted with the
    message if he/she wants to delete those duplicate entries . If 'Yes'
    is pressed then all the duplicate entries will be deleted or else
    if 'No' is pressed , then user will remain in the same header screen
      IF    G_DUPLICATE_ENTRY = C_X.
        CONCATENATE TEXT-058 TEXT-059
        INTO   G_POPUP_TEXT
        SEPARATED BY SPACE.
        CLEAR G_ANS.
        CLEAR G_LINE_TEXT.
    Get the pop-up to confirm the operation
        PERFORM GET_POPUP_CONFIRM USING G_ANS
                                        G_POPUP_TEXT
                                        G_LINE_TEXT.
        IF G_ANS = '1'.
    Delete the duplicate entries
          DELETE ADJACENT DUPLICATES FROM I_STORE_INFO COMPARING REGION_ID
                                                                 DIST_ID
                                                                 AREA_ID
                                                                 STORE_ID
                                                                 ATTR_VAL.
          MESSAGE S161(ZS) WITH TEXT-003.
        ENDIF.
      ELSE.
    Perform the duplicate entry check for create or change pricing
        IF G_MAIN_OKCODE = 'PRCC' OR G_MAIN_OKCODE = 'CRPR'.
          IF I_STORE_INFO[] IS INITIAL.
            MESSAGE S161(ZS) WITH TEXT-004.
          ELSE.
            CLEAR G_FLAG.
            LOOP AT I_STORE_INFO WHERE NOT REPROMO IS INITIAL.
              G_FLAG = C_X.
              EXIT.
            ENDLOOP.
    Prompt the message by calling the function module for pop-up confirm
            IF NOT G_FLAG IS INITIAL.
              CONCATENATE TEXT-061 TEXT-062
                           INTO G_POPUP_TEXT SEPARATED BY SPACE .
              CLEAR G_LINE_TEXT.
              PERFORM GET_POPUP_CONFIRM USING G_ANS
                                              G_POPUP_TEXT
                                              G_LINE_TEXT.
              IF G_ANS = C_ANS1.
                CLEAR G_ANS.
                PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
                TBCL3-TOP_LINE = 1.
               call screen 9002.
                LEAVE TO SCREEN 9002.
    End of DEVK939178
              ENDIF.
            ELSE.
              PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
              TBCL3-TOP_LINE = 1.
              LEAVE TO SCREEN 9002.
             call screen 9002.
    End of DEVK939178
            ENDIF.
          ENDIF.
        ELSE.
    If user does not input any store grouping info in the header screen
    and opts to go to the detail, then message will appear to the user as
    'A Promo is going to be applied on the Price List type '. This will
    necessarily be a % promo as the promo is going to applied across all
    the SKUs that belong to that price list type which is irrespective of
    the price of individual SKUs
          IF I_STORE_INFO[] IS INITIAL.
            IF G_PRICING_VIEW_FLAG = C_X       " DEVK939197
              OR G_PROMO_VIEW_FLAG = C_X.      " DEVK939197
              LEAVE TO SCREEN 9002.
            ELSE.
              IF G_PROMO_PLTYP <> C_X.
                CLEAR G_POPUP_TEXT.
                CLEAR G_LINE_TEXT.
                CONCATENATE TEXT-063 TEXT-062
                             INTO G_POPUP_TEXT SEPARATED BY SPACE .
                PERFORM GET_POPUP_CONFIRM USING G_ANS
                                                G_POPUP_TEXT
                                                G_LINE_TEXT.
                IF G_ANS = C_ANS1.
    If user opts 'Yes' then another screen will appear where the user can
    give the value of the % promo that is going to be applied on the
    pricelist type
                  G_PROMO_PLTYP = C_X.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
                  CLEAR I_STORE_INFO.
                  I_STORE_INFO-LEVEL = C_LEVEL6.
                  APPEND I_STORE_INFO.
                  TBCL3-TOP_LINE = 1.
                  PERFORM CHECK_EXIST_PROMO_STR .
                  PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
                  LEAVE TO SCREEN 9002.
               call screen 9002.
    End of DEVK939178
             call screen 9006 starting at 10 5 ending at 70 10.
                ELSE.
                  MESSAGE S161(ZS) WITH TEXT-004.
                ENDIF.
              ENDIF.
            ENDIF.
          ELSE.
            CLEAR G_FLAG.
            LOOP AT I_STORE_INFO WHERE NOT REPROMO IS INITIAL.
              G_FLAG = 'X'.
              EXIT.
            ENDLOOP.
            IF NOT G_FLAG IS INITIAL.
              CONCATENATE TEXT-064 TEXT-062
                           INTO G_POPUP_TEXT SEPARATED BY SPACE .
              CLEAR G_LINE_TEXT.
              PERFORM GET_POPUP_CONFIRM USING G_ANS
                                              G_POPUP_TEXT
                                              G_LINE_TEXT.
              IF G_ANS = C_ANS1.
                CLEAR G_ANS.
                PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
                TBCL3-TOP_LINE = 1.
                LEAVE TO SCREEN 9002.
               call screen 9002.
    End of DEVK939178
              ENDIF.
            ELSE.
              PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
              TBCL3-TOP_LINE = 1.
              LEAVE TO SCREEN 9002.
             call screen 9002.
    End of DEVK939178
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    *endif.
    ENDFORM.                    " GOTO_SKU_HIER_SCREEN
    *&      Form  ADD_LINE_STR_GRP
          Add new entry to the store gropuing info
    FORM ADD_LINE_STR_GRP.
      G_OKCODE = OKCODE.
      CLEAR I_STORE_INFO.
      DESCRIBE TABLE I_STORE_INFO LINES L_LINE.
      DO 15 TIMES.
        I_STORE_INFO-LEVEL = C_LEVEL0.
        APPEND I_STORE_INFO.
        CLEAR I_STORE_INFO.
      ENDDO.
      G_ADD_CNT = G_ADD_CNT + 15.
      G_LINE_CNT = 1.
    ENDFORM.                    " ADD_LINE_STR_GRP
    *&      Form  DELETE_LINE_STR_GRP
    Delete selected entries which the user wants to perform a
    delete operation .
    FORM DELETE_LINE_STR_GRP.
    If the store grouping table is blank then issue message
    'No Entry is available for Selection.' .
      IF I_STORE_INFO[] IS INITIAL.
        MESSAGE S161(ZS) WITH TEXT-001.
      ELSE.
    Check if any entry in the store info table is checked for the delete
    If selected, then issue a confirmation message to the user in pop-up
        READ TABLE I_STORE_INFO WITH KEY SEL = C_X.
        IF SY-SUBRC = 0.
          CLEAR G_POPUP_TEXT.
          CLEAR G_LINE_TEXT.
          G_POPUP_TEXT =  TEXT-065 .
          PERFORM GET_POPUP_CONFIRM USING G_ANS
                                          G_POPUP_TEXT
                                          G_LINE_TEXT .
    If the user opts 'Yes' then delete the selected lines
          IF G_ANS = C_ANS1.
            DELETE I_STORE_INFO WHERE SEL = C_X.
            MESSAGE S161(ZS) WITH TEXT-002.
          ENDIF.
        ELSE.
    Do the same deletion operation even if user does not select the line
    but puts the cursor in any line entry.
          GET CURSOR LINE L_LINE.
          IF SY-SUBRC = 0.
            L_LINE = L_LINE + TBCL_HEAD1-TOP_LINE - 1.
            CLEAR G_POPUP_TEXT.
            G_POPUP_TEXT =  TEXT-065.
            CLEAR G_LINE_TEXT.
            PERFORM GET_POPUP_CONFIRM USING G_ANS
                                            G_POPUP_TEXT
                                           G_LINE_TEXT.
            IF G_ANS = C_ANS1.
              DELETE I_STORE_INFO INDEX L_LINE.
    Upon successful delete operation issue a success message to the user
              MESSAGE S161(ZS) WITH TEXT-002.
            ENDIF.
          ELSE.
            MESSAGE S161(ZS) WITH TEXT-006.
          ENDIF.
        ENDIF.
      ENDIF.
      DESCRIBE TABLE I_STORE_INFO LINES G_ADD_CNT.
    ENDFORM.                    " DELETE_LINE_STR_GRP
    *&      Form  SELECT_ALL_ENTRIES
    When the user selects the 'Select All' button, then select all the
    entries of the store grouping table by setting the SEL field to X for
    each entry
    FORM SELECT_ALL_ENTRIES.
      IF I_STORE_INFO[] IS INITIAL.
    If the store grouping table is blank then issue message
    'No Entry is available for Selection.' .
        MESSAGE S161(ZS) WITH TEXT-001.
      ELSE.
        LOOP AT I_STORE_INFO .
          I_STORE_INFO-SEL = C_X.
          MODIFY I_STORE_INFO.
        ENDLOOP.
        G_OKCODE = OKCODE.
      ENDIF.
    ENDFORM.                    " SELECT_ALL_ENTRIES
    *&      Form  DESELECT_ALL_ENTRIES
          Deselect all the entries in the table
    FORM DESELECT_ALL_ENTRIES.
      IF I_STORE_INFO[] IS INITIAL.
    If the store grouping table is blank then issue message
    'No Entry is available for Selection.' .
        MESSAGE S161(ZS) WITH TEXT-001.
      ELSE.
        LOOP AT I_STORE_INFO .
          I_STORE_INFO-SEL = C_SPACE.
          MODIFY I_STORE_INFO.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " DESELECT_ALL_ENTRIES
    *&      Form  SAVE_PROMO
          Save the promo Event.
    FORM SAVE_PROMO.
      DATA: L_DATUM LIKE SY-DATUM,
            L_SUBRC LIKE SY-SUBRC .
    Populate dept/class/subclass if sku or style is not blank
      PERFORM POPULATE_DEPT_CLASS.
      DATA: G_PROMONO LIKE ZSDRETL_RMPHEAD-PP_ID.
      IF G_PROMO_CHG_FLAG = C_X.
        G_PROMONO = G_PROMO_ID.
      ELSE.
    Get number range for the promo
        CALL FUNCTION 'NUMBER_GET_NEXT'
             EXPORTING
                  NR_RANGE_NR   = C_NR_OBJ1
                  OBJECT        = C_NROBJ
                  QUANTITY      = '1'
                  IGNORE_BUFFER = C_X
             IMPORTING
                  NUMBER        = G_PROMONO.
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      IF NOT G_PROMONO IS INITIAL.
        REFRESH I_RMPHEAD.
        CLEAR   WA_RMPHEAD.
    If Override flag is set for any SKU end that promo first
        READ TABLE I_SKU_INFO WITH KEY OVERRIDE = C_X.
        IF SY-SUBRC = 0.
         perform end_existing_promo .
        ENDIF.
    Populate Header information for Promo event
        REFRESH I_RMPHEAD.
        CLEAR   WA_RMPHEAD.
        IF SY-DYNNR = '9006'.
          WA_RMPHEAD-PP_ID = G_PROMONO.
          WA_RMPHEAD-ID_TYPE = C_P.
          WA_RMPHEAD-PLTYP = ZPRICELIST-ZLIST.
          WA_RMPHEAD-APPROVE = CHK_APR.
          WA_RMPHEAD-ERDAT = SY-DATUM.
          WA_RMPHEAD-ERNAM = SY-UNAME.
          WA_RMPHEAD-ID_DESC = G_PDESC.
          WA_RMPHEAD-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
          WA_RMPHEAD-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
          WA_RMPHEAD-CLEARANCE = C_SPACE.
          WA_RMPHEAD-PROMO_TYPE = G_PTYPE.
          APPEND WA_RMPHEAD TO I_RMPHEAD.
          CLEAR  WA_RMPHEAD.
        ELSE.
          WA_RMPHEAD-PP_ID = G_PROMONO.
          WA_RMPHEAD-ID_TYPE = C_P.
          WA_RMPHEAD-PLTYP = G_PRICELIST.
          WA_RMPHEAD-APPROVE = CHK_APR.
          WA_RMPHEAD-ERDAT = SY-DATUM.
          WA_RMPHEAD-ERNAM = SY-UNAME.
          WA_RMPHEAD-ID_DESC = G_PDESC.
          WA_RMPHEAD-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
          L_SUBRC = 4.
          LOOP AT I_SKU_INFO.
            IF I_SKU_INFO-END_DATE GE ZSDRETL_RMPHEAD-START_DATE .
          if i_sku_info-end_date ge sy-datum.
              L_SUBRC = 0.
              EXIT.
            ENDIF.
          ENDLOOP.
          IF L_SUBRC = 4.
            L_DATUM = ZSDRETL_RMPHEAD-START_DATE - 1.
          l_datum = sy-datum - 1.
            WA_RMPHEAD-END_DATE = L_DATUM.
          ELSE.
            WA_RMPHEAD-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
          ENDIF.
          WA_RMPHEAD-CLEARANCE = G_CHK_CLR.
          WA_RMPHEAD-PROMO_TYPE = G_PROMO_TYPE.
          APPEND WA_RMPHEAD TO I_RMPHEAD.
          CLEAR  WA_RMPHEAD.
        ENDIF.
        IF NOT I_RMPHEAD[] IS INITIAL.
          MODIFY ZSDRETL_RMPHEAD FROM TABLE I_RMPHEAD.
          IF SY-SUBRC = 0.
            CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
                 EXPORTING
                      PERCENTAGE = 0
                      TEXT       = TEXT-067.
            COMMIT WORK.
          ENDIF.
        ENDIF.
    Populate Store information for Promo event
        REFRESH I_RMPSTORE.
        CLEAR   WA_RMPSTORE.
        IF SY-DYNNR = '9006' OR G_PROMO_PLTYP = C_X.
          WA_RMPSTORE-PP_ID = G_PROMONO.
          WA_RMPSTORE-RECNO = 0.
          WA_RMPSTORE-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
          WA_RMPSTORE-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
          WA_RMPSTORE-STORE_LEVEL = C_LEVEL6.
          WA_RMPDETAIL-ID_TYPE = C_P.
          WA_RMPDETAIL-PLTYP = G_PRICELIST.
          APPEND WA_RMPSTORE TO I_RMPSTORE.
          CLEAR WA_RMPSTORE.
        ELSE.
          LOOP AT I_STORE_INFO.
            WA_RMPSTORE-PP_ID = G_PROMONO.
            WA_RMPSTORE-RECNO = SY-TABIX.
            WA_RMPSTORE-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
            WA_RMPSTORE-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
            WA_RMPSTORE-REGION_ID = I_STORE_INFO-REGION_ID.
            WA_RMPSTORE-DIST_ID = I_STORE_INFO-DIST_ID.
            WA_RMPSTORE-AREA_ID = I_STORE_INFO-AREA_ID.
            WA_RMPSTORE-STORE_ID = I_STORE_INFO-STORE_ID.
            WA_RMPSTORE-ATTR_VAL = I_STORE_INFO-ATTR_VAL.
            WA_RMPSTORE-STORE_LEVEL = I_STORE_INFO-LEVEL.
            WA_RMPSTORE-ID_TYPE = C_P.
            WA_RMPSTORE-PLTYP = G_PRICELIST.
            APPEND WA_RMPSTORE TO I_RMPSTORE.
            CLEAR WA_RMPSTORE.
          ENDLOOP.
        ENDIF.
        IF NOT I_RMPSTORE[] IS INITIAL.
          IF NOT I_RMPSTORE_TEMP[] IS INITIAL.
            READ TABLE I_RMPSTORE_TEMP INTO WA_RMPSTORE INDEX 1.
            IF SY-SUBRC = 0.
              PERFORM ENQUEUE USING WA_RMPSTORE-PP_ID.
            ENDIF.
            DELETE ZSDRETL_RMPSTORE FROM TABLE I_RMPSTORE_TEMP.
            IF SY-SUBRC = 0.
              COMMIT WORK.
              PERFORM DEQUE.
              REFRESH I_RMPSTORE_TEMP.
            ENDIF.
          ENDIF.
          MODIFY ZSDRETL_RMPSTORE FROM TABLE I_RMPSTORE.
          IF SY-SUBRC = 0.
            CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
                 EXPORTING
                      PERCENTAGE = 0
                      TEXT       = TEXT-066.
            COMMIT WORK.
          ENDIF.
        ENDIF.
    Populate SKU information for Promo event
        CLEAR: WA_RMPDETAIL , I_RMPDETAIL[].
        IF SY-DYNNR = '9006'.
          WA_RMPDETAIL-PP_ID = G_PROMONO.
          WA_RMPDETAIL-RECNO = 0.
          WA_RMPDETAIL-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
          WA_RMPDETAIL-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
          WA_RMPDETAIL-VALUE = G_VAL_PLTYP.
          WA_RMPDETAIL-ZLEVEL = C_LEVEL1.
          APPEND WA_RMPDETAIL TO I_RMPDETAIL.
          CLEAR  WA_RMPDETAIL.
        ELSE.
          LOOP AT I_SKU_INFO.
            WA_RMPDETAIL-PP_ID = G_PROMONO.
            WA_RMPDETAIL-RECNO = SY-TABIX.
            WA_RMPDETAIL-START_DATE = I_SKU_INFO-START_DATE.
            IF ZSDRETL_RMPHEAD-END_DATE LT ZSDRETL_RMPHEAD-START_DATE.
          if zsdretl_rmphead-end_date lt sy-datum.
              WA_RMPDETAIL-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
            ELSE.
              WA_RMPDETAIL-END_DATE = I_SKU_INFO-END_DATE.
            ENDIF.
            WA_RMPDETAIL-DEPT = I_SKU_INFO-DEPT.
            WA_RMPDETAIL-CLASS = I_SKU_INFO-CLASS.
            WA_RMPDETAIL-SUB_CLASS = I_SKU_INFO-SUB_CLASS.
            WA_RMPDETAIL-STYLE = I_SKU_INFO-STYLE.
            WA_RMPDETAIL-SKU = I_SKU_INFO-SKU.
            WA_RMPDETAIL-VALUE = I_SKU_INFO-VALUE.
            WA_RMPDETAIL-BASIC_PRICE = I_SKU_INFO-KBETR.
            WA_RMPDETAIL-ZLEVEL = I_SKU_INFO-TYPE.
            WA_RMPDETAIL-TOP_UP = I_SKU_INFO-TOP_UP.
            WA_RMPDETAIL-OVERRIDE = I_SKU_INFO-OVERRIDE.
            WA_RMPDETAIL-ZLEVEL = I_SKU_INFO-TYPE.
            WA_RMPDETAIL-REF_PROMO = I_SKU_INFO-REF_PROMO.
            WA_RMPDETAIL-ID_TYPE = C_P.
            WA_RMPDETAIL-PLTYP = G_PRICELIST.
            APPEND WA_RMPDETAIL TO I_RMPDETAIL.
            CLEAR  WA_RMPDETAIL.
          ENDLOOP.
        ENDIF.
        IF NOT I_RMPDETAIL[] IS INITIAL.
          IF NOT I_RMPDETAIL_TEMP[] IS INITIAL.
            READ TABLE I_RMPDETAIL_TEMP INTO WA_RMPDETAIL INDEX 1.
            IF SY-SUBRC = 0.
              PERFORM ENQUEUE USING WA_RMPDETAIL-PP_ID.
            ENDIF.
            DELETE ZSDRETL_RMPDETL FROM TABLE I_RMPDETAIL_TEMP.
            IF SY-SUBRC = 0.
              COMMIT WORK.
              PERFORM DEQUE.
              REFRESH I_RMPDETAIL_TEMP.
            ENDIF.
          ENDIF.
          MODIFY ZSDRETL_RMPDETL FROM TABLE I_RMPDETAIL.
          IF SY-SUBRC = 0.
            CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
                 EXPORTING
                      PERCENTAGE = 0
                      TEXT       = TEXT-068.
            COMMIT WORK.
          ENDIF.
        ENDIF.
        IF SY-SUBRC = 0.
          IF G_PROMO_CHG_FLAG = C_X.
            MESSAGE S161(ZS)
                 WITH TEXT-046 G_PROMONO TEXT-048.
          ELSE.
            MESSAGE S161(ZS)
                   WITH TEXT-046 G_PROMONO TEXT-049.
          ENDIF.
          LEAVE TO SCREEN 9000.
        ENDIF.
      ENDIF.
    ENDFORM.                    " SAVE_PROMO
    *&      Form  EXIT_FROM_HEADER_SCREEN
          Exit from header screen
    FORM EXIT_FROM_HEADER_SCREEN.
    in case of view promo and view pricing , come back to the view/copy
    screen
      IF G_MAIN_OKCODE = 'VRPR' AND (  G_PROMO_VIEW_FLAG = C_X
                                    OR G_PRICING_VIEW_FLAG = C_X ).
        LEAVE TO SCREEN 9007.
      ELSE.
    if store grouping info table is empty then come back to the main menu
        IF I_STORE_INFO[] IS INITIAL.
          LEAVE TO SCREEN 9000.
        ELSE.
    if store grouping info contains a blank record then come to main menu
          READ TABLE I_STORE_INFO INDEX 1.
          IF SY-SUBRC = 0 AND I_STORE_INFO-REGION_ID IS INITIAL
                          AND I_SKU_INFO[] IS INITIAL.
            LEAVE TO SCREEN 9000.
          ENDIF.
    if SKU info table is blank then issue message if the user wants to
    exit from the header screen without entring the promo/pricing detail
          IF I_SKU_INFO[] IS INITIAL.
            CLEAR G_ANS .
            IF G_MAIN_OKCODE = 'CRPR' OR G_MAIN_OKCODE = 'PRCC'.
              G_POPUP_TEXT = TEXT-069.
            ELSE.
              G_POPUP_TEXT = TEXT-070.
            ENDIF.
    Call FM for pop-up message
            CLEAR G_LINE_TEXT.
            PERFORM GET_POPUP_CONFIRM USING G_ANS G_POPUP_TEXT G_LINE_TEXT.
            IF G_ANS = C_ANS1.
              LEAVE TO SCREEN 9000.
            ENDIF.
          ELSE.
    if sku info is avilable & user presses exit then a message is issued
    if the user wants to leave without saving the promo/pricing event
            CLEAR G_ANS .
            IF G_MAIN_OKCODE = 'CRPR' OR G_MAIN_OKCODE = 'PRCC'.
              G_POPUP_TEXT = TEXT-071.
            ELSE.
              G_POPUP_TEXT = TEXT-072.
            ENDIF.
    Call FM for pop-up message
            CLEAR G_LINE_TEXT.
            PERFORM GET_POPUP_CONFIRM USING G_ANS G_POPUP_TEXT G_LINE_TEXT.
    If user presses 'Yes' then go back to the main menu
            IF G_ANS = C_ANS1.
              LEAVE TO SCREEN 9000.
    if user pressed 'No' then prompts the message if the user wants to go
    back without saving if it says 'Yes' , then go to the main menu and if
    it says 'No' then save the event and go back to main menu
            ELSEIF G_ANS = C_ANS2.
              CLEAR G_ANS .
                 message s161(zs) with text-164.
                 exit.
             IF G_MAIN_OKCODE = 'CRPR' OR G_MAIN_OKCODE = 'PRCC'.
               G_POPUP_TEXT = TEXT-073.
             ELSE.
               G_POPUP_TEXT = TEXT-074.
             ENDIF.
    Call FM for pop-up message
             CLEAR G_LINE_TEXT.
           PERFORM GET_POPUP_CONFIRM USING G_ANS G_POPUP_TEXT G_LINE_TEXT.
             IF G_ANS = C_ANS1.
               IF G_MAIN_OKCODE = 'CRPR' OR G_MAIN_OKCODE = 'PRCC'.
    Call save pricing subroutine to save the pricing event
                 MESSAGE S161(ZS) WITH TEXT-164.
                 perform save_pricing.
               ELSE.
    Call save promo subroutine to save the promo event
                 perform save_promo.
                 MESSAGE S161(ZS) WITH TEXT-164.
               ENDIF.
             ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " EXIT_FROM_HEADER_SCREEN
    *&      Form  VIEW_PROMOS
      Call subroutine to view all the pre-existing promos that are
      available for the selected lines
    FORM VIEW_PROMOS.
      CASE SY-DYNNR.
        WHEN '9001'.
          G_DYNNR = SY-DYNNR.
    Display all the promo that are already exist for the selected entries
    in store grouping table
    Begin of DEVK939178
    logic is changed to check if any existing promo available with higher
    store hierarchy
          PERFORM VIEW_PRE_PROMO_STRGRP.
    End of DEVK939178
        WHEN '9002'.
          G_DYNNR = SY-DYNNR.
    Display all the promo that are already exist for the selected entries
    in sku hierarchy table
    Begin of DEVK939196
          PERFORM VIEW_PROMO_FOR_SKUHIER1 .
    End of DEVK939196
      ENDCASE.
    ENDFORM.                    " VIEW_PROMOS
    *&      Form  VIEW_PRICING
          View the existing pricing if available for an entry
    FORM VIEW_PRICING.
      CASE SY-DYNNR.
        WHEN '9001'.
          G_DYNNR = SY-DYNNR.
    Display all the pricings that are already exist for  selected entries
    in store grouping table
          PERFORM VIEW_PRE_PROMO_STRGRP .
        WHEN '9002'.
          G_DYNNR = SY-DYNNR.
    Display all the pricings that are already exist for  selected entries
    in sku hierarchy table
          PERFORM VIEW_PROMO_FOR_SKUHIER1.
      ENDCASE.
    ENDFORM.                    " VIEW_PRICING
    *&      Form  VIEW_PROMO_FOR_STRGRP
          Prepare the ALV scenarios to display the existing promos
    FORM VIEW_PROMO_FOR_STRGRP.
      REFRESH I_FIELDCAT.
      CLEAR   I_FIELDCAT.
    Populate the field catalogue table for Stor grouping fields
      PERFORM POPULATE_CATALOGUE USING:
    Position       Fieldname  Tablename  Title              Display
       '01'          'REGION_ID'    'I_STR_GRP1'    TEXT-075     ' ',
       '02'          'DIST_ID'      'I_STR_GRP1'    TEXT-076     ' ',
       '03'          'AREA_ID'      'I_STR_GRP1'    TEXT-077     ' ',
       '04'          'ATTR_VAL'     'I_STR_GRP1'    TEXT-078     ' ',
       '05'          'STORE_ID'     'I_STR_GRP1'    TEXT-079     ' ',
       '06'          'PP_ID'        'I_STR_GRP1'    TEXT-084     ' ',
       '07'          'START_DATE'   'I_STR_GRP1'    TEXT-082     ' ',
       '08'          'END_DATE'     'I_STR_GRP1'    TEXT-083     ' ',
       '09'          'PROMO_TYPE'   'I_STR_GRP1'    TEXT-080     ' ',
       '10'          'CLEARANCE'    'I_STR_GRP1'    TEXT-081     ' ',
       '11'          'ID_DESC'      'I_STR_GRP1'    TEXT-161     ' '.
      LOOP AT I_FIELDCAT INTO STRUCT_CAT.
        CASE STRUCT_CAT-FIELDNAME.
          WHEN 'PROMO_TYPE'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-NO_OUT = C_SPACE.
            ELSE.
              STRUCT_CAT-NO_OUT = C_X.
            ENDIF.
          WHEN 'CLEARANCE'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-NO_OUT = C_SPACE.
            ELSE.
              STRUCT_CAT-NO_OUT = C_X.
            ENDIF.
          WHEN 'START_DATE'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-082.
            ELSE.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-085.
            ENDIF.
          WHEN 'END_DATE'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-083.
            ELSE.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-086.
            ENDIF.
          WHEN 'PP_ID'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-084 .
            ELSE.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-088.
            ENDIF.
        ENDCASE.
        MODIFY I_FIELDCAT FROM STRUCT_CAT INDEX SY-TABIX.
      ENDLOOP.
      CLEAR STRUCT_LAYOUT.
      STRUCT_LAYOUT-COLWIDTH_OPTIMIZE = C_X.
      IF G_PROMO_FLAG = C_X.
        STRUCT_LAYOUT-WINDOW_TITLEBAR   = TEXT-089.
      ELSE.
        STRUCT_LAYOUT-WINDOW_TITLEBAR   = TEXT-090.
      ENDIF.
      STRUCT_LAYOUT-ZEBRA = C_X.
    Populate sort table
      PERFORM POPULATE_SORT_TABLE.
    populate event table
      PERFORM POPULATE_EVENT_TABLE.
    Call function to display the list of existing promos in ALV format
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM = G_REPID
                IS_LAYOUT          = STRUCT_LAYOUT
                IT_FIELDCAT        = I_FIELDCAT
                IT_SORT            = I_SORTTAB[]
                IT_EVENTS          = I_EVENT[]
           TABLES
                T_OUTTAB           = I_STR_GRP1
           EXCEPTIONS
                PROGRAM_ERROR      = 1
                OTHERS             = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " VIEW_PROMO_FOR_STRGRP
    *&      Form  POPULATE_CATALOGUE
          Populating general informations for output format
         -->p_position     Column position
         -->p_fname        Field name
         -->p_tabname      Internal table name
         -->p_title        Title
         -->p_display      Display/No display
    FORM POPULATE_CATALOGUE USING    P_POSITION TYPE SYCUCOL
                                     P_FNAME    TYPE FIELDNAME
                                     P_TABNAME  TYPE TABNAME
                                     P_TITLE    TYP

    Hi sahil,
    probably one or more fields used for comparison in for all entries where clause is not part of the refered table. The error is given for one of your for all entries select - I don't know which one it was. Check this condition: Are all fields like i.e. I_SKU_HIER-PP_ID parts of the used tables?
    Maybe ther is a typo.
    Regards,
    Clemens

  • IPhoto album backups and duplicate photos

    Hello,
    After uprading to iPhoto 6, I went through the whole library and put it all into about 15 separate albums. I've only got about 2000 photos, but it was still a lot of work. After I had done this, I started making a calendar, which for some strange reason make iPhoto practically refuse to run, so I had to re-install. (ther people on discussions have had the same problem, and the common factor seems to be trying to make a calendar).
    After the re-install, I re-imported all my photos back into iPhoto. I'm not going to try and make a calendar straight away, as before I do, I really want to back up my Albums.
    Does a straight complete backup of the iPhoto library folder back this up for me? If not, can anyone tell me how this can be achieved?
    Secondly, after re-importing all my photos, the photos that I had previously edited now are present in two forms; the original and the edited one. Unfortunately it is too late to re-import my library having deleted the folder "Originals". I didn't think of it at the time!
    Does anyone know of a way to delete duplicate photos, or how I could at least get them all side by side, as a lot are spaced out and therefore it can be hard to compare and see if they are duplicated.
    Any ideas would be hugely appreciated, as this is really stopping me using iPhoto that much at the moment.
    Many many thanks for any help, it will be extremely gratefully received!!
    Regards,
    Adam Dalton

    Hi Adam,
    All you need to do is backup the entire iPhoto Library folder. This will preserve everything. If for some reason you need to use this backup then you would place it in the Pictures folder and launch iPhoto. iPhoto will launch and open the library. there is no need to import all your photos again.
    If you have an iPhoto Library folder already in the Pictures folder, but you want to replace it or it is damaged, then drag that folder to the desktop and drag the backup into the Pictures folder, then launch iPhoto.
    Bottom line...back up the iPhoto Library folder in the Pictures folder. do it often.
    As far as the duplicates you have now, do you have your view set to film rolls? I would think since the film roll name is the same they would be next to each other. How about putting the name of the roll in the search field? You should get the contents of both modified and Originals from the rolls. You can then delete what you don't want.
    Backing up your iPhoto Library
    1. Burn the iPhoto Library folder in the Finder to a CD or DVD
    This method will give you a burned iPhoto Library folder that can be copied back to your computer to replace a damaged library. You can also use this method to backup an old library when you want to create a new Library to use as your current library.
    insert a blank CD into your internal or external CD-RW drive and copy the iPhoto library to the CD icon on your desktop. When you drag the CD icon to the Trash/Eject button in the Dock, you are given the option to burn the CD. Click Burn and the CD is created. To burn a DVD backup of your digital images, use a DVD and a SuperDrive-equipped Mac
    The easiest way to burn an iPhoto Library folder in the Finder that is larger than 4.7 gig to fit on one DVD is to burn sections of the folder.
    Drag the iPhoto Library folder to the desktop
    Double click the folder to open it.
    Drag each Year folder to the desktop.
    You should be left with the iPhoto Library folder containing all the data files, and the Year folders.
    Combine whatever year folders that amount closest to a DVD burn size on one DVD. Make sure that you have burned all the Year folders, then the iPhoto Library folder with all the data files.
    If you ever need to use this backup, insert the DVDs into your computer and copy the folders to the desktop. Put all the Year folders back into the iPhoto Library folder. Then put the iPhoto Library folder back into the Pictures folder.
    2. Copy the ENTIRE iPhoto Library to an external drive formated for a Mac. Do not use this as your only back up as the external can also go bad.
    3. Copy the ENTIRE iPhoto Library to your iPod in disk mode
    4.Creating your own CDs and DVDs for viewing in iPhoto
    This method is a great way to back up Albums of older photos or even your entire library if it is small enough to fit on a DVD. This method will give you a library that will mount within iPhoto in the source column to be viewed. To import any images from this library they need to be dragged into your library in the source column.
    If you just want to backup the images in your library:
    1) Within iPhoto select the images, albums or rolls you want to backup. Go to Share>Export and export them to a newly created folder on the desktop. Follow the directions in the next link.
    Creating a CD or DVD to be viewed in Windows or by a photo processing company

  • Please help iPhoto library problems - faces, facebook etc.

    I don't know what I'm doing wrong but iPhoto 09 has never worked very well for me. When I first started to use iPhoto 09 I went through my library to tag everyone so they came up in the faces thing. I had to add lots of missing faces because it didn't detect many. Then it merged lots of the faces together under one face name and also lost most of the ones I had tagged. I was really annoyed because this took me ages and I read on the forum that others were having problems so I decided to leave it for a while. I also had a huge problem uploading to facebook. When I made an album to upload it would start but then my internet would go off and then iPhoto just crashed. Whenever I touch any of the facebook albums iPhoto just crashes. After a couple of updates I started to think these features might be working better so I decided to sort out my library. I started to sort out the faces thing where they different people had been merged. I went through and added lots of missing faces. When I went back to check these photos the names I had added disappeared from the photo. I tried about 10 times and each time they disappeared on the same photos. Facebook was still crashing so I deleted all of my facebook albums which took ages because it kept crashing. Now it has duplicated an event and put it under a blank name and a different date. When i try to delete the photos they stay there and when I try to merge the folders that are the same, another event gets put in the folder of the same date, creating different duplicates. I don't understand what i'm doing wrong and I'm so scared of losing photos and all of the things like dates and order etc. Can anyone tell me why i'm having all of these problems? I think i need to rebuild my libary but I don't know how and i'm scared of losing photos or dates, or names or places or faces. Sorry such a long post, any help would be appreciated. Thanks.

    It's likely that your Library database has been damaged in all the crashing.
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    Regards
    TD

  • In Iphoto I have MANY duplicate photos. Is there a way I can rid the duplicates without doing them individually?  Thanks Dave

    I have dozens of duplicate photos in Iphoto. Is there a way of deleting the duplicates without doing each one
    individually?  Thanks Dave

    No - Diplicate Annihilator does not "accidently" duplicate anything - in fact is does not change anything - it simply identifies duplicates and markes them so you can easily deal with them
    and iPhoto does  not duplicate photos - randomly, accidently or on purpose - duplicate photos are the result of user action like importing an iPhoto library into another iPhoto library (NEVER do that), telling iPhoto to importa all rahter than selected or other user errors
    As to specific help you need to start a new thread and give exact details on your system and what you are doing and what exactly is happening
    LN

  • Help Required in full outer Join

    I feel the below query can be changed to full outer join. But, I've not been able to do so.
    I require your help in changing it to full outer join. My current query is
    SELECT CLAIMNO,'1' INDX FROM D_CLAIM@CMS2PROD
    WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null
    MINUS
    SELECT CLAIMNO,'1' FROM D_CLAIM
    WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null
    UNION
    SELECT CLAIMNO,'2' FROM D_CLAIM
    WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null
    MINUS
    SELECT CLAIMNO,'2' FROM D_CLAIM@cms2prod
    WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null

    donisback wrote:
    I feel the below query can be changed to full outer join. But, I've not been able to do so.
    I require your help in changing it to full outer join. My current query is
    SELECT CLAIMNO,'1' INDX FROM D_CLAIM@CMS2PROD
    WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null
    MINUS
    SELECT CLAIMNO,'1' FROM D_CLAIM
    WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null
    UNION
    SELECT CLAIMNO,'2' FROM D_CLAIM
    WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null
    MINUS
    SELECT CLAIMNO,'2' FROM D_CLAIM@cms2prod
    WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null
    I do not think that query is doing what you think that it is doing - on first inspection, it was not doing what I thought either due to the order in which the UNION and MINUS operators are performed. If the FILECREATEDT column is defined as a DATE, your query is relying on an implicit date conversion - in such a case, you should replace:
    filecreatedt='18-feb-2011'With:
    filecreatedt=TO_DATE('18-feb-2011','DD-MON-YYYY')Now, building a simple model to explain what is happening, we create two tables with 10 rows each. The first table has C1 values that increase by 2, while the second has C1 values that increase by 3:
    CREATE TABLE T1 AS
    SELECT
      ROWNUM*2 C1,
      TRUNC(SYSDATE)+ROWNUM*2 C2
    FROM
      DUAL
    CONNECT BY
      LEVEL<=10;
    CREATE TABLE T2 AS
    SELECT
      ROWNUM*3 C1,
      TRUNC(SYSDATE)+ROWNUM*3 C2
    FROM
      DUAL
    CONNECT BY
      LEVEL<=10;It appears that the intended result of your query is to obtain a distinct list of those rows that are in each table that are not in both tables - the UNION ALL minus the intersection of the rows in two tables. However, that is not what you are achieving with that query. To demonstrate, the two halves of your query:
    SELECT
      C1,
      C2
    FROM
      T1
    MINUS
    SELECT
      C1,
      C2
    FROM
      T2;
    C1 C2
    2 28-FEB-11
    4 02-MAR-11
    8 06-MAR-11
    10 08-MAR-11
    14 12-MAR-11
    16 14-MAR-11
    20 18-MAR-11
    SELECT
      C1,
      C2
    FROM
      T2
    MINUS
    SELECT
      C1,
      C2
    FROM
      T1;
    C1 C2
    3 01-MAR-11
    9 07-MAR-11
    15 13-MAR-11
    21 19-MAR-11
    24 22-MAR-11
    27 25-MAR-11
    30 28-MAR-11As can be seen by the above, each half returned 7 rows - there are 7 rows in each table that is not in the other table. Common sense would state that if we UNION these two results (assuming no duplicate values in each table), we would see 14 rows:
    SELECT
      C1,
      C2
    FROM
      T1
    MINUS
    SELECT
      C1,
      C2
    FROM
      T2
    UNION
    SELECT
      C1,
      C2
    FROM
      T2
    MINUS
    SELECT
      C1,
      C2
    FROM
      T1;
    C1 C2
    3 01-MAR-11
    9 07-MAR-11
    15 13-MAR-11
    21 19-MAR-11
    24 22-MAR-11
    27 25-MAR-11
    30 28-MAR-11Only 7 rows? Let's try again with the help of inline views to control the order in which the MINUS and UNION operators are processed:
    SELECT
    FROM
      (SELECT
        C1,
        C2
      FROM
        T1
      MINUS
      SELECT
        C1,
        C2
      FROM
        T2)
    UNION
    SELECT
    FROM
      (SELECT
        C1,
        C2
      FROM
        T2
      MINUS
      SELECT
        C1,
        C2
      FROM
        T1);
    C1 C2
    2 28-FEB-11
    3 01-MAR-11
    4 02-MAR-11
    8 06-MAR-11
    9 07-MAR-11
    10 08-MAR-11
    14 12-MAR-11
    15 13-MAR-11
    16 14-MAR-11
    20 18-MAR-11
    21 19-MAR-11
    24 22-MAR-11
    27 25-MAR-11
    30 28-MAR-11Note that the above returned 14 rows. We can do the same using just two outer joins:
    SELECT
      T1.C1,
      T1.C2
    FROM
      T1,
      T2
    WHERE
      T1.C1=T2.C1(+)
      AND T2.C1 IS NULL
    UNION
    SELECT
      T2.C1,
      T2.C2
    FROM
      T1,
      T2
    WHERE
      T2.C1=T1.C1(+)
      AND T1.C1 IS NULL;
    C1 C2
    2 28-FEB-11
    3 01-MAR-11
    4 02-MAR-11
    8 06-MAR-11
    9 07-MAR-11
    10 08-MAR-11
    14 12-MAR-11
    15 13-MAR-11
    16 14-MAR-11
    20 18-MAR-11
    21 19-MAR-11
    24 22-MAR-11
    27 25-MAR-11
    30 28-MAR-11Or we can do it with a full outer join and a MINUS operator:
    SELECT
      NVL(T1.C1,T2.C1) C1,
      NVL2(T1.C1,T1.C2,T2.C2) C2
    FROM
      T1 FULL OUTER JOIN T2
        ON T1.C1=T2.C1
    MINUS
    SELECT
      T1.C1,
      T1.C2
    FROM
      T1,
      T2
    WHERE
      T1.C1=T2.C1;
    C1 C2
    2 28-FEB-11
    3 01-MAR-11
    4 02-MAR-11
    8 06-MAR-11
    9 07-MAR-11
    10 08-MAR-11
    14 12-MAR-11
    15 13-MAR-11
    16 14-MAR-11
    20 18-MAR-11
    21 19-MAR-11
    24 22-MAR-11
    27 25-MAR-11
    30 28-MAR-11Or just with a full outer join with a WHERE clause:
    SELECT
      NVL(T1.C1,T2.C1) C1,
      NVL2(T1.C1,T1.C2,T2.C2) C2
    FROM
      T1 FULL OUTER JOIN T2
        ON T1.C1=T2.C1
    WHERE
      (T1.C1 IS NULL
        OR T2.C1 IS NULL);
    C1 C2
    3 01-MAR-11
    9 07-MAR-11
    15 13-MAR-11
    21 19-MAR-11
    24 22-MAR-11
    27 25-MAR-11
    30 28-MAR-11
    8 06-MAR-11
    20 18-MAR-11
    2 28-FEB-11
    10 08-MAR-11
    4 02-MAR-11
    14 12-MAR-11
    16 14-MAR-11With the above knowledge, you should be able to fix your SQL statement to produce the expected results.
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

Maybe you are looking for