<?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 Local Variables Versus Global Variables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-variables-versus-global-variables/m-p/7516160#M1560104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA A TYPE I VALUE 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM PRINT_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM PRINT_DATA.&lt;/P&gt;&lt;P&gt;           DATA A(10) TYPE C 'HELLO'.&lt;/P&gt;&lt;P&gt;           WRITE / A. "Wanted to Print 100 (Global)&lt;/P&gt;&lt;P&gt;           WRITE / A.  "Wanted to Print 'HELLO'(Local)&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Both the times, the Local Variable 'A' is Printed .&lt;/P&gt;&lt;P&gt;&lt;U&gt;?Is there any way to   Differentiate the Local and Global Variables When the Names Are Same.*&lt;/U&gt; &lt;/P&gt;&lt;P&gt; *It Might be Possible in Object Oriented But I am Looking for the Same in FORMs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Nov 2010 15:58:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-11-17T15:58:42Z</dc:date>
    <item>
      <title>Local Variables Versus Global Variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-variables-versus-global-variables/m-p/7516160#M1560104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA A TYPE I VALUE 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM PRINT_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM PRINT_DATA.&lt;/P&gt;&lt;P&gt;           DATA A(10) TYPE C 'HELLO'.&lt;/P&gt;&lt;P&gt;           WRITE / A. "Wanted to Print 100 (Global)&lt;/P&gt;&lt;P&gt;           WRITE / A.  "Wanted to Print 'HELLO'(Local)&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Both the times, the Local Variable 'A' is Printed .&lt;/P&gt;&lt;P&gt;&lt;U&gt;?Is there any way to   Differentiate the Local and Global Variables When the Names Are Same.*&lt;/U&gt; &lt;/P&gt;&lt;P&gt; *It Might be Possible in Object Oriented But I am Looking for the Same in FORMs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 15:58:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-variables-versus-global-variables/m-p/7516160#M1560104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-17T15:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Local Variables Versus Global Variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-variables-versus-global-variables/m-p/7516161#M1560105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Local declarations are masking global declarations. Using identical names is extremely bad programming style.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution: do not use global variables, and if you must, prefix them with "g_", for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 16:13:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-variables-versus-global-variables/m-p/7516161#M1560105</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-11-17T16:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Local Variables Versus Global Variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-variables-versus-global-variables/m-p/7516162#M1560106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want to print the Global as well as the local values of the variable named "A". Here are a couple of approaches:&lt;/P&gt;&lt;P&gt;1.The 'Subroutines' are part of the modularization techniques. There are certain keywords like "using" &amp;amp; "Changing" so that you can work by passing Values.&lt;/P&gt;&lt;P&gt;2. There is a keyword named "LOCAL". Declare data object with the keyword "LOCAL" and then try the 'write" statement. I suppose this should work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if any one of the above works or if you need more help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Chaitanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 16:33:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-variables-versus-global-variables/m-p/7516162#M1560106</guid>
      <dc:creator>former_member229034</dc:creator>
      <dc:date>2010-11-17T16:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Local Variables Versus Global Variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-variables-versus-global-variables/m-p/7516163#M1560107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the f1 help of statements STATICS and LOCAL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 16:48:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-variables-versus-global-variables/m-p/7516163#M1560107</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-11-17T16:48:16Z</dc:date>
    </item>
  </channel>
</rss>

