cancel
Showing results for 
Search instead for 
Did you mean: 

Deletion of Sales Order Items

Former Member
0 Kudos

(Have also posted this on Security forum but hope someone on here can help)

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?

Accepted Solutions (1)

Accepted Solutions (1)

Lakshmipathi
Active Contributor
0 Kudos

Dear Peter

Following are some of the sale order user exits which you can make use of to achieve your requirement.

- User exits in the program MV45AFZZ - USEREXIT_READ_DOCUMENT

- User exits in the program MV45AFZZ - USEREXIT_SAVE_DOCUMENT

- User exits in the program MV45AFZB - USEREXIT_CHECK_VBAP

Tell the logic to your ABAPer and ask him / her to write a code in any of the above user exits which can definitely be achieved.

thanks

G. Lakshmipathi

Answers (1)

Answers (1)

0 Kudos

Hi Peter Andrew,

For that use the exit USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_CHECK_VBAP, you need to add the logic in both exit to ensure to cover all bussines case.

Thanks,

Mariano.

Former Member
0 Kudos

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.