‎2007 Feb 22 4:33 PM
Hi All,
I have a requirement like I need to from a maintenance view of custom table i.e. Ztable I need to remove the Delete button from application tool bar? Is there any way to achieve this thing so that user cant able to delete the existing records in the data base? if any sample code is there r where i need to do the modification in the function group related to this table maintenance view.
Thanks In Advance
‎2007 Feb 22 4:37 PM
Hi,
You can create a maintenance view in SE11 for the custom table..
GO to SE11
Give a view name ZVIEW_TABLE.
Press create..
In the popup choose maintenance view..
In the table/join conditions tab give the table name..
In the view flds tab give the fields that you want..
<b>In the Maint. status tab Choose the radio button "Read and change"</b>
Save and generate the view..
Now in the menu..UTILTIES -> TABLE MAINTENANCE GENERATOR..
Generate the TM..
After generating go to SM30..
Give the view name..
You will not get the delete button...
Thanks,
Naren
‎2007 Feb 22 4:44 PM
thanq for u r replay Mr Narendran
but i was already created the table maintenance generator and i am able to view that in SM30 transaction my problem is when user go to change mode i need to restricts him not to change existing records for this i am planning to degrade the delete button. is there any way to do this.
‎2007 Feb 22 4:56 PM
Hi,
If you don't want to create another TM, then you can give an error message in PAI if the user presses the delete button..I am not sure how to suppress the delete button other than using MAINTENANCE VIEW...
Thanks,
Naren
‎2007 Feb 22 5:08 PM
‎2007 Feb 23 9:43 AM
There are two options:
1. Database view.
While creating the view, choose "database view" instead of maintenance view. This is used on for display purposes and not for changing or delete.
2. Or in the maintenance view, you can use events like before save event "01", which you can use to check for action = 'X' , which means "Delete". And restrict such actions by giving an error message & setting vim_abort_Saving = 'X'.
‎2007 Feb 23 9:59 AM
Best way is to use
option "read and change" form the tab "Maint.Status" in the maintenance view.
This allow only to "Read and Change" but not delete.
‎2007 Feb 23 10:00 AM
After you change to "read and change" do not forget to re-generate the maintenance view in "Expert Mode".
‎2007 Feb 26 9:02 AM
hi..
hava a look on this tcode SE54.
this may be helpful, i think.
shamim.