<?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: Common Include in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799240#M653618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi madhu ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can copy this include in your program and perform and delete unwanted write statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Sep 2007 15:30:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-10T15:30:04Z</dc:date>
    <item>
      <title>Common Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799238#M653616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Guys,&lt;/P&gt;&lt;P&gt;   i have written a common include which should be used by any program. The include consists  of  generating the spool and writing to PDF.&lt;/P&gt;&lt;P&gt;But i have a problem with the piece of code below&lt;/P&gt;&lt;P&gt;IF WF_VALID &amp;lt;&amp;gt; SPACE.&lt;/P&gt;&lt;P&gt;  NEW-PAGE PRINT ON PARAMETERS WF_PARAMS NO DIALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT IT_EMP INTO WA_EMP.&lt;/P&gt;&lt;P&gt;    WRITE:/ WA_EMP-ORT01, WA_EMP-ORT02    " Output   written  to  Spool&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  NEW-PAGE PRINT OFF.&lt;/P&gt;&lt;P&gt;ENDIF .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The write statement cannot be common for all the programs. And i cannot write this in the main programs as it is in the middle of the include. Is there any solution for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;        madhu reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 15:17:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799238#M653616</guid>
      <dc:creator>madhu_reddy22</dc:creator>
      <dc:date>2007-09-10T15:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Common Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799239#M653617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then simply write the condition :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if sy-cprog =  program name&amp;lt;/b&amp;gt;. ( Here you can mention program names which ever you want)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_EMP INTO WA_EMP.&lt;/P&gt;&lt;P&gt;WRITE:/ WA_EMP-ORT01, WA_EMP-ORT02 " Output written to Spool&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 15:22:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799239#M653617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T15:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Common Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799240#M653618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi madhu ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can copy this include in your program and perform and delete unwanted write statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 15:30:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799240#M653618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T15:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Common Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799241#M653619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;     you can do like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you include name is Zinclude, then,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform print_program(Zinclude) using ls_data&lt;/P&gt;&lt;P&gt;                                              changing lt_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Niyaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 15:32:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799241#M653619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T15:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Common Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799242#M653620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Seshu,&lt;/P&gt;&lt;P&gt; Thanks a lot for the quick response.   So you mean to say that if 4 people use the include. Then they can write their own statements using this condition in the include so that the remaining part of the include will function the same way.The  number of write statements will increase but the remainig code will be same. Am i interpreting correctly?&lt;/P&gt;&lt;P&gt;So it will be like&lt;/P&gt;&lt;P&gt;IF WF_VALID &amp;lt;&amp;gt; SPACE.&lt;/P&gt;&lt;P&gt;  NEW-PAGE PRINT ON PARAMETERS WF_PARAMS NO DIALOG.&lt;/P&gt;&lt;P&gt;if sy-cprog = program name&lt;/P&gt;&lt;P&gt;write: xxxxxxxxxx&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;if sy-cprog = program name&lt;/P&gt;&lt;P&gt;write: xxxxxxxxxx&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;if sy-cprog = program name&lt;/P&gt;&lt;P&gt;write: xxxxxxxxxx&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt; NEW-PAGE PRINT OFF.&lt;/P&gt;&lt;P&gt;ENDIF .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 15:34:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799242#M653620</guid>
      <dc:creator>madhu_reddy22</dc:creator>
      <dc:date>2007-09-10T15:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Common Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799243#M653621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Narayan,&lt;/P&gt;&lt;P&gt;   you got me wrong. The same include should be used and it should not be copied as i am writing the common include to reduce the redundancy of the code.&lt;/P&gt;&lt;P&gt;Seshu has provided a great tip for that. Check that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 15:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799243#M653621</guid>
      <dc:creator>madhu_reddy22</dc:creator>
      <dc:date>2007-09-10T15:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Common Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799244#M653622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes,because you said that you will not modify in main program then best would be maintain the condition in include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you use SY-CPROG then it gets the program name from called program(Main program),&lt;/P&gt;&lt;P&gt;so you can write the condition so that your write statement will trigger only few programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 15:39:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/common-include/m-p/2799244#M653622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T15:39:26Z</dc:date>
    </item>
  </channel>
</rss>

