08-28-2007 9:41 AM
Hello,
When I create a URL link to an object, there is always a 'delete' button in the toolbar of the attachment list. Apparently, there are no authorization checks being made and everyone can delete this link.
Is it possible to remove this button from the toolbar? Or at least making sure that not everyone can delete the link?
Thanks!
08-30-2007 2:39 AM
Hi Dave,
there are some BADI's that help you do this. Check OSS note 491271 for how to do this on specific basis releases.
Cheers
Graham
08-28-2007 1:40 PM
you can see in method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS of class CL_GOS_ATTACHMENT_LIST that the delete button is always displayed
I'm afarid there is no simple solution...
08-28-2007 2:20 PM
I couldn't find it, but I'm pretty sure there's a note related to this.
Rob
08-28-2007 3:25 PM
Hi,
I think you are using CL_GOS* class for this. then
module call_gos_attachment output.
"<< I have created a authorisation object and
" and called here if user have only display or change
" access then the ip_mode will get value passed
" accordingly
if ( sy-tcode eq c_yars2 or sy-tcode eq c_yars3 ).
i_borident-objtype = 'YARS_ATTA'.
i_borident-objkey = yarshdr-docno.
create object gos_manager
exporting
is_object = i_borident
it_service_selection = i_services
ip_no_commit = ' '
exceptions
object_invalid = 1.
else. " Display Mode
i_borident-objtype = 'YARS_ATTA'.
i_borident-objkey = yarshdr-docno.
create object gos_manager
exporting
is_object = i_borident
it_service_selection = i_services
ip_mode = 'D' "<<<<<< Check for display mode
exceptions
object_invalid = 1.
endif.
endmodule. " Call_gos_attachment Output
or if this suit your need then
create object gos_view
exporting
ip_mode = 'D'. " <<<<Display Mode
* Start GOS Service for attachement view
i_viewobj-objtype = 'YARS_ATTA'.
i_viewobj-objkey = yarshdr-docno.
call method gos_view->start_service_direct
exporting
ip_service = 'VIEW_ATTA'
is_object = i_viewobj.
This i have done it for one of the custom Generic object, i think this one will help you out.
a®
08-30-2007 2:39 AM
Hi Dave,
there are some BADI's that help you do this. Check OSS note 491271 for how to do this on specific basis releases.
Cheers
Graham
08-30-2007 10:43 AM