<?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 Code that doesn't require maintenance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397746#M1644421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have several tables and want to code ABAP, so that data would be written and updated to the correct table accordingly. Later on, there would be requirements to add more tables and data would be updated accordingly. The requirement is to code it so that it wouldn't need to be modified every time a new table is added. The table is named by the year, so there would be table 2009, 2010, 2011, 2012, etc. So when table 2013 is added, there shouldn't be a requirement to modify or change the code. Essentially the requirement is not to hard code the year. Is this possible to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jan 2012 21:42:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-01-10T21:42:04Z</dc:date>
    <item>
      <title>Code that doesn't require maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397746#M1644421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have several tables and want to code ABAP, so that data would be written and updated to the correct table accordingly. Later on, there would be requirements to add more tables and data would be updated accordingly. The requirement is to code it so that it wouldn't need to be modified every time a new table is added. The table is named by the year, so there would be table 2009, 2010, 2011, 2012, etc. So when table 2013 is added, there shouldn't be a requirement to modify or change the code. Essentially the requirement is not to hard code the year. Is this possible to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 21:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397746#M1644421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-10T21:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Code that doesn't require maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397747#M1644422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use SETS for to store table names and keep on adding tables whenever you want in future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check F.M G_SET_GET_ID_FROM_NAME&lt;/P&gt;&lt;P&gt;                 G_SET_TREE_IMPORT&lt;/P&gt;&lt;P&gt;This way you will get your table name read the set data based and based on logic  like as you said table is named after year&lt;/P&gt;&lt;P&gt;you can write your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bhanu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bhanu  Malik on Jan 10, 2012 10:46 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 21:46:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397747#M1644422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-10T21:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Code that doesn't require maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397748#M1644423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the risk of sounding like an idiot - why don't you just have one table and use the year as one of the key fields?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 22:45:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397748#M1644423</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2012-01-10T22:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Code that doesn't require maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397749#M1644424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To me I could not really understand your requirement completly. However based on my understanding:&lt;/P&gt;&lt;P&gt;You are planning to maintain data in different tables using ABAP program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If program selection has an option to given Table Name as input and data would be in some file format similar to table structure given on selection screen, then you have to use Dynamic decalarations of internal tables and Field Symbols to perform the maintenance task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 12:27:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397749#M1644424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-11T12:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Code that doesn't require maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397750#M1644425</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;Get Year from Current date using SY-DATUM and then validate year with out hard coding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 12:54:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397750#M1644425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-11T12:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Code that doesn't require maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397751#M1644426</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;Better to try with Dynamic programming techniques using field symbols,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example with select query,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select [field set dynamic] from [table name variable] into table [dynamic internal table].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i am not wrong, you can not create a table definition from se38 program but entries you can make it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 15:32:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397751#M1644426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-11T15:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Code that doesn't require maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397752#M1644427</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 am not understanding the naming conventions for tables. &lt;/P&gt;&lt;P&gt;Are u saying that your table names are years and how can it be possible to have names like that for custom tables??&lt;/P&gt;&lt;P&gt;sorry for the confusion....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;Aswath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 10:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397752#M1644427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-13T10:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Code that doesn't require maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397753#M1644428</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;If you plan to create tables 2008, 2009, 2010 etc which are having exactly having the same fields, there is no need of so much work. Simply create one Z-table which has Year as a key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you really have a a need to create different tables for different years then in your program, use the value of SY-DATUM(4). Based on this value you can easily update your desired table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Danish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 12:21:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397753#M1644428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-13T12:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Code that doesn't require maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397754#M1644429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way we handle this (for many custom tables that we have for bolt-on applications) is via a small customer-written program to supply the tablename and call FM &lt;STRONG&gt;VIEW_MAINTENANCE_CALL&lt;/STRONG&gt; .  Our tables have generated table maintenance modules, so we can simply update this way.  In our case, we have radiobuttons for display or update on the selection screen for our simple utility program that sets the table name, the display or view (action).  For a limited number of tables we call the FM with SHOW_SELECTION_POPUP = 'X'.  You can, of course, add authorization checks if needed for whomever is allowed to update, whether for single or multiple tables, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 14:29:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-that-doesn-t-require-maintenance/m-p/8397754#M1644429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-13T14:29:59Z</dc:date>
    </item>
  </channel>
</rss>

