Welcome, you seems to be new here. Get Connected: Become a Fan on Facebook Join ABAP Help on Google+ Subscribe to email X

Generic Object Services (GOS) Toolbar Part 8 : Disable Delete Function

Many times, I have received the request to disable Delete Function on Attachment list of the Generic Object Services (GOS) in SAP.

Option in question

This delete option on the GOS attachment list, is in the question.

GOS Attachment List Delete Option

Authorization Object S_GOS_ATT

Authorization object S_GOS_ATT was introduced in recent support pack releases. Check out the OSS Note 1293080 – GOS: Attachment list autorization object S_GOS_ATT for more information on which Support Pack contains this Authorization object. If you are on the latest support pack, this authorization object should exist in your system.

The object is available under Object class BC_Z – Basis – Central Functions. By setting up proper ACTVT field values in the Users Security Profile, we can control the Delete Access of the attachment. We can also control, who can change the attachment.

GOS Authorization object S_GOS_ATT

Workaround when Authorization Object is missing

When your system doesn’t have S_GOS_ATT object yet available, you may use this workaround.

Advertisement

In SAP, we have a BADI GOS_SRV_REQUEST which triggers before start of every service in GOS toolbar. This BADI is filter dependent. We have a FM GOS_ATTACHMENT_LIST_POPUP which also generates the Attachment List.

So, here what you need to do to achieve the workaround:

  1. Create BADI implementation for filter VIEW_ATTA
  2. In the implementation,
    • call the FM GOS_ATTACHMENT_LIST_POPUP to generate the Attachment list popup
    • Set the parameter IP_MODE as D for Display. This parameter drives which toolbar buttons would be active or inactive. So, setting it to display more will gray out Create, Change and Display.

Sample code snippet:

GOS BADI Implementation for GOS list

 
  DATA: lwa_object TYPE sibflporb.
  lwa_object-instid  = is_lpor-instid.
  lwa_object-objtype = is_lpor-typeid.
  lwa_object-catid   = 'BO'.
  CALL FUNCTION 'GOS_ATTACHMENT_LIST_POPUP'
    EXPORTING
      is_object = lwa_object
      ip_mode   = 'D'.    " Display
 

Get your Social On!

Stay Tuned with ABAP Help

Wanna say something?





=