<?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 Maintainence in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintainence/m-p/2673122#M617372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can't, table maintenance is not a program with event ..  &lt;/P&gt;&lt;P&gt;You could only insert data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Aug 2007 06:22:51 GMT</pubDate>
    <dc:creator>FredericGirod</dc:creator>
    <dc:date>2007-08-22T06:22:51Z</dc:date>
    <item>
      <title>Table Maintainence</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintainence/m-p/2673121#M617371</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 giving end user a table maintainence,&lt;/P&gt;&lt;P&gt;In which if the user enters the employee number in the table table maintainence the&lt;/P&gt;&lt;P&gt;employee name which is the next field the table maintainence has to be populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other fields like AEDTM &amp;amp; SY-UNAME, I am able to get when I use table maintainence events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Iff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:15:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintainence/m-p/2673121#M617371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T06:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table Maintainence</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintainence/m-p/2673122#M617372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can't, table maintenance is not a program with event ..  &lt;/P&gt;&lt;P&gt;You could only insert data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:22:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintainence/m-p/2673122#M617372</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2007-08-22T06:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Table Maintainence</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintainence/m-p/2673123#M617373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have solution to ur requirement, just follow the steps carefully&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create the table maintenance generator,say of ZTABLE, and assign a Function Group(FG) to it, say ZFG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now go to se80, open Function Group ZFG. double click on the name 'ZFG' which is displayed in the Left pane of ur screen, under 'Object Name', a dialog box "Display Function Group" will appear, this dialog box will have a button "Main Program", press that button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will take you to the source program, this will contain all includes used by the ZFG.&lt;/P&gt;&lt;P&gt;At last of the source, write your own code like this&lt;/P&gt;&lt;P&gt;INCLUDE ZMYINCLUDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now double click on ZMYINCLUDE, dialog of 'Create object' will appear,press YES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then another dialog of 'Exit editor' will appear, asking you to save, press YES again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then warning will come "Include ZMINCLUDE will not be created in fun group ZFG", press ENTER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now an include ZMYINCLUDE would be created. Activate it and press BACK, u now return to the main program ZFG, activate it too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now go to sm30, write ur table name, ZTABLE, and press maintain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when ur table is displayed, go to menu bar 'System -&amp;gt; Status'. You will find screen No. here., say 1, double click on that screen no. You now reach the flow logic of the screen, in this flow logic you will find a statement MODULE LISTE_UPDATE_LISTE.&lt;/P&gt;&lt;P&gt;Insert a line before this statement MODULE MYCODE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now double click on MYCODE.dialog of 'Create object' will appear,press YES.&lt;/P&gt;&lt;P&gt;another dialog of 'Create PAI Module' will appear showing the list of includes and asking u to choose. If you browse to the end of the list, u will find the include ZMYINCLUDE that we had created earlier.select ZMYINCLUDE and press ENTER. select means pressing the button next to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then another dialog of 'Exit Screen Painter' will appear, asking you to save, press YES again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this module you write the code according to your logic, and assign the value correspondingly, e.g.&lt;/P&gt;&lt;P&gt;select name from .........&lt;/P&gt;&lt;P&gt;into ZTABLE-EMPNAME.......&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;empnumber = ZTABLE-PERNR.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date and name field are assigned directly.e.g.&lt;/P&gt;&lt;P&gt;ZTABLE-AEDTM = sy-datum.&lt;/P&gt;&lt;P&gt;ZTABLE-UNAME = SY_UNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now activate this include and press BACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and its all done. moreover you can go to Layout of that screen and Disable the fields like EMPNAME,AEDTM,UNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;don't forget to activate all the objects created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now go to sm30 and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful, get back in case of query...&lt;/P&gt;&lt;P&gt;Cheers!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 08:57:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintainence/m-p/2673123#M617373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T08:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Table Maintainence</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintainence/m-p/2673124#M617374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[quote]&lt;/P&gt;&lt;P&gt;I think you can't, table maintenance is not a program with event .. &lt;/P&gt;&lt;P&gt;You could only insert data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fred &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[/quote]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[x] not true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can create events for table maintenance under SM30&lt;/P&gt;&lt;P&gt;under the table maintenance generator you can find in the menu Environment _&amp;gt; Modification -&amp;gt; events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you can define a function where you can also include fixed values like username etc . use eventid 05 and in my case I used the formname 'GET_NEXT_ZCSID' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use it for instance to create autoincrement keys for my Z tables&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* autonummering voor zcs_mailsettings
FORM GET_NEXT_ZCSID.
perform GET_NUMBER_NEXT using 'ZCSID'.

ENDFORM.



FORM GET_NUMBER_NEXT using keyobject.

* Types Declaration
TYPES: BEGIN OF ztable_wa.
  INCLUDE STRUCTURE zcs_mailsettings.
  TYPES: update_fl TYPE char1,
  mark TYPE char1,
END OF ztable_wa.

* Workarea Declaration
DATA: wa TYPE ztable_wa.
DATA: new_key type ztable_wa-zcsid.


* Assign the current workarea
wa = &amp;lt;table1&amp;gt;.

* Call the function module
if wa-zcsid is initial.
CALL FUNCTION 'NUMBER_GET_NEXT'
  EXPORTING
    nr_range_nr                   = '1'
    object                        = keyobject
*   QUANTITY                      = '1'
*   SUBOBJECT                     = ' '
*   TOYEAR                        = '0000'
*   IGNORE_BUFFER                 = ' '
  IMPORTING
    NUMBER                        = new_key
*   QUANTITY                      =
*   RETURNCODE                    =
* EXCEPTIONS
*   INTERVAL_NOT_FOUND            = 1
*   NUMBER_RANGE_NOT_INTERN       = 2
*   OBJECT_NOT_FOUND              = 3
*   QUANTITY_IS_0                 = 4
*   QUANTITY_IS_NOT_1             = 5
*   INTERVAL_OVERFLOW             = 6
*   BUFFER_OVERFLOW               = 7
*   OTHERS                        = 8
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.



* Assign the value.
wa-zCSID = new_key.
&amp;lt;table1&amp;gt; = wa.
endif.
.


ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;arthur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        A. de Smidt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 09:08:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-maintainence/m-p/2673124#M617374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T09:08:35Z</dc:date>
    </item>
  </channel>
</rss>

