<?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: declaring constants in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363941#M1038563</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;PRE&gt;&lt;CODE&gt;perform f_processdata
 
constants:
 lc_test type c value 'X'
 
endform&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you declare inside a form routine then that is accessible with in that form routine itself.&lt;/P&gt;&lt;P&gt;we cant use them outside the form routine.&lt;/P&gt;&lt;P&gt;If this constant is used only in a particular form routine  then it better to declare locally then globally.&lt;/P&gt;&lt;P&gt;If the constant or variable is used in many instances then we declare it globally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;raam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Aug 2008 06:02:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-27T06:02:23Z</dc:date>
    <item>
      <title>declaring constants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363934#M1038556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i was wondering is it make sense to declare local constants in a report program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i mean constants is created so that it can be access globally then what's the use of declaring it in a perform like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

perform f_processdata

constants:
 lc_test type c value 'X'

endform
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i always declare my constant in my top include.  i just wanted to know the difference&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 05:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363934#M1038556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T05:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: declaring constants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363935#M1038557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the difference is only in scope.....if you declare it in an include then it is available globally wherever the include is used....a local constant has only a local scope...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 05:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363935#M1038557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T05:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: declaring constants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363936#M1038558</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;The only difference comes for there scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we declare the constants in INCLUDE then it has a global scope i.e. we can use this constants in number of programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if we declare in any program its scope is local i.e we can use that in program only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 05:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363936#M1038558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T05:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: declaring constants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363937#M1038559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no difference except for the availability of the constant. It will be locally available in this case and cant be accessed from other subroutines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 05:49:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363937#M1038559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T05:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: declaring constants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363938#M1038560</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;&lt;/P&gt;&lt;P&gt;Refer this link &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3041358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3041358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&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;Sravanthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 05:49:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363938#M1038560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T05:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: declaring constants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363939#M1038561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declaring constants within a perform has the scope within that subroutine only. It cannot be accessed out of that subroutoine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declaring globally, it can be accessed throught the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can check this in debugging. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 05:51:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363939#M1038561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T05:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: declaring constants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363940#M1038562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, if you declare constant globally then anywhere you can use it.and if you declare it in any subroutine then whenever you call that subroutine you can have that constant value.if some variables are really used for so many programs then it is better to declare it as global but constant value will not be used that much time so it is better to declare it as local and call that subroutine whenever you need it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 05:53:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363940#M1038562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T05:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: declaring constants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363941#M1038563</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;PRE&gt;&lt;CODE&gt;perform f_processdata
 
constants:
 lc_test type c value 'X'
 
endform&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you declare inside a form routine then that is accessible with in that form routine itself.&lt;/P&gt;&lt;P&gt;we cant use them outside the form routine.&lt;/P&gt;&lt;P&gt;If this constant is used only in a particular form routine  then it better to declare locally then globally.&lt;/P&gt;&lt;P&gt;If the constant or variable is used in many instances then we declare it globally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;raam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 06:02:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-constants/m-p/4363941#M1038563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T06:02:23Z</dc:date>
    </item>
  </channel>
</rss>

