How can we generate automatic id

Hi,
I want a automatic id like
String str="java"+System.currentTimeMillis();
if any other way we will generate automatic id.Please reply me

Hai
If u want to generate a random ID then u can use the Java Random class But we cannot make sure that the generated ID will be unique. But most probably it will not repeat. This problem can be avoided by setting primary key for the ID in the DB. So if the ID exists it will throw an exception , then u can generate the next ID.
Random random = new Random();
          for (int i = 0; i < 100; i++) {
               double d = random.nextDouble();
               long l = random.nextLong();
               l = Math.abs(l);
               System.out.println("l : "+ l + "  d : " + d);
          }

Similar Messages

  • How can I generate automatic inspection lots every 15th day

    Hello,
    My client receives chemicals (Raw Mat) every day. Incoming inspn is done only for physical spec and Usage deciison is taken on same day itself.
    As he is getting raw mat from good vendors, he usally do chemical analysis every 15th day.
    Whats the best way for me to map this process of generating inspection lot on every 15 day. initial incoming lot we cant use as he already taken UD on that.
    15 day chemical analysis dont have any impact on qty posting as Raw mat usally will be consumed.
    Is there anything other than manual lot. I welcome all ideas.

    In this case your looking at a pooled sample of the approx. 15 batches of material that were received in.  Correct?
    If you are batch managed, then no.  Since the sample is a composite sample, you can't link it to anything else really and you don't have a batch number to enter into the inspection lot upon creation.  First, you'd have to create a dummy batch to hold the results.  Which you could do maybe by date if your system allows external batch numbering.
    Then you could at least manually create the inspection lot.
    The is no true "event" to trigger the creation of the inspection lot as there is when you do a GR.  The only why you could trick the system would be if your were willing to maintain a separate storage location, and do a stock posting to it of the sample quantity each day.  Then you could have an inspection plan that would create a skip lot each day.  On the 15th day it would become required.  You would probably utilize a copy of movement type 411 for this and use that custom one to make the moves. 
    The problem with this is then you'll have to write off that little bit of material at some point for accounting purposes.
    Another option.. you could create dummy batch and set a 15 day inspection interval on it.  Use deadline mointoring to create the lot one day in advance of expiration.
    One more option:  Use standard calibration inspection to set up a calibration program.. I.e. recalibate every 15 days.
    Craig
    Edited by: Craig Snyder on Mar 25, 2008 1:08 PM

  • How can I avoid automatic build of an User Code Block at SystemBuild

    Hi,
    I've created a simulation with a User Code Block at SystemBuild. I want the building process to be performed manually, so I changed the buildProcess tag in xml file which is generated by SystemBuild to "Manual". Unfortunately it doesn't work. When I try to execute the simulation, the xml file is overwriten, the buildProcess tag is set to "Automatic" and the software tries to build the library again. How can I avoid automatic build of an User Code Block at SystemBuild?
    Thanks.
    Attachments:
    fileInterface.zip ‏1 KB

    The xml file generated when a UserCodeBlock is linked usually contains the following at the top of the file:
    <DynamicLib xmlVersion="1"
                architecture="WIN32_DLL"
                rtLibLinkage="Dynamic"
                buildProcess="Automatic"
                debug="no">
    To prevent sim from automatically rebuilding your UCB dll change the tag buildProcess to "Manual"
    Bob Wilson
    MATRIXx R&D

  • How can I Generate two different reports from single execution of Test cases in NI teststand

    Hi,
    My requirement is to generate two different reports from NI teststand. One for the Logging of error descriptions and the other report is by default generated by the Teststand. How can i generate a txt file that contains error descriptions other than that mentioned in the default report?
    Solved!
    Go to Solution.

    Do you need to do that just for these two sequences but not for other sequences? I don't see a problem to use SequenceFilePostStepRuntimeError. Create this callback in both sequence files and configure them to log into the same file. SequenceFilePostStepRuntimeError callback is called after each step of the sequence file if it has runtime error. You can access the calling step error information via RunState.Caller.Step.Result.Error property. Take a look to attached example.
    The "other way" is useful if you need to log errors not for every step of the sequence file, but for some of them. This is more complex, because you need to create a custom step types for these steps. For the custom step you can create substeps (post-step in your case) which will be executed every time after step of this type executed. Then, this is you job to determine if error happened in the step, acces to step's error information is via Step.Result.Error property. 
    Also, be aware that step's post-expression is not executed in case of error in the step.
    Sergey Kolbunov
    CLA, CTD
    Attachments:
    SequenceFilePostStepRuntimeError_Demo.seq ‏7 KB

  • How can I generate SSL Keys from a Oracle 9iAS server version 1.0.2.2.0

    How can I generate SSL Keys for use on Oracle 9iAS server
    version 1.0.2.2.0. I have tried using the open_ssl method but
    was unsuccessful.

    <?xml version="1.0" encoding="UTF-8" ?>
    <nodes>
    <node>
    <category_id>3</category_id>
    <parent_id>2</parent_id>
    <name>Mobile</name>
    <is_active>1</is_active>
    <position>1</position>
    <level>2</level>
    <children>
    <node name="Nokia" category_id="6" parent_id="3" is_active="1" position="1" level="3">
    <node name="Nokia N79" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N95" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N97" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    </node>
    <node name="Samsung" category_id="7" parent_id="3" is_active="1" position="2" level="3">
    </node>
    </children>
    </node>
    <node>
    <category_id>4</category_id>
    <parent_id>2</parent_id>
    <name>Laptop</name>
    <is_active>1</is_active>
    <position>2</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>5</category_id>
    <parent_id>2</parent_id>
    <name>Monitor</name>
    <is_active>1</is_active>
    <position>3</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>8</category_id>
    <parent_id>2</parent_id>
    <name>Camera</name>
    <is_active>1</is_active>
    <position>4</position>
    <level>2</level>
    <children></children>
    </node>
    </nodes>
    Is this correct format to create dynamic menu?

  • How can we generate the reports in html or text file formats?

    Hi,
    Is there any package that can help in creating HTMLDB reports in .txt files or .html files? (Similar to TEXT_IO in Oracle Forms)
    How can we generate the reports in html or text file formats from HTMLDB?
    Thanks in Advance
    Renjith

    Hello all.
    Bi Publisher is great, but has a very high price tag. It's even more expensive than Forms & Reports Services. We are considering APEX to replace Forms & Reports on the web, but the reporting limitations are still a problem.
    I wonder if there is another option.
    Thanks

  • How can we generate the report of backup,tablesapcefrom OEM / RMAN

    How can we generate the report of backup status,tablesapce(usedf,free space) for all the databases from OEM / RMAN
    1.)we need generate the report of tablespace used,free, archive...
    2.)How can we generate the Backup status report also

    user13584223 wrote:
    How can we generate the report of backup status,tablesapce(usedf,free space) for all the databases from OEM / RMAN
    1.)we need generate the report of tablespace used,free, archive...There are DBA_* views that expose the necessary information. They are documented in the Reference Manual.
    2.)How can we generate the Backup status report alsoThere are rman commands that give that. They are documented in the Backup and Recovery User's Guide.
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to [url tahiti.oracle.com]tahiti.oracle.com.
    Locate the link for your Oracle product and version, and click on it.
    You are now at the entire documentation set for your selected Oracle product and version.
    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab (for 10.x) or the "Master Book List" link (for 11.x) you will find the complete documentation library.
    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

  • How can I generate a table of contents from bookmarks

    How can I generate a Table of Contents from bookmarks in Adobe Acrobat XI?

    Something to try.
    Rick Bostein  provided a "Create Bookmark Report" Acrobat Action.
    With this report as a PDF you could insert it at the start of your PDF document to serve as a "TOC". 
    Go here:
    https://acrobatusers.com/actions-exchange 
    Scroll down some.
    Be well...

  • How can I generate javadoc in PDF format?

    Hi,
    How can I generate javadoc in PDF format?
    Thanks,
    Fayezin

    HTML to PDF with Java, using OpenOffice.org - example here: [http://www.dancrintea.ro/html-to-pdf/|http://www.dancrintea.ro/html-to-pdf/]
    You can use OpenOffice.org, running as a server and command it remotely for document convertion.
    Besides HTML to PDF, there are also possible other convertions:
    doc --> pdf, html, txt, rtf
    xls --> pdf, html, csv
    ppt --> pdf, swf
    Code example:
    import officetools.OfficeFile; // this is my tools package
    FileInputStream fis = new FileInputStream(new File("c:/test.html"));
    FileOutputStream fos = new FileOutputStream(new File("c:/test.pdf"));
    // suppose OpenOffice.org runs on localhost, port 8100
    OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
    f.convert(fos,"pdf");
    -----------------------------------------------------------------------------------------------------------------------------------------

  • I need to get the latest version of Adobe Reader.  Is this still free?  How can I receive automatic upgrades?

    I need to get the latest version of Adobe Reader.  Is this still free?  How can I receive automatic upgrades?

    Of course the free Reader is still available: http://get.adobe.com/reader/
    To get automatic updates set the Updater in the Reader Preferences.

  • How can I delete automatically all double photos in the library of iPhoto? jos vdp

    How can I delete automatically all double photos in the library of iPhoto? jos vdp

    Two apps that I've tried and work very well are  iPhoto Library Manager and  Duplicate Cleaner for iPhoto
    OT

  • How can I avoid automatical quantity confirmation of the items?

    At our case, production is done on sales sales order for some of the materials. When all of the materials at the order are producedi I want to triger the availability check but availability check triggered autpmatically when for the first time the order is created. I don't want the system to make the confirmation automatically. How can I avoid automatical quantity confirmation of the items?
    Thanks in advance for the answers....

    Hi Yasar
    This can be done 2  ways
    1.if you want individual material stocks to be checked for avialbility and deliver them independently then check whether you are using requirement type KSV.
    2. If you want to send the group of materials together and do not want to send a material which is part of group individually ,you can use delivery group with Sales Bill of material  concept . the header material may be a fantom assembly .
    The delivery group is set at the item  category level ,so u can set it for the item categories u want to go together.
    for example  all text package inserts ,extra spares and a material must go together, they  will be part of delivery group.
    I hope this helps
    Regards
    Mandar

  • How can we generate result set report?

    how can we generate result set report ?means the out put of one query be the input of another query?how it is?

    Hi
    You have to use APD ( analysis process designer) to use results of one query as the input for the other queries.
    Check this link
    http://help.sap.com/saphelp_nw70/helpdata/en/49/7e960481916448b20134d471d36a6b/frameset.htm
    Regards

  • How can we generate a usage report

    Hi Friends,
    As my application is going to live, for that i want to usage report.
    how can we generate a usage reopts ?
    Thanks in advance

    Hi,
    Take a look at Usage Tracking; http://apex.oracle.com/pls/apex/f?p=44785:24:370475959673014::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:4152,2
    Good Luck,
    Daan Bakboord
    http://obibb.wordpress.com

  • How can we generate proxies?

    Hi,
    I am doing one POC on ABAP client proxies. I am using WAS 6.20 as sender and receiver is XI server it self. If I use same XI System for both sender and receiver with different clients then I can generate proxies for sender using "SPROXY" transaction. But the sender is different system , how can I generate abap proxy in sender system?
    Do I need to export any things from XI server to Sender system to generate proxies? Please help me on this.
    Thanks in advance.

    Hi,
    I am doing one POC on ABAP client proxies. I am using WAS 6.20 as sender and receiver is XI server it self. If I use same XI System for both sender and receiver with different clients then I can generate proxies for sender using "SPROXY" transaction. But the sender is different system , how can I generate abap proxy in sender system?
    Do I need to export any things from XI server to Sender system to generate proxies? Please help me on this.
    Thanks in advance.

Maybe you are looking for

  • Microsoft has stopped working error in windows 7

    when ever i close an worksheet or word document it gives the error excel/word has stopped working, but the program is running in the back ground when we look into task manager. we did tried with windows 7 repair and also reinstalled office 2007 also

  • Publish to zip html problem in CP4

    When I elect to publish to  zip and html, it publishes but it does not zip the files. What am I doing wrong? Possibly related -->( when I publish to zip/html or to html,  the html file doesn't run the swf file)

  • Error in notification

    hi there, In  trying to design company specific notification,in 1/0tab01-notification 1 ,not able to see the reference object i.e functional location,equipment etc in notification though in screen area   have assigned reference object -005 hope to ge

  • HT2614 Help! How do I open a winmail.dat attachment with my Mac OS 10.6.8 & Mail 4.6 (1085) Thank you.

    Help! How do I open a winmail.dat attachment with my Mac OS 10.6.8 & Mail 4.6 (1085) Thank you.

  • X300 SSD question

    How do I find out what the brand and exact specs of my x300's solid state drive are. The only thing I know is that it's 64 GB. I'd like to replace the SSD with a bigger size SSD. For that I'd like to know its size and power restrictions and so on. Is