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: 

Disabling Delete button from service attachement of ME53N

Former Member
0 Kudos

Hi All,

I am working on a requirement where i need to disable DELETE and ATTACH icons of ME53N-->Services for Object-->Attachment List.

These two icons should be made in display mode for the Purchase Requisitions which are released.

I tried creating a z authorization object and the copying the standard class CL_GOS_SRV_ATTACHMENT_LIST and further assigning the custom class in SGOS transaction.

This method didn;t give me the solution.

Has anyone worked on such requirement ?????

Please let me know your tips for this requirement.....

Regards

Pavan

1 ACCEPTED SOLUTION

arindam_m
Active Contributor
0 Kudos

Hi,

Check the below document. May be helpful to your requirement.

http://scn.sap.com/docs/DOC-33485

Cheers,

Arindam

12 REPLIES 12

arindam_m
Active Contributor
0 Kudos

Hi,

Check the below document. May be helpful to your requirement.

http://scn.sap.com/docs/DOC-33485

Cheers,

Arindam

0 Kudos

Hi Pavan,

Did you try with BADI gos_srv_select & it's method?

Search for information in google.

Also check this link & sap notes for help

http://scn.sap.com/thread/902269.

Thanks

Gourav.

Former Member
0 Kudos

Hi Kumar,

I have created implementation for GOS_SRV_SELECT and written this code.

if is_lpor-typeid = 'BUS2105'.

       ls_option-sign = 'E'.
ls_option-option = 'EQ'.
ls_option-low =  'VIEW_ATTA'.

append ls_option to et_options.

endif.

But with this code, the 'attachment list' itself is disappeared from ME53N.

My requirement is to disable 'Delete' button in the attachment list for the Purchase Order which has release indicator '2'.

Can you help me what to code for this requirement?

Regards

Pavan

0 Kudos

Hi,

Have a look at kesav's reply in this thread

http://scn.sap.com/thread/3250145

Thanks

Gourav.

Former Member
0 Kudos

Hi ,

you need to get GET_GOS_MANAGER of interface class CL_PO_HEADER_HANDLE_MM.

then u can use method SET_RW_MODE - SGOS: Display/Change Mode of Generic Object Services

lets check.

Prabhu

0 Kudos

Hi ,

get lo_gos class instance from program LMEGUICJJ(SAPLMEGUI) then call method SET_RW_MODE.

it should work.

Prabhu

0 Kudos

Hi Prabhu,

Should the method SET_RW_MODE be called in the GOS_SRV_SELECT's implementation?

Regards

Pavan

0 Kudos

0 Kudos

Hi Pavan ,

in your case you cant implement badi GOS_SRV_SELECT bcos  you need to check the PR document status.

so i think you need to use PR badi ME_PROCESS_REQ_CUST or something  then you need to get access to gos manager of that document( can ref my prev comments).

once you have gos manager then u call SET_RW_MODE or get access to gp_model the change attributes of gp_model {O:216*\CLASS=CL_GOS_TOOLBOX_MODEL}-GP_MODE = 'D' Display.

i have checked it debug mode and its working fine with me , so try at your end and let me know if have any more doubts.

Regards

Prabhu

0 Kudos

Hi Nabneet,

Thanks for your Help..

As per your link, the Delete, Change and Create buttons are made as Display mode.

1. Our requirement is to make only Delete and Change icons as Display mode... (Here even 'Create' icon is also getting into display mode...)

2. This functionality should be activated for the Purchase Orders which has Release Indicator '2'.

3. This functionality should be activated for certain users only.

Please help me...

Regards

Pavan

0 Kudos

Hi Pavan

Please find below the solution detail. I have debugged and checked it it debugging.

  • In class CL_GOS_ATTACHMENTS there is a method name MODIFY_BROWSER_SETTINGS.
  • You have make an enhancment as post method that is before the method is called.
  • In that method put a check of tcode etc since this class is used for other things also.
  • The ok code of buttons to be excluded needs to be added to LO_SETT-GT_TOOLBAR_EXCLUDE and removed from LO_SETT-GT_TOOLBAR_CUSTOM
  • Once the data contents are modified call the below mentioned code in POST method. Please note you will need create an instance of LO_SETT as it is happening in MODIFY_BROWSER_SETTINGS method(Just copy the same code and before calling below mentioned method remove the button code which you dont want to display)

 

CALL METHOD go_browser->set_custom_browser_settings
EXPORTING
io_sett = lo_sett.

I know its little bit complex but you will have control over all buttons.

thanks

Naheet

arindam_m
Active Contributor
0 Kudos

Hi,

Have you checked this:

CL_BINARY_RELATION=>READ_LINKS

It gives you the list of attachments.Also there is a BADI GOS_SRV_REQUEST which triggers before start of all services in GOS. Check this BADI in SE18.

An easier way might be possible depending on your release. Check if there is a Authorization object that can achieve this filtering. The object name is S_GOS_ATT. Check SAP note 1293080. You can check with your basis team. In that there is field ACTVT by setting values in the User profile you can control the Attachment access.

Cheers,

Arindam