<?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: Better way to manage Hardcoded values in program? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248537#M1383306</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought this process because  of this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there will be few requirements just to change the value of constants , at that time Maintainability of hard code values in program is cumbersome process.. You need to comment the existing code and then rewrite the same code new constant value. But instead of that if you have a custom table where you do maintain such kind of frequent hard code values change, just changing the table entry will solve the problem .In this case we do can save a lot of effort and time . No need to create a TR , no transport, USER can also do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2009 06:36:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-24T06:36:22Z</dc:date>
    <item>
      <title>Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248534#M1383303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the better way to manage hard code values in the program . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One option will be create a custom table and store the constant values in it , and retrieve based on the program id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If such case what would be the best optimum table design for this case?&lt;/P&gt;&lt;P&gt;&lt;U&gt;table structure :&lt;/U&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Program ID
constant field name 
constant value&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the above design doesn't have the uniqueness . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any new ideas on this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raghavendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 06:11:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248534#M1383303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T06:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248535#M1383304</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;I don't think it will be a good option as each and evry program will have thier own hardcoded values....and also custom table takes some space in the database as well.The custom table can be helpful if multiple programs use same hardcoded value...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel use constants in the indiviudal programs or if you don't want to change the code then specify them in the selection screen and try to use them in ur code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 06:22:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248535#M1383304</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2009-09-24T06:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248536#M1383305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raghavendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think declaring constant values in program will better option rather than using table for constant values.&lt;/P&gt;&lt;P&gt;this is the suggestion of standard sap .&lt;/P&gt;&lt;P&gt;when you go for extended check, if you have used any constant then it shows error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare your constant with some suitable char which will indicate it is constant and for particular field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 06:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248536#M1383305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T06:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248537#M1383306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought this process because  of this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there will be few requirements just to change the value of constants , at that time Maintainability of hard code values in program is cumbersome process.. You need to comment the existing code and then rewrite the same code new constant value. But instead of that if you have a custom table where you do maintain such kind of frequent hard code values change, just changing the table entry will solve the problem .In this case we do can save a lot of effort and time . No need to create a TR , no transport, USER can also do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 06:36:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248537#M1383306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T06:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248538#M1383307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what about maintaining the constants in attributes of a class ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 06:45:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248538#M1383307</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-09-24T06:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248539#M1383308</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;I understand what u said..But for custom table also some one needs to maiantain when there is change in the constant values.... also this needs to be maintained in all the servers... also authorization needs to be given for maintainence of the custom table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are not using SM30 or some tcode to maintain the values then u need to do another program to update the values...once any change comes then once again u need to modify the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my suggestion is use constants or else specify a separate block in the selection screen and then specify the values and use them in ur program, when u do this u don't need to change the program...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 06:45:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248539#M1383308</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2009-09-24T06:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248540#M1383309</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;In this case i would go for the following fields;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Key Fields&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Program &lt;/P&gt;&lt;P&gt;Field&lt;/P&gt;&lt;P&gt;Sequence&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;No-Key fields&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ActiveFlag&lt;/P&gt;&lt;P&gt;Value&lt;/P&gt;&lt;P&gt;Description&lt;/P&gt;&lt;P&gt;Created on&lt;/P&gt;&lt;P&gt;Created by&lt;/P&gt;&lt;P&gt;Last change on&lt;/P&gt;&lt;P&gt;Last Chang by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 06:51:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248540#M1383309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T06:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248541#M1383310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Always reinventing the wheel......&lt;/P&gt;&lt;P&gt;There's a standard way to deal with constants without repeating coding. Also multi value constants with all features of Selecti-options (Ranges) are applicable there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table TVARV (TVARVC on &amp;gt; 4.6C)&lt;/P&gt;&lt;P&gt;Transaction STVARV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These Variables are also useful within Report-Variants.&lt;/P&gt;&lt;P&gt;The only poor is that SAp does not provide a way to compare variables with tose ranges.&lt;/P&gt;&lt;P&gt;We developed a public static method do so and we deal with TVARV variables in the same manner as the IN statement in ABAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;carsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 06:56:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248541#M1383310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T06:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248542#M1383311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raghavendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Herewith, I am giving you a small idea. Please use this if it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please create a COM PARAM database table with the following structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pgmid           - Program name&lt;/P&gt;&lt;P&gt;para1           - Parameter name (Constant name) Data element - PARAM_D&lt;/P&gt;&lt;P&gt;para2           - Parameter name (Variant of constant 1) Data element should be same as para1&lt;/P&gt;&lt;P&gt;Use of this is that, for example PARA1 = Module PARA2 = SD&lt;/P&gt;&lt;P&gt;                                                  PARA1 = Module PARA2 = FI &lt;/P&gt;&lt;P&gt;                                                  PARA1 = Module PARA2 = MM (Like this variations could be handled)&lt;/P&gt;&lt;P&gt;sign             - Data element = DDSIGN (Value can be Included in range / Excluded in Range)&lt;/P&gt;&lt;P&gt;opt              - Data element = DDOPTION (Value can be EQ/NE/GE/GT/LT/etc)&lt;/P&gt;&lt;P&gt;low             - Data element = SETVAL (Value for the constant)&lt;/P&gt;&lt;P&gt;high            - Data element = SETVAL (Value for the constant can be SPACE if the constant is not a range of values)&lt;/P&gt;&lt;P&gt;description - Description for the constant (CHAR255)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the way which most of the experts would prefer, instead of hardcoding the values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After creating the table, you can maintain the constants in this table as records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 07:06:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248542#M1383311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T07:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248543#M1383312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;Do you have any example on this? looks like the sequence indicator will do better things&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 08:57:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248543#M1383312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T08:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Better way to manage Hardcoded values in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248544#M1383313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi Karthik,&lt;/P&gt;&lt;P&gt;&amp;gt; Do you have any example on this? looks like the sequence indicator will do better things&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope all fields are self explanatory, so you have to maintain the entry with the program name , field name and sequence 1 for the first time, check the active flag if you want to have this record as active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In program use a select query to fetch the data value, checking the active flag is set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using sequence you can maintain multiple values for a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 09:19:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/better-way-to-manage-hardcoded-values-in-program/m-p/6248544#M1383313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T09:19:48Z</dc:date>
    </item>
  </channel>
</rss>

