FM for internal number generation

Hi Friends,
I want to generate one internal number and print the same for my Gate Pass Form...this number should be alloted to the particular delivery document which i called for and it goes like other delivery document number for follow-ups.
If i call the same delivery number for multiple print out...the gates pass no should be same as generated once.
Example in FORM****
      Gatepass No:1
       Invoice No: 98300012
   then in next FORM
      Gatepass No: 2
      Invoice No: 98301247
Pls advise with some sample code of FM.
thanks & regards
sankar.
Edited by: sankar babu on Jan 31, 2008 9:13 AM
Edited by: sankar babu on Jan 31, 2008 12:26 PM

Step 1)
Create a Number Range in SNRO Transaction.
Step 2)
Create a Z Table with two fields Delivery Number and Gate Pass Number.
Step 3)
In your form, write the code as per the following guidelines.
select single * from ZTABLE where DELIVERY = P_DELIVERY.
if sy-subrc <> 0.
Use the FM NUMBER_GET_NEXT to get the next available
number.
ztable-delivery = p_delivery.
ztable-gatepassno = <Number that was returned by the FM>.
modify ztable from ztable.
endif.
Regards,
Ravi Kanth Talagana

Similar Messages

  • 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

  • Error in J1INCHLN for internal number range

    Dear Experts,
    I am getting the below error when I am executing J1INCHLN. I checked J1INUMBER but of no use. Number range for 2008 is maintained. I am not able to maintain number range for 2009. Kindly guide.
    Number range for internal challan numbers not maintained
    Message no. 8I706
    Diagnosis
    Number range object 'J_1ICHLNNO' is not maintained fully.
    System response
    There is an error in the number range object and a new internal number can not be generated.
    Procedure
    Check if the number range object exists in your system and also check if number ranges for the number group is maintained for the current year. Maintain the number range object and then start this transaction. The transaction code for the number range maintenance is  'J1INUMBER'.
    Regards
    Komal

    Hi
    Go to SPRO>IMG>Financial Accounting (New)>Financial Accounting Global Settings (New)>Withholding Tax>Extended Withholding Tax>Posting>India>Remittance Challans>Maintain Number Groups
    here define - cocode , section , tds section code , number group
    now go
    SPRO>IMG>Financial Accounting (New)>Financial Accounting Global Settings (New)>Withholding Tax>Extended Withholding Tax>Posting>India>Remittance Challans>Assign Number Ranges to Number Groups
    here assign number group to Number range
    now create number range go to SPRO>IMG>Financial Accounting (New)>Financial Accounting Global Settings (New)>Withholding Tax>Extended Withholding Tax>Posting>India>Remittance Challans> Maintain Number Ranges
    here create a number range on year base
    **some time you have to update the table so go SM30 and update J_1IEWTNUM , J_1IEWTNUMGR and J_1IEWTNUMGR_1 tables
    Best Of Luck
    Tanmoy

  • New Hunt Pilot for internal number is not working.

    Hi support, I have a problem with the new hunt pilot number that created for internal use is not working. I had create 1 internal number (1090) for the Hunt Pilot number, and there are 2 hunt group member (9382 / 9387). These number will forward all to the mobile number 9382 will forward
    all to 90176253579 9387 will forward all to 90133921295 Calling from 1941 to 1090 resulted failed but calling from 1941 to 9382 working and the call forwarded to mobile 90176253579. What might be wrong with the 1090 where i can't call that number from internal. From the DNA, it shows the call should reachable to the destination. I attached the DNA result for your reference.

    Hi Mohd Afadzal,
    Forwarding setting do no apply for Line Group members. As you mentioned that the Line group members
    (9382 / 9387) are configured to forward all calls to their respective cell phones, this will not work.
    You can use the HuntPilot's Busy or No Answer configuration to forward calls to an alternate number.
    HTH,
    Jagpreet Singh Barmi

  • BAPI : MATERIAL MASTER - Internal Number generation

    Dear Experts,
                        I am using BAPI_MATERIAL_SAVEDATA to update material master,Material number should be generated
    internally.If iam not including Material number,Bapi returns errror mesage.How can i do this?
    Regards,
    Sujay .

    From the function module documentation:
                                                                                    o   MATERIAL                                                            
         Only external number assignment is supported for the material number
         (MATERIAL). If you want the material number to be assigned          
         internally, the method BAPI_MATERIAL_GETINTNUMBER must first be     
         called. This method determines an internal number for the material  
         to be created. You must enter this internal number in field         
         HEADDATA-MATERIAL.                                                  
    Hope this helps,
    -Mark

  • Wrong internal order number for internal number range

    Hi,
    I have created an internal order type and assigned the internal number range 450000-459999. When we checked the numbers given for the system there are missing numbers. For example; the numbering is OK up to 450013 numbered order and the next order has 450020 number, and next one has the 450040
    number.
    I checked the COAS table and there are no number used by any other order. What can be the reason for this situation? How can we fix the problem? Is there any one who face the same problem?
    What are your suggesitions...
    Thanks in advance
    Ahmet

    Hi,
    I have similar kind of query. How to use the numbers that the system jumped? Is there any record/history of unused numbers present in any table? Thanks in Advance!
    Regards,
    Nidhi

  • DEBMAS06 - posting for internal number

    Hi,
    I am able to post DEBMAS06 idoc in R3 and create customers with external number.
    How to create customer with internal number range ? i tried sending in blank value for KUNNR field, idoc failed to post.
    Any ideas?

    Hi,
    I think you can try to use fm BAPI_CUSTOMER_GETINTNUMBER .
    D Bye...

  • Exit/Badi for Serial number generation in MIGO

    Dear ALL,
    Requirement: Based on the serial number profile i will maintian the number range in custom table and on doing MIGO system will find the serail number profile thorugh material and based on that system should generate the serial number automatically.
    Advise for the user exit /badi ... I have checked some exit starting with IQ....  .
    Please provide the exact badi or exit for this purpose.
    Regards
    Rahul

    You can see the local class lcl_migo_globals used in include LMIGOGL1 which inturn has a variable
    called kernel with reference to class lcl_migo_kernel. Here exists an example [Serial Numbers Modify in LINE_MODIFY method in MB_MIGO_BADI|http://saptechsolutions.blogspot.com/2011/11/serial-numbers-modify-in-linemodify.html]of accessing & modifying the lines by accessing the call stack using class lcl_migo_kernel and method line_get & line_modify through badi MB_MIGO_BADI .

  • Problem with submit for spool number generation

    Hi All,
    I have a ALV report which downloads the output to pdf . I have a footer data in the END_OF_PAGE event which should be displayed for each page. It works fine if I take a  printout using the print option in the report output screen and generate a spool number the footer is getting printed.
    But when I use a submit to sap-spool....statement to generate the spool number the footer is not displayed.
    Any suggestions??

    Hi RAkesh,
    Are you using the FM 'REUSE_ALV_COMMENTARY_WRITE' for footer text or simple using the write statements.
    try with the both options, still problem provide the complete code.
    Regards,
    Satya.

  • MDM Internal number Assignment

    Hi Experts,
    Need your guidence on the below scenario.
    1. how is the internal number assignment configuration done in MDM ( where the number is generated as soon as you save the records in the repository)
    2. ECC has internal number generation for FERT Material, and i am creating a record in MDM which also has internal number generation whose number range match with the ECC number range for material type FERT. what is the configuration required to syndicate the record from MDM to ECC ( as ECC has internal number generation).
    Thanks in Advance.

    Hi Sandhya,
    Its a difficult thing to comment why the design is like this,there is a purpose why it is made such.
    Suppose you create a Material in MDM system 100010002000(say) and ECC system is defined for internal number generation.
    You send the material through PI to ECC as idoc.
    And torrow MDM system goes down or there is a business requirement because of which you have to create Material in ECC.
    This will require huge manual intervention and possibility of error is quiet high if Number range is defined as external.
    Whereas if it is Internal (as in your case) ECC takes care of the number range and the sequence.
    The ALE processing of idoc does not update the status of the current number range used.You can goto MMNR to check this for Material,xkn1 for Vendor.And this is the major concern with external number generation definition in ECC.
    For further detaills regarding Material number range please go through :
    http://saptechsolutions.com/pdf/MaterialNumberRangesAndFormatting.pdf
    Hope this helps!
    Thanks,
    Ravi

  • 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

  • Excise Invoice number and Internal Number

    Hello Friends
    I have some queries ,I will be thankful to you if you could guide me, in understanding themu2026
    1) When we see the document in J1IEX ,in excise invoice tab, we see two fields :Excise invoice number and Internal Number.
    For Internal number we define the range in object J_1INTNUM, but how do we define range for Excise invoice  number
    2) Where do we maintain the relation between GRPO (Excise Transaction type) with the Excise Invoice number
    3) When do we require updating of register ,is it done on daily bases, and  how can we see the entries of RG23A part 1.
    4) We have excise invoice number  range of posted ,in process and cancel documents which is  assigned to GRPO transaction type, while running J1I7 though we select last option   part 1 posted  and part 2 not  posted, still the system shows the cancelled documents, How can I avoid  the cancel documents
    Thanks
    Siddharth

    1) When we see the document in J1IEX ,in excise invoice tab, we see two fields :Excise invoice number and Internal Number.
    For Internal number we define the range in object J_1INTNUM, but how do we define range for Excise invoice number
    -->> Ex inv nbr will be entered based on the vendor ex invoice .. this is external nbr assignment
    2) Where do we maintain the relation between GRPO (Excise Transaction type) with the Excise Invoice number
    --->> there is no relation between grpo vs. ex inv nbr
    3) When do we require updating of register ,is it done on daily bases, and how can we see the entries of RG23A part 1.
    >> u can see in J1I7 or thru table J_1IPART1
    4) We have excise invoice number range of posted ,in process and cancel documents which is assigned to GRPO transaction type, while running J1I7 though we select last option part 1 posted and part 2 not posted, still the system shows the cancelled documents, How can I avoid the cancel documents
    >> wait for others answers..

  • 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

  • DPR_ATTRIBUTES - Automatic number generation of Project ID

    Dear All,
    I am using the method 'SET_DEFAULTS_UPON_CREATION' in  BAdi 'DPR_ATTRIBUTES'  for automatic number generation of Project ID in cProjects.
    I am able to change the project ID with my new number in CS_ATTRIBUTES. But the same is not getting populated to cprojects screen.
    My code --
      FIELD-SYMBOLS:
        <ls_attributes> TYPE dpr_ts_project_int.
      CASE flt_val.
        WHEN cl_dpr_co=>sc_ot_project.
         ASSIGN cs_attributes TO <ls_attributes>.
          CALL FUNCTION 'NUMBER_GET_NEXT'
            EXPORTING
              nr_range_nr = '01'
              object      = 'ZXX'
            IMPORTING
              number      = g_pid.
          CONCATENATE g_ptype g_pid INTO g_newpid SEPARATED BY '-' .
            MOVE g_newpid TO <ls_attributes>-project_id.
    ENDCASE.
    While debugging the new project ID can be viewed in CS_ATTRIBUTES.
    Can you please let me know what might be the issue for not populating on cprojects.

    Hi Matthias,
    Thanks for the reply.
    Can you please help me where exactly the external_id attributes needs to be changed.
    Your help is greatly appreciated.
    Matthias

  • Automatic employee number generation

    Hi,
    When installing Oracle HR, we had choosed manual employee number generation and then we changed to the automatical mode. Now, we need to return back the the manual mode.
    I ask if there tips to do that?
    best regards,
    Mourad.

    Pl see MOS Doc 452044.1 (Unable to Switch From Auto to Manual for Employee Number Generation in Shared Hr)
    HTH
    Srini

Maybe you are looking for