Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

GOS functionality disable Delete button

0 Kudos
4,412

Is there a possibility to disable ONLY the Delete attachment button on GOS (Generic Object Services)? I've tried with the BADI implementation GOS_SRV_REQUEST (from the source below), but this disable also the New and Change options.

http://zevolving.com/2012/01/generic-object-services-gos-toolbar-part-8-disable-delete-function/

1 ACCEPTED SOLUTION

maheshpalavalli
Active Contributor
1,645

In ideal scenario you don't want to remove 'Delete' option without removing 'Edit'. So considering your case, I've checked for the badis and the standard code and came to conclusion that you cannot do it in a standard way. But there is one way, you can replace the standard class with custom class, but still there will a hell a lot work you have to do for that in order to work.

Simple way is create an implicit enhancement in class: CL_GOS_ATTACHMENTS and method: SET_TOOLBAR at the end and remove the delete toolbar or pass 'X' in disable field. But implicit enhancements are not the best solution, so you decide and implement accordingly.

Best Regards,
Mahesh

2 REPLIES 2

maheshpalavalli
Active Contributor
1,646

In ideal scenario you don't want to remove 'Delete' option without removing 'Edit'. So considering your case, I've checked for the badis and the standard code and came to conclusion that you cannot do it in a standard way. But there is one way, you can replace the standard class with custom class, but still there will a hell a lot work you have to do for that in order to work.

Simple way is create an implicit enhancement in class: CL_GOS_ATTACHMENTS and method: SET_TOOLBAR at the end and remove the delete toolbar or pass 'X' in disable field. But implicit enhancements are not the best solution, so you decide and implement accordingly.

Best Regards,
Mahesh

1,645

thanks. It works well for me.