<?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: Subroutine in include in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063419#M971327</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I have worked with this scenario, where we write the FORM routines in the include program of type I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have taken your code and worked on that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report ZMK_TEST no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If you use the first code which is your actual code the program goes to dump once you execute as the include you used is a program of type I and in the perform you are using the statement  PERFORM F1 IN PROGRAM ZMK_INCLUDE USING 'abc' 'def'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*INCLUDE Zmk_INCLUDE.
*WRITE 'Calling sub'.
*PERFORM F1 IN PROGRAM ZMK_INCLUDE USING 'abc' 'def'.
*WRITE:/ 'Sub called.'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Use this code it will work correctly and the main modification is use of start-of-selection and the change in perform statement&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INCLUDE Zmk_INCLUDE.
START-OF-SELECTION.
WRITE 'Calling sub'.
PERFORM F1 USING 'abc' 'def'.
WRITE:/ 'Sub called.'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward points if helpful.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Khan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jul 2008 04:24:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-09T04:24:28Z</dc:date>
    <item>
      <title>Subroutine in include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063413#M971321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to include some subroutines I have written in an include program but they are not able to execute. For example, my include program contains:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM F1 USING STR1 STR2.&lt;/P&gt;&lt;P&gt;   WRITE: / 'STR1 =', STR1, / 'STR2 = ', STR2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prog name: ZINCLUDE&lt;/P&gt;&lt;P&gt;Attributes: Include program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to call this subroutine in another program (attributes: executable) using the following code it doesn't work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST.&lt;/P&gt;&lt;P&gt;INCLUDE ZINCLUDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'Calling sub..'.&lt;/P&gt;&lt;P&gt;PERFORM F1 IN PROGRAM ZINCLUDE USING 'abc' 'def'.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Sub called.'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This program activates and gets compiled successfully. However, when I run it produces no output, not even the local write statements. Please help.&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, 09 Jul 2008 03:42:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063413#M971321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T03:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Subroutine in include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063414#M971322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Khan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Goto SE80 and activate the main program ZTEST .... Also make the below modification ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST.&lt;/P&gt;&lt;P&gt;INCLUDE ZINCLUDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'Calling sub..'.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PERFORM F1 USING 'abc' 'def'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;WRITE:/ 'Sub called.'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 03:45:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063414#M971322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T03:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Subroutine in include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063415#M971323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it should be a executable program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best reagrds,&lt;/P&gt;&lt;P&gt;raam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 03:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063415#M971323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T03:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Subroutine in include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063416#M971324</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 will Work Man.. I handled so many reports like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try once again.. it will work .. Make shure that the include program should be active stage ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check it once..&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Raghunath.S&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;9986076729&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 03:57:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063416#M971324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T03:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Subroutine in include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063417#M971325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi khan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'Calling sub..'.&lt;/P&gt;&lt;P&gt;PERFORM F1 USING 'abc' 'def'.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Sub called.'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE ZINCLUDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in ZINCLUDE include the following code hope this helps you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM F1 USING STR1 STR2.&lt;/P&gt;&lt;P&gt;WRITE: / 'STR1 =', STR1, / 'STR2 = ', STR2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sravanthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 04:01:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063417#M971325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T04:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Subroutine in include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063418#M971326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  when you are including program.No need to write inprogram while calling subroutine and also we need to use start-of-selection .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST.&lt;/P&gt;&lt;P&gt;INCLUDE ZINCLUDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'Calling sub..'.&lt;/P&gt;&lt;P&gt;PERFORM F1 IN PROGRAM ZINCLUDE USING 'abc' 'def'.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Sub called.'. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Above code need to be write as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST.&lt;/P&gt;&lt;P&gt;INCLUDE ZINCLUDE.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: / 'Calling sub..'.&lt;/P&gt;&lt;P&gt;PERFORM F1  USING 'abc' 'def'.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Sub called.'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 04:22:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063418#M971326</guid>
      <dc:creator>former_member761936</dc:creator>
      <dc:date>2008-07-09T04:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Subroutine in include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063419#M971327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I have worked with this scenario, where we write the FORM routines in the include program of type I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have taken your code and worked on that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report ZMK_TEST no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If you use the first code which is your actual code the program goes to dump once you execute as the include you used is a program of type I and in the perform you are using the statement  PERFORM F1 IN PROGRAM ZMK_INCLUDE USING 'abc' 'def'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*INCLUDE Zmk_INCLUDE.
*WRITE 'Calling sub'.
*PERFORM F1 IN PROGRAM ZMK_INCLUDE USING 'abc' 'def'.
*WRITE:/ 'Sub called.'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Use this code it will work correctly and the main modification is use of start-of-selection and the change in perform statement&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INCLUDE Zmk_INCLUDE.
START-OF-SELECTION.
WRITE 'Calling sub'.
PERFORM F1 USING 'abc' 'def'.
WRITE:/ 'Sub called.'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward points if helpful.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Khan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 04:24:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutine-in-include/m-p/4063419#M971327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T04:24:28Z</dc:date>
    </item>
  </channel>
</rss>

