<?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: Funtion module for maximum number in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869022#M673140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No the datatype of the field is NUMC, But I get the values like this, Can any one help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Sep 2007 11:27:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-24T11:27:01Z</dc:date>
    <item>
      <title>Funtion module for maximum number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869019#M673137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to pick the maximum number from the database table and increment by 1. I am using select max ..... but it is not picking the maximum number from the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;s.no&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0001&lt;/P&gt;&lt;P&gt;0002&lt;/P&gt;&lt;P&gt;0003&lt;/P&gt;&lt;P&gt;0004&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data in the field is like this, we changed the field data type and again we assigned the same data type as before even though we are getting the number like 5,6,7, instead of 0005,0006,0007,....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me how to solve this problem, as the object has been send to production.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All answers are rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 08:34:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869019#M673137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T08:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Funtion module for maximum number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869020#M673138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess this is a Z... table and the field is C type. In this case change the field to N type (and adjust the table, no concern, it won't be deleted). Now all values will look like (because the initial value of an N type variabnle is '0')&lt;/P&gt;&lt;P&gt;0001&lt;/P&gt;&lt;P&gt;0002&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;0006&lt;/P&gt;&lt;P&gt;0007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it will give back the value you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 08:44:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869020#M673138</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-09-24T08:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Funtion module for maximum number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869021#M673139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suppose a database table TEST, consisting of two columns and 10 lines: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COL_1                          COL_2&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;1                                     3&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;2                                     1&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;3                                      5&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;4                                       7&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;5                                           2&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;6                                           3&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;7                                           1&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;8                                          9&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;9                                          4&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;10                                        3&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following coding demonstrates the aggregate functions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA RESULT TYPE P DECIMALS 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT &amp;lt;agg&amp;gt;( [DISTINCT] COL_2 ) &lt;/P&gt;&lt;P&gt;INTO   RESULT &lt;/P&gt;&lt;P&gt;FROM   TEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE RESULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following table shows the results of this program extract according to different combinations of aggregate expressions &amp;lt;agg&amp;gt; and the DISTINCT option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggregate expression&lt;/P&gt;&lt;P&gt; DISTINCT&lt;/P&gt;&lt;P&gt; Result&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;MAX&lt;/P&gt;&lt;P&gt; no&lt;/P&gt;&lt;P&gt; 9.00&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;MAX&lt;/P&gt;&lt;P&gt; yes&lt;/P&gt;&lt;P&gt; 9.00&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;MIN&lt;/P&gt;&lt;P&gt; no&lt;/P&gt;&lt;P&gt; 1.00&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;MIN&lt;/P&gt;&lt;P&gt; yes&lt;/P&gt;&lt;P&gt; 1.00&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;AVG&lt;/P&gt;&lt;P&gt; no&lt;/P&gt;&lt;P&gt; 3.80&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;AVG&lt;/P&gt;&lt;P&gt; yes&lt;/P&gt;&lt;P&gt; 4.43&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SUM&lt;/P&gt;&lt;P&gt; no&lt;/P&gt;&lt;P&gt; 38.00&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SUM&lt;/P&gt;&lt;P&gt; yes&lt;/P&gt;&lt;P&gt; 31.00&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;COUNT&lt;/P&gt;&lt;P&gt; yes&lt;/P&gt;&lt;P&gt; 7.00&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;COUNT( * )&lt;/P&gt;&lt;P&gt; ---&lt;/P&gt;&lt;P&gt; 10.00&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 09:29:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869021#M673139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T09:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Funtion module for maximum number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869022#M673140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No the datatype of the field is NUMC, But I get the values like this, Can any one help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 11:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869022#M673140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T11:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Funtion module for maximum number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869023#M673141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you check the values in SE16? what do you see? Did you click on adjust the table after you changed it (in SE11 database utility)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 12:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869023#M673141</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-09-24T12:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Funtion module for maximum number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869024#M673142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Line, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use the FM NUMBER_GET_NEXT. You have to pass the Number range number and the Object which you can find in SNRO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 07:25:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/funtion-module-for-maximum-number/m-p/2869024#M673142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T07:25:10Z</dc:date>
    </item>
  </channel>
</rss>

