<?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: Regarding Include in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911340#M57142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post additional details for us to look at?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of error did you get?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has everything been activated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you move the FORM to the main program can you call it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Jan 2005 22:00:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-01-15T22:00:05Z</dc:date>
    <item>
      <title>Regarding Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911338#M57140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai&lt;/P&gt;&lt;P&gt;I cannot write "Form" module in INCLUDE program and access inside the Module program.why&lt;/P&gt;&lt;P&gt;could you pls help.&lt;/P&gt;&lt;P&gt;PROGRAM ZMW00M0010.&lt;/P&gt;&lt;P&gt;INCLUDE ZMW0010010.&lt;/P&gt;&lt;P&gt;inside include prg i wrote small FORM ..ENDFORM and&lt;/P&gt;&lt;P&gt;tried to call from Main Module pool program ZMW00M0010.&lt;/P&gt;&lt;P&gt;Chandra kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Jan 2005 10:07:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911338#M57140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-15T10:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911339#M57141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chandra, it's important that inside your main program you call your include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;PROGRAM ZMYPROGRAM.&lt;/P&gt;&lt;P&gt;INCLUDE ZMW0010010.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now, you must call your rutine that's inside your include,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM MY_RUTINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The my_rutine it's inside the include with a &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form my_rutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Jan 2005 16:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911339#M57141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-15T16:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911340#M57142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post additional details for us to look at?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of error did you get?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has everything been activated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you move the FORM to the main program can you call it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Jan 2005 22:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911340#M57142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-15T22:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911341#M57143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
HAI
PROGRAM ZMW00M0010. * Main module program type M
INCLUDE ZMW0010010. * data declaration type I
*INCLUDE ZMW0010020. * PBO module program type I
INCLUDE ZMW0010040. * Subrouting program type I


In ZMW0010010, data declaration.

DATA: FIELDS_LINE TYPE SVAL,
      FIELDS_ITAB LIKE TABLE OF FIELDS_LINE.

In ZMW0010040,Inside Subrouting program i wrote

FORM TP_GETDATE.
FIELDS_LINE-TABNAME = 'ZMW0001'.
  FIELDS_LINE-FIELDNAME = 'IMPORTDAY'.
  FIELDS_LINE-VALUE = SY-DATUM.
*  FIELDS_LINE-FIELD_ATTR =
  FIELDS_LINE-FIELD_OBL = 'X'.
*  FIELDS_LINE-COMP_CODE =
  FIELDS_LINE-FIELDTEXT = '&amp;amp;#31227;&amp;amp;#36865;&amp;amp;#21453;&amp;amp;#26144;&amp;amp;#26085;'.
*  FIELDS_LINE-COMP_TAB =
*  FIELDS_LINE-COMP_FIELD =
*  FIELDS_LINE-NOVALUEHLP =
  APPEND FIELDS_LINE TO FIELDS_ITAB.
  CALL FUNCTION 'POPUP_GET_VALUES'
    EXPORTING
*     NO_VALUE_CHECK        = ' '
      POPUP_TITLE           = 'testpopup'
*     START_COLUMN          = '5'
*     START_ROW             = '5'
*   IMPORTING
*     RETURNCODE            =
    TABLES
      FIELDS                = FIELDS_ITAB
   EXCEPTIONS
     ERROR_IN_FIELDS       = 1
*     OTHERS                = 2
            .
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.

In Main PROGRAM ZMW00M0010,
PROGRAM ZMW00M0010. * Main module program type M
INCLUDE ZMW0010010. * data declaration type I
INCLUDE ZMW0010040. * Subrouting program type I

Inside user command
MODULE MAINUSER_COMMAND_0100 INPUT.
SAVE_OK = OK_CODE.
  CLEAR OK_CODE.
  CASE SAVE_OK.
  WHEN 'BACK'.                 "&amp;amp;#21069;&amp;amp;#30011;&amp;amp;#38754;
    SET SCREEN 0.
  WHEN 'CANCEL'.               "&amp;amp;#20013;&amp;amp;#27490;
    LEAVE PROGRAM.
  WHEN 'EXIT'.                 "&amp;amp;#32066;&amp;amp;#20102;
    LEAVE PROGRAM.
  ENDCASE.
  CASE SY-UCOMM.
    WHEN 'FU01'.
    PERFORM TP_GETDATE.
    CALL SCREEN '200'.

ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried compiling individual programs it gives below error&lt;/P&gt;&lt;P&gt;"STATEMENT is INACCESSIBLE"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you pls tell why this error occurs.&lt;/P&gt;&lt;P&gt;Chandra kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jan 2005 03:49:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911341#M57143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-16T03:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Include</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911342#M57144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need an ENDCASE statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;WHEN 'FU01'.&lt;/P&gt;&lt;P&gt;PERFORM TP_GETDATE.&lt;/P&gt;&lt;P&gt;CALL SCREEN '200'.&lt;/P&gt;&lt;P&gt;                        &amp;lt;=== need ENDCASE here&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try adding that and let us know what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Charles Folwell&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will also need to define OK_CODE and SAVE_OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jan 2005 16:12:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-include/m-p/911342#M57144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-16T16:12:05Z</dc:date>
    </item>
  </channel>
</rss>

