<?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 Access to local class, error in code check in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758214#M1461208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a report with the following includes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INCLUDE ztest_top. "top include

INCLUDE ztest_c01. "local class

INCLUDE ztest_e01. "events

INCLUDE ztest_f01. "functions&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my top include, I define a reference variable of my local class lcl_test defined in the c01 include. Therefore I need the &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS lcl_test DEFINITION DEFERRED.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;line in my top include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my f01 include I got a form (called from e01 include), where I create my object. If I check my code now, I get an error(!) message saying &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;components of classes declared using  "CLASS LCL_TEST DEFINITION DEFERRED" can only be accessed after you have defined the class (CLASS LCL_TEST DEFINITION)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Althought it's an error message, I can activate the program and run it without getting any errors. If I check it again afterwards, the errors show up again.&lt;/P&gt;&lt;P&gt;I don't really get this, the class definition and the implementation are in the c01 include, so the form in the f01 should know the class, shouldn't it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain this to me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tobi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Mar 2010 14:06:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-29T14:06:19Z</dc:date>
    <item>
      <title>Access to local class, error in code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758214#M1461208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a report with the following includes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INCLUDE ztest_top. "top include

INCLUDE ztest_c01. "local class

INCLUDE ztest_e01. "events

INCLUDE ztest_f01. "functions&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my top include, I define a reference variable of my local class lcl_test defined in the c01 include. Therefore I need the &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS lcl_test DEFINITION DEFERRED.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;line in my top include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my f01 include I got a form (called from e01 include), where I create my object. If I check my code now, I get an error(!) message saying &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;components of classes declared using  "CLASS LCL_TEST DEFINITION DEFERRED" can only be accessed after you have defined the class (CLASS LCL_TEST DEFINITION)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Althought it's an error message, I can activate the program and run it without getting any errors. If I check it again afterwards, the errors show up again.&lt;/P&gt;&lt;P&gt;I don't really get this, the class definition and the implementation are in the c01 include, so the form in the f01 should know the class, shouldn't it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain this to me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tobi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Mar 2010 14:06:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758214#M1461208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-29T14:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Access to local class, error in code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758215#M1461209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tobias,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cheked it in some quick example program. It seems that I received this message too, until I activated all the includes. This caused the error gone.&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>Mon, 29 Mar 2010 14:34:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758215#M1461209</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-29T14:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Access to local class, error in code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758216#M1461210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your answer. &lt;/P&gt;&lt;P&gt;All my includes are activated as well, but when I code check again, the error reappears. This looks like a compiler error to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tobi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 06:14:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758216#M1461210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-30T06:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Access to local class, error in code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758217#M1461211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tobias,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Its not a compiler problem . Goto main program of the Function Group you created and check for syntax error .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   You will not get the error message . If you check for syntax error anywhere outside, you will get error message .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S.Sivakumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 12:34:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758217#M1461211</guid>
      <dc:creator>Sivakumar_Subramaniam</dc:creator>
      <dc:date>2010-04-01T12:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Access to local class, error in code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758218#M1461212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello S.Sivakumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really understand what you mean? Could you explain?&lt;/P&gt;&lt;P&gt;I only get the error when i code check the f01 include.`&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tobi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 12:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758218#M1461212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-12T12:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Access to local class, error in code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758219#M1461213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tobias,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Just go to main program of the Function group and check code . No error occurs .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  The fact is when you check the code inside an include , the declaration part of the class which u are accessing inside the include is not available . So because of that u r getting the error message .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S.Sivakumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 11:34:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758219#M1461213</guid>
      <dc:creator>Sivakumar_Subramaniam</dc:creator>
      <dc:date>2010-04-13T11:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Access to local class, error in code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758220#M1461214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi S.Sivakumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why should the declaration part not be available? All data defined in the top include is available as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I replace my "definition deferred" command in the top include with "INCLUDE ztest_c01.", I get no error message when code checking the f01 as well? Where is the difference if I include the c01 in the main programm or in the top include? In both cases, the creation of the object happens after the declaration?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still don't get it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tobi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 12:20:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758220#M1461214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-13T12:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Access to local class, error in code check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758221#M1461215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as far as I know the ABAP editors do a kind of simulation when you perform a syntax-check within an include. The simulation works like this way the top include is combined with the current include into a temp. program which gets fed to the compiler. Cllass definition deferred in the top include does not work out in such a scenario. By moving the class definition statement into the TOP Include the true behavior should come closer to the expected one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;  Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 14:41:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-to-local-class-error-in-code-check/m-p/6758221#M1461215</guid>
      <dc:creator>former_member183804</dc:creator>
      <dc:date>2010-04-13T14:41:32Z</dc:date>
    </item>
  </channel>
</rss>

