<?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: Help in ABAP function module coding. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500264#M1421616</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lessy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use Number ranges for the requirement. The Number range is of two type :&lt;/P&gt;&lt;P&gt;Internal Number assignment &amp;amp;  External number assignment  . You can use External number assignment  ,Here, the user assigns a number within the number range interval allowed. You can define the intervals for external number assignment numerically and alphanumerically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jan 2010 06:00:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-13T06:00:17Z</dc:date>
    <item>
      <title>Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500255#M1421607</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;i am having trouble coding the program where i have to select a number from the table and add one to it to create a new record back to the table.  example, i've select 1 from the table, i need the program to be able to return 2 and create a new record back into the table and the next time i generate the program, i will select 2 and create a 3 into the table. It needed to be a custom function module as i need to call it in another function module which would concatenate the generated number with some words.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm very new to abap programing...so could anyone please provide a detailed on how i could code it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS alot in advance!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 07:09:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500255#M1421607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T07:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500256#M1421608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lessy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please explain it more in details so that one can get it clearly.&lt;/P&gt;&lt;P&gt;What table you are using? &lt;/P&gt;&lt;P&gt;What functionality?&lt;/P&gt;&lt;P&gt;What you want to achieve?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manas Mishra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 07:14:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500256#M1421608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T07:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500257#M1421609</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;Better you create a Customer number range object for this.&lt;/P&gt;&lt;P&gt;With the help of FM 'NUMBER_GET_NEXT' you can get the next number. Here you need to pass the Number range object which will be custom developed from Tcode SNRO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert of you need more help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 07:17:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500257#M1421609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T07:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500258#M1421610</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;i am currently creating a gp process where i have to create a unique form number which requires the department name, year and the unique id eg DEPT_YYYY_1234. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i thought of using a function module to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. i create a table 'num' for the id.&lt;/P&gt;&lt;P&gt;      - i will retrive the latest num in it and add one to the number in one function module 'get_num'&lt;/P&gt;&lt;P&gt;           eg. i get 100 from the table, i need the function module to create a 101 into the table num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Concatenate the number with the year and dept.&lt;/P&gt;&lt;P&gt;     - i will create another function module to get the current year(should be the system date) and the dept from an existing table in R3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      - then, i need to call the 'get_num' FM to concatenate the id with the retrieved dept and year to have the outcome i need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ps. this is what i think that can be work but i am not sure about the codings...so is this the right way? or is there any other alternatives that can achieve what i need?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;leesyy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 07:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500258#M1421610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T07:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500259#M1421611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you need FM for that? Just 2 line of code would do the work for you.&lt;/P&gt;&lt;P&gt;Just fetch the recent number and add + 1 to the fetched number.and pass it back to table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 07:28:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500259#M1421611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T07:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500260#M1421612</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;i am not sure about the codings...as i've never coded a abap program.&lt;/P&gt;&lt;P&gt;as for the creation of function module...i think i need it because i need to use it for a field in VC.&lt;/P&gt;&lt;P&gt;correct me if i am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for thr reply &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;leesyy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 07:33:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500260#M1421612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T07:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500261#M1421613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lessy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this you do not need to create FM. Just create a Z table with 2 fields Unique ID and description.&lt;/P&gt;&lt;P&gt;Select the last record in table and split the number part of unique id and increment it by one and write description of it. Now Insert this record in z table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nitesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 07:36:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500261#M1421613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-12T07:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500262#M1421614</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 i don't need a function module, where do i code it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry that i'm really super new to abap programing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;leesyy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 02:40:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500262#M1421614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-13T02:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500263#M1421615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please ask your Seniors in your team.&lt;/P&gt;&lt;P&gt;They will guide you in using FM or writing the code.&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, 13 Jan 2010 05:34:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500263#M1421615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-13T05:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500264#M1421616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lessy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use Number ranges for the requirement. The Number range is of two type :&lt;/P&gt;&lt;P&gt;Internal Number assignment &amp;amp;  External number assignment  . You can use External number assignment  ,Here, the user assigns a number within the number range interval allowed. You can define the intervals for external number assignment numerically and alphanumerically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 06:00:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500264#M1421616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-13T06:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500265#M1421617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lessy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have done the same requirement where my sequence number will automatically get incremented by 1 as new record cames for update.as already discussed you have to cretae the numebr range and call the number range by function module 'Number_get_next'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFB the code which will definitely help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 CALL FUNCTION 'NUMBER_GET_NEXT'
        EXPORTING
          NR_RANGE_NR                   = '01'  " specify this number this is 
*the same when you cretae numberrange  have specified.
          OBJECT                        = 'ZSEQNUM'    " This the number range 
*i have created
       IMPORTING
         NUMBER                         = wa_msg-seqnr
       EXCEPTIONS
         INTERVAL_NOT_FOUND            = 1
         NUMBER_RANGE_NOT_INTERN       = 2
         OBJECT_NOT_FOUND              = 3
         QUANTITY_IS_0                 = 4
         QUANTITY_IS_NOT_1             = 5
         INTERVAL_OVERFLOW             = 6
         BUFFER_OVERFLOW               = 7
         OTHERS                        = 8.

      modify lt_message FROM wa_msg TRANSPORTING seqnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; to cretete number range.&lt;/P&gt;&lt;P&gt;goto transaction SNRO&lt;/P&gt;&lt;P&gt;enter the name,short text, give the number length domain (char10 or what ever is your domain)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;click on number range and cretae interval.&lt;/P&gt;&lt;P&gt;give the &lt;STRONG&gt;number&lt;/STRONG&gt; , from number and to number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this &lt;STRONG&gt;number&lt;/STRONG&gt; you have to give in FM also (i have given '01').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will help you.for any problem revert back&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Tanmaya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 13, 2010 4:16 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jan 13, 2010 5:20 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 10:15:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500265#M1421617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-13T10:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help in ABAP function module coding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500266#M1421618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is  the logic&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:prev_no type i,
     new_no type i.

prev_no = 1.
do 100 times.
  write prev_no.    "Select from table
  skip 1.
  new_no = prev_no + 1.
prev_no = new_no.
  write new_no.     "Insert into table.
                    "Commit work and wait.
  skip 1.
enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 May 2010 13:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-abap-function-module-coding/m-p/6500266#M1421618</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-05-18T13:20:29Z</dc:date>
    </item>
  </channel>
</rss>

