Pseudorandom number generation based upon an integer seed,to produce the same table given the same seed.

Does LabVIEW have a VI that produces Pseudorandom
Numbers based upon supplying a integer Seed Value? This way
you could generate a table of numbers that looked random, but
could be reproduced for test comparisons whenever you
supplied the same seed value. Do such algorhythms
already exist in the liabrary somewhere?
Larry

It may be that even these subVIs might not do quite the trick depending on what you want. If you want to get exactly the same random number (or array) from the Gaussian White Noise.vi for example, you may need to edit the VI and create a personalized copy.
In the existing VI, the seed value that you input as a parameter is actually 'randomized' on the first run of the program (open the VI and look at the case statement inside the loop). If you want the same seed to always kick off the same set of random numbers (for re-testing at a later time) you'll definitely want to take that code out. It is as easy as moving the two cluster constants outside the while loop (as initial values of the shift registers) and deleting the rest of the case (and re-attaching the
broken wires), so it's not too bad at all.
Cheers,
EMR
Cheers,
Elaine R.
www.bloomy.com

Similar Messages

  • Dynamic XSLT source code generation based upon internal table

    Hi,
    Is there anyway to generate dynamic XSLT source code based upon final structure of output internal table and call dynamic generated XSLT in program?
    CALL TRANSFORMATION z_transformation
                PARAMETERS
                 p_shared_string = lo_shared_str_nodeset
                SOURCE XML g_sheet_data
                RESULT lt_data = i_data[].
    Source code example of XSLT transformation -
    <xsl:template match="/">
         <asx:abap version="1.0">
           <asx:values>
             <LT_DATA>   "Internal table
               <xsl:for-each select="ss:worksheet/ss:sheetData/ss:row">
                 <xsl:if test="position() &gt; 1">
                   <item>
                     <FIELD1>
                       <xsl:variable name="cell_id" select="concat('A', position())"/>
                       <xsl:variable name="v_index" select="ss:c[@r=$cell_id][@t='s']/ss:v"/>
                       <xsl:if test="$v_index">
                         <xsl:value-of select="$V_SHARED_STRING/sst/si[$v_index + 1]/t"/>
                       </xsl:if>
                       <xsl:if test="not($v_index)">
                         <xsl:value-of select="ss:c[@r=$cell_id]/ss:v"/>
                       </xsl:if>
                     </FIELD1>
                 </item>
                 </xsl:if>
               </xsl:for-each>
             </LT_DATA> "internal table
           </asx:values>
         </asx:abap>
       </xsl:template>
    </xsl:transform>

    In addition,
    We are converting binary data of excel from application server into internal table but currently we created two XSLT transformation to achieve this one for deleting name space and other for converting data into internal table format.
    We want to make our source code for future use also,Is there anyway to generate XSLT source code dynamically?Above mentioned code is snippet of data extracting which we are doing but this transformation is hard coded.
    Any help is appreciated.
    BR,
    Praveen

  • IDoc number based upon sales data.

    Hi Experts,
    How to get the IDoc number in case I have sales document number or any other data which is being send in IDoc, any way we can get the IDoc number?
    Also help me know the program to process the IDocs in background, I know the t.code bd87 is used to process the idocs, but how to process in background via a batch job.
    thanx
    Garima

    Hi,
    You may use t.code we09 to get the Idoc number based upon data,
    you need to provide the information like Idoc basic type, date range etc to filter the data,
    and under "Creteria for search in data records",  provide the segment name, search in field and value against you are looking for a Idoc number.
    Use following programs to process the IDocs in background:-
    RSEOUT00 u2013 Process all selected IDocs (EDI) 
    RBDAPP01 u2013 Inbound Processing of IDocs Ready for Transfer
    Some use full t.code for IDoc processing:-
    WE60 u2013 IDoc documentation 
    BD87 u2013 Inbound IDoc reprocessing 
    BD88 u2013 Outbound IDoc reprocessing 
    BDM2 u2013 IDoc Trace 
    WE19- Testing IDoc.
    regards
    Vivek.

  • Enq: TX - row lock contention in forms 10g sequency number generation

    Iam Getting the Deadlock issue in oracle formdeveloper 10g database is 11g Acutually in our small Hospital organization using different forms generating entrying labrequest form finally save time
    one sequency number will generated i have give procedure below every save criteria form using below procedure some time iam getting lock iam using blocksession query i have find out some
    OSUSER
    MACHINE
    TERMINAL
    PROGRAM
    SQL_ID
    LOGON_TIME
    BLOCKING_SESSION_STATUS
    BLOCKING_SESSION
    EVENT
    user423
    UMCCDOM\LEVEL4-MICU
    LEVEL4-MICU
    PrjMcr.EXE
    0ccngw7dfkmgb
    23/09/2013 11:34:41 AM
    VALID
    277
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    23/09/2013 11:32:50 AM
    VALID
    186
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    22/09/2013 2:49:47 PM
    VALID
    277
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    23/09/2013 7:00:22 AM
    VALID
    186
    enq: TX - row lock contention
    user290
    UMCCDOM\LEVEL2-N
    LEVEL2-N
    PrjMcr.EXE
    0ccngw7dfkmgb
    23/09/2013 10:28:06 AM
    VALID
    277
    enq: TX - row lock contention
    lock are happen after open the code i have find out used FOR UPDATE in procedure please tell me any alternative for this every labrequest form saving time using this procedure for generating prefix sequence number multiple user using with different systems
    PROCEDURE   Gsp_GenSeqNum (I_SvPrefixCd IN VARCHAR2,I_SvUserName IN VARCHAR2,
                              O_SvSeqNum OUT VARCHAR2) IS
    --This Procedure generates the sequence number
    --by retrieving the prefix based on the code
    --supllied to the procedure.
      CURSOR  crSeqGenerator IS
             SELECT Gsn_prefix_last_num, Gsn_prefix_year
                FROM G_SEQUENCE_NUMBER
             WHERE Gsn_prefix_Cd = I_SvPrefixCd
                   AND Gsn_prefix_year = TO_CHAR(SYSDATE,'YYYY')
      FOR UPDATE OF Gsn_prefix_last_num;
      udSeqNum        G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
      udNextSeqNum    G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
      udYear          G_SEQUENCE_NUMBER.Gsn_Prefix_year%TYPE;
      udPrefix        G_SEQUENCE_PREFIX.Gsp_Prefix_Value%TYPE;
    BEGIN
      SELECT Gsp_Prefix_Value
      INTO udPrefix
      FROM G_SEQUENCE_PREFIX
      WHERE Gsp_Prefix_Cd = I_SvPrefixCd;
      OPEN crSeqGenerator;
      FETCH crSeqGenerator
       INTO udSeqNum,
            udYear;
      IF crSeqGenerator%FOUND THEN
         udNextSeqNum  :=udSeqNum + 1;
         O_SvSeqNum     := udPrefix||'/'||TO_CHAR(SYSDATE,'YY')
                                   ||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
      ELSE
    INSERT INTO G_SEQUENCE_NUMBER VALUES(I_SvPrefixCd,TO_CHAR(SYSDATE,'YYYY'),0,I_SvUserName,SYSDATE);
         udSeqNum      :=0;
         udNextSeqNum  :=udSeqNum + 1;
         O_SvSeqNum:=UdPrefix||'/'||TO_CHAR(SYSDATE,'YY')
                             ||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
      END IF;
      UPDATE G_SEQUENCE_NUMBER
         SET Gsn_Prefix_last_num=udNextSeqNum
       WHERE Gsn_Prefix_Cd = I_SvPrefixCd
         AND Gsn_Prefix_year=TO_CHAR(SYSDATE,'YYYY');
      CLOSE crSeqGenerator;
    END Gsp_GenSeqNum;
    Thanks
    subbu

    This application is inbuit with some modules VB (cath ,cardio)and oracle forms for required sequence number generation different time used this procedure whereever required the sequence Prefix generation.If i replace the procedure sequene to oracle standard sequency if the user cannot save the form unnessary sequency generated order is missing from sequence.

  • Number Generation Failure While Reversing Sub. Challan

    hi all,
    While reversing the sub contracting Challan, I am getting this Error "Number Generation Failure". Kindly guide where to maintain the Number range & Object.
    regards
    Dhinakar

    Hi Jeyakanthan,
    Thanks for your response
    I maintaned number range for object : J_1i57c in T.cde j1i9....
    still it is showing the same error.....
    hope to hear back from you......
    Thanks&Regards,
    Chand

  • Regarding Number Generation

    Hi Experts,
    I am SAP MDM Consultant and have recently come across this issue pertaining to number generation,need your expert guidance to solve it.
    Problem Definition : In our landscape Number generation takes places through a BAPI function call to ECC system,This data is then filled in the form and then on submission data gets saved in MDM.Later the same gets syndicated to ECC after enrichment and approvals.Recently in dev system we have encountered Duplicate Vendor number in MDM system.MDM is not generating number,its the BAPI call from ECC which does this.I think some previously used numbers must have be released for use and the same has been used by BAPI.
    So,can you please guide what can be reasons of inconsistent number generations and which methods are used to release the same unused numbers for use?
    Quick help will be appreciated.
    Thanks,
    Ravi

    .I think some previously used numbers must have be released for use and the same has been used by BAPI.
    SAP has no process to release old numbers,
    There is a function module to get the next number: 'NUMBER_GET_NEXT'
    It just uses the  the number range number and the number range object and reads then the next number from the number range table NRIV.
    Usually you cannot create duplicates, SAP ends in a dump.
    So I guess your problem is created by either resetting the number range in ERP production system manually, or somebody transported the intervals from DEV to PROD system despite of the endless warnings, which obviously has then the lower current number as you usually have not as much materials in a DEV system like in a PROD system.
    It can already be years ago that a number range was resetted, and you are just approaching  numbers that are already used.
    You have to analyze the numbers in MARA table  and compare it with the number range intervals and their current number.

  • Problem with random number generation

    hey forum, i wonder if anyone can help me out with a small problem with my university coursework (yep its homework!!!)
    heres my problem, i am writing one of them 8 puzzle problems (the one based around sam lloyds 15 puzzler), i can successfully generate one random sequence of numbers with no duplicates, but whenever i call the random method again it keeps producing the same results
    heres the code
    in my main class file
    if(e.getSource() == randomButton) {
          new RandomPuzzle();
          System.out.println(random.randState);
          //startStateString = new RandomPuzzle();
    }heres my number generator class file
    import java.util.Random;
    import java.io.*;
    public class RandomPuzzle
         /** Base Random number generator */
        Random rn = new Random();
        /** Puzzle holder */
        byte b[];
        long number = 0;
        String randState = "";
        /** Default constructor */
        public RandomPuzzle() {
            rn.setSeed(number);
            b = new byte[9];
            randState = randomString();
        /** Provide range for generation */
        public int rand(int lo, int hi) {
            int n = hi - lo + 1;
            int i = rn.nextInt() % n;
            if (i < 0)
            i = -i;
            return lo + i;
        /** Set size for array */
        public int rand( int hi){
            int n = hi;
                return n;
        /** Check for duplicate values within the same configuration */
        boolean valueExists( byte value ) {
            int i = b.length;
            boolean exists = false;
            for( int j = 0; j < i; j++ ){
                if( b[j] == value )
                    exists = true;
            return exists;
        /** returns the actual string */
        public String randomString(int lo, int hi) {
            int n = rand( 9 );
            //boolean valueEntered = false;
            for (int i = 0; i < 9; i++) {
                boolean valueEntered = false;
                byte temp = (byte)rand('0', '8');
                while( valueEntered == false ) {
                    if( !valueExists( temp ) ) {
                         b[i] = temp;
                         valueEntered = true;
                    else
                        temp = (byte)rand('0', '8');
            return new String(b, 0);
        /** calls above function */
        public String randomString() {
            return randomString(0, 8);
    }i've tried for hours to work this out, but i am stumped. if anyone can point me in the right direction, maybe point out the problem code and give one or two tips i would be forever in your debt
    thanx in advance
    korbitz

    thanx for the help paulcw, but when i removed the seed code it done the same
    but i added this to my main class and now it works fine
    if(e.getSource() == randomButton) {
                   RandomPuzzle temp = new RandomPuzzle();
                   System.out.println(temp.randState);
                   //startStateString = new RandomPuzzle();
              }thanx again for your help

  • How to Create an Custom Employee Number Generation ...

    Dear Friends,
    We are Implementing HRMS Suite Version12i, for one of the Client in Middle east.
    One question about Custom Person Numbering.
    How to create custom employee numbering Based on the User Person Type?
    Example:
    Two person types
    o Permanent Employee
    o Probationary employees
    We Need to give two different numbering schemes for each person type.
    eg Permanent Employee will use a seq begin 100000 whereas Probationary employees (other user type) will use a sequence beginning 200000.. Can any pls let me know how to handle the Custom Employee Number Generation (with Setups)
    With regards
    Swpana

    Hi,
    Could you please help me to write/or send a sample of a Person Number Generation Formula.
    I don't see the noteid : 279458.1 on metalink,I get the following message:
    Article or Bug cannot be displayed. Possible reasons are:
    The article Id or bug number was entered incorrectly. Please check and try again.
    The article Id or bug number does not exist (was referenced incorrectly).
    The article or bug is not classified as publicly accessible ("non-public").
    The content is being updated and it is temporarily unavailable but will be made available again soon.
    If you still have questions about why you could not access this article or bug, please use Feedback.
    Please help!!

  • Custom Employee Number Generation Using Fast Formulas

    Hi,
    I have a requirement to generate custom employee numbers like "EMP100001". we have already created a business group with the setting of Employee number generation as Automatic. but we need to generate custom employee number as Format given above instead of automatic number generation.
    I have created my own PL/SQL Package to generate custom employee number as per Person Type. Also created a Fast Formula Function with the following parameters -
    Name = Get_Custom_Number
    Data Type = Text
    Class = External Funtion
    Alias Name = NULL or what you want the alias to be
    Description = Returns the next custom number value
    Definition = CUSTOM_EMP_NUMBER_GENERATION.Get_Custom_Number (PL/SQL Function)
    Proving the following Context usages and Parameters details to the Fast Formula Function -
    Context usages:-
    Number = 1
    Context Name = BUSINESS_GROUP_ID
    Data Type = Number
    Parameters as defined in PL/SQL function
    1 p_legislation_code Text Input Only
    2 p_person_type Text Input Only
    3 p_person_number Text Input Only
    4 p_party_id Number Input Only
    5 p_person_id Number Input Only
    6 p_national_id Text Input Only
    7 p_date_of_birth Date Input Only
    Than i created a Fast Formula using the following navigation
    Total Compensation > Basic > Write Formula
    with following details -
    Name = EMP_NUMBER_GENERATION
    Type = Person Number Generation
    Description = Returns next Employee number
    and wrote my formula code.
    When i created a Employee from Enter and Maintain People screen it is showing automatic number instead of my custom employee number.
    I m not able to find where i m missing the logic or some parameters?
    If anyone has come across such situation, please provide some pointers here.
    Thanks
    Renu

    What is the application release?
    Please review these docs and see if it helps.
    Is it Possible to Update Generate Employee Number Method From Automatic to Manual? [ID 393827.1]
    Need To Change The Employee Numbering From Automatic To Manual [ID 291634.1]
    Unable to Switch From Auto to Manual for Employee Number Generation in Shared Hr [ID 452044.1]
    How to Prefix a Zero on Custom Employee Numbers [ID 822425.1]
    How To Implement Custom Person Numbering Using FastFormula Based on User Person Type Instead of System Person Type [ID 372696.1]
    Thanks,
    Hussein

  • Report based upon material type against movement type for a period ?

    i need a inventory report which should be based upon materil type & movement type for a particular period.
    For example- for last monthe how much Raw material has been issued againast production order. i would like report to allow me  ROH and movement type 261/262 and period entry. MB5B does not satisfy my requirements, ist of all there si no material type/secondly it restricts itself if i use movement types
    thanks
    sam

    Hi,
    You can create a small program to get report.
    Input fields Date of posting BUDAT, Movement type BWART (Plant if required).
    Check field BUDAT (Posting Date. Should check based on input date field.) In table MKPF.
    If data falls in required date range. Pick MBLNR-MKPF (Mat doc number).
    Go to table MSEG compare MBLNR-MKPF and MBLNR-MSEG if same pick field MATNR-MSEG (Mat number).
    Go to MARA check MTART-MARA for picked MATNR-MARA (in previous step). Take the material type.
    Add the below fields to out put
    MATNR, MTART, BWART-MSEG (Movt type), ERFMG-MSEG (quantity posted), WERKS-MSEG (Plant received), LOGRT-MSEG (S. Loc received).
    Please take advise from ABAPer regarding prog logic
    Thank you,
    Anand K

  • Automatic Batch Number Generation in tcode MIGO...

    Hi Experts,
                     There is automatic Batch Number is generated  after clicking on Pushbutton  "Check" in transaction code MIGO. Instead of that user want Batch Number Generation after clicking on Pushbutton "Post" . Can anybody tell me the procedure for the same..
                    Thanks in advance.
    Best Regards,
    Vinayak

    HI Vianayak,
    You can implement a Badi for your logic.
    You can implement Badi :MB_MIGO_BADI and write your logic in method CHECK_ITEM .
    Here you can restrict the Batch number based on Fcode for the Check and Post buttons.
    Like if the user click on Check button: based on the fcode for the check button u can restrict it and similarly if the user click on Post button you can pass the value for Batch number. This method get called in both the cases.
    Hope this solves your problem.
    Regards,
    Satyam

  • Sequnce Number generation in Message Mapping..

    Hello All,
    I am using this thread as a reference for declaring a Counter for unique sequence number generation...
    Sequence Number in XI Mapping
    -> define a global variable by clicking the JAVA_SECTION_TOOLTIP icon on the design tab of source message type of ur message mapping.
    enter the following in the GlobalVariables Section
    Integer counter =0;
    -> define a user defined function (SeqGen let's say)
    write the following code in it.
    Integer seq = 0;
    GlobalContainer globalContainer = container.getGlobalContainer();
    a = globalContainer.getParameter("counter");
    seq = globalContainer.getParameter("counter");
    seq = seq + 1;
    globalContainer.setParameter("counter",seq);
    return a;
    now use this user defined function (SeqGen)in all ur mappings to the sequence no of ur line items.
    If u could just elaborate on creation of UDF.. on what are we goin to pass in the variable 'a'...  while creating the UDF. ??
    Harpreet..!!

    Hi harpeet,
    A UDF can be of two types a  Simple UDF and Adavnced UDF.
    This is a case of a simple UDF,
    A simple UDF returns only 1 element  as  an output. 
    here 'a' is such an generated output.   you can assign this to any numeric filed of ur target stucture
    This UDf does not require any input Field from the message. 
    These functions are known as generating functions.
    Hope this explains.
    Reward points if useful.
    Regards,
    Abhishek

  • Material Document number generation

    Hi,
    The transaction GI, Trsfr Posting, Other Goods Movement is clubed to a wide category of Trans./Event Type(WA).So all the three documents has  been generated under a single number range.
    Still further based on certain specific mvt.types(transactions) can i  segregate the number generation to identify the transactions uniquely.
    Regards,
    Milton.I

    Hi
    The number range is generated for the trans/event type. One cannot have number range for specific movement type.
    Rgds
    SVJ

  • Create maintenance order based upon notification in NWBC / Portal

    Dear experts,
    How to create a maintenance order based upon a notification, using the POWL for notifications ?
    I am using NWBC and would like to create a maintenance order, based upon a notification put in process.
    In R/3, this works fine using transaction IW22 / IW28 and all info from the noticiation is copied in the new order.
    How can I get the same functionality using  the role SAP_BPR_MAINTENANCE_TECH_12 ?
    Kind regards,
    Dirk

    Dirk,
       You should be able to select the Notification number from the POWL overview list and choose the "Create Order" push button on the Tollbar (along with display notification, change notification etc).
      What i have noticed is that once you are inside the notification from the Portal application, the create Order push button or functionality doesn't seem to exists. This is probably incomplete functionality taking into consideration the standard IW22 transaction /Or a  Bug  and maybe you could raise a OSS Note for the same.
    Regards
    Narasimhan

  • Create order based upon notification in NWBC / Portal

    Dear experts,
    How to create a maintenance order based upon a notification, using the POWL for notifications ?
    I am using NWBC and would like to create a maintenance order, based upon a notification put in process.
    In R/3, this works fine using transaction IW22 / IW28 and all info from the noticiation is copied in the new order.
    How can I get the same functionality using the role SAP_BPR_MAINTENANCE_TECH_12 ?
    Kind regards,
    Dirk

    Dirk,
       You should be able to select the Notification number from the POWL overview list and choose the "Create Order" push button on the Tollbar (along with display notification, change notification etc).
      What i have noticed is that once you are inside the notification from the Portal application, the create Order push button or functionality doesn't seem to exists. This is probably incomplete functionality taking into consideration the standard IW22 transaction /Or a  Bug  and maybe you could raise a OSS Note for the same.
    Regards
    Narasimhan

Maybe you are looking for