<?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: how to create a include in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465761#M219347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An INCLUDE is simply a way to separate code to make it more managable.   For example, in a module pool program, there are includes.  In a basic one, you will see a TOP include which as all of the data and type declaractions, a O01 include which as all of the PBO modules, a PAI include which has all of the I01 modules and a F01 include which has all of the forms or subroutines.  You can create an include via SE38,  instead of selecting "Execture Program" from the listbox, just choose "Include Program".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jul 2006 13:42:29 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-07-25T13:42:29Z</dc:date>
    <item>
      <title>how to create a include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465759#M219345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ABAP Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was suggested to use an include for some modification in the program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the purpose of the include and how to create it. &lt;/P&gt;&lt;P&gt;how is it different from using a function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to decide, whether i have to use the include or the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;BWer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:39:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465759#M219345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-25T13:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465760#M219346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you use a function module you can use it in another program, but an include is only for save procedures, so you can use these procedures, but only on this program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:41:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465760#M219346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-25T13:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465761#M219347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An INCLUDE is simply a way to separate code to make it more managable.   For example, in a module pool program, there are includes.  In a basic one, you will see a TOP include which as all of the data and type declaractions, a O01 include which as all of the PBO modules, a PAI include which has all of the I01 modules and a F01 include which has all of the forms or subroutines.  You can create an include via SE38,  instead of selecting "Execture Program" from the listbox, just choose "Include Program".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:42:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465761#M219347</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-25T13:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465762#M219348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;to create a include program-&amp;gt;goto se38 editor create a program with type INCLUDE PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can call this include in ur program by the statement&lt;/P&gt;&lt;P&gt;include zprogname.&lt;/P&gt;&lt;P&gt;reward if helpful.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:53:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465762#M219348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-25T13:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465763#M219349</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;Include programs are global R/3 Repository objects. They are solely for modularizing source code, and have no parameter interface. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They have the following functions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Library: Include programs allow you to use the same source code in different programs. For example, this can be useful if you have lengthy data declarations that you want to use in different programs. &lt;/P&gt;&lt;P&gt;Order. Include programs allow you to manage complex programs in an orderly way. Function groups and module pools use include programs to store parts of the program that belong together. The ABAP Workbench supports you extensively when you create such complex programs by creating the include programs automatically and by assigning them unique names. A special include is the TOP include of a program. If you name it according to the naming convention, it is always included in program navigation and in the syntax check. &lt;/P&gt;&lt;P&gt;Creating Your Own Include Programs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you create an include program yourself, you must assign it the type I in its program attributes. You can also create or change an include program by double-clicking on the name of the program after the INCLUDE statement in your ABAP program. If the program exists, the ABAP Workbench navigates to it. If it does not exist, the system creates it for you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An include program cannot run independently, but must be built into other programs. Include programs can contain other includes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only restrictions for writing the source code of include programs are: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include programs cannot call themselves. &lt;/P&gt;&lt;P&gt;Include programs must contain complete statements.&lt;/P&gt;&lt;P&gt;You must ensure that the statements of your include program fit logically into the source code of the programs from which it is called. Choosing Check while editing an include program in the ABAP Editor is normally not sufficient for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***INCLUDE INCL_TST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEXT = 'Hello!'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, the syntax check reports an error because the field TEXT is not declared. However, you can include INCL_TST in any program in which a field called TEXT with the correct type has been declared. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the syntax check to produce valid results, you must check the program in which the include occurs. The exception to this is the TOP include, the contents of which are always included when you check the syntax of another include. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Include Programs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use an include program in another program, enter the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE &amp;lt;incl&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The INCLUDE statement has the same effect as copying the source code of the include program &amp;lt;incl&amp;gt; into the program. In the syntax check, the contents of the include program are also analyzed. Include programs are not loaded at runtime, but are expanded when the program is generated. Once the program has been generated, the load version contains static versions of all of its includes. If you subsequently change an include program, the programs that use it are automatically regenerated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The INCLUDE statement must be the only statement on a line and cannot extend over several lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose we have the following program: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***INCLUDE STARTTXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'Program started by', SY-UNAME,&lt;/P&gt;&lt;P&gt;/ 'on host', SY-HOST, &lt;/P&gt;&lt;P&gt;'date:', SY-DATUM, 'time:', SY-UZEIT.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can then include this program in any other ABAP program to display a standard list header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM SAPMZTST.&lt;/P&gt;&lt;P&gt;INCLUDE STARTTXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This could produce the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program started by KELLERH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on host ds0025   date: 03/19/1998 time: 09:00:39&lt;/P&gt;&lt;P&gt;___________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the below link for it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db973535c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db973535c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u find it useful plz mark the points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:57:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465763#M219349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-25T13:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465764#M219350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;INCLUDE pgm is used for coding common routines used, thereby making it possible to re-use the code. So, in short you can use the routines(FORMS) defined in the INCLUDE from the main pgm(including the other includes in the main pgm). U can create it just like another ABAP&lt;/P&gt;&lt;P&gt;using SE38 but defining the type attribute as Include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function module, are basically used for general code which can be used by any ABAP just by using the call function statement. Surely, you can import/export variables and tables to function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short, we can say Include is for routines to be used within the Main Calling program while Function module is for global use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 13:57:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465764#M219350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-25T13:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465765#M219351</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 want to make some modifications in the script , that time with out changing the print program , you can call subroutines from the script , in this case you can define these soubroutines in a include. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to create include , just write below statement in any report program and double click on name , system automatically gives pop-up to create include &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INCLUDE &amp;lt;Name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can create include from SE38 , give a name in SE38 and take type from the attributes as 'INCLUDE program' then system will create a include. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;includes are useful to create subroutines ,these are specific to particular program .function modules can be called from any program , these are global objects.but if you want to call any subroutines from any include , you need to add that include in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are writing any generic code which can be used in any program then go for function modules.&lt;/P&gt;&lt;P&gt;if you are writing partcular code which is specific to one object then go for include . &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;Appana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2006 14:01:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-include/m-p/1465765#M219351</guid>
      <dc:creator>Laxmana_Appana_</dc:creator>
      <dc:date>2006-07-25T14:01:12Z</dc:date>
    </item>
  </channel>
</rss>

