Posts

Showing posts with the label Restricting line item delete using VA02

Restrict/Stop User From Deleting Line Items Of Sales Order Through Transaction (T-Code) VA02.

Image
Requirement is to Restrict / Stop User From Deleting Line Items Of Sales Order Through Transaction (T-Code) VA02. Say, user has created a sales order with say 2 line items via VA01 transaction. Save it. A new sales order gets created. In our case the sales order number is 3679. Now what user wants is he/she should not be able to delete both the line items from the sales order however if he/she wants to add a third line item or wants to delete a new line item which was not a part of sales order while creating he/she should be allowed to do so. So to achieve this requirement we will have to do an enhancement in Include Program MV45AFZB. Here you will find a user exit, USEREXIT_CHECK_XVBAP_FOR_DELET - This is the user exit where we will have to do the enhancement. SAMPLE CODE: DATA: v_lines TYPE i,              wa_ivbap LIKE LINE OF ivbap,           ...