How to Determine Multiple Delivery Types for a One Sales Document Type

January 2, 2018 | Author: Anupa Wijesinghe | Category: Computing, Technology, Computer Programming, Software, Areas Of Computer Science
Share Embed Donate


Short Description

When you create a delivery note with reference to a sales order in SAP, the delivery type is determined based on the con...

Description

Contents Introduction .................................................................................................................................................. 2 Manually switch the delivery type in VL01N ............................................................................................ 3 Pre-requisites ........................................................................................................................................ 3 Switch the delivery type via a user exit .................................................................................................... 4 Pre-requisites ........................................................................................................................................ 5

Introduction When you create a delivery note with reference to a sales order in SAP, the delivery type is determined based on the configuration you have done in the sales document type customizing. You can see it in the below IMG path: Sales and Distribution / Sales / Sales Documents / Sales Document Header / Define Sales Document Type

Field "Delivery Type" under the section "Shipping"

During delivery note creation, if you have maintained correct copy control settings, system will automatically determine this delivery type for the delivery document. Now let's say, you need to determine a different delivery type (Eg: ZLF) for same sales document type. This cannot be done automatically via standard configuration. But it is possible to switch the delivery type during delivery creation in the transaction VL01N. But this feature is not available in any other delivery creation transactions such as VL10A, VL10C, etc.

Manually switch the delivery type in VL01N Pre-requisites You should maintain the relevant copy control settings from the sales document type to the required delivery type. IMG Path:

Eg:



Now during delivery document creation, you can manually specify the delivery type under the field "Delivery Type" in the section "Predefine delivery type"

Once this field is specified, system will take this as the "Delivery type" relevant for your delivery document.

But this has its own risks, such as;   

Higher possibility of not specifying the relevant delivery type, therefore creating delivery notes with wrong delivery type This field is only available in the transaction VL01N. Therefore for it is not possible to use this functionality in transactions like VL10A, VL10C, Etc Batch job scheduling is not possible with this field as it is only available for VL01N

Switch the delivery type via a user exit Due to above limitations you can implement below enhancement to switch the delivery type automatically based on a pre-defined criteria.

Pre-requisites As mentioned above, sales document type to delivery type copy control settings must be completed. 

Then you need to specify the delivery type determination criteria in a customer table (Z), such as;

As per above example, if sales document type = OR, Shipping point = A300, then Delivery type should be "ZLF" 

Now you need to include an ABAP code to switch the delivery type in the below user exit; o Include - MV50AFZ1 o User Exit - USEREXIT_MOVE_FIELD_TO_LIKP



Ask your ABAP developer to switch the value in the field "LIKP-LFART" based on the entries in your custom table. For example, you can see how it comes during debugging;





Now let's change the value to "ZLF" using



Now if I execute it, system will create my delivery using delivery type "ZLF"

-> This is what ABAP code should do

This user exit is called even within "VL10X" transactions. Therefore, it is possible to achieve same outcome in background processing as well! Refer below SAP note for more details on the user exits available in delivery processing 

SAP Note 415716 - User exits in delivery processing

Author: Anupa Wijesinghe E-Mail: [email protected] / [email protected] 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.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF