01-30-2009 4:04 PM
We need to be able to block users from deleting sales order items. The objects V_VBAK_VKO and V_VBAK_AAT can be used at the 'order header' level but these do not prevent a user deleting an individual item in an order. Does anyone know of a way of achieving this through authorisations?
01-31-2009 2:16 AM
We had a similar requirement where the line items can only be rejected and not deleted and we created a Z auth object for it called ZSD_SPART that has activity field for delete ( 06 )
If we do not give them this activity even though they see the delete icon in VA02 they do not have access to delete it.
01-31-2009 2:16 AM
We had a similar requirement where the line items can only be rejected and not deleted and we created a Z auth object for it called ZSD_SPART that has activity field for delete ( 06 )
If we do not give them this activity even though they see the delete icon in VA02 they do not have access to delete it.
02-02-2009 1:20 PM
The authorization to delete the items is controlled by the actvt 02 for the objects mentioned in your post. Unortunately you would not want to restrict that as it would then block the entire change authorization for the sales order.
You may try to create an transaction variant using SHD0 and try hiding the delete button. I am not sure how effectively you would be able to achieve it.
Regards,
Subbu
02-02-2009 2:11 PM
Thanks for your responses. We have decided to use USEREXIT_CHECK_XVBAP_FOR_DELET in MV45AFZB with some code based on the AUTHORITY-CHECK syntax below:
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD pa_carr
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE e045(sabapdocu) WITH pa_carr.
ELSEIF sy-subrc <> 0.
MESSAGE e184(sabapdocu) WITH text-010.
ENDIF.
In our case we will reference object V_VBAK_AAT.