<?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: Table maintenance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284571#M497697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rishi,&lt;/P&gt;&lt;P&gt;go to se54..give table/view name... environment-&amp;gt;events..&lt;/P&gt;&lt;P&gt;click new entries..select '01' ..before saving to database...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give a form name ...and then click on 'SAVE'...&lt;/P&gt;&lt;P&gt;then click on the editor...&lt;/P&gt;&lt;P&gt;and write this logic there..TOTAL will be the table with the whole contents.. EXTRACT will have the newly added entries after clicking on the new entries... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TOTAL.&lt;/P&gt;&lt;P&gt;LS_VIEW = TOTAL.&lt;/P&gt;&lt;P&gt;   CASE &amp;lt;ACTION&amp;gt;.&lt;/P&gt;&lt;P&gt;      WHEN NEUER_EINTRAG.&lt;/P&gt;&lt;P&gt;        LS_VIEW-CREATED_BY   = SY-UNAME.&lt;/P&gt;&lt;P&gt;        LS_VIEW-CREATED_ON   = SY-DATUM.&lt;/P&gt;&lt;P&gt;        LS_VIEW-CREATED_TIME = SY-UZEIT.&lt;/P&gt;&lt;P&gt;        LS_VIEW-UPDATED_BY   = SY-UNAME.&lt;/P&gt;&lt;P&gt;        LS_VIEW-UPDATED_DATE = SY-DATUM.&lt;/P&gt;&lt;P&gt;        LS_VIEW-UPDATED_TIME = SY-UZEIT.&lt;/P&gt;&lt;P&gt;        READ TABLE EXTRACT WITH KEY &amp;lt;VIM_XTOTAL_KEY&amp;gt;.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;          L_INDEX = SY-TABIX.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          CLEAR L_INDEX.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;*-- make desired changes to the line total&lt;/P&gt;&lt;P&gt;        TOTAL = LS_VIEW.&lt;/P&gt;&lt;P&gt;        MODIFY TOTAL.&lt;/P&gt;&lt;P&gt;        CHECK L_INDEX GT 0.&lt;/P&gt;&lt;P&gt;        EXTRACT = TOTAL.&lt;/P&gt;&lt;P&gt;        MODIFY EXTRACT INDEX L_INDEX.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2007 13:48:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-15T13:48:58Z</dc:date>
    <item>
      <title>Table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284568#M497694</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;A simple question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating one table with table maintenance generator and also T code for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to apply logic that when i am enterting some data into table using that T code, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3 fields  System date, Sytem time and user name should populate automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please guide and tell the procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rishi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 13:34:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284568#M497694</guid>
      <dc:creator>former_member541016</dc:creator>
      <dc:date>2007-05-15T13:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284569#M497695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi rishi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chk this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2403945"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 13:38:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284569#M497695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T13:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284570#M497696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create table Maintenance Events &lt;/P&gt;&lt;P&gt;Table Maintenance Environment-&amp;gt;Modification-&amp;gt;Events-&amp;gt; New Entries &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This event will be triggered while creating a new entry in SM30 or using the TCODE. &lt;/P&gt;&lt;P&gt;Form Name: AT_NEWENTRY (Enter key) &lt;/P&gt;&lt;P&gt;Double Click on the editor. &lt;/P&gt;&lt;P&gt;form at_newentry. &lt;/P&gt;&lt;P&gt;Ztab-ZCOUNTRY = &amp;#145;India&amp;#146;. &lt;/P&gt;&lt;P&gt;Ztab-ZCREATEDATE = sy-datum. &lt;/P&gt;&lt;P&gt;Ztab-ZCREATETIME = sy-uzeit. &lt;/P&gt;&lt;P&gt;endform. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create another event: 02 for &amp;#147;After Save&amp;#148; &lt;/P&gt;&lt;P&gt;FORM after_save. &lt;/P&gt;&lt;P&gt;Ztab-mandt = extract+0(3). &lt;/P&gt;&lt;P&gt;Ztab-ZCOUNTRY = extract+3(3).. &lt;/P&gt;&lt;P&gt;Ztab-ZCREATEDATE = sy-datum. &lt;/P&gt;&lt;P&gt;Ztab-ZCREATETIME = sy-uzeit. &lt;/P&gt;&lt;P&gt;MODIFY ztab. &lt;/P&gt;&lt;P&gt;ENDFORM. "after_save &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if it is useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 13:38:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284570#M497696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T13:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284571#M497697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rishi,&lt;/P&gt;&lt;P&gt;go to se54..give table/view name... environment-&amp;gt;events..&lt;/P&gt;&lt;P&gt;click new entries..select '01' ..before saving to database...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give a form name ...and then click on 'SAVE'...&lt;/P&gt;&lt;P&gt;then click on the editor...&lt;/P&gt;&lt;P&gt;and write this logic there..TOTAL will be the table with the whole contents.. EXTRACT will have the newly added entries after clicking on the new entries... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TOTAL.&lt;/P&gt;&lt;P&gt;LS_VIEW = TOTAL.&lt;/P&gt;&lt;P&gt;   CASE &amp;lt;ACTION&amp;gt;.&lt;/P&gt;&lt;P&gt;      WHEN NEUER_EINTRAG.&lt;/P&gt;&lt;P&gt;        LS_VIEW-CREATED_BY   = SY-UNAME.&lt;/P&gt;&lt;P&gt;        LS_VIEW-CREATED_ON   = SY-DATUM.&lt;/P&gt;&lt;P&gt;        LS_VIEW-CREATED_TIME = SY-UZEIT.&lt;/P&gt;&lt;P&gt;        LS_VIEW-UPDATED_BY   = SY-UNAME.&lt;/P&gt;&lt;P&gt;        LS_VIEW-UPDATED_DATE = SY-DATUM.&lt;/P&gt;&lt;P&gt;        LS_VIEW-UPDATED_TIME = SY-UZEIT.&lt;/P&gt;&lt;P&gt;        READ TABLE EXTRACT WITH KEY &amp;lt;VIM_XTOTAL_KEY&amp;gt;.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;          L_INDEX = SY-TABIX.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          CLEAR L_INDEX.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;*-- make desired changes to the line total&lt;/P&gt;&lt;P&gt;        TOTAL = LS_VIEW.&lt;/P&gt;&lt;P&gt;        MODIFY TOTAL.&lt;/P&gt;&lt;P&gt;        CHECK L_INDEX GT 0.&lt;/P&gt;&lt;P&gt;        EXTRACT = TOTAL.&lt;/P&gt;&lt;P&gt;        MODIFY EXTRACT INDEX L_INDEX.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 13:48:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284571#M497697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T13:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284572#M497698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Table of Contents&lt;/P&gt;&lt;P&gt;Let us consider a scenario, where a custom table has to be updated with the created/modified date and time.&lt;/P&gt;&lt;P&gt;The steps for implementing the same are given below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step1: Create a table ZTAB with the following fields:&lt;/P&gt;&lt;P&gt;field         key      key       key       key      Dec       text&lt;/P&gt;&lt;P&gt;MANDT     X      MANDT   CLNT      3         0        Client&lt;/P&gt;&lt;P&gt;ZCTRY      X      LAND1    Char       3                   Country Key&lt;/P&gt;&lt;P&gt;ZDATE      X      CDATE   Dats       8                    Creation/Change Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: Create a TABLE MAINTENANCE GENERATOR FOR THE TABLE&lt;/P&gt;&lt;P&gt;Utilities-&amp;gt; Table Maintenance Generator.&lt;/P&gt;&lt;P&gt;Authorization Group: &amp;amp;NC&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function group: Any suitable FC Eg: ZBC420XX&lt;/P&gt;&lt;P&gt;Maintenance type: Two Step&lt;/P&gt;&lt;P&gt;Maint. screen no: Overview screen 8005&lt;/P&gt;&lt;P&gt;Single screen 8006&lt;/P&gt;&lt;P&gt;Create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3: Create table Maintenance Events&lt;/P&gt;&lt;P&gt;Table Maintenance Environment-&amp;gt;Modification-&amp;gt;Events-&amp;gt; New Entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see list of events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select 05 for an event for &amp;#147;Creating a new entry&amp;#148;.&lt;/P&gt;&lt;P&gt;This event will be triggered while creating a new entry in SM30 or using the TCODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form Name: AT_NEWENTRY (Enter key)&lt;/P&gt;&lt;P&gt;Double Click on the editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form at_newentry.&lt;/P&gt;&lt;P&gt;Ztab-ZCTRY = &amp;#145;India&amp;#146;.&lt;/P&gt;&lt;P&gt;Ztab-ZCDATE = sy-datum.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create another event: 02 for &amp;#147;After Save&amp;#148;&lt;/P&gt;&lt;P&gt;FORM after_save.&lt;/P&gt;&lt;P&gt;Ztab-mandt = extract+0(3).&lt;/P&gt;&lt;P&gt;Ztab-ZCTRY  = extract+3(3)..&lt;/P&gt;&lt;P&gt;Ztab-ZCDATE = sy-datum.&lt;/P&gt;&lt;P&gt;MODIFY ztab.&lt;/P&gt;&lt;P&gt;ENDFORM. "after_save&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 4: Create Transaction Code.&lt;/P&gt;&lt;P&gt;Go to SE93.&lt;/P&gt;&lt;P&gt;Transcation code: ZTAB&lt;/P&gt;&lt;P&gt;Transaction text Test Table Maintenance Events&lt;/P&gt;&lt;P&gt;Transaction: SM30, Skip first Screen&lt;/P&gt;&lt;P&gt;Default Values:&lt;/P&gt;&lt;P&gt;VIEWNAME ZTAB&lt;/P&gt;&lt;P&gt;UPDATE X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this when you execute the tcode ZTAB, and create a new entry, it will update the system date and time in the tabel ZTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover if any of the data entries are changed, it will update with the new entries.&lt;/P&gt;&lt;P&gt;All sorts of validations of the entries is also possible through this event creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SaiRam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 06:58:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284572#M497698</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2007-05-16T06:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284573#M497699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rishi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goto table --&amp;gt; Utlities --&amp;gt; Table maintanence generator --&amp;gt; Environment --&amp;gt; Modification --&amp;gt; Events. &lt;/P&gt;&lt;P&gt;Select the event 01 (Before saving the data in the database)--&amp;gt; Enter some name example USER_NAME_TIME. There is one more column Editor near to that click that.&lt;/P&gt;&lt;P&gt;Write the code inside that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ztest-user_name = sy-uname.&lt;/P&gt;&lt;P&gt;ztest-time = sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sastry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 07:56:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284573#M497699</guid>
      <dc:creator>subramanya_sastry</dc:creator>
      <dc:date>2007-05-16T07:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284574#M497700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Create another event: 02 for &amp;#147;After Save&amp;#148; 
FORM after_save. 
Ztab-mandt = extract+0(3). 
Ztab-ZCOUNTRY = extract+3(3).. 
Ztab-ZCREATEDATE = sy-datum. 
Ztab-ZCREATETIME = sy-uzeit. 
MODIFY ztab. 
ENDFORM. "after_save&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the purpose of this  &lt;STRONG&gt;Ztab-mandt = extract+0(3)&lt;/STRONG&gt; statement ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 16:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284574#M497700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-20T16:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284575#M497701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is to assign the value of the mandt field to the correct field from the extract. ie.. the extract will have all the data together as a string. so you have to manually assign the first 3 characters to the mandt field and so on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 17:39:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284575#M497701</guid>
      <dc:creator>lijisusan_mathews</dc:creator>
      <dc:date>2011-07-20T17:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284576#M497702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please note the date of the original post before posting your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 17:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintenance/m-p/2284576#M497702</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-07-20T17:49:17Z</dc:date>
    </item>
  </channel>
</rss>

