<?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: Using subroutines in a Function Module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188715#M1001273</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shyam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to suggest, &lt;/P&gt;&lt;P&gt;Yes, we can use Subroutines in function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also would like to suggest few references, it is quite the same as your issue,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[SDN - Reference for Error while writing perform statement in Function module|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="411589"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[SDN - Reference for Syntax error in Perfrom statemement while using function module|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="734282"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that's usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck &amp;amp; Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Harsh Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jul 2008 07:33:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-16T07:33:21Z</dc:date>
    <item>
      <title>Using subroutines in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188709#M1001267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          Can i use perform statemetns in the source code of a function module...If i am using so...it showing an error message...Thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 07:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188709#M1001267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-16T07:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using subroutines in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188710#M1001268</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;Yes, you can use perform statements in a function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you told us what the error message is there's a better chance we can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 07:25:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188710#M1001268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-16T07:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using subroutines in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188711#M1001269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can defenitly use perform statement in FM..check with the code of your subroutine and check for passing parameters inside subroutine...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;twinkal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 07:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188711#M1001269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-16T07:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using subroutines in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188712#M1001270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the error you are getting..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION zsflight.

  DATA:t_table TYPE table of sflight.

  SELECT * FROM sflight INTO TABLE i_sflight 
        WHERE carrid EQ p_carrid
                    AND connid EQ p_connid.

perform get_data.


ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Double click on the get_data it propose the includes to create the routine, just choose one ex..LXXXXXXXF01 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*----------------------------------------------------------------------*
***INCLUDE LZTEST1F01 .
*----------------------------------------------------------------------*
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  get_data
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
form get_data .

endform.                    " get_data&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it will gernerrate the routine, add the code. and activate the whole function module and Function group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 07:27:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188712#M1001270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-16T07:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using subroutines in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188713#M1001271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whats the error message...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tatvagna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 07:28:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188713#M1001271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-16T07:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using subroutines in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188714#M1001272</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 showung syntactical error saying 'incorrect nesting: before the statement 'form', the structure introduced by 'function' should be concluded with 'end function' .&lt;/P&gt;&lt;P&gt;         Also, i amusing both perform and form in the same function module..is it correct way....&lt;/P&gt;&lt;P&gt;&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, 16 Jul 2008 07:32:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188714#M1001272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-16T07:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using subroutines in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188715#M1001273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shyam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to suggest, &lt;/P&gt;&lt;P&gt;Yes, we can use Subroutines in function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also would like to suggest few references, it is quite the same as your issue,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[SDN - Reference for Error while writing perform statement in Function module|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="411589"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[SDN - Reference for Syntax error in Perfrom statemement while using function module|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="734282"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that's usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck &amp;amp; Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Harsh Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 07:33:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188715#M1001273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-16T07:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using subroutines in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188716#M1001274</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;You shouldn't put the definition of the subroutine inside the function (i.e. before the ENDFUNCTION command).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do one of two things;&lt;/P&gt;&lt;P&gt;Move the subroutine to after the ENDFUNCTION (untidy, but it works)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;Create an include program in the function group and put the subroutine in there (better approach).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 07:34:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-subroutines-in-a-function-module/m-p/4188716#M1001274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-16T07:34:40Z</dc:date>
    </item>
  </channel>
</rss>

