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: 

Disable 'Delete' button for posted invoices in GOS Attachment List

Former Member
0 Kudos

Hi,

when i open the attachement list of a generic object i see the attached files. In this dialog i want to disable the "Delete" ( attachment) button for Posted invoices ( In MIR4 tcode -> If the invoice is already posted it should not allow to delete the attachment )

I read oss notes and some ides of copying diverse classes but nothing really helps.

I found two badis

GOS_SRV_REQUEST

GOS_SRV_SELECT

but i dont know where we have to write our code .

I read so many posts related to attachments but all the places described about authoriztion object .

Can you please give some ideas to disable the delete button for posted invoices.

10 REPLIES 10

david_liu1
Advisor
Advisor
0 Kudos

Hello,

For GOS there is no SAP Standard authorization concept. The only way to

manage GOS authorizations is implementing it via custom code as

described in SAP Note: 491271.

Please have a look at the SAP notes:

491271 Authorizations for generic object services

701609 Authorizations for services: Final classes

For the use of S_OC_ROLE: this object states if a user is an office

administrator he can create, modify or delete every document, even

those created by other users. If the user is not an office admin, the

user is still able to create his own attachments.

Regarding to the issue, there is an role object S_GUI for upload.

To match your inquiry, pleaes find the user's role and active the

object S_GUI.

Regards,

David

0 Kudos

As per the below link

I tried to do the debuggin in the method

IF_CMD_HANDLER~GET_CMD_FOR_ITEM

Debugger is not stopping over there , can please suggest how we can disable the delete-function for cetain conditions

0 Kudos

Hi ,

Solution found ,

i have created a enhancement spot in

Class : CL_GOS_ATTACHMENTS

Method : IF_CMD_HANDLER~EXECUTE_ITEMS_CMD

So it is restricting the user to delete the attachement for posted invoices

0 Kudos

Hi

We have a similar requirement for controlling another object. Could you please provide details on how did you create Enhancement without modifying the Class-Method.

thanks in advance

0 Kudos

Hi,

Before calling the delete function i have created a enhancement spot in beginning of the method

1. In the enhancement spot first i have taken all the required values

2. check the condition whether the invoice is posted ot not

3. displayed a information message if the invoice is posted

0 Kudos

Hi,

Thnks for your solution.

I need particular TCODE Run time only This button disable .

Example A user run in Miro , MIR7 I want to disable this tcode. At the same time A is run TCODE MIR4 I want enable this

Button.

Please sugges me how to restrict this.

0 Kudos

Hi expert,

I have same requirement for disabling attachments delete button after PO completely released in PO's transaction. As per your information i tried class CL_GOS_ATTACHMENTS but its not triggering when i am using PO's transaction. Please guide me to solve this issue.

Regards,

Rathish

Former Member
0 Kudos

Found the solution

0 Kudos

how do you make it? Can you explain step for step, please?

Former Member
0 Kudos

HI vijay,

           Did u solved this,please,give me the solution .because i am also stuck up with this requirement,.disabling the change and delete buttons in the attachment list in gos based on authorization object .

regards,

krishna.,