<?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 Group - common subroutine to be used ... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063682#M971421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi dont write the perform in the top it doesnt mean that it is available globally...but you can create the external subroutine and you can call them as well....&lt;/P&gt;&lt;P&gt;like in this..&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db999535c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db999535c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can see some standard function modules ...for the coding&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jul 2008 16:50:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-01T16:50:56Z</dc:date>
    <item>
      <title>Function Group - common subroutine to be used ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063677#M971416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can help please. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my function group I have a subroutine that I need to always perform 1st. I've added the perform to the INCLUDE XXXXXTOP but then the program doesn't want to compile. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where do I add this PERFORM statement ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Maré&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 15:49:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063677#M971416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T15:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function Group - common subroutine to be used ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063678#M971417</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;TOP include is used only to define data. You put there definition of your form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FORM&lt;/STRONG&gt; form_name.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDFORM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using &lt;STRONG&gt;PERFORM&lt;/STRONG&gt; you just invoke it thereafter. &lt;/P&gt;&lt;P&gt;If you need this to be at the very beginning, call it in the beginning of the function module you use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FUNCTION&lt;/STRONG&gt; your_function.&lt;/P&gt;&lt;P&gt;*DATA:....&lt;/P&gt;&lt;P&gt;PERFORM form_name&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDFUNCTION*.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in the program use:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CALL your function...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 16:02:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063678#M971417</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2008-07-01T16:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Function Group - common subroutine to be used ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063679#M971418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rather than storing the subroutine to top-include store it in a different include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : This new include should be created in the function group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 16:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063679#M971418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T16:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Function Group - common subroutine to be used ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063680#M971419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx for the replies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that the subroutine will be used in more than one function module therefor I would like to do it only once at the start of the function group ... if possible ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 16:11:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063680#M971419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T16:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Function Group - common subroutine to be used ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063681#M971420</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 u define the subroutine in a diff. include then u call call it from all Fms with the following statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform &amp;lt;Subroutine name&amp;gt; in program &amp;lt;Include name&amp;gt; if found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 16:22:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063681#M971420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T16:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Function Group - common subroutine to be used ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063682#M971421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi dont write the perform in the top it doesnt mean that it is available globally...but you can create the external subroutine and you can call them as well....&lt;/P&gt;&lt;P&gt;like in this..&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db999535c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db999535c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can see some standard function modules ...for the coding&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 16:50:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063682#M971421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T16:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function Group - common subroutine to be used ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063683#M971422</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;1) You should define the form in a separate Influde INCLUDE XXXXXF01 rather than in  &lt;/P&gt;&lt;P&gt;INCLUDE XXXXXTOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Call the FORM with PERFORM from each function module that needs the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) If it has to be called only once (because output does not differ) you may define static variables and give back the last results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM get_t006 TABLES e_t006 STRUCTURE t006
                    USING VALUE(i_dimid) TYPE DIMID .

STATICS: lv_last_dimid type dimid.
STATICS: lt_last_result type standard table of t006.

IF i_dimid = lv_last_dimid.
     e_t006[] = lt_last_result[].
     RETURN.
ENDIF. 

..." select from t006/ ...

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have fun,&lt;/P&gt;&lt;P&gt;hp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Holger Pakirnus on Jul 1, 2008 6:51 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Holger Pakirnus on Jul 1, 2008 6:54 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 16:51:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-group-common-subroutine-to-be-used/m-p/4063683#M971422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T16:51:37Z</dc:date>
    </item>
  </channel>
</rss>

