Serial Number generation for the records in a Z-Table

Hi,
I have created a Z-Table to store Request Details. User provides the details of the request.
when ever user saves the Request i will generate the Request Number.
My Constraint is these Request Numbers must be in serial.
I don't want to hit the database every time to know what the Latest Request Number is? Because these requests would be in thousands. Please suggest me the better way.
Thanks,
Sekhar.J

u can do this by using Number Range...
Maintain number range and intervals in transaction code SNUM
Coding...
call function 'NUMBER_RANGE_ENQUEUE'
         exporting
               object              = 'ZOWNNO'   "Create with SNUM
         exceptions
               foreign_lock        = 1
               object_not_found    = 2
               system_failure      = 3
               others              = 4.
  if sy-subrc ne 0.
*   message e086 with 'Lock error' sy-subrc.
  endif.
  call function 'NUMBER_GET_NEXT'
         exporting
               nr_range_nr         = wnorange
               object              = 'ZOWNNO'
               subobject           = wsubobj
         importing
               number                  = wdocno  "Number generated by SAP
         exceptions
               interval_not_found      = 1
               number_range_not_intern = 2
               object_not_found        = 3
               quantity_is_0           = 4
               quantity_is_not_1       = 5
               internal_overflow       = 6
               others                  = 7.
  if sy-subrc ne 0.
*   message e086 with 'Number Range' sy-subrc.
  endif.
  call function 'NUMBER_RANGE_DEQUEUE'
    exporting
      object                 = 'ZOWNNO'.
  if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.

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

  • Reg serial number generation at the time of GR-(MB31)

    Dear all,
    can we create a customized serial number  at the time of goods receipt (MB31)like ex: S0900001  where in S stands for plant number , 09 stands for the year and 00001 is running serial number
    please give the required steps to get the customized number for product identification.
    Thanks in advance
    venu

    Dear Venu,
    You want to generate Alphanumeric Serial Number that is possible by following Enhancement for Serial Numbers:
    Pls find here some details about generating alphanumeric serial numbers as below :
    You can generate alphanumeric serial number with the following BADI / Customer Exit:
    Name of Enhancement : IQSM0001
    Name of Function Module Exit: EXIT_SAPLIPW1_001
    Name of Include : ZXQSMU01
    ZXQSMU01:
    This user exit can be used to create the serial numbers automatically for material of a production order. Number of serial numbers generated will be equal to the total number of quantity. The purpose behind development of this user exit was to attach prefix in each serial number generated.
    so as per your requirement you can generate serial number like ABC0001 etc.
    Process Steps:
    For exit: EXIT_SAPLIPW1_001
    1. Get serial number profile for a material in respective plant.
    2. Check if the profile is u2018XYZu2019.
    3. If profile is u2018XYZu2019 generate the serial numbers for the given quantity of material in production order.
    General Program Structure
    For exit: EXIT_SAPLIPW1_001
    1. Get the serial number profile using function module 'MARC_SINGLE_READ' for a material.
    2. Check if the profile is u2018XYZu2019.
    3. If the serial number profile is u2018XYZu2019 then generate the serial numbers for the given production order quantity of a material.
    4. Concatenate ABC as a prefix to the all generated serial numbers
    Provide above details reg. implementation BADI / Enhancement to your ABAPer and go ahead.
    You can implement above Enhancement in CMOD.
    Hope this helps.
    Revert in case of any doubt.
    Award points if useful.
    Regards,
    Tejas

  • My Serial Number is for the wrong OS

    Ive just installed elements on my MacBook, and when i went to put the serial number in, i realised i had been given a serial number for windows, and not Mac. What can i do? Is there some way to find it out? Im not having any luck contacting support....

    See if this helps: Find your hardware serial number.
                   and     About This Mac

  • Where do I get the serial number from for the free download?

    Where do I get the serial number for the free download?

    There are no serials for trials. They run without one for 30 days and that's it. If they time out prematurely, there's nothing anyone can do.
    Adobe trial software expired early
    Mylenium

  • I have been trying to do the serial number retrieval for the Photoshop elemems 13 and hve been having trouble getting it to go through. One set of the numbers contains a O with a slash through it and I don't know how to enter it

    I am trying to enter the redemption code for my photoshop elements 13 and have one set that has a O with a slash through it and I have no idea what to enter

    A slashed Ø often represents the number zero, to distinguish it from the character O.
    If you have more questions, please ask in the Downloading, Installing, Setting Up forum.

  • 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

  • Get the Serial Number based on the  Delivery

    Hi Experts,
    I want to fetch the serial number based on the delivery number  and Item.
    If I see in the LIPS table we have the field like SERNR but we dont have data in that field.
    But in the VL03n transaction Serial Number exists for the same delivery.
    Please any one Suggest me Using which table we can fetch the serial number.
    Thnx ,
    Sam

    TABLES: RSEROB.
    DATA : S_LV_IRSEROB TYPE STANDARD TABLE OF RSEROB WITH HEADER LINE.
    *       S_LV_ORSEROB TYPE STANDARD TABLE OF RSEROB WITH HEADER LINE,
    *       WA_RSEROB TYPE RSEROB.
    CLEAR : S_LV_IRSEROB , S_LV_ORSEROB , WA_RSEROB .
    *LOOP AT ITAB_LT_ITEMS INTO WA_ITEMS.
      S_LV_IRSEROB-TASER   = 'SER01'.
      S_LV_IRSEROB-LIEF_NR = WA_ITEMS-VGBEL.---delivery no.
      S_LV_IRSEROB-POSNR   = WA_ITEMS-VGPOS.--delivery item
      APPEND S_LV_IRSEROB.
      CALL FUNCTION 'GET_SERNOS_OF_DOCUMENT'
        EXPORTING
          KEY_DATA                  = S_LV_IRSEROB
    *   STATUS_PRE_READ           = ' '
    *   EQUNR_CORR                = 'X'
        TABLES
          SERNOS                    = S_LV_ORSEROB
    *   SERXX                     =
       EXCEPTIONS
         KEY_PARAMETER_ERROR       = 1
         NO_SUPPORTED_ACCESS       = 2
         NO_DATA_FOUND             = 3
         OTHERS                    = 4.
    *  IF SY-SUBRC EQ 0.
    *    Loop at S_LV_ORSEROB INTO WA_RSEROB.
    *      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
    *  EXPORTING
    *    INPUT         =  WA_RSEROB-SERNR
    * IMPORTING
    *   OUTPUT        = WA_RSEROB-SERNR        .
    *      WA_ITEMS-SERIAL_NO = WA_RSEROB-SERNR(18).
    *      MODIFY ITAB_LT_ITEMS FROM WA_ITEMS.
    *    ENDLOOP.
    *  ENDIF.
    *ENDLOOP.

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

  • Number Ranges for the Serial Number Profiles

    Hi All,
    We wanted to trace the Goods movement based on the serial numbers. we could make this possible by attaching the serial number profile with relevant procedure (Stock Chk) to the Material.
    Now the issue left out is of Number range and the pop-up for the existing serial numbers for the material. Is it possible to define Number Ranges (Ext. / Int) to the Serial Number profile ? Also, to get a pop-up for the serail numbers of material currently in Stock, which can be issued. Currently, I have to get the detail of sr. No. thru' IQ09 / IQ03.
    Pls advise.
    Shekhar.

    Hi,
    Yes. In IMG under Plant maintenance -- > Technical objects -->Serial No profile.
    Here you can create diff profile with difff procedures.
    And mention the properties of each.
    There is a material master record for each type in the system. For control purposes, the company wants to know which customer received which collector type, and which serial number(s) of the collector type were supplied to the customer, when the individual solar collectors were delivered.
    It is therefore necessary to assign a serial number to the customer delivery in addition to the material number.
    A serial number master record is created with the assignment of the serial number. You can maintain data fields specific to the serial number in the master record.
    At a later date, it may be necessary to enter equipment master records for materials that have already been serialized and delivered to customers, for example, if the producer of the solar collectors also has to perform maintenance activities for the customers and therefore wants to use all the functions available in the equipment master record for a serialized material.
    In order to keep this option open at any time, you must define a number range for serial numbers. The numbers assigned from this number range are not the serial numbers but reserved keys that stand for the combination of material number and serial number and the equipment number that may possibly be assigned.
    You can also define one or more serial number profiles.
    The serial number profile defines how and under which conditions a serial number is assigned for a material.
    Note
    A material can only be assigned serial numbers after the required serial number profile has been entered in the material master for a specific plant.

  • Adobe Photoshop CS4 message: "Licensing for this product has stopped working." I have the serial number but not the media. How do I use the software?

    I recently tried to use Photoshop CS4 that I have on my computer but I get the message:"Licensing for this product has stopped working." I have the serial number but not the media. How can I use this version?

    You can get the installer here: Download CS4 products
    It will install as a fully functional 30 day trial. Entering your serial number will convert it to a permanent version, Standard or Extended, depending on what serial number you purchased.
    If you still have the license problem. get back to me with your OS details and the error code.
    Gene

  • I want to install on my other computer the "creative suite 6" and I can't find the serial number. For some reason, there is no sticker on the cover of the disc. I think I bought it at 2012. What should Ido?

    I want to install on my other computer the "creative suite 6" and I can't find the serial number.
    For some reason, there is no sticker on the cover of the disc.
    I think I bought it at 2012.
    What should Ido?
    Hagar

    To locate the serial number:
    http://helpx.adobe.com/x-productkb/global/find-serial-number.html

  • Reinstalling,APSE11,from,original,CD,with,serial,number,,I,get,the,message,"Key,not,valid, for,use,in,specified,state."

    While reinstalling APSE 11 (windows) from original CD (with serial number), I get the message "Key not valid for use in specified state."  What do I do?

    Unfortunately, you're in the wrong forum.  This is not the Elements forum.
    Here's the link to the forum you want:
    https://forums.adobe.com/community/photoshop_elements/content

  • Where to find my Serial Number for Photoshop CS6 Extended? The program has been on my computer for at least a year now and for some reason it is now requiring my serial number to run the program. Please help!

    Where to find my Serial Number for Photoshop CS6 Extended? The program has been on my computer for at least a year now and for some reason it is now requiring my serial number to run the program. Please help!

    Log in into your Adobe account and go to "My Products".  You'll find a list of all the products you've ever registered with Adobe.

  • I bought photoshop elements 13 at Costco for my Mac i cannot find the serial number anywhere on the box

    i bought photoshop elements 13 at Costco for my Mac i cannot find the serial number anywhere on the box

    You do not find a serial number ON the box where anyone may see the number
    Photoshop Elements is not part of the Cloud, I will move this to that forum
    Photoshop Elements Forum http://forums.adobe.com/community/photoshop_elements
    Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html
    Find serial # http://helpx.adobe.com/x-productkb/global/find-serial-number.html
    Select a topic, then click I STILL NEED HELP to activate Photoshop Elements Online chat
    -http://helpx.adobe.com/contact.html?product=photoshop-elements or
    http://helpx.adobe.com/photoshop-elements/kb/troubleshoot-installation-photoshop-elements- premiere.html

Maybe you are looking for