How to Determine Different Number Ranges for Sales Orders Based on the Sales Organizaton

September 16, 2017 | Author: Anupa Wijesinghe | Category: Information Retrieval, Technology, Computing, Data, Areas Of Computer Science
Share Embed Donate


Short Description

As the number range is assigned to the sales document type, you cannot determine different number ranges for the same sa...

Description

Contents Introduction .................................................................................................................................................. 2 Requirement ................................................................................................................................................. 3 Solution ......................................................................................................................................................... 3 Technical Data ............................................................................................................................................... 4

Introduction Document numbers for sales orders in SAP are triggered via the number range assigned to sales document type in the IMG path: SPRO -> Sales and Distribution / Sales / Sales Documents / Sales Document Header / Define Sales Document Type.

This number range (Eg: "01") is defined under the IMG path: SPRO -> Sales and Distribution / Sales / Sales Documents / Sales Document Header / Define Number Ranges for Sales Documents

Requirement As the number range is assigned to the sales document type, you cannot determine different number ranges for the same sales document type in different sales organization. For example, if you have two sales organizations in the system and you want to have two different number ranges for sales document type "OR" for those two sales organizations, then SAP standard number range setting cannot be used directly. But this is possible via use exits in the sales order creation.

Solution 

First you need define number ranges per each sales organization under below IMG path:



Then you have to design a custom table (Let's say "ZSONORANGE") which can be maintained via the transaction SM30 with below columns. o Sales Document Type (AUART) o Sales Organization (VKORG) o Number range (NRRANGENR)

 

Using transaction SM30, now you can define the number ranges for each sales document type for each sales organization. Now you need ABAP help to code the sales order user exit to trigger this table to determine the number range based on the sales organization / sales document type combination o Include - MV45AFZZ 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 sales order 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 sales organization / sales document 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.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF