<?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: Generate number range with date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166998#M1622862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you locking your number range table while you get the next number and update it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Sep 2011 14:56:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-07T14:56:38Z</dc:date>
    <item>
      <title>Generate number range with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166993#M1622857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We would like to generate a unique numeric value to represent an external invoice number. This number begins with the current date followed by the next number in the sequence 0-9999 e.g. 201109070001. The sequence needs to be reset to 1 at the start of each day. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We currently use a program to select and update a database table which stores the date and next number in the sequence for a given day and finally reset the number at the start of each day. Unfortunately we sometime experience duplications of the invoice numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried using a SAP number range object (transaction SNRO) but I can't find a function to reset the number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a function to reset a SAP number range object or an alternate method to obtain the required results?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nicholas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 13:46:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166993#M1622857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-07T13:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Generate number range with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166994#M1622858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RRBA_NUMBER_RANGE_RESET&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 14:08:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166994#M1622858</guid>
      <dc:creator>former_member209703</dc:creator>
      <dc:date>2011-09-07T14:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Generate number range with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166995#M1622859</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;It is not recommended to reset the number range.  Why cant you try finding a function module where you can propose a number based on the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the below thread :&lt;/P&gt;&lt;P&gt;&lt;/P&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="7493476"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 14:21:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166995#M1622859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-07T14:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Generate number range with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166996#M1622860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first, sorry if i sound any harsh or what, thats in no way intended. I´m just a technician.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i dont get is, why you dont just do that yourself. either create a table or make use of a TVARVC variable where you store your last number, along with the date where it was created/used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can easily write a FM which does what NUMBER_GET_NEXT does. Means if a number is requested, goto your table or TVARVC variables (yeah two, one for number, one for the date), and check what number you got there.&lt;/P&gt;&lt;P&gt;If date = sy-datum then increment number by one, store it to your table/TVARVC variable, and return that number as an exporting parameter. &lt;/P&gt;&lt;P&gt;elseif date # sy-datum then store 1 and your new date in your table/TVARVC variables and return it as exporting parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As it would be a FM of your own, soleley for this purpose you can even return a concatenated value of sy-datum and your number, instead of just the number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would estimate a maximum workload of one hour for such a solution, and it would exactly do what you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope you got my drift.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 14:35:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166996#M1622860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-07T14:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Generate number range with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166997#M1622861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian, your suggestion is what we currently have in place and for the most part it is works. However, every once an a while we find orders with the same invoice number. This number is suppose to be unique for each external invoice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to eliminate all chances of duplicated invoice numbers and using a number range object seems to be my best bet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 14:50:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166997#M1622861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-07T14:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Generate number range with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166998#M1622862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you locking your number range table while you get the next number and update it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 14:56:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166998#M1622862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-07T14:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Generate number range with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166999#M1622863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The table isn't locked. How do I go about locking?&lt;/P&gt;&lt;P&gt;Please note it is frequently accessed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 18:34:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8166999#M1622863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-07T18:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Generate number range with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8167000#M1622864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Locking tables is pretty basic. Please search the forums for ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 18:45:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-number-range-with-date/m-p/8167000#M1622864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-07T18:45:36Z</dc:date>
    </item>
  </channel>
</rss>

