You are on page 1of 11

Quantity Rounding In Sales Orders

Applies to:
SAP ECC 5.0 and above.

Summary:
In SAP ERP system, rounding profiles can be used to fulfill special rounding requirements during execution of various logistical processes. Typical rounding requirement during sales order processing is to have the required products automatically rounded up or down so that ordered quantity is always in exact multiples of required UOM. Rounding profiles can be configured in SAP ERP system to provide static or dynamic product rounding during sales order processing. However, using standard SAP configuration, only one rounding rule or profile can be applied to a product. This article outlines how SAP ERP system can be customized to meet a requirement where a product needs to be rounded differently for different customers based on business rules. Here, I have described required configuration, custom development and process of maintaining rounding profiles. Author: Amit Kokane

Company: Deloitte Consulting LLP Created on: 09 January 2009

Author Bio:
Amit is a senior SAP consultant at Deloitte Consulting Enterprise Application practice. He is SAP centified professional with extensive SAP implementation experience in consumer business and manufacturing indutry space. He is focused on Order-To-Cash processes with expertise in multiple areas like Order Management, Pricing, Shipping, Billing and Transportaion.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 1

Quantity Rounding In Sales Orders

Table of Contents
Example Process Scenario.................................................................................................................................3 Rounding Activation ........................................................................................................................................3 Configuration ......................................................................................................................................................3 Create Dynamic rounding profiles ......................................................................................................................4 Master Data ........................................................................................................................................................7 Enhancement Design......................................................................................................................................9 Related Content................................................................................................................................................10 Disclaimer and Liability Notice..........................................................................................................................11

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 2

Quantity Rounding In Sales Orders

Example Process Scenario


Product X is set up with following units of measures: o Each (Base UOM) o Carton (Alternative UOM) = 12 Each o Palate (Alternative UOM) = 144 Each Customers are classified as Retail and Wholesale using a customer group field in customer master Sales orders for all customers are always entered and processed in base unit of measure Each Retail customers can only order product X in multiples of carton quantity Wholesale customer can only order product X in multiples of palate quantity For Retail customers If order quantity for product X is less than a carton quantity (less than 12 each) or not in exact multiples of carton quantity (12, 24, 36 etc.) then system should automatically round up the order quantity to meet the business requirement For Wholesale customers If order quantity for product X is less than a palate quantity (less than 144 each) or not in exact multiples of palate quantity (144, 288, 432 etc.) then system should automatically round up the order quantity to meet the business requirement

Rounding Activation
Configuration

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 3

Quantity Rounding In Sales Orders

Create Dynamic rounding profiles

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 4

Quantity Rounding In Sales Orders

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 5

Quantity Rounding In Sales Orders

Set up item category to allow rounding

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 6

Quantity Rounding In Sales Orders

Master Data Populate Material Master sales view with dummy rounding profile and maintain units of measure under additional data tab

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 7

Quantity Rounding In Sales Orders

Make sure that customer master is set up to allow the rounding

Create a custom Z table to define the required criteria - Sales Organization, Distribution Channel, Division, Customer Group and Rounding Profile

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 8

Quantity Rounding In Sales Orders

Sales Organization 0001 0002

Distribution Channel 10 10

Division 01 01

Customer Group 02 (Retail) 03 (Wholesale)

Rounding Profile ZCAR (Carton Rounding) ZPAL (Palate Rounding)

Enhancement Design
Use function Exit EXIT_SAPLMDR1_005 and enhancement MDR10001 During sales order processing, system will replace Dummy Rounding Profile ZDUM defined in Material Master with the appropriate rounding profile from Z table Additional processing logic can be used to ensure that this replacement does not happen if the Rounding Profile in the Material Master is NOT equal to dummy Rounding Profile ZDUM Processing Logic o Check if Material Master Rounding Profile CH_S_MVKE-RDPRF = Dummy Rounding Profile ZDUM if yes then continue else EXIT o Read Z table with Sales Organization (CH_S_KNVV-VKORG), Distribution Channel (CH_S_KNVV-VTWEG), Division (CH_S_KNVV-SPART) and Customer Group (CH_S_KNVV-KDGRP) o If an entry exists in Z table then populate field CH_S_RESULTS-RDPRF with Rounding Profile from Z table

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 9

Quantity Rounding In Sales Orders

Related Content
For further information, please go to http://help.sap.com and review SAP documentation. Also check out the SAP Community Network - https://www.sdn.sap.com/irj/sdn for articles, Wikis, and Forums.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 10

Quantity Rounding In Sales Orders

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP COMMUNITY NETWORK 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 11

You might also like