<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Generating automatic numbers in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769372#M645174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this sample codes form other thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 INCLUDE ZRANGENO.
 
data: wnorange like INRI-NRRANGENR,      "number range,
      wsubobj  like inri-SUBOBJECT,            "sub object
      wdocno(12).
 
* Steps :-
* 1. Number range Sub Object must be maintain in table ZSGRP
*    You can used transaction SE16 to create a table entries.
* 2. Maintain number range and intervals in transaction code SNUM
*
 
*
 
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 &amp;lt;&amp;gt; 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Sep 2007 19:41:43 GMT</pubDate>
    <dc:creator>ferry_lianto</dc:creator>
    <dc:date>2007-09-06T19:41:43Z</dc:date>
    <item>
      <title>Generating automatic numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769368#M645170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;   I need any Fm which genrates serial number automatically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 19:22:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769368#M645170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-06T19:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Generating automatic numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769369#M645171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are looking to get the next number from a serial number range object that you have, then you will have to use the NUMBER_GET_NEXT function module and pass the number range object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 19:32:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769369#M645171</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-09-06T19:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generating automatic numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769370#M645172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the function   "NUMBER_GET_NEXT "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 19:34:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769370#M645172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-06T19:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Generating automatic numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769371#M645173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u please explain the parametes,&lt;/P&gt;&lt;P&gt; i am unable to get the output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 19:36:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769371#M645173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-06T19:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Generating automatic numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769372#M645174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this sample codes form other thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 INCLUDE ZRANGENO.
 
data: wnorange like INRI-NRRANGENR,      "number range,
      wsubobj  like inri-SUBOBJECT,            "sub object
      wdocno(12).
 
* Steps :-
* 1. Number range Sub Object must be maintain in table ZSGRP
*    You can used transaction SE16 to create a table entries.
* 2. Maintain number range and intervals in transaction code SNUM
*
 
*
 
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 &amp;lt;&amp;gt; 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 19:41:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769372#M645174</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-09-06T19:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Generating automatic numbers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769373#M645175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2684141"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2007 20:22:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-automatic-numbers/m-p/2769373#M645175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-06T20:22:33Z</dc:date>
    </item>
  </channel>
</rss>

