Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Tell me the name of include program and User exit which run on PGI of VL02N

Former Member
0 Kudos

Hello...

Please Tell me the name of include program and User exit which run on PGI of VL02N(Outbound Delievery)

I run SAP -TCODE VL02N provide outbound delievery number. When I click on Post Goods Issue button, which exit get called? and In which include program I can write my code for enhancement?

5 REPLIES 5

Former Member
0 Kudos

Hi,

Use the BADI "LE_SHP_GOODSMOVEMENT" , method :"CHANGE_INPUT_HEADER_AND_ITEMS".

Regards

Vinod

Former Member

Hi Swapnil

USEREXIT_SAVE_DOCUMENT is called after the delivery is saved and USEREXIT_SAVE_DOCUMENT_PREPARE is called just before the save happens. So if you want to influence any custom fields PREPARE is the user-exit and any post save activites would have to be done in USEREXITSAVE_DOCUMENT. You may have to check for the OK_CODE or LIKP-WADAT_IST to see if the delivery save is just delivery change or PGI.

You have to write the code in include - MV50AFZ1

Form routine is USEREXIT_SAVE_DOCUMENT 

Within form routine ,keep the condition 

if sy-ucomm = 'WABU' or ' WABU_T'.
       *'Code'*
endif.

Edited by: Raj on Jul 27, 2010 3:23 PM

0 Kudos

Hello,

Right. I Wrote my code in same include and User exist. In MV50AFZ1

In MV50AFZ1-

In FORM userexit_save_document_prepare. -

In IF xlikp-lfart = c_zlf AND ( fcode = 'WABU_T' OR fcode = 'BACK_T' OR fcode = 'SICH_T'). Condition

**Code**

But Now I give break point before my coding and trying to execute PGI of VL02N.

Execution must be stop at breakpoint but I am getting error message. Execution not reach till break point. Why so? I am not done any changes anywhere else. Will you help me to understand this why so?

Error Info:

Document is incomplete: You cannot post goods movement @35\QLong text exists@

The batches are not defined for delivery item 000150 @5F\QNo long text exists@ FTBE01

Document is incomplete: You cannot post goods movement @35\QLong text exists@ FTBE01

Regards,

Swapnil.

0 Kudos

Fill the Batches for delivery item 150 and then check again it should post.. This is due to incompletness of the Sales document.

0 Kudos

Thanks I got my solution.