12-18-2008 11:49 PM
HI All,
In ECC6, Generic Object doesn't do any authority checks anymore, but instead they give customization options where customer can add their own checks.
My requirement is to prevent delete on GOS while allow edits. I have done the following in adding customize auth checks:
1. Copied CL_GOS_SRV_ATTACHMENT_LIST to ZCL_GOS_SRV_ATTACHMENT_LIST
2. In ZCL_GOS_SRV_ATTACHMENT_LIST there is a method called: CHECK_STATUS. I overwrote with my check;
on_mode_changed( 'D' ). --- For display
on_mode_changed( 'E' ). --- For edit mode.
3. In SGOS tcode, added VIEW_ATTA to point to ZCL_GOS_SRV_ATTACHMENT_LIST
This works, but when set for display, it does not allow DELETE or CHANGE. But when set to edit, it allow both DELETE and EDIT.
My question is how can I fine tune and allow EDIT without Delete?
Thanks in advance,
12-19-2008 9:30 PM
I am not sure if this will work in ECC 6.0, but in ECC 5.0 we can check on authorization object S_OC_ROLE as this code checks for the autorization before deleting.
AUTHORITY-CHECK OBJECT 'S_OC_ROLE'
ID 'OFFADMI'
FIELD 'ADMINISTRATOR'.
Regards,
Naimesh Patel
12-19-2008 9:14 AM
Hi,
long ago i used badi GOS_SRV_SELECT to do something similar.
Have a look at this badi and check if it´s useful to you.
This might be useful as well:
Best regards.
Edited by: Pablo Casamayor on Dec 19, 2008 10:33 AM
12-19-2008 4:55 PM
Thanks, but I have tried GOS_SRV_SELECT and GOS_SRV_REQUEST.
In GOS_SRV_REQUEST, I added VIEW_ATTA in the attributes and tried to put in my custom code in START_SERVICE method. But I couldn't instantiate and call ATTA_LIST correctly, so it never linked to the right list of attachments. Also, I could only control the ATTA_LIST class through ON_MODE_CHANGED method. So again, its change/delete groupped together.
I have also tried GOS_SRV_SELECT. But I don't know what I can populate for ET_OPTIONS. Could any give me some examples?
12-19-2008 5:02 PM
I have a something similar issue so i added with new entry in the conext menu only EDIT and another one for DELETE. Please check this link
a®s
12-19-2008 10:23 PM
Thanks, I was reading your post and I couldn't figure out this step:
...
and then while calling the object CL_GOS_MANAGER filter out all except DELETE
When do you call CL_GOS_MANAGER and how do you filter out the DELETE?
I assume your suggestion is to remove: VIEW_ATTA CL_GOS_SRV_ATTACHMENT_LIST
from GOS, and then implement a VIEW and a DELETE seperately on the GOS?
I am not clear on how to implement the VIEW and DELETE and what class I need to call...
Any suggestion is appreciated.
12-19-2008 9:49 AM
Dear Charlie
Refer this URL
http://help.sap.com/saphelp_nw04/helpdata/en/5a/0e5e3ae8c5074ee10000000a114084/frameset.htm
Regards,
Flavya
12-19-2008 9:30 PM
I am not sure if this will work in ECC 6.0, but in ECC 5.0 we can check on authorization object S_OC_ROLE as this code checks for the autorization before deleting.
AUTHORITY-CHECK OBJECT 'S_OC_ROLE'
ID 'OFFADMI'
FIELD 'ADMINISTRATOR'.
Regards,
Naimesh Patel
12-19-2008 9:33 PM
Where did you put the authority check code? I'll try that.
Thanks,
Charlie
12-19-2008 9:53 PM
The authority code is already there in place.
Check
Class CL_MSG_AL_ITEM
Method EXECUTE
This is the code which is being executed whenever you do some action on the Attachment List.
Basically, we don't want to attach the autorization object S_OC_ROLE in the user profile for which we don't want to give the delete access.
Regards,
Naimesh Patel
12-19-2008 10:13 PM
I placed a breakpoint in CL_MSG_AL_ITEM under EXECUTE method where the auth check is done. It never stopped there when I try to delete an GOS object from the list.
I think ECC 6 might have changed that... sad...
04-09-2009 10:54 PM
I copied CL_GOS_ATTACHMENTS to ZCL_GOS_ATTACHMENTS.
Then changed out all appropiate reference from CL_GOS_ATTACHMENTS to ZCL_GOS_ATTACHMENTS.
In SET_TOOLBAR method, I de-coupled delete with change and checked authority object in case of delete.
That works!
12-15-2010 6:49 AM
Hi, Could you please advise on how to acheive the same functionality in ECC5.0 ?
Regards,
Vijayalakshmi
05-14-2011 12:21 AM
Can you explain in detail how you de-coupled delete with change? Is this in addition to your change in CL_GOS_SRV_ATTACHMENT_LIST.
Edited by: Kamala Tummala on May 14, 2011 1:21 AM