Confirmation Number Calculations

I am writing an application where I would like to generate a confirmation number to give back to the end user as a means to confirm his/her transaction. Does anybody know of a good platform independant strategy for generating such a number? I would like the confirmation number to be non-sequential and 10 characters or less if possible. I would also welcome any advice on the Dos and Don'ts of confirmation number generation. Suggested reference material would also be good. Thanks for your help in advance.

How about using a pseudo-random number generator, such as the one provided in java.util.Random? For example, Random.nextInt() will return an integer, which is guaranteed to be in range: -2147483648 to 2147483647 (Integer.MIN_VALUE and Integer.MAX_VALUE). This is 10 digits, ignoring the minus sign. You could just throw away the negative ones, or subtract negative ones from ((long) Integer.MAX_VALUE), storing it in a long.
As long as you're using the int's in their entirety (not stripping bits), then you'll be guaranteed that they won't repeat until you've gone through all 2^32 possible ids. This is a property of the RNG used in Random.
The only problem I see is that when your program shuts down, how do you store the RNG's state so that you can start at the same position in the sequence? Another property of the RNG is that it always gives out the same sequence of numbers, if started with the same seed. But Random has setSeed(), but no getSeed(). Any ideas?
One possibility is to save the initial seed and keep a count of the ids you've passed out; when you restart the program, you run through all of the old ids before generating new ones. This is kind of lame, but it should work.

Similar Messages

  • How do I add multiple tickets under the same confirmation number from the American Airlines app to Passbook?

    I have a confirmation number from American Airlines for a flight with my family all under my name and for some reason I cannot add all of our tickets to Passbook. To clarify, I went to the American Airlines app and put in the confirmation number along with my name which pulled up my boarding pass only. Although I was able to add this boarding pass to Passbook, I was not able to add any of the other boarding passes for my children to Passbook that should have also been under the flight reservation. In fact I couldn't even see them in the American Airlines app. I tried to use their names and the same confirmation number but nothing happened, and nothing else seems to be working. How can I add all of these boarding passes to my Passbook?

    Fair enough.
    I started doing this before unlimited data and emails on phones was a common commodity, on my Samsung Blackjack.
    I then continued it due to its convenience. My only counter argument is this:
    Even when emails are set to immediately push, I am always notified earlier by this forwarding message (sometimes by several minutes/hours due to the fact that it is not dependent on my being connected to 4G or wifi to receive it.
    Also, to contradict snozdop's point that both methods use data and battery, I say this - when I use the forwarding method, the information comes in a pure text format and therefore uses considerably less information than an HTML and CSS rich email, with embedded images and such -also, unlimited text messages aids curve costs.
    I will, however, give this method a go. In any case, a solution to my original question would still be greatly appreciated.
    Thanks guys.

  • Offered the Edge program months ago, as a solution to reduce current bill, and compete with other providers. Offer no longer available till next year, then November, then October 2nd, now given confirmation number that can be looked up but not completed?

    Final offer is to just continue to pay $260/mo, and call back on October 2nd, as that is the date I can change my four lines to EDGE and save per month. The initial offer did not include a $25/line discount and required me to Upgrade my phones. I have four Iphone 5S model devices, sharing 10GB of data.
    Months ago that offer would just cost more per month and lacked a device to offer me. Later I saw an add that mentioned a $25/line discount for Edge. That would drop my bill $100/month! I asked about the plan again at that time. I was told that I was still eligible,but there was no way to keep my current phones, and work them into the Edge plan. Once the Iphone 6 was announced, I now had a phone that was an upgrade, and I was ready to take the offer. I was told at a store that the offers have no specific terms, and they must be taken when offered. They said I would qualify for another chance in November! I called CS and was told that my next Offer to take the plan would be October 2nd. I went online and at 3:01am EST to pre-order. My phones ship date was October 7th, and I was told that, I then qualified for the Edge, due to the date, but only one line could be activated that way and the rest needed to be done at a store. I was given a confirmation number. Due to glitches that night, I placed this order on my own computer and the customer service agent at the same time, (he was on with me for 3 hours) till one of us was successful. My computer gave me the confirmation number, but the number is a customer service generated confirmation number. Internet services cannot help me confirm the order, because the number is CS. CS cannot help because I did it online. My plan has not changed and going to a verizon store, after staying up all night to preorder, I was told that they have no idea if it went through or not, and to wait and see if my order arrives at home on the 7th. During the store managers "search" he asked for my password,number/username, secret questions, secret site picture (confirmed) last four of my social, kept my family and I in the store 40 min past closing time, answering nothing and leaving me concerned in my sleep deprived state. Calling CS after that, only told me to change my password and again, wait till October 7th, as neither CS or internet dept. are sure of what happened. Neither would actually put a supervisor on the phone, it disconnects while waiting. Has anyone else ever had this happen to them? I don't feel like its safe to go to the local verizon store. CS did not feel as though the managers actions were disciplinary other than to change my password immediately, to prevent unauthorized access. Who are you supposed to trust with your private information? who can you trust to get the truth? The only thing the run around has done is prevent me from pre-ordering from another provider. I was even told that if I did, and Verizon preorders also came on the 7th, that I would have to pay for them too. $35 restocking fee at minimum. 

    Yes, I am aware of the new phone costs being added back to the plan. My issue is not with the current iteration of the EDGE plan, but with the inconsistent instructions to implement the plan. So far no one can tell me what changes have been made, if any to my current plan. The status of the pre-order? Plus my security concerns have not yet been addressed.
    What they will offer, is the EDGE plan, plus specific dates of delivery, for any additional lines that I would like to order above and beyond my current 4 lines. Yet the status of those lines are still in limbo. That was the term they used. Why would I want to purchase additional phones and lines of service when they cannot find my original order. If those phones do arrive in October, they would add 4 more lines of service totaling 8 lines of EDGE. I am not sure why this cannot be fixed beyond, wait and see. I am currently testing out an Iphone 5S with T-mobile. So far I am getting similar signal quality, and they offer Wifi calling that will be enabled with a new iPhone 6, that needs to be taken into account with the comparison. I've read that Verizon will enable the feature mid 2015. Four Iphone Plus models would run me about $225/mo as the most expensive option, still saving me monthly. I know verizon has good service where I live, tmobile is unknown, and after being treated so poorly, I am looking into with the test phone.

  • Error in mapping for floating Number calculation

    Hi All,
       I have a small doubt in floating number calculation in Mapping.
    Actually i am geting a floating point number and calculating the SUM and generating the output. The input is of 2 decimal places(Ex: 26.02  and 26.03 ), but when it is adding all the values it is generating a three digit decimal number (Ex: 52.050003)
    I dont know from where it is geting one extra number "2" in the output.
    Please find the code for the same and let me know if i need to do something else to get ride of this.
       //write your code here
    float sum=0;
    if(a != null && a.length > 0.00)
       for ( int j =0; j<a.length;j++)
        sum  =  sum + Float.parseFloat(a[j]);
       result.addValue(String.valueOf(sum));
    else
    result.addValue("0");
    Thanks in Advance,
    JAY

    Jay,
    Please use the below code and let us know, if it helps.
    BigDecimal sum= new BigDecimal("0");
    BigDecimal bd;
    if(a != null && a.length > 0.00)
    for ( int j =0; j<a.length;j++)
    bd=new BigDecimal(a[j]);
    sum=sum.add(bd);
    result.addValue(""+sum+"");
    else
    result.addValue("0");
    in import section - java.math.*;
    raj.
    Edited by: Raj on Feb 18, 2008 11:11 AM

  • SRM confirmation number  - R/3 material document

    Hi all,
    I'd want to know if I can find in a R/3 table the SRM material confirmation.
    Example: I created a SRM material confirmation 9000279101. In R/3 the system created material document 1000000013 associated to  SRM confirmation 9000279101.
    Can I find a R/3 table where there' s a connection between material document and SRM material confirmation?
    I Know only ESSR Table of R/3, but it contains only Service confirmation.
    Thanks in advance.
    Best Regards
    Valerio

    Hi Valerio
    Please look at this thread:
    In EBP table that links the Backend Confirmation number and the PO
    Regards,
    Marcin Gajewski

  • Vendor order confirmation number

    Hi,
    I have a requirement:
    When we send PO to the vendor, it takes about 2-3 days for them to send us an order confirmation. I want to enter this order confirmation number in the PO header. I want to do this so that I can run a standard PO report (example: ME80FN) and choose all PO's which have this field empty, which means that the vendor has not sent me the confirmation and I can call him back for this.
    Is there a standard SAP field in the PO header for this issue? Can I add a new field in the PO header that can be used for this purpose.
    Thanks in advance.

    You can not do with std SAP but SAP can enter the confirmaiton at line item level on confirmation tab if oyu activae that in customizing as well as selection conformatio key on the PO confirmation tab.
    once you do that then once oyu receive the confirmation you can update PO automatically by Idoc funciton lity or create manually using VL31N transaciton then you can see on the PO.
    for report purpose you can get the data from EKES

  • Confirmation number

    Dear Gurus...
    Where can I found the Production Order Confirmation number? For example I created a prod. order and released it. During the confirmation at operational level using the transaction CO11N, I can give order and operation number. At the same time I can also give the confirmation number. My question is before confirmation, where can I found the confirmation number in the order. So that I can do the confirmation with confirmation number...instead of order number.

    Hi All,
    A confirmation documents the processing status of orders, operations, suboperations and individual capacities.
    You can enter a confirmation
    - For an Opeartion (co11/co11n)
    You have the following options:
    - To confirm quantities, durations, activities or personnel data.
    - To make a confirmation at a particular point in time (for example, at the start of setup or the finish of processing) enter a 
    confirmation.
    - When you confirm time events, the system calculates the required duration. For example, the setup duration is the time between setup start and setup finish.
    - For an Order : CO15
    If you enter a confirmation at order header level, the system confirms all the operations that have a control key in which 
    confirmation is optional or necessary. The quantitiesconfirmed in the operations are proportional to the quantities confirmed in the order header.
    Reward if useful.
    Regards,
    pherasath

  • Confirmation number reaches maximum number

    Hi,
    In my client production system, we are getting close to the limit in terms of QM Confirmation Number for Inspection Characteristic (table QAMV-RUECKMELNR).
    We have standard SAP number range configuration 1 - 99,999,999 for object QMERKRUECK and actual number is <10%
    To resolve the isse, we are planning to archive old inspection lots.
    But my question is how the confirmation number behaves after archiving a set of  inspection lots, we may face the situation where the confirmation number holds two inpsection lots ( one is archived & other is new)?
    What will happen when the system start number with 1 and we would have duplicated numbers in table QAMV.
    Please advise with details steps for archiving inspection lots and how the confirmation number reset to 1 and its consequences etc.,
    Thanks a lot and best regards,
    Nagesam

    Thanks you Sujit,
    You are saying to create new number range for inspection lots ( QCC3 ) and assign origin & type,  please calrify if I am wrong. Please find my exact issue and help to fix...
    In my production system.....
    QMERKRUECK  range is...
    00000001 to 99999999 and the current number is already 91245679
    and QLOSE intervals are below..
    000000000001 to 009999999999
    040000000000 to 049999999999
    070000000000 to 079999999999
    and the flag for 'No interval rolling ' is NOT checked, so the number range will be automatically resets to 1, once reaches to the upper limit
    Issue : Warning message ' Internal number assignment for object QMERKRUECK (numbers are in critical area)" is showing while creating inspection lots using QA01.
    What could be the best solution to fix this?
    1. Archive old inspection lots ( on specific criteria ) ? Later, once the confirmation numbers reaches to 99999999, it will reset to 1. In this case...do we get the situation where the confirmation number holds both archived inspection lot and active ( newly created) inspection lot ? Do we have any business impacts?
    2. How creating new nuber ranges for inspection lots fix the confirmation number range issue? Please clarify if I am missing anything.
    Thanks in advance,
    Nag

  • Idoc associated with the GR confirmation number

    Dear all,
    How can one get the information from an idoc number?
    I've got a GR confirmation number and would like to have the idoc associated with the confirmation number, or, is there a way to retrieve the content of the confirmation?
    Thank you in advance.
    (Answers will be rewarded)

    Hi Geoffroy,
    Look in bbp_pd transaction with your Conf number to get the date and time of last change of your document.
    Then go to we02 transaction and select only outbound idocs of type MBGMCR01 with restriction on date and time.
    You should be able to find the corresponding idoc. look in the segment E1BP2017_GM_ITEM_CREATE for field PO_NUMBER. Then go to R/3 backend with this po number and enter transaction ME23n with this po number.
    Go to Item history and you will find related Confirmation.
    Best regards,
    Laurent
    Remind points if helpfull.

  • Where to find SRM confirmation number in R/3

    Dear Gurus:
    We have an Extended Classic setup & the confirmation for the products normally carried out from the SRM side. Our setup is such that the confirmations created in SRM & the corresponding Material Document number generated from the backend R/3 are different. My question now would be is there any way to locate the SRM confirmation number from the R/3 side??

    The confirmation no in SRM and material no in ECC will be necessarily different.
    since these are two diff docs in two diff systems.
    the confirmation created in SRM is carried in IDOC MBGMCR and posted in ECC MM PO
    which creates material document and updates PO history.
    had worked on it long back.
    some 2 fields in SRM conf are linked to ECC GR
    BR
    Dinesh

  • FM to change Confirmation number of Production order

    Hello Experts,
    I have a requirement where I need to change the confirmation number ( which is already created for a production order) AFVC-RUECK.  I could see that the confirmation number is not modifiable once it is created and no opition to change it by BDC.  But my requirement is to change it for a production order. 
    1.  Is there any FM or BAPI to change it? 
    2.  Or directly changing in the database table AFVC is the only option?
    3.  Or is there any other method in which we can do it.
    Awaiting your reply,
    Balaji

    Hi Balaji,
    Please check whether the below link is helpful,
    Re: How to modify a wrong confirmation of a production order
    Also for the relevant tables, check the link,
    confirmation number of production order
    Best Regards.

  • Java number calculation.

    hi, i am doing java encryption/decryption and my key is 128 bits. i need to times multiple keys and thus, the value is far exceed the integer and long value.
    thus i decide to use math.biginteger.
    however, the calculation is weird.
    here is my code
    BigInteger biPdi = new BigInteger(bPdi); //bPdi is a bytearray
    BigInteger biKey = new BigInteger(groupKey);//group key is a bytearray
    BigInteger bicKey = new BigInteger(bicGroupKey));//bicgroupkey is a bytearray
    System.out.println("derivationkey: " + biPdi.toString(16));
    System.out.println("child group key: " + bicKey.toString(16));
    b = biPdi.add(bicKey).toByteArray();     
    BigInteger bit2 = new BigInteger(b);
    System.out.println("derivationkey: " + bit2.toString(16));
    this is the result i am getting back.
    derivationkey: 30
    child group key: 3938393951128f27c3da559f36ea62de
    derivationkey: 3938393951128f27c3da559f36ea630e
    i know the derivationkey has value "0" which is encode as "30" b/c it is based on 16. thus, the byte value is "48" which is the value of "0".
    when i add derviationkey with child group key, i expect to my new diviationkey is same as childgroup key b/c it is childgroup plus 0. however, i am getting a different value. i think the reason is because java byte array try to add 30 to childgroup.
    in this case, how can i do a large number calculation? can someone give me any advice??
    Thanks in advance.

    There's a button what says "code." Hit it and put your code inside the tags.
    i know the derivationkey has value "0" which is
    encode as "30" b/c it is based on 16. thus, the byte
    value is "48" which is the value of "0".0 is zero no matter what the base. And 48 != 0 no matter how much paint you sniff (though it can seem that way).
    when i add derviationkey with child group key, i
    expect to my new diviationkey is same as childgroup
    key b/c it is childgroup plus 0. however, i am
    getting a different value. i think the reason is
    because java byte array try to add 30 to childgroup.If it's 30 and you add it, the answer will come out as 30 more than the number you added to 30.
    in this case, how can i do a large number
    calculation? can someone give me any advice??BigInteger works like it should. derivationkey is 30.
    ~Cheers

  • Week number calculations not working ...

    Why doesn the week number calculation (ISO 8601) using datepart ('ww',#date#,crMonday,crFirstFourDays) not work?
    As an example do the following formula:
    DatePart('ww',CDate(2005,1,1),crMonday,crFirstFourDays)
    The result is 9363, quite an impressive week number
    This is an issue in versions 2008, XI R2, XI, 10 and possibly previous versions too

    Hi Raghavendra
    No I want to be able to calculate week number according to the week numbering definition from ISO 8601 - have a look at [http://en.wikipedia.org/wiki/ISO_week_date|http://en.wikipedia.org/wiki/ISO_week_date]
    If you want to use datepart ('ww, ... to solve this,
    you have to specify crMonday as third argument and crFirstFourDays as argument number 4 to tell datepart that weeks starts on mondays and week #1 is the one with the first 4 days of the year.
    Doing this makes my example date  used with datepart returns the week number 9363!!
    The DatePart('ww',CDate(2005,1,1),crMonday,crFirstFourDays) is supposed to return 53!!
    Weeknumbers are supposed to be between 1 and 52 or 53 depending of the year.
    Be aware weeks number 1, 52 and 53 very often contains days from 2 consequtive years, when defined according to ISO 8691.
    Your suggestion does not take into account the fact Weeks start on mondays and january 1st is not always the first day of week 1.
    It returns week number 1
    In fact it seems every day in the start of a year with weeknumber starting in the previous year gets the weeknumber calculated wrong.
    Regards,
    Poul
    Do you want to calculate the weeknumber of a particular date? If so please try datepart('ww',CDate(2005,1,1)).
    If not could you please explain me what you are trying to calculate and what output you are expecting?
    Regards,
    Raghavendra

  • Production confirmation number generation sequence

    Hi
    I have a problem. In one client say 200, confirmation number for operations in an order getting created in incremental manner like
    OP.10 - 54
    OP.20 - 55
    OP.30- 56
    Other client say 300, it is generated at the time of production order creation, in decremental manner like
    OP.10 - 56
    OP.20 - 55
    OP.30- 54
    Plse guide me on this issue as i have to follow some logic to take operation confirmation level data into development report.

    Hi,
    Check with the Number range Object: AUF_RUECK with the Transaction SNRO.
    The logic is: System will follow the first come first basis to assign the Confirmation Number.
    Hope this helps..
    Regards,
    Siva

  • TS1702 it says that i have to pay again to download a game from itunes.. how can i get the game in my itunes and phone? do I accept the charges and it will be re-embersed? what should I do? I have the order confirmation number etc. if you need.

    it says that i have to pay again to download it from itunes.. how can i get the game in my itunes and phone? do I accept the charges and it will be re-embersed? what should I do? I have the order confirmation number etc.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

Maybe you are looking for