Hastable order reversing

Can i get sample code for first in first out using Hashtable.
Actually we are iterating hastable object to get the value of a key and display it on screen,but screen displays in reverse order(last value of table as first in screen), i want to display first value as a first in screen.
kindly do get me sample code regarding my problem

Hi.
Hashtable itself is not designed to maintain order of elements in it. It only serves as mapping between keys and values. What you need is to get the keys from the hashtable, then sort them in any order you like and then retrieve the values iterating through those sorted keys. Here is the sample code:
Hashtable hashtable = new Hashtable();
/* add some key/value pairs */
/* get the Set of keys */
Set sKeys = hashtable.keySet();
/* copy the keys to Vector */
Vector keys = new Vector(sKeys);
/* sort the Vector */
Collections.sort(keys);
/* or sort using custom Comparator*/
// Collections.sort(keys, myComparator);
/* iterate through keys to get values */
for(Iterator i = keys.iterator(); i.hasNext(); ) {
    Object value = hashtable.get(i.next());
}

Similar Messages

  • Re: Payment order Reversal using custom program

    Hello Experts,
    The requirement is when we void any chek the corresponding documents (payment request ,payment order and accounting document) related to the check has to be reversed in Fi Tresury.
    Reversal of the payment reqest and the accounting document in my program is fine but payment order reversal is not happening in the program.
    I am able to reverse it by using standard transaction ihc02.
    In the program  i have used the same function module IHC_BCA_PAYM_ITEM_REVERSE as used in the standard program and passing the same values what we are passing in the standard transaction but reversal of  the payment order was not happening using that functiona module.
    Please suggest me what to do with this requirement and how to reverse the payment order using the custom program.
    Thanks and regards
    pavan

    Hello Experts,
    The requirement is when we void any chek the corresponding documents (payment request ,payment order and accounting document) related to the check has to be reversed in Fi Tresury.
    Reversal of the payment reqest and the accounting document in my program is fine but payment order reversal is not happening in the program.
    I am able to reverse it by using standard transaction ihc02.
    In the program  i have used the same function module IHC_BCA_PAYM_ITEM_REVERSE as used in the standard program and passing the same values what we are passing in the standard transaction but reversal of  the payment order was not happening using that functiona module.
    Please suggest me what to do with this requirement and how to reverse the payment order using the custom program.
    Thanks and regards
    pavan

  • Regarding order reversal without affecting stock

    Dear all,
    Issue is regarding the prod. order reversal without affecting stock of materials. Scenario is as follows.
    I have an order of X matl. year 2011 - this order not yet delivered where as the raw materials has been issued by mb1b (261).
    As this order not yet been delivered, it is showing in WIP with value. KKAX.
    Afterwards user created second order and completed too. Now previous order reamined open without confirmation.
    For removing ths order from WIP, we can reverse the 261 movement in current date, but it will also revert the raw matl. stock alongwith values to unrstricted.
    Where as finance peoples doesnt want thew same.
    Also as del. qty. is not 0, we cant apply del. flag too.
    Please suggest the appropriate way to remove the previous order from wip without affecting the stock of materials.
    Dont want to do changes in table entry also.
    with best regards,
    Manish.

    Hi,
    Thanks boss.
    It is working now correctly.
    The issue is the  i_mvtit-XSTOB should be equal space in case of Goods issue while incase of Reversal it should be equal to X.
    Thanks for ur efforts.
    I had awarded you points.
    Thanks a lot.
    Thanks & Regards,
    Rayeez.

  • Stock Tranport Order - Reversal of Stock Transport Order in VMS

    Dear All,
    Cross Company Code Stock Tranport Order with delivery is created across company code & delivered.
    Now we want to go for reversal of this.
    We are using Vehicle Management System.
    Is it possible? If so, pls let me know how to do it.
    Expecting ur expertise on this.
    Regards,
    Ramesh

    You can do reversal using VL09 if Goods Receipt at the receiving plant is not complete.
    Other-wise cancel the GR then do VL09.
    Thanks,
    Ashish

  • How we can Reverse the closed Production Order (REVERSAL)

    Dear All
    How we can Reverse the Closed  Production Order Which one is confirmed before 5 or 6 month ..Actually i want to reverse the production order  with old pricing.Not with present pricing.
    Rgds
    Pankaj Agarwal

    You can reverse a production order using fucntions --> Restricit Processing --> Revoke Closing.
    But if you want to reverse the materials consumed with the older pricing it is not posible as per my knowledge, as the periods would be closed and you can only reverse in the present period and also that all the settlements would have affected on the order and material.

  • Production order reversal in closed  period

    Hi Experts,
    I am having a iisue related to Production order
    This production order is in closed period ie 2 months back
    from this order i want to reject the material order is of 300 qty
    out of which 59 qty is rejected and now i want to reverse the production order
    It is possible and how ?
    This client is in Automotive sector and this happens regularly.
    Client want to show the rejection to supplier how to do this without opening back period?
    Please suggest. 
    Pert

    Dear ,
    Goto MMPV to open the Material Period .I think any business process can hev 2 motnhs material periods open .Please discuss the same with your MM consultant .same way you can do for OB52 to open the FI period because u need to cancal the docuements in MBST .
    Both the cases , you have to discuss wit your FI and MM consulatnt who are responsble for maintain materials and FY periods
    Regards
    JH

  • Playlist order reversing on syncing

    Why do some album playlists reverse the order when synced over to my iPhone 4 or iPad?
    When the playlist is viewed by album on each device the order is correct.
    On my Mac they are in the correct order.
    To get round this problem I have to put them in the reverse order on my mac and then copy the order to playlist and re-sync?
    Please fix this very very irritating bug! This has been going on for ages now!

    Mine has just started doing that as well.

  • Word order reversed for arabic locale in Flex 3

    I have a "Flex Application" that uses flex builder 3. I want to add Arabic localization to this application, i.e., all the labels can be changed via ResourceBundle. I succeeded to see Arabic letters however the word order is reversed. Namely, the label "1 2 3" is shown as "3 2 1" if I switch the Arabic localization on. Is it possible to fix the problem without moving to Flex 4?

    Hi Lenvno,
    You cannot programmatically change the register byte order.  You can select the option on an object by object basis when you are setting up your modbus ethernet objects.  In IA OPC server, select Object->Modify and select the modbus object you want to configure.  On the object configuration page click Advanced.  Here you will see an option for "Modicon 32-bit floating point order (0123 vs. 3210)".  This should be what you are looking for.
    Regards,
    Justin D
    Applications Engineer
    National Instruments
    Message Edited by Justin D on 01-18-2007 11:29 AM
    Attachments:
    iaopc_serverSS.JPG ‏86 KB

  • Desktop Icon Sort Order Reversed

    On my 15" MBP, I noticed that all my icons are being sorted in reverse order. No matter whether I select sort by size, date created, modified, etc, all the icons are sorted in reverse.
    Any ideas how I can fix? I've already tried deleting the finder preference file, but no luck.
    To clarify, this is not an issue in a finder window, but on the actual desktop itself.
    Thanks!

    Same problem here. Click on empty area of desktop, then keep arranged by name...
    Alphabetization is fine, EXCEPT, the A column is the on the RIGHT, and moves alphabetically down and to the LEFT. English alphabet and column order should be start at LEFT and move down and RIGHT.
    In other words, alphabetical order is backwards. Any help?
    Thanks in advance.

  • Production order reversal error

    Hi all,
               I am trying to reverse a collective order activities using CO13. I am getting an error
    Confirmed activity must not be smaller than 0 (check entry)
    Message no. RU033
            I need to reverse the production order confirmation, pl help me in solving the issue.
    Thanks in advance
    Amar

    Amar,
    This error is caused when one or more confirmed activities result in a negative value upon cancellation. Can you check the activities that you will be cancelling when you cancel the confirmation. Also pay attention to the units.
    Anoop

  • Production Order Reversal

    Hi All
    We have a problem regarding one of the production order we have created. We already reverse the 101 confirmation  but when we try to view the transaction in MB51 the movement type 102 won't display. And when we check in CO02 or CO03 quantity in field delivered still exist. I have tried to run transaction code CO14 and checked the management tab but there's no intended goods. Also checked in COGI and CO1P but the production order but no record was found for the selection.
    Please help. Accounting will possibly close the book today.
    Thank you
    Jesielle

    >
    Jesielle Yanson wrote:
    > Hi Madhu,
    > That's the problem. We can't view in MB51 but in tcode CO14 it was displayed as already been reversed.
    >
    > Thank you
    > Jesielle
    Dear Jesielle,
    Everything can be tracked in MB51 ( 261,262,101,102)
    How are you saying it is reversed, as you cannot find any 262 & 102 movemnet types in COOIS
    More over you can get Material doc number also in COOIS
    Just input that material doc number in MB03 & check
    Regards

  • Argument Order Reversed Importing Package into OWB

    I'm having a problem importing Packages into OWB. It recognizes the Functions contained in the Package, however the order of the arguments for each Function are reversed after I complete the import into OWB. This causes execution of the mapping to fail... Additionally, after importing into OWB, OWB doesn't seem to recognize any optional parameters or default values in the signature of the Function. I must be doing something wrong... Can anyone help...
    Thanks
    Alan

    Hi
    Standard approach to be followed for any object modification
    1. If you have created your package from OWB and deployed it into your DB, always do it that way i.e. Design center -->DB . Do not make any modifications on DB level and import in back to your Design center. OWB manages Ids for all objects on the repository and this will confuse it. That is why you see two versions of the same package . Any modifications should be done on Design center level and then do a replace on the package from control center
    2. If an object (package or procedure) is created on DB directly and is imported into design center, follow the same norm everytime you make any changes to that object. The status of that object will appear as "New" or "Not deployed" on control center but that is fine because OWB has no ID on its repository to maintain this information.
    3. If you need to rename any object already deployed from OWB, always drop it first, then rename it and then deploy it. That way OWB will maintain the name and ID on its end and not get confused.
    4. For your case, you can drop the older version of the package from OWB, delete the one imported from Database into OWB, make the changes on OWB level (adding parameter etc) and then redeploy the same package as replace from control center.
    Hope these tips help
    birdy

  • Process Order reverse before resersal of Sattlement

    Hello GURU's
    I want to know that If we reverse process order before reversal of sattlement, is thier any impact on costing,MRP. If yes than how we resolve this problem.Please suggest..............

    Vikas,
    The ultimate completion of the order must have ZERO cost balance, so you need to work to achieve this.
    What is the reason for reversing/cancelling confirmation? If it was
    1. Order needs to be short closed before confirmation, then
    (a) First Cancel confirmation
    (b) Reverse the settlement or do settlement - Both are ok.
    (c) Close the order.
    2. Order needs to be confirmed with different quantity or time, then
    (a) First Cancel confirmation.
    (b) Do Confirmation with correct values.
    (c) Settle - (No Cancellation of previous settlement is required)
    Regards,
    Prasobh

  • Selectable Dialog Panel Tab Order Reversed when Plug-In compiled with XCode 3

    Hi,
    I'm not sure if anyone has seen this before, but I am experiencing
    a problem with the order of the panel tabs in a selectable dialog when compiling
    a CS3 plug-in using the following configuration.
    OSX 10.5.4
    XCode 3.
    ID SDK 5.0.3
    The problem is evident in the sample SDK plug-in "BasicSelectableDialog"
    Other than the obvious ( i.e. use XCode 2.4.1 ) is there a simple configuration fix for this??
    Regards,
    Mike.

    Update::
    Seems to be a problem with the ResourceEnabler or the call to CDialogCreator::GetOrderedPanelIDs() in the GetOrderedPanelIDs call in the dialog creator.
    The list returned is always empty when compiled in XCode 3, but filled in when compiled using XCode 241.
    Regards,
    Mike.

  • Song order reverses by default and then plays reversed

    Hello,
    I'm using itunes 8.0.2.20 and since updating to 8 I am having an issue where the tracks of all albums list in descending order not ascending by default. I can easily correct this obviously by clicking on the column header however the problem gets worse from there...
    Despite reordering in ascending it then plays the album backwards. So I reorder, play track 1 and then it ends the album after that. If I select track 2, it moves next to track 1 etc. I must say though it is not consistent and usually fixes with time.
    I have tried uninstalling itunes and reinstalling and didn't fix it. This is a weird problem and hopefully someone has come across this or knows something about it.
    Cheers

    Try Settings > General > Siri > Raise to Speak > Off

Maybe you are looking for

  • HT3819 Will home sharing work with 2 itunes accounts on the same computer?

    My husband and I share a laptop.  Can we use Home Sharing to share music with each other? I have an account for each of us on iCloud and the computer has us each set up as users. 

  • 2 facts in a single gauge/ pie

    Hi, I have 2 facts. One is the estimated time and other is the actual time taken. My requirement is to show the actual as a slice of estimated time But if I click on the pie in the results view, it shows 2 pies corresponding to these 2 facts. I want

  • After upgrading to latest version of iTunes audio CD burning issues

    Hi, I upgraded to the latest version of iTunes and now when I try to burn a playlist as an audio CD it keeps telling me it won't fit on one CD and I have now gotten the playlist down to 1 hour and it is an 80 Min CD and it still won't let me do it. A

  • QuickTime animation becomes blurry on YouTube

    I am working on a MacBookPro with OS 10.6.8. I have both QuickTime Player 10, and Quicktime Pro 7.6.6. I made an animation of a SketchUp model (a garden with trees and walls and such) and the exported animation looks very sharp and clear when viewed

  • How to implement parent entity for core data

    Hi there. I am starting a document-based Core Data application (Cocoa) and developed the following data model; The 'invoice' entity is a parent entity of 'items', because ideally I would want there to be many items for each invoice. I guess my first