<?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: Function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067821#M727052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to activate all the includes along with the FM and its main program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2007 19:30:58 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2007-11-28T19:30:58Z</dc:date>
    <item>
      <title>Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067813#M727044</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 trying to write a sub-routine inside a function module. But it is giving errors saying a particular variable is not declared etc. Is not possible to write a sub routine inside a fm?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vishnu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:54:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067813#M727044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T16:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067814#M727045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is possible but you have to use the variables in the parameters of the routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM GET_DATA TABLES ITAB USING P_WERKS P_NAME.

FORM GET_DATA TABLES I_ITAB STRCUTRE MARC
USING I_WERKS TYPE WERKS_D
I_NAME TYPE SY-USNAME.

* USE I_ITAB, I_WERKS AND I_NAME inside the form

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:56:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067814#M727045</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-28T16:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067815#M727046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishwanath, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can create subroutines in a FM in the same way as you do in a report program. Only difference if that you have to create the form routines after the endfunction.&lt;/P&gt;&lt;P&gt;Also the variables declared in the FM will not be accesible in these routines as the variables you declare in the FM are local to that include.&lt;/P&gt;&lt;P&gt;In case you need Global variables create a top Include in the Function Group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 17:01:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067815#M727046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T17:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067816#M727047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you write the perform statement and double click on it, it will show the include names one is top include for the declarations and the other is to give the subroutines. You can not place the subroutine on the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 17:02:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067816#M727047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T17:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067817#M727048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lokesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we create a Top include and if we declare all the variables there, then is it possible to create sub-routines with these variables as we do normally in reports?&lt;/P&gt;&lt;P&gt;If so how to create a top include and how to declare vars in that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vishnu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 18:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067817#M727048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T18:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067818#M727049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went to SE80 and I have declared all the variables declaration in the Top include.But when I am trying to write a sub-routine in the FM, it is giving the error &lt;/P&gt;&lt;P&gt;that the particular form doesnt exist.Please resolve my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vishnu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 18:15:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067818#M727049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T18:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067819#M727050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes vishwanath you can declare global variables in Top Include and then use them in a similar way as in report.&lt;/P&gt;&lt;P&gt;Top Include is automatically created when you create a Function group.&lt;/P&gt;&lt;P&gt;goto se80 and display the function group, you will be able to see the top include, include ending with TOP.&lt;/P&gt;&lt;P&gt;Declare all global variables in there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;P&gt;Pls. reward if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 18:24:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067819#M727050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T18:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067820#M727051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I did Lokesh.I declared the global vars in the Top include in SE80.But still when I write a sub-routine say " perform sample ". Once I create that in a new include or Top include it is givinng the error " Form sample" doesnt exist. Please help me out.&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 18:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067820#M727051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T18:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067821#M727052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to activate all the includes along with the FM and its main program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 19:30:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067821#M727052</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-28T19:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067822#M727053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishwanath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be your issue would have been resolved by now. If not, &lt;/P&gt;&lt;P&gt;Goto Se80, right click on the Function Group and Activate.&lt;/P&gt;&lt;P&gt;It should work, if still it does not help:&lt;/P&gt;&lt;P&gt;Right click on the FG -&amp;gt; More Functions -&amp;gt; Rebuild Object List.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works.&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2007 10:56:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3067822#M727053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-29T10:56:25Z</dc:date>
    </item>
  </channel>
</rss>

