Correctness of the HashMap implementation w.r.t. its specifications/docs

According to the JavaDoc of HashMap, containsKey is defined as :
public boolean containsKey(Object key)
     Returns true if this map contains a mapping for the specified key.
     Specified by:
          containsKey in interface Map
     Overrides:
          containsKey in class AbstractMap
     Parameters:
          key - The key whose presence in this map is to be tested
     Returns:
          true if this map contains a mapping for the specified key.
Again, according to the JavaDoc of Map, containsKey is defined as :
public boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key. More formally, returns true if and only if this map contains at a mapping for a key k such that (key==null ? k==null : key.equals(k)). (There can be at most one such mapping.)
In a project, I use a HashMap to store objects and my key class is something like that :
public class MyKey {
private String s1 = null;
private String s2 = null;
public MyKey(String s1, String s2) {
this.s1 = s1;
this.s2 = s2;
public boolean equals(Object o) {
if (o instanceof MyKey) {
MyKey oKey = (MyKey) o;
returns this.s1.equals(o.s1) && this.s2.equals(o.s2);
returns false;
So according to the JavaDoc, the following should be ok :
MyKey key1 = new MyKey("hello","world");
MyKey key2 = new MyKey("hello","world");
HashMap map = new HashMap();
map.put(key1, new Object());
map.containsKey(key1); // returns true
map.containsKey(key2); // returns false BUT should return true
After reading the code of containsKey, it actually does a AND test on a hashcode and the equals method, which does not correspond to the spec.
map.containsKey(key2) returns false because although key1.equals(key2) is true, key1.hashCode() != key2.hashCode().
Is that behaviour normal ? Am I missing something in my understanding of the keys comparison ?
This behaviour also stands for the Set Interface, despite what's said in the JavaDoc.
Regards.
Jerome

It's not so clear exactly how the documentation should be ammended though. HashMap.containsKey is required to conform to Map.containsKey, and putting the hashCode referencing stuff into Map would force its use in every Map implementation, even if they weren't in fact hash maps.
I think the view that the designers have taken is that the key is assumed to be well-formed, which means that all its methods obey their contracts. If this isn't true, then the behaviour is undefined.
Do we want such a well-formed requirement to be expressly stated everywhere that an Object is used?
Sylvia.

Similar Messages

  • Why the HashMap implements the Map interface twice

    See the type hierarchy below:
    HashMap<K,V>
    &#9475;
    &#9507;AbstractMap<K,V>
    &#9475;&#9475;
    &#9475;&#9495;Map<K,V>
    &#9495;Map<K,V>
    The HashMap extends AbstractMap, which implements Map. So the HashMap has already implements Map, and has the Map type. But the HashMap's declaration still contains "implements Map".
    So why the HashMap implements the Map interface twice?
    Thanks in advance.

    georgemc wrote:
    Maybe the guy who wrote HashMap wanted to make it clear that HashMap implemented Map, rather than rely on you looking further up the hierarchy to find outYes, it does make the Javadoc clearer. If they hadn't done that then there would have been legions of newbies who couldn't tell that HashMap implemented Map and thousands of "I have a doubt, does HashMap implement Map" questions here.

  • HTML5 UI is unable to correctly get the information of  key-events .

    I have developed a plug-in for Illustrator CC2014.
    But, The Plug-in UI which was built with HTML5, is unable to correctly get the information of  key-events .
    As problems following.
        0-9 key press       : "keyCode" is "0"
        Shift key press     : "shiftKey"is "false"
        Alt key press        : "altKey"is"false"
    Even if acquired at any timing(keydown, keypress, keyup) symptom occurs.
    In the Windows, you can get the information of key-events is correct at the same implementation.
    In the case of the browser UI, even in the Mac, I can correctly get.
    What causes that can not be acquired key event information is correct on the plug-in?
    Also, If you have any way to get the information of key-events correctly, please let me know.

    Pulluran wrote:
    I tried the event, but it does not resolve.
    In the windows, onKeydownEvent(event) can get the event information correctly.
    in the Mac, the keyevent information was originally can be get.The problem is that the keyevent information was not the correct information.
    "in the Mac, the keyevent information was originally can be get"
    What does that mean?
    "The problem is that the keyevent information was not the correct information."
    The problem seems to be that the event contains no information, keyCode is always zero and shiftKey and altkey are always false.
    What happens if you try
    function onKeydownEvent(obj) {
    var keyCode = (obj.keyCode >= 96 && obj.keyCode <= 105) ? obj.keyCode - 48 : obj.keyCode;
    var inputStr = String.fromCharCode(keyCode);

  • Documentation of the HashMap class

    Is it me or is the documentation of the HashMap class missing the very important sentence "classes used as keys _must_ implement the equals and hashCode methods".
    This sentence is present in the Hashtable documentation.
    Best regards
    Torben Hoffmann

    Well, its described in the Map interface. So maybe
    that's why they didn't bother to describe it in the
    HashMap class.I have look at the documentation of the Map interface and it does not say anything regarding a hashCode requirement on the keys as far as I can see (do you have an URL to where you found your info?).
    I would consider it to be correct to leave out any talk of hashCode in the Map interface since that has nothing to do with that interface.
    Cheers,
    /Torben

  • How can i create my own HashMap implementation?

    Do i extend HashMap and just override the needed methods?

    What i wanted to do was change the way a HashMap stores it's
    elements so it behaves the same as a TreeMapBad idea IMO. The two are vastly different.
    HashMap implements Map
    TreeMap implements SortedMap
    Do you want to implement a Map or a SortedMap?
    Using a hash by definition precludes having any sort of ordering to the elements.
    If you want to implement your own Map, then do exactly that.
    The best way would be to extend AbstractMap and go from there.
    What advantages are you hoping to gain by providing your own implementation of Map?
    Have you looked at all the other implementations in the API to see if they are of any use?
    Cheers,
    evnafets

  • Creating the BAdI implementation: se19(OSS note )

    Hi Experts,
    I have to apply a Note 1330434 ( FBL5N: Performance improvement by changed selection.) in our ECC.6.0.
    The 1330434 note says,
    Solution
    When you implement a new BAdI in the line item display, the selection logic can be optimized. The system only reads the clarification case attributes for the line items that are also displayed.
    Import the specified Support Package.
    To implement the correction instructions manually, proceed as follows:
    1...
    2. Implement the corrections in accordance with the correction instructions.
    3. Creating the BAdI implementation:
    Call transaction: SE19.
    Under "Create Implementation", choose "Classic BAdI".
    BAdI name: FI_ITEMS_CH_DATA
    Implementation name: FDM_AR_ITEM_ATTR_GET
    Implementation short text: FSCM-DM: Selection of attributes in FBL5N
    Activate the implementation.
    How to do the third step --> .."3. Creating the BAdI implementation: " ?
    when I go to se19,
    Under "Create Implementation", choose "Classic BAdI"... give FI_ITEMS_CH_DATA or FDM_AR_ITEM_ATTR_GET
    and then press button 'create impl.'
    then it says  "Badi definition FI_ITEMS_CH_DATA does not exist."
    I struck up at 3rd part of the note (BADI creation/implementation part of the note.).
    Please suggest me how to apply this Badi part of the note ?
    YOUR HELP WILL BE HIGHLY APPRECIATED!
    Thanks in advance.
    Edited by: sam kumar on Jul 22, 2009 12:22 AM

    Are you sure this note is for your system. I am also working in ECC6. I checked but I couldn't find the defibition too. Make sure note is for your component version and if it is report this problem to OSS.
    Edited by: Gungor Ozcelebi on Jul 22, 2009 8:37 AM

  • I have an wireless printer and a new wifi router. I have set the printer and iPhone / iPad correctly to the new router but when i try to print it won't recognise the air printer. Help. All was working fine on my old router

    I Have a new wifi router and have set up my iPad / iPhone and wireless printer correctly  to the new router but I can't print from the iPad and iPhone. It keeps saying ' no AirPrint printer found'. Help please!

    Start with the most basic thing that you can try. Unplug the router from power for about 30 seconds, and restart the printer and the iPad and plug the router back into power.

  • Photoshop CS6 - Spot channels are not saved correctly in the psd files.

    Hi,
    I'm using Photoshop CS6 and something happent a few days ago....some Windows or Adobe update messed up everything...I don't know...
    Here's how things are.
    If I add to an image a couple of new spot channels (any Pantone color) and remove the informations from the CMYK channels (or not-the problem it's there anyway), I should have an image with 6 color plates (CMYK and the 2 Pantone). It doesn't happened anymore...
    I'm using Corel to print the files and the previous saved files are fine, I have all the Spot colors there. Now, If I edit any file I've worked on before, and save it again, the spot colors dissapear when I'm importing the psd file in my Corel document. And if there is no information on the CMYK channels, I'm getting a blank image...
    I hope someone will give me some ideas because I don't know what to do anymore...
    Codrut

    Right. It's not reading these new saved files correctly. The old ones are fine.
    I forgot to mention one thing. I've got this CS6 as an upgrade and I still have the CS5 one running on the same computer. The CS5 version does the same thing...
    Today I tryed again to open a PSD (CS6) with another CS5 version from another computer and came with an error message "Could not complete your request because the specified color book cannot be found". And the file didn't opened....
    Who messed up my color book and how can I fix it?

  • Can not receive Mac mail -error Outlook cannot find the server. Verify the server information is entered correctly in the Account Settings, and that your DNS settings in the Network pane of System Preferences are correct.  Account name: "MacMail"

    Can not receive Mac mail -error Outlook cannot find the server. Verify the server information is entered correctly in the Account Settings, and that your DNS settings in the Network pane of System Preferences are correct.  Account name: "MacMail"
    What are the correct mail account settings and more importantly the correct DNS settings
    Thank you for any help you may be able to provide
    Cheers
    Chris (iMac i7)

    Do not delete the old account yet. sign up for an iCloud account if you haven't.
    I understand .mac mail will still come through. Do not delete the old account yet.
    You cannot use .mac or MobileMe as type of Account, you have to choose IMAP when setting up, otherwise Mail is hard coded to change imap.mail.me.com to mail.me.com & smtp.mail.me.com to smtp.me.com, no matter what you try to enter.
    iCloud Mail setup, do not choose .mac or MobileMe as type, but choose IMAP...
    On second step where it asks "Description", it has to be a unique name, but you can still use your email address.
    IMAP (Incoming Mail Server) information:
              •          Server name: imap.mail.me.com
              •          SSL Required: Yes
              •          Port: 993
              •          Username: [email protected] (use your @me.com address from your iCloud account)
              •          Password: Your iCloud password
    SMTP (outgoing mail server) information:
              •          Server name: smtp.mail.me.com
              •          SSL Required: Yes
              •          Port: 587
              •          SMTP Authentication Required: Yes
              •          Username: [email protected] (use your @me.com address from your iCloud account)
              •          Password: Your iCloud password
    Also, you must upgrade your password to meet the new criteria:  8 characters, including upper and lower case and numbers.  If you have an older password that does not meet these criteria, when you try to setup mail on your mac, using all of the IMAP criteria listed above, it will still give a server error message.  Go to   http://appleid.apple.com         then follow directions to change your password, then go back to setting up your mail using the IMAP instructions above.
    Thanks to dpepper...
    https://discussions.apple.com/thread/3867171?tstart=0

  • BKI0008E: The environment variable BI_CALLER is not set correctely. The cur

    Hi All,
    I have configured backint for backup of maxdb for content server 640. I configured it as per the documents available, created the configuration fiale and the parameter file. Created the backup medium in dbmgui.
    Now when i try to run the backup using the pipe am getting the above mentioned error.
    Please find below the dbm.ebp log for the same...
    more dbm.ebp
    2009-10-22 02:06:08
    Setting environment variable 'TEMP' for the directory for temporary files and pi
    pes to default ''.
    Setting environment variable 'TMP' for the directory for temporary files and pip
    es to default ''.
    Using connection to Backint for MaxDB Interface.
    2009-10-22 02:06:08
    Checking existence and configuration of Backint for MaxDB.
        Using configuration variable 'BSI_ENV' = '/sapdb/CFC/lcbackup/apoatlas.env'
    as path of the configuration file of Backint for MaxDB.
        Setting environment variable 'BSI_ENV' for the path of the configuration fil
    e of Backint for MaxDB to configuration value '/sapdb/CFC/lcbackup/apoatlas.env'
        Reading the Backint for MaxDB configuration file '/sapdb/CFC/lcbackup/apoatl
    as.env'.
            Found keyword 'BACKINT' with value '/sapdb/CFC/db/bin/backint'.
            Found keyword 'INPUT' with value '/tmp/backint4sapdbCFC.in'.
            Found keyword 'OUTPUT' with value '/tmp/backint4sapdbCFC.out'.
            Found keyword 'ERROROUTPUT' with value '/tmp/backint4sapdbCFC.err'.
            Found keyword 'PARAMETERFILE' with value '/sapdb/CFC/lcbackup/param.cfg'
            Found keyword 'TIMEOUT_SUCCESS' with value '1800'.
            Found keyword 'TIMEOUT_FAILURE' with value '1800'.
        Finished reading of the Backint for MaxDB configuration file.
        Using '/sapdb/CFC/db/bin/backint' as Backint for MaxDB program.
        Using '/tmp/backint4sapdbCFC.in' as input file for Backint for MaxDB.
        Using '/tmp/backint4sapdbCFC.out' as output file for Backint for MaxDB.
        Using '/tmp/backint4sapdbCFC.err' as error output file for Backint for MaxDB
        Using '/sapdb/CFC/lcbackup/param.cfg' as parameter file for Backint for MaxD
    B.
        Using '1800' seconds as timeout for Backint for MaxDB in the case of success
        Using '1800' seconds as timeout for Backint for MaxDB in the case of failure
        Using '/sapdb/data/wrk/CFC/dbm.knl' as backup history of a database to migra
    te.
        Using '/sapdb/data/wrk/CFC/dbm.ebf' as external backup history of a database
    to migrate.
        Checking availability of backups using backint's inquire function.
    Check passed successful.
    2009-10-22 02:06:08
    Checking medium.
    Check passed successfully.
    2009-10-22 02:06:08
    Preparing backup.
        Setting environment variable 'BI_CALLER' to value 'DBMSRV'.
        Setting environment variable 'BI_REQUEST' to value 'NEW'.
        Setting environment variable 'BI_BACKUP' to value 'FULL'.
        Constructed Backint for MaxDB call '/sapdb/CFC/db/bin/backint -u CFC -f back
    up -t file -p /sapdb/CFC/lcbackup/param.cfg -i /tmp/backint4sapdbCFC.in -c'.
        Created temporary file '/tmp/backint4sapdbCFC.out' as output for Backint for
    MaxDB.
        Created temporary file '/tmp/backint4sapdbCFC.err' as error output for Backi
    nt for MaxDB.
        Writing '/sapdb/CFC/lcbackup/pipe1 #PIPE' to the input file.
        Writing '/sapdb/CFC/lcbackup/pipe2 #PIPE' to the input file.
    Prepare passed successfully.
    2009-10-22 02:06:08
    Creating pipes for data transfer.
        Creating pipe '/sapdb/CFC/lcbackup/pipe1' ... Done.
        Creating pipe '/sapdb/CFC/lcbackup/pipe2' ... Done.
    All data transfer pipes have been created.
    2009-10-22 02:06:08
    Starting database action for the backup.
        Requesting 'SAVE DATA QUICK TO '/sapdb/CFC/lcbackup/pipe1' PIPE,'/sapdb/CFC/
    lcbackup/pipe2' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BACKINT_ONLINE1'' from
    db-kernel.
    The database is working on the request.
    2009-10-22 02:06:09
    Waiting until database has prepared the backup.
        Asking for state of database.
        2009-10-22 02:06:09 Database is still preparing the backup.
        Waiting 1 second ... Done.
        Asking for state of database.
        2009-10-22 02:06:10 Database is still preparing the backup.
        Waiting 2 seconds ... Done.
        Asking for state of database.
        2009-10-22 02:06:12 Database has finished preparation of the backup.
    The database has prepared the backup successfully.
    2009-10-22 02:06:12
    Starting Backint for MaxDB.
        Starting Backint for MaxDB process '/sapdb/CFC/db/bin/backint -u CFC -f back
    up -t file -p /sapdb/CFC/lcbackup/param.cfg -i /tmp/backint4sapdbCFC.in -c >>/tm
    p/backint4sapdbCFC.out 2>>/tmp/backint4sapdbCFC.err'.
        Process was started successfully.
    Backint for MaxDB has been started successfully.
    2009-10-22 02:06:12
    Waiting for end of the backup operation.
        2009-10-22 02:06:12 The backup tool is running.
        2009-10-22 02:06:12 The database is working on the request.
        2009-10-22 02:06:14 The backup tool process has finished work with return co
    de 2.
        2009-10-22 02:06:17 The database is working on the request.
        2009-10-22 02:06:27 The database is working on the request.
        2009-10-22 02:06:42 The database is working on the request.
        2009-10-22 02:07:02 The database is working on the request.
        2009-10-22 02:07:15 Canceling Utility-task after a timeout of 60 seconds ela
    psed ... OK.
        2009-10-22 02:07:17 The database has finished work on the request.
        Receiving a reply from the database kernel.
        Got the following reply from db-kernel:
            SQL-Code              :-903
    The backup operation has ended.
    2009-10-22 02:07:17
    Filling reply buffer.
        Have encountered error -24920:
            The backup tool failed with 2 as sum of exit codes. The database request
    was canceled and ended with error -903.
        Constructed the following reply:
            ERR
            -24920,ERR_BACKUPOP: backup operation was unsuccessful
            The backup tool failed with 2 as sum of exit codes. The database request
    was canceled and ended with error -903.
    Reply buffer filled.
    2009-10-22 02:07:17
    Cleaning up.
        Removing data transfer pipes.
            Removing data transfer pipe /sapdb/CFC/lcbackup/pipe2 ... Done.
            Removing data transfer pipe /sapdb/CFC/lcbackup/pipe1 ... Done.
        Removed data transfer pipes successfully.
        Copying output of Backint for MaxDB to this file.
    Begin of output of Backint for MaxDB (/tmp/backint4sapdbCFC.out)-
                                     Data Protection for mySAP(R)
                         Interface between BR*Tools and Tivoli Storage Manager
                         - Version 5, Release 4, Modification 0.0  for Linux x86_64
                               Build: 303  compiled on Nov 16 2006
                    (c) Copyright IBM Corporation, 1996, 2006, All Rights Reserved.
            BKI0008E: The environment variable BI_CALLER is not set correctely. The
    current value is "DBMSRV"
            usage:
             backint -p <par_file> [-u <user_id>] [-f <function>]
                    [-t <type>] [-i <in_file>] [-o <out_file>] [-c]
            where:
                   <user_id>    backint utility user
                   <function>   backup | restore | inquire | password | delete
                   <type>       file | file_online
                   <par_file>   parameter file for backup utility
                   <in_file>    name of a text file  that defines the objects
                                default: STDIN
                   <out_file>   Pool for processing messages and the results
                                of the executed function.
                                default: STOUT
            BKI0020I: End of program at: Thu 22 Oct 2009 02:06:14 AM EDT .
            BKI0021I: Elapsed time: 01 sec .
            BKI0024I: Return code is: 2.
    End of output of Backint for MaxDB (/tmp/backint4sapdbCFC.out)---
        Removed Backint for MaxDB's temporary output file '/tmp/backint4sapdbCFC.out
        Copying error output of Backint for MaxDB to this file.
    Begin of error output of Backint for MaxDB (/tmp/backint4sapdbCFC
    .err)----
    End of error output of Backint for MaxDB (/tmp/backint4sapdbCFC.e
    rr)----
        Removed Backint for MaxDB's temporary error output file '/tmp/backint4sapdbC
    FC.err'.
        Removed the Backint for MaxDB input file '/tmp/backint4sapdbCFC.in'.
    Have finished clean up successfully.

    Also, is there any specification about the user permissions and about how the backup should be run?

  • Please suggest a correction in the code: Urgent

    I am capturing the Material Document No., Material No., Material Description, Quantity etc. into a main_table in my code so as to write/print labels containing GRN details (movement type '105') using se38. These labels are to be pasted on the material received in stores, the exact requirement is 100% material identification sticker on all items to maintain FIFO. Obviously the no. of these stickers, to be printed, shall solely depend on the Quantity of a particular material received.
    I have written the following piece of code to print the captured information of GRN. The problem is that my code is unable to track the change in material document number. For example if I have 10 nos of quantity for a particular material say 1001 and 5 no.s of quantity for a subsequent material 1002. I should get 10 labels for 1001 and 5 for 1002 but my code is giving me 10 labels for 1002 also.
    Hope you got it.
    Please suggest the necessary correction on the following code.You can execute the following code and get a real time feeling of my problem.
    REPORT  ZMM_GRN_LABEL_REPORT_38.
    TABLES : MKPF, MSEG, MAKT.
    DATA : BEGIN OF I_MKPF OCCURS 0,
           MBLNR LIKE MSEG-MBLNR,
           BLDAT LIKE MKPF-BLDAT,
           MJAHR LIKE MKPF-MJAHR,
           END OF I_MKPF.
    DATA : BEGIN OF I_MSEG OCCURS 0,
           MBLNR LIKE MSEG-MBLNR,
           MATNR LIKE MSEG-MATNR,
           EBELN LIKE MSEG-EBELN,
           LIFNR LIKE MSEG-LIFNR,
           MENGE LIKE MSEG-MENGE,
           END OF I_MSEG.
    DATA : BEGIN OF I_MAKT OCCURS 0,
           MATNR LIKE MAKT-MATNR,
           MAKTX LIKE MAKT-MAKTX,
           END OF I_MAKT.
    DATA : BEGIN OF I_LFA1 OCCURS 0,
           LIFNR LIKE LFA1-LIFNR,
           NAME1 LIKE LFA1-NAME1,
           END OF I_LFA1.
    DATA: BEGIN OF MAIN_TABLE OCCURS 0,
          MBLNR LIKE MSEG-MBLNR,
          MATNR LIKE MSEG-MATNR,
          BLDAT LIKE MKPF-BLDAT,
          MAKTX LIKE MAKT-MAKTX,
          MENGE LIKE MSEG-MENGE,
          MJAHR LIKE MSEG-MJAHR,
          EBELN LIKE MSEG-EBELN,
          LIFNR LIKE MSEG-LIFNR,
          NAME1 LIKE LFA1-NAME1,
          END OF MAIN_TABLE.
    DATA : N LIKE MSEG-MENGE.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_MBLNR FOR MSEG-MBLNR.
    PARAMETERS : P_GJAHR LIKE MSEG-GJAHR.
    SELECTION-SCREEN END OF BLOCK B1.
    select MBLNR MJAHR BLDAT
    into corresponding fields of
    table I_MKPF
    from Mkpf
    where
    MBLNR in S_MBLNR and
    MJAHR EQ p_GJAHR.
    LOOP AT I_MKPF.
    MAIN_TABLE-MBLNR = I_MKPF-MBLNR.
    MAIN_TABLE-MJAHR = I_MKPF-MJAHR.
    MAIN_TABLE-BLDAT = I_MKPF-BLDAT.
    APPEND MAIN_TABLE.
    CLEAR MAIN_TABLE.
    ENDLOOP.
    IF I_MKPF[] IS NOT INITIAL.
    SELECT MBLNR MATNR EBELN LIFNR MENGE
    INTO CORRESPONDING FIELDS OF
    TABLE I_MSEG FROM
    MSEG
    FOR ALL ENTRIES IN I_MKPF
    WHERE
    MBLNR = I_MKPF-MBLNR.
    ENDIF.
    LOOP AT I_MSEG.
    LOOP AT MAIN_TABLE WHERE MBLNR = I_MSEG-MBLNR.
    MAIN_TABLE-MATNR = I_MSEG-MATNR.
    MAIN_TABLE-EBELN = I_MSEG-EBELN.
    MAIN_TABLE-LIFNR = I_MSEG-LIFNR.
    MAIN_TABLE-MENGE = I_MSEG-MENGE.
    MODIFY MAIN_TABLE INDEX SY-TABIX.
    ENDLOOP.
    ENDLOOP.
    IF I_MSEG[] IS NOT INITIAL.
    SELECT MATNR MAKTX
    INTO CORRESPONDING FIELDS OF
    TABLE I_MAKT FROM MAKT
    WHERE
    MATNR = I_MSEG-MATNR.
    ENDIF.
    LOOP AT I_MAKT.
    LOOP AT MAIN_TABLE WHERE MATNR = I_MAKT-MATNR.
    MAIN_TABLE-MAKTX = I_MAKT-MAKTX.
    MODIFY MAIN_TABLE INDEX SY-TABIX.
    ENDLOOP.
    ENDLOOP.
    IF I_MSEG[] IS NOT INITIAL.
    SELECT LIFNR NAME1
    INTO CORRESPONDING FIELDS OF
    TABLE I_LFA1 FROM LFA1
    FOR ALL ENTRIES IN I_MSEG
    WHERE
    LIFNR = I_MSEG-LIFNR.
    ENDIF.
    LOOP AT I_LFA1.
    LOOP AT MAIN_TABLE WHERE LIFNR = I_LFA1-LIFNR.
    MAIN_TABLE-NAME1 = I_LFA1-NAME1.
    MODIFY MAIN_TABLE INDEX SY-TABIX.
    ENDLOOP.
    ENDLOOP.
    ******************************Problem lies somewhere here
    N = MAIN_TABLE-MENGE.
    DO N TIMES.
    SORT MAIN_TABLE BY MBLNR.
    LOOP AT MAIN_TABLE.
    WRITE :/5 MAIN_TABLE-MBLNR.
    WRITE :/5 MAIN_TABLE-MAKTX, 50 MAIN_TABLE-MATNR.
    ENDLOOP.
    ENDDO.

    Hello,
    Take one new table with three fields ie. it_no with mblnr, matnr and menge.
    collect data to new table form main_table.
    and replace your doubtful code by
    SORT MAIN_TABLE BY MBLNR.
    loop at it_no.
    N = it_no-MENGE.
    DO N TIMES.
    LOOP AT MAIN_TABLE where matnr = it_no-matnr.
    WRITE :/5 MAIN_TABLE-MBLNR.
    WRITE :/5 MAIN_TABLE-MAKTX, 50 MAIN_TABLE-MATNR.
    ENDLOOP.
    ENDDO.
    endloop.
    regards,
    Naimesh

  • (ios5 ipad bugs)I can't get changes of album art, artist, album and other tags to show up in the iPad music player, but they show up correctly in the iTunes device view. Certain random songs do not sync correctly.   Wifi sync hasn't worked yet.

    (ios5 ipad bugs)I can't get changes of album art, artist, album and other tags to show up in the iPad music player, but they show up correctly in the iTunes device view. Certain random songs do not sync correctly.   Wifi sync hasn't worked yet.
    I mostly use technology for education and professional audiovisuals and lights.
    I don't sync  music because I use music from at least 4 different computers. (manually mange music)
    I use my iPad to play performance tracks for church and a local gospel group out of our church, Won4Christ.
    I chose to buy the iPad because the laptop of one of the group members (dellxps running iTunes) was randomly losing and mixing up music and I wanted a more stable option that was bigger than my iPod touch.
    I tried to add some data to music libraries that I previously added to my iPad, but the data only shows up when looking at the device in iTunes.
    Wifi sync has not worked on either my laptop or desktop ( both running windows 7 enterprise 64 and newest iTunes) not really a big issue, but very annoying
    When browsing through library playlist albums on the iPad, random artwork shows up on playlists with no artwork that you touch while dragging, and it does not go away until you change to another navigation tab and back.
    Random songs out of hundreds that I added showed up in iTunes grayed out with a sync circle beside them.  Those songs would play back okay on the iPad but were unplayable through the iTunes device view.  I had to delete the songs manually through the library along with the playlist and add them again. 
    These seem to be major stability bugs in the "new" music app and iTunes.  My only option right now seems to be to delete the songs that I want to change and re-add them with the changes already applied rather than changing the id3 tags and artwork on the existing music. I hope apple will release updates to resolve these issues. 
    Thank you for actually making it to the end of this manuscript of annoyances.

    Just wondered if anyone had any other suggestions.

  • I have OSX 10.5.7 on my Intel Mac. When I try to login using the correct password the screen goes white and just returns back to the login screen. It does not jiggle like when you enter the wrong password.

    I have had a number of issues with my Intel Mac recently and had to reboot using disk utilities, safe mode, OSX recovery, but always come back to the login screen but when I type my password the screen goes white and returns to the login screen. My password is correct and the login does not jiggle as it would if the password was wrong. Please advise,

    Back up all data if you haven’t already done so. There are ways to back up, even if you can’t log in. Before proceeding,you must be sure you can restore everything to the state it’s in now. If you’re not sure you can do that, STOP.
    The procedure below may spare you the need for a clean reinstallation of OS X. If you don't feel comfortable carrying it out, don't. try.
    Briefly, you need to delete the following file:
    /var/audit/current
    If you already know how to do that, you can skip the rest of this message. Do it, and try again to log in.
    Boot in single-user mode by holding down the key combination command-S at the startup chime. If you’re using an external USB keyboard, it must be plugged directly into a built-in port on the Mac, not into a hub. Release the keys when you see a black screen with scrolling white text. In this mode, there’s no graphical interface; just a command line. Initially, you can’t make any changes to files.
    When the text stops scrolling, and you see a line ending in a pound sign (“#”), type the following command:
    mount -uw /
    You must type the command exactly as given, with no mistakes. If you don’t feel able to do that, STOP. At this stage, no harm will be done if you make a mistake, but later, it will be. Press the return key.
    Next, type the following command:
    rm -i /var/audit/current
    Press return. You should get the following output:
    remove /var/audit/current?
    If that's not what you get, STOP. Type the single letter N, press return, and try again. Otherwise, type the single letter Y and pressreturn.
    Finally, enter the command:
    exit
    Press return. The text will start scrolling again, and then the system will reboot. Try again to log in.
    Credit for this solution to ASC user AnthonyTW.

  • The Apple trackpad won't except the "pinch open and close" command on Firefox version 4. It is configured correctly in the system preferences. HELP!

    I am using the Apple trackpad with Firefox version 4. The trackpad won't "pinch open and close". It is configured correctly in the system preferences. It also worked in version 3. Anyone have any suggestions?

    Do the related browser.gesture prefs on the <b>about:config</b> page still have a value set for those gestures?
    Which Firefox function should be performed with those gestures?
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />

  • Excise not captured in the MIGO & Tax calculation is not correct in the PO.

    Excise Settings completed.                    02.11.2007
    a)     Configuration done as per J05 Building block.( Tax Procedure TAXINN)
    b)     Maintained J1ID, all steps.
    c)     Maintained tax code in FTXP.
    d)     FV11 &#61664; Maintained for Material, vendor, Plant in combination with Tax code input tax maintained in FTXP.
    e)     Checked CIN Health, all tick are green.
    f)     Given all G/L accounts for Excise Transaction Type (ETT)
    g)     Maintained all number Ranges.
    Issue &#61664; 1)
    Tax calculation is not correct in the PO, tax tab
    a)     JMIP is appearing 12% in condition amount, (as per condition record) but condition value is Zero, (Not calculated by the FI Pricing procedure). Screen shot for Pricing procedure, PO taxes and condition record given below.
    b)     JIPC Sales tax 4% in condition amount (as per condition record) , calculated by the FI Pricing procedure is 8%, condition value is Rs 8 instead of Rs 4
    Fi pricing procedure.
    PO Taxes &#61664; wrong Tax calculated
    FV11&#61664; Condition record
    Issue &#61664; 2)
    While creating Goods receipt aginst PO (Tax code V2 in PO). Movement type 101, Excise tab appears at Header and Item level and we need to put the Vendors Excise Invoice and date, nothing is copied from the PO for Excise duty  & sales tax.
    Now we put the values for ED and Sales tax manually in the MIGO and saved the document. While display material document, excise tab is not there i.e. no excise related activiy is captured here in goods receipt.
    If you need more detail, please revert on cell 093295 53235.
    Please suggest.
    Manish Gupta
    93295 53235
    [email protected]

    Hai,
    1.Check the condition types JMIP & JMIC in IMG - Financial accting New - FI AC Global settings - Taxes on sales and purchases - Check calculation procedure - Define condition type.
    2.The condition types you have used are defined for non deductible taxes i.e., it gets inventorised, added to the material account.And also the accural key assigned to this condition types are NVV - defined for non ded input taxes.
    3.Instead the condition types defined by SAP Standard system for BED & ST are JMOP & JIPS and the accurals assigned to this are VS1 & VS5.
    If you want clear details mail the screen shots to my id [email protected]

Maybe you are looking for

  • Zip files related to startCD

    Hi, Can you please help me what are the zip files in 12.1.1 for Linux86-64 related to startCD. I think these are related to startCD. B53824-01_1of4.zip B53824-01_2of4.zip B53824-01_3of4.zip B53824-01_4of4.zip Thanks, Kavitha

  • ATGDustCase - Unable to load the components when the nuclues is starting up

    Hi, Below is the ATGDust Case code to unit test existing DropletInvoker. But when we invoke the code it is unable to start the nucleus and throwing error like:- Unable to resolve component /atg/dynamo/service/groupconfig/Configuration java.lang.NoSuc

  • Safari displaying blurred buttons on MacBook Pro

    Safari is displaying buttons on web pages as blurred squares. For example, whilst typing in this comment box, the formatting option buttons are showing up blurred, as shown in the picture below. The same issue is also occurring on the Facebook 'log i

  • Ethernet Communications Issue

    Hello list, I have an ethernet communications issue. We can communicate with our products using two communications modes, ethernet, and a proprietary CAN. For the ethernet connection, I have a router that assigns a DHCP address to the product (169.25

  • Using my own domain

    Hi, I have my own domain for personal purposes. All email to my own domain email account forward to my @btinternet.com mail address, when I was using BT webmail through Yahoo I could send and receive emails using my own domain email address but with