03-03-2008 6:01 PM
ANY body can help me how to create EVENTS in table maintenance generator plz??????
03-03-2008 6:09 PM
After you generate table maintenance in SE54, you go to menu Environment->Modification->Events...refer to link below the list of events you can use and add to your table.
http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
03-03-2008 7:55 PM
Hi,
Create table Maintenance Events
Table Maintenance Environment->Modification->Events-> New Entries
Check this PDF document for HOW TO IMPLEMENT EVENTS IN TABLE MAINTENANCE
also Check this Blogs.
/people/sudheer.junnuthula2/blog/2007/07/31/events-in-table-maintenance-generator
03-04-2008 3:56 AM
Hi Surender,
You can create an event in the table maintenance generator as follows:
Step: 1: Create a table
Step: 2: In SE11, go to Utilities --> table maintenance generator.
Step: 3: Follow the path Environment --> Modification --> Events.
Step: 4: Click new entries, select a table maintenance dialog event which suits your requirement.
Step: 5: Create a form routine.
Step: 6: Include your logic in the routine created in step 5.
Hope this helps you.
(If your query is answered, reward relevant points & mark it answered).
Regards
Sayee
03-04-2008 4:07 AM
Hi,
While creating the tables, sometimes we may need to update the table fields in the background
Lets take an example, if create a table with 10 fields in those 10 fields there are 2 fields which are User name and the Date, these 2 fields should update automatically when a record Inserted/Updated in the table.
For this, we need to create a table maintenance generator for that table. There in the table maintenance generator we have an option to create EVENTS.
In the table maintenance generator, Environment --> Modifications --> Events then a screen will be appear here,we need to create the Events, for updating the fields create 05(Creating a new entry) and 21(Fill hidden fields) .
In the EVENTS screen, press new Entries, there give 05 and give a name(This will become a PERFORM), then click the Editor pushbutton, this will be there at the right side of the entry, then a popup will be appear, you can create an include program, there inside of the include program write the below code
form CREATE_ENTRY.
TABLE-USERNAME = sy-uname.
TABLE-CHANGED_ON = sy-datum.
endform.
Then in the events screen enter 21 and give the form name as HIDDEN_FIELDS, then press the editor button, then in the editor
form HIDDEN_FIELDS.
TABLE-USERNAME = sy-uname.
TABLE-CHANGED_ON = sy-datum.
update TABLE.
endform.
This CREATE_ENTRY Perform will be triggered for every new entry and the HIDDEN_FIELDS fields will be triggered for every changed value in the table, so the Fields USERNAME and the CHANGED_ON fields will be updated automatically when a new record inserted into the table or an existed record changes through the table maintenance generator.
If you want any more functions, and then look at the events, you can press the F4 and look at the description of the event, then you come to know how to use and where to use.
Check these links
http://help.sap.com/saphelp_nw04s/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/content.htm
http://abapliveinfo.blogspot.com/2007/12/events-in-table-maintenance-in-sap.html
Regards,
Priyanka.
03-04-2008 4:54 AM
http://www.saptechnical.com/Tutorials/ABAP/TableMaintenance/events.htm
regrads.
santhosh reddy
reward if useful
03-17-2008 9:32 AM
Hi Surendra,
If your query is answered, do award points to all the helpful answers & close the thread.
Regards,
Sayee
03-17-2008 4:16 PM
Hi,
After creation of table maintenance, goto
Environment - > modification - > Events - > Create Event
event 01 - > for updating new entries
05 - > for updating changed entries.
like these there are so many events. Please choose the right one and write the code in the routines.
For ex : If you want to update time,date, userid in 01 event...
&----
*& Form zfgl_accounting_create
&----
text
----
FORM zfgl_accounting_create.
*User Name.
zfgl_accounting-uname = sy-uname.
*Date.
zfgl_accounting-datum = sy-datum.
*Time
zfgl_accounting-uzeit = sy-uzeit.
ENDFORM. "ZFGL_ACCOUNTING_CREATE
for updating date, time , userid in 05 event
&----
*& Form zfgl_accounting_change
&----
text
----
FORM zfgl_accounting_change.
DATA : l_name TYPE sy-uname, "User name
l_date TYPE sy-datum, "date
l_time TYPE sy-uzeit. "Time
l_name = sy-uname.
l_date = sy-datum.
l_time = sy-uzeit.
LOOP AT total.
IF records EXIST with changed status then,
IF <action> = aendern. "Changed entry
IF total+45(1) = 'U'.
total+19(11) = l_name.
total+31(8) = l_date.
total+39(6) = l_time.
extract = total.
MODIFY total FROM total INDEX sy-tabix.
MODIFY extract FROM extract INDEX sy-tabix.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. "ZFGL_ACCOUNTING_CHANGE
thanks