<?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 how to access global variable in class interface in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828119#M920577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; i have declared a global variable i_variable in top include.&lt;/P&gt;&lt;P&gt;i have declared a method, where i want to use the global variable.&lt;/P&gt;&lt;P&gt; my class interface is throwing error that the varaible is not declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone help me, how to include the declaration in my class interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;pratyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 May 2008 12:27:17 GMT</pubDate>
    <dc:creator>former_member5472</dc:creator>
    <dc:date>2008-05-14T12:27:17Z</dc:date>
    <item>
      <title>how to access global variable in class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828119#M920577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; i have declared a global variable i_variable in top include.&lt;/P&gt;&lt;P&gt;i have declared a method, where i want to use the global variable.&lt;/P&gt;&lt;P&gt; my class interface is throwing error that the varaible is not declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone help me, how to include the declaration in my class interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;pratyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2008 12:27:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828119#M920577</guid>
      <dc:creator>former_member5472</dc:creator>
      <dc:date>2008-05-14T12:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to access global variable in class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828120#M920578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume the class is local to your ABAP?  Global variables are not visible within classes.  If you want to have a variable visible in all methods, it must be defined as an attribute of the class (private, protected or public),  or superclass (protected or public).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2008 12:43:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828120#M920578</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-05-14T12:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to access global variable in class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828121#M920579</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;You need to create a public attribute in the class/method and pass the global variable into it.&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, 14 May 2008 12:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828121#M920579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-14T12:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to access global variable in class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828122#M920580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your response. &lt;/P&gt;&lt;P&gt;the value of the variable is set inside the method, and the global variable is declared in top include. the same global variable is used in some other FM .&lt;/P&gt;&lt;P&gt;so i have to assign the attribute value to global variable to make it visible across the Function Group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually the scenario is like this,&lt;/P&gt;&lt;P&gt;i have redifined SAP standard class . the methods in the class are triggred based on actions done by end users. so i'm not sure which method will be trigerred first and thats why i'm confused where to set the attribute value ? i.e if i have written code to set the attribute value inside one method and if  users dosen't trigers the method than , my global variable won't be set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2008 13:01:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828122#M920580</guid>
      <dc:creator>former_member5472</dc:creator>
      <dc:date>2008-05-14T13:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to access global variable in class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828123#M920581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set the attribute, which should be static, in the CLASS-CONSTRUCTOR.  Then it will be set the first time there is a reference to the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is precisely the scenario that constructors were designed to deal with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2008 14:16:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828123#M920581</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-05-14T14:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to access global variable in class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828124#M920582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for the replies&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 06:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828124#M920582</guid>
      <dc:creator>former_member5472</dc:creator>
      <dc:date>2008-05-15T06:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to access global variable in class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828125#M920583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now mark the question answered! &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 08:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828125#M920583</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-05-15T08:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to access global variable in class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828126#M920584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 08:41:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-global-variable-in-class-interface/m-p/3828126#M920584</guid>
      <dc:creator>former_member5472</dc:creator>
      <dc:date>2008-05-15T08:41:37Z</dc:date>
    </item>
  </channel>
</rss>

