You are on page 1of 3

Introduction

Some time back we discussed about how to prevent delivery document deletion in the system. (Click
here to view it). But in some businesses it is often requested to keep this functionality available for
users, but track the deletion of delivery notes. This is similar to a system audit on delivery document
deletion.

There is no such standard functionality available for this in SAP. But you can achieve this via below
mentioned user exit coding.

ABAP coding required

When a delivery document is deleted, the ABAP code goes through below user exit. Therefore you have
to ask your ABAP developer to fill all required values in to a custom table (Z table). Later you can
generate a report out of that table.

 Include - MV50AFZ1
 User Exit - FORM USEREXIT_DELETE_DOCUMENT

Let's try it out in the debug mode and see what data is available in this user exit.

 I will delete a delivery document using the menu option -> Outbound Delivery / Delete

 System will pop up the confirmation message as follows;
Choose "Yes" to the pop up

 Since there is a break point in the above mentioned user exit, the debugger is starting. Here you
can see the required data can be populated as follows;

 Details of the delivery note (Item Data) can be extracted from relevant structures
Ask your ABAP developer to fill required fields in to a Z table.

 Create a query or a ABAP report to view the output out of that table

Author: Anupa Wijesinghe

E-Mail: anupaw@gmail.com / anupaw@learnsaptips.com

Website: www.learnsaptips.com

View my profile in LinkedIn

Follow me on Twitter

Disclaimer

This article is done based on my research and readings, unless otherwise stated. The views expressed
are my own and not of anyone else.
Author accepts no liability for the content of the articles in this website or for the consequences of any
actions taken on the basis of the information provided. Using this information is at the users own
discretion and responsibility.