100% found this document useful (1 vote)
201 views4 pages

SAP Delivery Order Storage Check

The document describes implementing a user exit in SAP to check if a storage location is a space when creating a delivery order. It involves finding the suitable user exit called USEREXIT_SAVE_DOCUMENT_PREPARE, verifying it by setting a breakpoint, and then writing code inside the form to check if the storage location field is initial and display an error message if so. The access key is required from SAP to implement the user exit.

Uploaded by

royjoy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
201 views4 pages

SAP Delivery Order Storage Check

The document describes implementing a user exit in SAP to check if a storage location is a space when creating a delivery order. It involves finding the suitable user exit called USEREXIT_SAVE_DOCUMENT_PREPARE, verifying it by setting a breakpoint, and then writing code inside the form to check if the storage location field is initial and display an error message if so. The access key is required from SAP to implement the user exit.

Uploaded by

royjoy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Business Requirement: When ever business user creates a delivery order, the standard SAP

application dose not check for storage location (whether it is space or not ), if it is space it should
raise a error message.
VL01 is the t-code for creating a deliver order, this uses standard SAP program SAPMV50A, the
standard program don`t check for storage location equal to space or not.

As per the requirement we need to find a suitable user exit for this and we need add additional
code to check storage location.

Technical information : Storage location field is LGORT and it is available in LIPS table.

To implement the user exit for this we need to follow the below steps.

Step1: Find the user exit.

Step2: Verify the user exit.

Step1: Implement the user exit.

Find the User exit

Go to transaction VL01N, System-Status

A pop up will open ans double click on program name.


Click on Find icon, select main program, find 'userexit' and press enter.

You will find number of performs.


Verify the user exits for suitable exit

Choose some exits based on descriptions .


You'll have to roughly decide which is the correct user exit routine to used. So, For my
requirement I used the below user exit.

USEREXIT_SAVE_DOCUMENT_PREPARE : Use this user exit to make certain changes or


checks immediately before saving a document. It is the last possibility for changing or checking
a document before posting.

So,Double click on the user exit FORM USEREXIT_SAVE_DOCUMENT_PREPARE, put


break-point inside the form.

Now go to table LIPS, display, get a deliver no and go to VL02N (T-code for changing deliver
order), provide delivery order no and enter.

Cahnge any value ex: delivery quantity and save.


click on Save (Ctrl S), debugger will open..now this is the suitable exit.

Implement user exit

To implement user exit we need access key from SAP, when we get access key from SAP, write
below code inside from.
If lips-lgort = ' ' . "check if storage location is initial
Message 'Storage location is mandatory field' TYPE 'E'. "error message
Endif .
Save, Activate and test.

You might also like