PI 7.1, Seqeunce number generation

Hi,
I need to auto increment a field value by 1 every time the Message flows through PI.  Can you please suggest a way to achieve this.  I am working on IDOC to XML File scenario.
For eg
Message 1
<NUMBER>1</NUMBER>
Message 2
<NUMBER>2</NUMBER>
Thanks in advance.

Anil,
It's better to create a table in PI / R3 / DB server and do a look-up (RFC / JDBC) for incremental value. Reason being, if you create the incremental function in PI (mapping etc), and if you re-start the PI server, the count will be lost as it is a temporary storage.
Regards,
Neetesh

Similar Messages

  • What algorithm does Excel 2010 use for Pseudo Random Number Generation (MT19937?)

    Does Excel 2010+ use the Mersenne Twister (MT19937) algorithm for Pseudo Random Number Generation (PRNG), implemented by the RAND() function?
    This has been a nagging question for some time now, with "hints" that it indeed does.  However, a relatively thorough search turns up no definitive documentation.  The most direct indication is perhaps given by Guy Melard [Ref 9] where
    he tests Excel 2010's RAND() function using the Crush battery of tests in TestU01 by L'Ecuyer & Simard.  Melard references a "semi-official" indication that Microsoft did indeed implement MT19937 for the RAND() function in
    Excel 2010, but this reference no longer seems to be available. http://office.microsoft.com/enus/excel-help/about-solver-HP005198368.aspx?pid=CH010004571033.
    The other references below [Ref 1-10] document the history of the statistical suitability of the PRNG and probability distributions in various versions of Excel.  This includes the Wichmann-Hill PRNG implementations supposedly (arguably) used in
    Excel 2003 & 2007 for random number generation.  But still, we have no answer as to which PRNG algorithm is used in
    Excel 2010 (and 2013 for that matter).
    Microsoft indicates that RAND() has been improved in Excel 2010; Microsoft states, "...and the RAND function now uses a new random number algorithm." (see https://support.office.com/en-ca/article/Whats-New-Changes-made-to-Excel-functions-355d08c8-8358-4ecb-b6eb-e2e443e98aac). 
    But no details are given on the actual algorithm.  This is critical for Monte Carlo methods and many other applications.
    Any help would be much appreciated. Thanks.
    [Ref 1] B. McCullough, B. Wilson.  On the Accuracy of Statistical Procedures in Microsoft Excel 97. 
    Computational Statistics & Data Analysis. Vol. 31 No. 1, pp 27-37. July 1999.
    http://users.df.uba.ar/cobelli/LaboratoriosBasicos/excel97.pdf
    [Ref 2]L. Knüsel.  On the accuracy of the statistical distributions in Microsoft Excel 97. Computational Statistics & Data Analysis. Vol. 26 No. 3, pp 375-377. January 1998.
    http://www.sciencedirect.com/science/article/pii/S0167947397817562
    [Ref 3]B. McCullough, B. Wilson.  On the Accuracy of Statistical Procedures in Microsoft Excel 2000 and Excel XP. 
    Computational Statistics & Data Analysis. Vol.40 No. 4, pp 713-721. October 2002.
    https://www.researchgate.net/publication/222672996_On_the_accuracy_of_statistical_procedures_in_Microsoft_Excel_2000_and_Excel_XP/links/00b4951c314aac4702000000.pdf
    [Ref 4] B. McCullough, B. Wilson.  On the Accuracy of Statistical Procedures in Microsoft Excel 2003. 
    Computational Statistics & Data Analysis. Vol.49. No. 4, pp 1244-1252. June 2005.
    http://www.pucrs.br/famat/viali/tic_literatura/artigos/planilhas/msexcel.pdf
    [Ref 5] L. Knüsel. On the accuracy of statistical distributions in Microsoft Excel 2003. Computational Statistics & Data Analysis, Vol. 48, No. 3, pp 445-449. March 2005.
    http://www.sciencedirect.com/science/article/pii/S0167947304000337
    [Ref 6]B. McCullough, D.Heiser.  On the Accuracy of Statistical Procedures in Microsoft Excel 2007. 
    Computational Statistics & Data Analysis. Vol.52. No. 10, pp 4570-4578. June 2008.
    http://users.df.uba.ar/mricci/F1ByG2013/excel2007.pdf
    [Ref 7] A. Yalta. The Accuracy of Statistical Distributions in Microsoft<sup>®</sup> Excel 2007. Computational Statistics & Data Anlaysis. Vol. 52 No. 10, pp 4579 – 4586. June 2008.
    http://www.sciencedirect.com/science/article/pii/S0167947308001618
    [Ref 8] B. McCullough.  Microsoft Excel’s ‘Not The Wichmann-Hill’ Random Number Generators. Computational Statistics and Data Analysis. Vol.52. No. 10, pp 4587-4593. June 2008.
    http://www.sciencedirect.com/science/article/pii/S016794730800162X
    [Ref 9] G. Melard.  On the Accuracy of Statistical Procedures in Microsoft Excel 2010. Computational Statistics. Vol.29 No. 5, pp 1095-1128. October 2014.
    http://homepages.ulb.ac.be/~gmelard/rech/gmelard_csda23.pdf
    [Ref 10] L. Knüsel.  On the Accuracy of Statistical Distributions in Microsoft Excel 2010. Department of Statistics - University of Munich, Germany.
    http://www.csdassn.org/software_reports/excel2011.pdf

    I found the same KB article:
    https://support.microsoft.com/en-us/kb/828795
    This was introduced (according to the article) in Excel 2003. Perhaps the references in notes 2 and 3 might help.
    The article describes combining the results of 3 generators, each similar to a Multiply With Carry (MWC) generator, but with zero carry. MWC generators do very well on the Diehard battery of randomness tests (mentioned in your references), and have
    very long periods. But using zero carry makes no sense to me.
    Combining the three generators only helps if the periods of the 3 are relatively prime (despite what the article implies). Then the period of the result will be the product of the 3 periods. But without knowing the theory behind these generators, I have
    no idea what the periods would be. The formulas for MWC generators fail here.
    Richard Mueller - MVP Directory Services

  • 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

  • Process Order Batch number generation at the time of order creation

    Dear All,
    I m facing some issue at the time process order creation:
    Current Settings:
    1. Batch Number Creation at the time of order create.
    Reason for this setting: Release of order is done  by releasing operations one by one, therfore batch number will be generated on the final operation release, thats why we set up batch creation at the time of order create.
    2. For FG batch number generation there is a program that copy the SFG(in Order BOM) Batch number to FG. ITs a industry requirement.
    Problem:
    when we create FG order system generate the error message at the time of order creation tht No batch could be determine.
    Please suggest the solution
    Thanks,

    Hi
    Hope you have cretaed Batch serch strategy in COB1
    U need to maintain it as per your strategy type.

  • Problem on forms for serial number generation with last record next_record.

    Hi Experts,
    currently i'm facing one problem like :
    i'm populating one receipt detail in Multi block , like when user key in one receipt number that time record should go in first record ,and if they key in second receipt number then record should go in second record . mean to say every time record go in last record ..but the problem is i want to generate Serial no correspondence to every last record ..
    here is my approch :
    cursor c1 is
    select * from table
    where cname =:blk_name.clm_name.
    Last record;
    next_record;
    for v1 in c1 loop
    processed record;
    next_record;
    end loop;
    last_record;
    go_block(___);
    first_record;
    :sno := system.cursor_record ;
    next_reocrd;
    end loop;
    first_record;
    And in block level i'm writing code for Serial number generation when user key in manual entry for receipt detail:
    :blk_name.coulumn_name := :system. cursor_record;
    so in this approach their is no problem it is working properly but the problem is that
    when user fetch one receipt automatically and then after he want to enter next record manually and he decided to go in detail block ,
    and once he reached in detail block that time block level trigger i firing .ans serial number 2 generated and then suddenly he came to know no i want to fetch next record automatically mean to say now user going again master block and fetching next receipt detail ,
    but the problem is when user leaving seccond sr no and going in master block and population next receipt detail that time cursor going on 3 record
    but logically have to replace the second Serial no and generate the again serial number 2 record population .mean to say its not refreshing last_record..
    so i'm appreciating is anyone if came accoross this type of issue please corrrect my code and send updated code ..plsssssssssssssssssssssssssssssss
    Thanks
    Abhishek
    [email protected]

    hi
    I put this below code on when_new_record_instance on block level..
    :blk_name.column_name :=system.cursor_record;
    so can you please help me.....
    Thanks
    Abhishek

  • 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!!

  • 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.

  • Serial number generation

    Hi friends,
    I have a question regarding the serial number generation.
    1. In serial number generation  do we have option of generating either when creating and releasing the production order or when doing the GR for the production order.
    If yes, please let me know how we can do that.
    2. If we have the serial number activiated for the material can we use auto goods receipt for the material?
    Thanks and regards,
    Satish

    Dear Satish,
    Go to OIS2 and create the serial number profile which will be later assigned to the material master.
    Select the serial number profile and select serializing procedure
    Here,select "PPAU Serial numbers in PP order" and enter the value as desired in serial number usage column.
    Similarly you can try for order release.
    We cannot activate auto GR for the items with serial numbers.
    regards,
    Joseph Charles Vaikathussery

  • 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

  • Enhancement for Automatic Serial Number Generation

    Hi,
    Has anybody worked on the enhancement iqsm0001?
    If so, please give me some idea on how to use this enhancement for automatic serial number generation.
    Thanks for your kind help.
    Regards,
    Renjith Michael.

    Hi Renjith,
    You can check the following link, Hope it helps you to some extent:
    Re: Implement unique serial number within a client
    And you can also try user exit EXIT_SAPLIPW1_001 for Automatic serial number assignment.

  • Customer number generation

    Oracle Gurus,
    Customer creation number generation as Automatic, where we are doing this setup in applications.
    For supplier we give the setup in Financial options but I am not able to trace out for customer automatic number generation.
    If anyone know the setups, please let me know the steps and setups.
    Please advise.
    Edited by: satish.ygl on 09-Sep-2012 19:21

    Hi Satish,
    Set the sequence number
    Pl. go thru following navaigation path :
    Go to Application Developer responsibility >Menu > Application> Database > Sequence
    Query on sequence RA_CUSTOMERS_NUM_S and set Start Value to 20000 .
    Retest it.
    HTH
    Sanjay

  • 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

  • Lot number generation when ever GR is done

    Dear All,
    As there is a requirement like Lot number generation when ever GR is done.
    For each material Lot Number is defined by the client.
    And there is partial receipt of Goods.
    Whenever you do GR system automatically generates Lot number.
    So we need when ever we do GR system should generate Lot number once the
    Lot size as defined is completed.
    Regards,
    Veeresh

    When a material is batch managed, and you do GR, either you specify the batch ID, or, if not, system will generate one. There are some exceptions, like when you do GR from production order, and have created the batch ID in advance in the order.
    Otherwise, if you want to have some kind of private logic of the kind, you'll need to employ a user exit.

Maybe you are looking for