2018 Oct 25 7:41 AM
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/
2018 Oct 25 8:43 AM
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
2018 Oct 25 8:43 AM
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
2018 Oct 25 9:19 AM