Document numbers for delivery documents in SAP are triggered via the number range assigned to delivery document type in ...
Contents Introduction .................................................................................................................................................. 2 Requirement ................................................................................................................................................. 3 Solution ......................................................................................................................................................... 4 Technical Data ............................................................................................................................................... 5
Introduction Document numbers for delivery documents in SAP are triggered via the number range assigned to delivery document type in the IMG path: SPRO -> Logistic Execution / Shipping / Deliveries / Define Delivery Types
This number range (Eg: "17") is defined under the IMG path: SPRO -> Logistic Execution / Shipping / Deliveries / Define Number Ranges for Deliveries
Requirement As the number range is assigned to the delivery document type, you cannot determine different number ranges for the same delivery document type in different shipping points. For example, if you have two shipping points in the system and you want to have two different number ranges for delivery document type "LF" for those two shipping points, then SAP standard number range setting cannot be used directly. But this is possible via use exits in the delivery creation.
Solution
First you need define number ranges per each shipping point under below IMG path:
Then you have to design a custom table (Let's say "ZDELNORANGE") which can be maintained via the transaction SM30 with below columns. o Delivery Type (LFART) o Shipping Point (VSTEL) o Number range (NRRANGENR) Using transaction SM30, now you can define the number ranges for each delivery type for each shipping point. Now you need ABAP help to code the delivery user exit to trigger this table to determine the number range based on the shipping point / delivery type combination o Include - MV50AFZ1 o User Exit - FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
Here you need to include an ABAP code, which can select the correct number range from the mentioned Z table. If you have the correct code there, during delivery document saving, system will trigger this user exist and find the relevant number range based on the entries in the Z table. This will enable you to determine different number ranges based on the shipping point / delivery type combination.
Technical Data All number ranges are stored in the table “NRIV”
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.