<?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: Create Number range in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-number-range/m-p/2371739#M525525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Guys &lt;/P&gt;&lt;P&gt;  I had already done what 'Jatra Riwayanto ' suggested now . It is better if before getting the next number via FM 'NUMBER_GET_NEXT' we should lock the number range object using FM 'NUMBER_RANGE_ENQUEUE' and after getting the number unlocks the number range ob ject using FM 'NUMBER_RANGE_DEQUEUE'  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Sample code&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;object = 'ZPOMID'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;foreign_lock = 1&lt;/P&gt;&lt;P&gt;object_not_found = 2&lt;/P&gt;&lt;P&gt;system_failure = 3&lt;/P&gt;&lt;P&gt;OTHERS = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'NUMBER_GET_NEXT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;nr_range_nr = '01'&lt;/P&gt;&lt;P&gt;object = 'ZPOMID'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;number = NEXT_NUMBER&lt;/P&gt;&lt;P&gt;quantity = quant&lt;/P&gt;&lt;P&gt;returncode = code&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;interval_not_found = 1&lt;/P&gt;&lt;P&gt;number_range_not_intern = 2&lt;/P&gt;&lt;P&gt;object_not_found = 3&lt;/P&gt;&lt;P&gt;quantity_is_0 = 4&lt;/P&gt;&lt;P&gt;quantity_is_not_1 = 5&lt;/P&gt;&lt;P&gt;interval_overflow = 6&lt;/P&gt;&lt;P&gt;buffer_overflow = 7&lt;/P&gt;&lt;P&gt;OTHERS = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;object = 'ZPOMID'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;object_not_found = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Buddies , full points awarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Jun 2007 11:40:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-17T11:40:21Z</dc:date>
    <item>
      <title>Create Number range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-number-range/m-p/2371736#M525522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to create a number range for OM ids . OM ids will be assigned to organistion units .  OM ids will be unique and cannot be assigned to more then one org units . Please tell me the steps to create Number range which should start with 10000 till 99999.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jun 2007 06:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-number-range/m-p/2371736#M525522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-17T06:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create Number range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-number-range/m-p/2371737#M525523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You have to create a Number range object for that first and then define the number range for that object which you wants to use&lt;/P&gt;&lt;P&gt;Use the Transactions &amp;lt;b&amp;gt;SNUM and SNRO&amp;lt;/b&amp;gt; for this purpose and create the number range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jun 2007 07:44:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-number-range/m-p/2371737#M525523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-17T07:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create Number range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-number-range/m-p/2371738#M525524</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;Just try this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
1. Run Tcode SNRO
2. Insert Object "Z_OM" and click button Create
3. Insert Short and Long Text ( this is your description for this Number Ranges Object )
4. In field Number length domain, insert: CHAR05.
5. In field Warning %, insert : 95.
6. In field No. of numbers in bufer: 1.
7. Click button Save
8. Click button Number Ranges ( F7 )
9. Click button Change Intervals
10. Click button Inser Interval ( Shift+F1)
11. Insert new interval: 
      No: OM.
      From Number: 10000
      To Number    : 99999
      And Save it (click Enter )
12. Save your interval.  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get new number, you can use FM: NUMBER_GET_NEXT&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL FUNCTION 'NUMBER_GET_NEXT'
    EXPORTING
      NR_RANGE_NR = 'OM'
      OBJECT      = 'Z_OM'
    IMPORTING
      NUMBER      = NUMBER_RESULT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jun 2007 07:58:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-number-range/m-p/2371738#M525524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-17T07:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create Number range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-number-range/m-p/2371739#M525525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Guys &lt;/P&gt;&lt;P&gt;  I had already done what 'Jatra Riwayanto ' suggested now . It is better if before getting the next number via FM 'NUMBER_GET_NEXT' we should lock the number range object using FM 'NUMBER_RANGE_ENQUEUE' and after getting the number unlocks the number range ob ject using FM 'NUMBER_RANGE_DEQUEUE'  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Sample code&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;object = 'ZPOMID'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;foreign_lock = 1&lt;/P&gt;&lt;P&gt;object_not_found = 2&lt;/P&gt;&lt;P&gt;system_failure = 3&lt;/P&gt;&lt;P&gt;OTHERS = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'NUMBER_GET_NEXT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;nr_range_nr = '01'&lt;/P&gt;&lt;P&gt;object = 'ZPOMID'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;number = NEXT_NUMBER&lt;/P&gt;&lt;P&gt;quantity = quant&lt;/P&gt;&lt;P&gt;returncode = code&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;interval_not_found = 1&lt;/P&gt;&lt;P&gt;number_range_not_intern = 2&lt;/P&gt;&lt;P&gt;object_not_found = 3&lt;/P&gt;&lt;P&gt;quantity_is_0 = 4&lt;/P&gt;&lt;P&gt;quantity_is_not_1 = 5&lt;/P&gt;&lt;P&gt;interval_overflow = 6&lt;/P&gt;&lt;P&gt;buffer_overflow = 7&lt;/P&gt;&lt;P&gt;OTHERS = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;object = 'ZPOMID'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;object_not_found = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Buddies , full points awarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jun 2007 11:40:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-number-range/m-p/2371739#M525525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-17T11:40:21Z</dc:date>
    </item>
  </channel>
</rss>

