Hi,
What you can do is you can completely remove the Create attachment option from the pop up.
You can implement the badi "GOS_SRV_SELECT", add the below code in the Method SELECT_SERVICES.
Add the below logic in that.
IF sy-tcode = 'ME21N' OR
sy-tcode = 'ME22N' OR
sy-tcode = 'ME21' OR
sy-tcode = 'ME22'.
DATA: ls_option TYPE sgos_sels.
ls_option-sign = 'E'.
ls_option-option = 'EQ'.
ls_option-low = 'PCATTA_CREA'.
APPEND ls_option TO et_options.
ENDIF.
Activate the badi, as this Badi will triiger every time the GOS toolbar is displayed, we need to restrict based on the tcodes being used.
Or
You can use Badi "GOS_SRV_REQUEST" to disable creation of attachment once the Create attachment is clicked.
This badi is a filter dependant badi, so add filter as "PCATTA_CREA", add the below code in that,
IF sy-tcode = 'ME21N'OR
sy-tcode = 'ME22N'OR
sy-tcode = 'ME21' OR
sy-tcode = 'ME22'.
DATA: lwa_object TYPE sibflporb.
lwa_object-instid = is_lpor-instid.
lwa_object-objtype = is_lpor-typeid.
lwa_object-catid = 'BO'.
CALLFUNCTION'GOS_ATTACHMENT_LIST_POPUP'
EXPORTING
is_object = lwa_object
ip_mode = 'D'. " Display
ENDIF.
Thanks & Regards
Bala Krishna
Message was edited by: Bala Krishna