Вы находитесь на странице: 1из 7

7/14/2014 TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki

http://wiki.scn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS 1/7
Getting Started Newsletters Store
Search the Community


Welcome, Guest Login Register
Products Services & Support About SCN Downloads
Industries Training & Education Partnership Developer Center
Lines of Business University Alliances Events & Webinars Innovation
Added by ankit harjai, last edited by Alon Mizrahi on Nov 01, 2011
ABAP Development
TABLE MAINTENANCE GENERATOR and ITS EVENTS
TABLEMAINTENANCEGENERATOR and
ITS EVENTS
What is table maintenance generator?
Table Maintenance Generator is a tool used to customize the tables created by end users and can be changed as required, such as making an entry to that table, deleting an entry etc.
In other words, table maintenance generator is a user interf ace tool which is used to change the entry of the table or delete an entry f rom the table or create an entry f or the table.
Prerequisite
To make this f eature work care should be taken while creating the database table that in the 'Delivery and Maintenance' tab, the 'Table View Maint.' should have the "Maintenance allowed" property def ined.
Transaction Codes
SE54: Generate Table Maintenance Dialog
SE55: Table view maintenance DDIC call
SE56: Table view display DDIC call
SE57: Deletion of Table Maintenance
SM30: Maintenance Table Views:
Implementation of table maintenance generator for a custom table
Go to SE11 and create a table with the f ields as per the requirement.
In table change mode, click on Utilities and then click on Table maintenance generator.
Following screen will be displayed f or setting up the Maintenance generator
7/14/2014 TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS 2/7
Following are the available options, choose them accordingly
Authori zati on Group : If the table needs to be maintained by only particular group of people, then the Authorization group needs to be f illed otherwise f ill it as NC. To maintain the authorization group ref er
to SU21.
Functi on group is the name to which the generated maintenance modules will belong to.
Generally Function Group name can be same as table name.
Mai ntenance screens: Maintenance can be done in 2 ways
1. Maintenance and Overview both on one screen
2. Maintenance on one screen and Overview on another screen.
Provide the desired screen numbers.
Af ter saving the changes, go to SM30 f or maintaining the table.
Modifications Available in Table Maintenance
The Function Group created will be having the code and screens used in maintenance.
We can alter the way Maintenance data and screens are viewed by making the appropriate changes in the Function Group and its screens.
Screen Al terati ons
Maintenance screen can be altered in a way that, if a f ield needs to be non-editable or def ault name appearing on the maintenance screen f or any f ield needs to be changed then f ollowing steps can be
used to do the same
Go To Environment -> Modif ication -> Maintenance Screens
7/14/2014 TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS 3/7

A f ield can be made non editable by simply unchecking that input checkbox f or that f ield.

So the maintenance screen will appear like the one below

7/14/2014 TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS 4/7
Similarly, the screen name of any of the f ields appearing on the maintenance window can also be changed by changing the Name on the layout window of that f ield.
Table Maintenance Events
The value to be displayed on the maintenance screen f or any f ield can also be altered as per the requirement like f or every new entry in the table one of the f ield should have the constant value appearing
automatically. For this purpose, the event needs to be chosen which perf orms the action. In this case event "05 creating a new entry".
List of Events available in Table maintenance
01 Bef ore saving the data in the database
02 Af ter saving the data in the database
03 Bef ore deleting the data displayed
04 Af ter deleting the data displayed
05 Creating a new entry
06 Af ter completely perf orming the f unction 'Get original'
07 Bef ore correcting the contents of a selected f ield
08 Af ter correcting the contents of a selected f ield
09 Af ter getting the original of an entry
10 Af ter creating the header entries f or the change task (E071)
11 Af ter changing a key entry f or the change task (E071K)
12 Af ter changing the key entries f or the change task (E071K)
13 Exit editing (exit main f unction module)
14 Af ter lock/unlock in the main f unction module
15 Bef ore retrieving deleted entries
16 Af ter retrieving deleted entries
17 Do not use. Bef ore print: Event 26
18 Af ter checking whether the data has changed
19 Af ter initializing global variables, f ield symbols, etc.
20 af ter input in date sub screen (time-dep. tab. /views)
21 Fill hidden f ields
22 Go to long text maintenance f or other languages
23 Bef ore calling address maintenance screen
24 Af ter restricting an entry (time-dep. tab./views)
25 Individual authorization checks
26 Bef ore creating a list
27 Af ter creation or copying a GUID (not a key f ield)
28 Af ter entering a date restriction f or time-dep. views
AA Instead of the standard data read routine
AB Instead of the standard database change routine
AC Instead of the standard 'Get original' routine
AD Instead of the standard RO f ield read routine
AE Instead of standard positioning coding
AF Instead of reading texts in other languages
AG Instead of 'Get original' f or texts in other languages
AH Instead of DB change f or texts in other languages
ST GUI menu main program name
AI Internal use only
For selecting the events f ollow the path as
Environment -> Modif ication -> Events
7/14/2014 TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS 5/7

Click on New Entries tab and Choose 05.

In f orm routine enter "FETCH_VALUE" and click on EDITOR.
7/14/2014 TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS 6/7

Go to the events and in the f orm routine: FETCH_VALUE, write the desired code:
Like : ZCHC_ORD_REL-SYUNAME= sy-uname.
Check the same by adding some entries through SM30:


1 Child Page
Add a Transaction to the Table with Table Maintenence Generator
No labels
4 Comments
Guest
Hi
I just wanted to know how to place cursor in a particular f ield (not the key f ield) if any error occur.
Thanks
Sourav
abhishek bansal
u can use GET CURSOR FIELD cursor_pos
above statement f ill the cursor_pos with the current location of cursor..
then use case statement to set the cursor in the desired f ield.
CASEcursor_pos.
WHEN 'FIELD1'
SET CURSOR FIELD 'FIELD2'.
ENDCASE.
7/14/2014 TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS 7/7
Guest
CAN you please reply me sir ..................
i want my abap editor code to come in color .
like exampe :
FORM ZNEW_REC .
ZCUST-DATEE= SY-DATUM.
ENDFORM .
in color
Abdullah nematullah
Hi,
Thanks a lot f or publishing this handy document. I like the simple detailing you have done. keep up the good work.
Thanks and regards,
Abdullah Nematullah.
Follow SCN
Contact Us SAP Help Portal
Privacy Terms of Use Legal Disclosure Copyright

Вам также может понравиться