Tuesday, April 28, 2020

User Exit in Sales Document

Business Requirement:  When user enters the Incoterm as FOB, Automatically shipping condition has to determine as 'Picking'. By default it will be as 'standard'.

VA01 is the t-code for creating a sales order, this uses standard SAP program SAPMV45A, the standard program will not have the functionality of determine the shipping conditions based on Incoterm.

As per the requirement, we need to find a suitable user exit for this and we need add additional code to determine the shipping condition based on incoterm.

 Technical information : Incoterm field is INCO1 (Table - VBKD) and shipping condition field name is VSBED (Table - VBAK).

Reference Document : SAP User Exit SD Processing

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

Step 1: Find the user exit.

Step 2: Verify the user exit.
Step 3: Implement the user exit.

Go to SE80 Tcode, Program name : SAPMV45A



















Click on Enhance button














Go to Edit -> Enhancement operations -> Show Implicit Enhancement Options


























Right click on the 'USEREXIT_SAVE_DOCUMENT_PREPARE' . Enhancement Operations -> Create Implementation. 



















Click on the Code option.

























Create a customized code and assign the transportable package.


























Write the code inside the enhancement block.
















Create a Sales order VA01, Enter the incoterm as FOB and save the document.
































Go to VA02 document, Check the Shipping condition in the shipping tab - Header.











No comments:

Post a Comment