Supply chains, especially retail supply chains, have specific requirements in the area of logistics lot sizing to not only improve the use of transportation resources but also to facilitate material handling. See some standard and simple custom rounding methodologies in Available-to-Promise functionality that can help make deliveries to the sales orders logistics compliant, thereby achieving a cost-efficient supply chain.
Key Concept
Supply chains can be made more cost-efficient by constraining fulfillment of sales orders and stock transport orders using rounding strategies. For example, if a supply chain organization ships in quantities of 24 and a customer orders 25, then the extra item would be automatically removed from the order by rounding it down to the closest shipping quantity. Based on pre-agreements with customers, the quantity of both ordered and confirmed quantities can be rounded up or down or true-rounded (rounding up or down based on the closest rounded unit). Once the order is made rounding compliant, it is easier to logistically manage since most of the material handling equipment presumes a certain lot size. This is true throughout the fulfillment process, from shipping an order out from a plant to a distribution center, to loading it on a truck or picking it up, to putting away in warehouse. Logistical costs per unit come down, and such cost savings can be passed on to the customer in a process known as SLOG — streamlined logistics pricing. In industries such as the consumer packaged goods (CPG) industry, companies have the option of ordering stocks in various units of measures that may not always be logistically convenient to manage. As a result, such orders have to be managed in terms of lot sizing or rounding to create optimal shippable units of measure. An SAP system provides several different ways to manage rounding functions in your supply chain, which I cover in detail. These methods can help optimize logistical functions such as transport load building and transportation management. Existing documentation does not cover this topic comprehensively, and information about the process is distributed across disparate module level documentations.
The benefits of lot sizing confirmations in sales orders include bringing down material handling and management costs. In a sales order you have the ordered quantity, which is what is ordered by the customer for fulfillment, and the confirmed quantity that is actually available in inventory. The confirmed quantity can also be rounded or lot-sized just like the ordered quantity. For example, a customer orders 100 units, but the company only has 84 units in the warehouse, and the lot size is 10 units. Thus the confirmed quantity would be rounded down to 80 units in this case. Following are some features of lot-sizing confirmations in a customer sales order.
- By basing the rounding of a quantity in a sales order confirmation on its unique customer requirements, you free up unrounded quantities of inventory that can then be made available for other, smaller customers who are placing smaller orders. For example, you have 86 units of a specific stock keeping unit (SKU) in a warehouse. A big customer expects a lot size of 10 units while a mom-and-pop store expects a lot size of five units. In such a scenario if both customers have ordered 100 units, you can satisfy the big customer up to 80 units, while the smaller customer at least gets five units. Thus it improves the service levels of the supply chain for both smaller and larger customers.
- Having an effective customer-based rounding strategy combined with a pricing strategy is an incentive to the customer to order in more aggregate units of measures that are easier to manage logistically. The resulting cost savings can be passed on to customers. An organization can do a cost-benefit analysis of both scenarios — having a customer order either in rounded units or unrounded shippable units — and then decide whether to reduce the price per unit.
- Shipment of orders with larger lot sizes is easier, which helps optimize loading, moving, handling, packaging, and unloading materials. There are economic benefits of scale with larger lot sizes, as the cost per unit of all overheads in the supply chain effectively reduces.
SAP ERP Central Component (SAP ECC) offers different ways of doing rounding. However, such functions are usually meant for ordered and delivered quantities. In an integrated environment in which global Available-to-Promise (global ATP) in SAP SCM is used for confirming a sales order, or even if the ATP engine in SAP ECC is used for rounding, it is imperative to adapt the rounding strategy that provides this intervention at all stages of an order’s life cycle.
The rounding function can be configured at different levels of control such as ship-to, sold-to, shipping plant, shipping condition, sales organization, or even the material to be shipped. Global ATP offers advanced ways of rounding a confirmed quantity in a sales order at the time of the ATP check, thereby improving parameters in a sales order (e.g., for downstream activities such as transportation planning and distribution).
Note
There is light ATP functionality in SAP ECC, and very deep ATP functionality in global ATP in SAP SCM. Global ATP offers powerful rounding features in some of the latest releases.
One such example is allocation, when customers of the supply chain organization are made aware of supply shortages. In this case, pricing at the confirmed quantity could discourage customers from ordering more than they are authorized to order. In an equitable selling strategy (i.e., one that treats all customers — whether large or small — the same) such a strategy is effective and achieved technically by anchoring all quantity calculations via the confirmed quantity in the sales order. This is particularly important in situations in which a supply shortage occurs.
Rounding in SAP ECC
Now I’ll delve into the options available for rounding an order in SAP ECC and global ATP. Based on specific logistics and technical implementation requirements, you can select either a standard or custom approach.
Standard Options in SAP ECC
In SAP ECC, you define rounding configurations at a Sales Org View of a material plant (Figure 1). Use transaction code MM02 and then click the Sales Org 1 tab.

Figure 1
Rounding profile at the sales organization view in the material master in SAP ECC
The minimum order quantity, which is defined for all customers ordering through the sales organization, shows up in the order. It is possible to configure the system to either reject the sales order or put the order on a delivery block in case such a minimum order is not respected by the customer. In almost all cases a minimum delivery quantity is defined as being equal to the minimum order quantity.
SAP provides the capability to define minimum delivery quantity separately to make sure that the order is not fulfilled if the availability of inventory is not enough to meet the requirements of shipment planning. Usually shipment planning is done based on delivery quantity; however, it can also be done on ordered quantity. The delivery unit can be further lot-sized using a specific unit of measure. The rounding profile also can be used to lot-size on an incremental basis from the minimum quantity. For example the base quantity can be 50 units with an incremental lot-sizing of 5 units. Thus an order for 49 units is rounded to 0, while an order with quantity of 59 units is rounded to 55.
Although this functionality in SAP ECC can be useful, there are some drawbacks, particularly when you compare it to global ATP in SAP SCM. Some possible issues with following a rounding strategy in SAP ECC are:
- Following a customer-centric approach is not possible. Since all customer orders roll up to one sales organization, you cannot plan a bigger lot size for larger customers and a smaller lot size for smaller ones. A one-size-fits-all logistics-oriented approach may not be effective for a customer-oriented supply chain.
- In the SAP ECC system, rounding an order is independent from the confirmation process, and is based on inventory positions and prioritization strategies. In a supply-crunch situation, you might want to follow a fair-share strategy and prioritize the inventory across different demand segments. Thus each order could have a different level of confirmation. However, in this scenario it is not possible to devise your logistical plan effectively since such a confirmation could be unrounded unless complex customizations are done. For example, say you have an order for 100 units and you have 84 units available in inventory, and 10 units constitute a rounded shippable unit. The initial unrounded quantity, based on availability, is 84 units. Due to the rounding logic, this figure would be rounded down to 80 units. In a sales order, while the ordered quantity is 100 units, the confirmed quantity (which I refer to in this section as confirmation), is 80 units. The purpose of this rounding is to drop a logistically-compliant order to the warehouse leading to dollar savings.
Custom Options in SAP ECC
Many CPG companies handle a variety of SKUs at different nodes in the supply chain network. They also have a variety of arrangements with their customers. Therefore the standard configuration options in SAP ECC might not meet their business needs and they would require other more meaningful parameters.
One solution is to create custom tables with exceptions at different levels of parameters in the sales order (i.e., sales organization, source plant, ship-to customer, sold-to customer, material, distribution channel, division, and even mode of transport) starting from the most specific to the most generic.
These tables are used to look for customer-specific rules (or generic business rules if there are no customer-specific rules), to change quantities in the sales order. Those changes streamline the sales order or logistics. Sales organization, for example, is a generic high-level element in a sales order fulfillment process, while custom ship-to is a detailed element in this process. You can configure business rules at different levels to manage orders in a more systematic manner (e.g., you could have customer exceptions starting at the customer-sales area level and then look for exceptions at the material-plant level).
Table 1 shows various ways of controlling rounding based on the specific business situation. For example, there may be supplying plants that have specific material equipment that can handle SKUs in pallets only. In that case, you want rounding logic in the sales order to abide by that restriction. For price discount purposes, big retailers would want to order SKUs in layers (a collection of pallets). In that case such business rules can be to set up at a customer-specific level. You can automate these business rules so there is little or no need to manually convert a customer-given sales order to a rounded sales order, which is easier to manage logistically.

Table 1
Condition technique, similar to the Z_table level of controls on rounding
You can round at the requested order quantity level or at a confirmation quantity level. Based on an organization’s specific order management strategy, they may choose one strategy over another. Since the requested quantity is passed to the ATP engine in the end, it directly influences the outcome of confirmation via the confirmed quantity. There are two options for achieving this. Option 1 refers to the rounding at the requested quantity while Option 2 refers to the rounding at confirmation quantity.
Option 1: Customer-Centric Approach
It is possible to follow a customer-centric approach at the time of order acquisition. To achieve this, you have to deploy the implementation of user exit MV45AFZA (USEREXIT_MOVE_FIELD_TO_VBAP). This user exit influences field VBAP-KWMENG so that it is lot-sized to the appropriate customer unit of measure. It is also advisable to code for any delivery block requirements in this exit. For example, an order could be placed under a custom unrounded quantity delivery block in case the customer has not placed the order in the right unit of measure.
However, this process is manual and may not be advisable in the interest of automation, unless the business process demands it. For example, in some situations you might want to constantly reaffirm the need to place orders in a rounded quantity with the ordering customer. You could then place delivery bocks so that customer service organization representative is able to reiterate and train customer counterparts on how to place a sales order. You can capture the quantity trimmed off from the requested quantity separately for reporting purposes.
The advantages of this rounding approach include:
- The rounding logic occurs when the order is created; therefore, , an accurate reflection of the quantity happens to all downstream logic and applications.
- The ability to review orders before saving
The disadvantage is that there may be a potential loss of a customer order, as the customer may be dissatisfied with the rounding of the requested order quantity.
Option 2: Trimming Decimal Quantities [subhead 2]
This option requires you to implement user exit MV45AFZZ (USEREXIT_SAVE_DOCUMENT_PREPARE).
In this example, after an ATP check in the schedule line, you round the confirmed quantity by trimming decimal quantities, which means obtaining the closest integer number based on the rounding strategy. In general it is not advisable to go with the up-rounding strategy when you don’t know if there is enough quantity available. Table 2 shows how these rounding strategies modify specific numbers in the system based on rounding strategy.

Table 2
Sample trimming of a confirmed quantity to the closest rounded quantity
If you implement user exit MV45AFZZ, rounding must be done on field XVBEP-BMENG, which is the confirmed quantity in the sales unit of measure. The confirmed quantity must be converted to the required quantity XVBEP-LMENG, which is in a base unit of measure before you apply any rounding logic. For the conversion, use field XVAP-UMVKZ (numerator [factor] for conversion of sales quantity into a stock keeping unit [SKU]) and field XVBAP-UMVKN (denominator [Divisor] for conversion of sales quantity into SKU). If there are special rounding needs that require looking up a custom Z table, it should be possible to do so in the code of user exit MV45AFZZ.
The advantages of this rounding feature are:
- Rounding logic happens when the order is saved, and the update happens in such a manner that data is consistent after save between SAP Advanced Planning & Optimization (SAP APO) and SAP ECC.
- Accurate visibility is provided to the user after save of the order in any report.
- In cases in which orders can have a maximum of one delivery schedule line, and also when the requirement is to just round based on the sales order unit of measure, this is a useful and simple logic to apply.
The disadvantages are:
- If the logic is extended to scenarios where there are multiple schedule lines of product substitutions without doing anything else, it leads to cuts in the order; therefore, in such scenarios, the logic has to be made fairly complex.
- The unrounded portion is not available for other orders with granular needs to be fulfilled. This is specifically important in the context of backorder processing (BOP) runs, which is an ATP function where orders are prioritized for fulfillment based on constrained supply. In this case, orders are temporarily locked in global ATP for processing.
- There is no option to review orders before saving.
Note
Special coding is required in scenarios where rounded quantities become 0. You may need to place an automatic rejection code if this situation happens. An alternative is not to round if the quantity post-rounding is 0. The SAP system usually does not process 0 quantity order lines during delivery creation. Based on the setup it can stop the delivery creation process. However, this could lead to manual processes which companies generally want to avoid. Therefore, business rules are placed to either not round the quantity to 0 or to auto-reject the line due to 0 quantity. That ensures that delivery creation, warehouse dropping of the order, and invoicing steps are appropriately carried out.
Figure 2
Figure 2
Sample code for rounding keeping conversion accuracies in consideration
There are other dimensions of rounding in the context of an ATP check that do not happen at delivery creation. In such a scenario, rounding decisions would need to be made by the warehouse. The disadvantage of doing it this way is that the order has to go through its life cycle to release unrounded quantities that could otherwise be used for fulfilling other orders in the system. However, supply chains that are highly execution oriented could use such an approach (e.g., where inventory accuracy is best represented at the warehouse level instead of in the SAP system). Remember that damages happen at the time of picking or misplacing during putaway of stocks. Thus inventory reconciliation could be affected and the SAP system might not always be accurate in terms of rounding or substitution.
Rounding in Global ATP
Standard global ATP provides the following option for rounding on the confirmed quantity:
Packaging Specification
Rounding with packaging specification is primarily used (and officially only released for use) with SAP CRM. However, it is possible to activate the functionality by managing the pinch. (Pinch is an SAP technical term for custom options provided to the user to code and influence certain default product behaviors without disrupting related functionalities in that module.) To use this functionality, the rounding indicator has to be set in the transfer structure for the requirements. You can do this on the SAP ERP side in the user exit ATP00001 (FM EXIT_SAPLATPC_001). You have to set the rounding indicator ROUNDING in structure T_ATPCSX (of type ATPCS).
Follow the menu path for Packaging Specification for Rounding in SAP configuration. Follow IMG menu path SCM Basis > Pack > Packaging Specification > Define general Packaging Specification Parameters (Figure 3).

Figure 3
Configuration setup of packaging specification in SAP APO
Note that you can add new packaging specification records with corresponding group numbers, range of rounding quantities, and status. The standard SAP system offers the field catalog shown in Figure 4 to maintain the condition tables, which you can enhance with custom fields. Follow IMG menu path SCM Basis > Pack > Packaging Specification > Determination of Packaging Specification > Create Field Catalog.

Figure 4
Field catalog available in standard packaging specification functionality in global ATP
You can use the ATP check instruction to sequentially check allocation, availability, and substitution. The sequence of these checks, along with some additional parameters such as rounding active, is captured via the check instruction menu path. Follow SAP IMG menu path Advanced Planning and Optimization > Global Available-to-Promise > General Settings > Maintain Check Instructions. In global ATP, you need to activate the rounding functionality so that an appropriate rounding profile is picked up automatically.
Check Modes are first assigned to an appropriate rounding procedure. Check Mode is an SAP technical term in SAP APO for the Requirements Class in SAP ERP. Essentially this represents the timing of when a forecast is consumed during a sales order cycle process depending on the requirement strategy. Make-to-order or make-to-stock are examples of Check Modes. Check Modes are automatically defined in the system once the connection between SAP APO and SAP ECC is established. You can customize these further in SAP APO to influence product behavior in terms of timing of the forecast consumption.

Figure 5
Assignment of rounding procedure to the Check Mode in global ATP
You subsequently make the rounding functionality active in the Maintain Check Instructions screen, as shown in Figure 6. In SAP SCM configuration follow IMG menu path Advanced Planning and Optimization > Global Available-To-Promise > General Settings > Maintain Check Instructions. Then check the Rndg Proced. Active (rounding procedure active) check box (Figure 6).

Figure 6
Activate the rounding procedure in check instructions in global ATP
Once the Maintain Check Instructions screen is set for rounding, global ATP is ready to be used for the rounding functionality using rounding capabilities in SAP SCM.
The advantages of this rounding feature are:
- The standard rounding function provides flexibility around the rounding strategy (up, down, or true rounding) and the rounding parameter controls (fields such as Plant, Material, Ship-to, or Sold-To)
- The function can be invoked during delivery creation if ATP is switched on at delivery, thus ensuring that the delivered quantity is well rounded
The disadvantages are:
- If allocation is the second step in the check instruction process, there is no guarantee that the final confirmation quantity outcome is rounded. The reason is that rounding as a function is well encapsulated in the availability function. Since check instruction is a linear step-by-step confirmation without any feedback mechanism, it is important to keep allocation as the first step.
- You have to do some coding in the ATP structure. This is subsequently stored in global ATP for the BOP run. Simply selecting the Rndg Proced. Active check box does not ensure that the rounding logic will kick in at the time of the BOP run (which does a full-fledged ATP check in a prioritized sequence). Using custom logic to pass the value mentioned in the check box helps switch on this function during the BOP run.
- In product substitution scenarios when the intent is to fulfill customer requirements at the main item level, you have to use customizations. This is a deficit of standard rounding. The capability in the tool by itself does not comprehensively meet business requirements. It is thus suggested that you do some light coding to cover these deficits and make the solution more holistic.
Custom Strategies for Rounding in Global ATP
One of the issues with all the rounding strategies described above is rounding in the context of product substitution. Since the specific intent at the time of delivery creation is to round down to the closest available shippable unit, the logic works at all the substitute line item levels. As a result it is very likely that unrounded quantities would always remain in inventory, causing a similar issue to all sales orders that are placed on a material that is not sufficiently available. If the product is in end-of-life or beyond shelf life, you have a situation of inventory on the books that cannot be sold, which is bad on any company. This leads to issues with the customer fill rate. Based on project experience, I have found the following custom logic to be most effective.
Execute user exit EXIT_/SAPAPO/SAPLATPT_005 in global ATP at BOP. Also execute this user exit during the transactional sales order ATP check that is automatically invoked during a sales order create or change event. The shippable unit of measure has to be passed via the ATP field catalog, in case such a field is available in the Z tables in SAP ECC. You have to execute the ABAP logic in the user exit as shown in the code in Figure 7.

Figure 7
Sample code to invoke rounding logic during backorder processing (BOP)
In Figure 8, each line item appears in the structure CT_INTREQITM in the form of an index. Line 2 is unrounded and the available quantity may be less than required; at the same time the substitute may be available in full. Thus the logic tries to identify line items that have to be rounded down and the one that can be rounded up. The intent is to maximize the confirmation quantity in the sales order to fulfill customer needs to the extent possible.

Figure 8
CT_INTREQITM field structure during the ATP check that can be manipulated during runtime of BOP
Figure 8 shows a critical structure available in the user exit mentioned above, which holds business-relevant data. The different fields available in this structure can be changed based on values determined by the system of other relevant fields during runtime execution of BOP. The logic used to accomplish this is detailed below.
The logic to be coded inside of the user exit changes figures in CT_INTRES where RESIND is INITIAL for the REQIDX identified above (equivalent REQITMIDX). By changing certain parameters during runtime execution of BOP in global ATP, it is possible to lead the system to believe that rounding needs to be executed without making a complex rounding-related configuration in the setup, which would otherwise be difficult to maintain.
In this instance the runtime changes are done in user exit EXIT_/SAPAPO/SAPLATPT_005 with certain fields using the logic (explained below) that would trick the system into performing rounding logic. REQIDX is the field that holds the index of records for which rounding needs to be executed. REQQTYP is the requested ordered quantity, while ATPQTY is the quantity that can be fulfilled with the stock on hand or planned receipts. The logic below lays out conditions to do a rounding up and a rounding down:
- For all the REQIDX fields where ATPQTY_CUM = REQQTYP or (lesser of ATPQTY_CUM, ALLQTY_CUM) = REQQTY as applicable, round down CNFQTY. This is an instance in which the stock on hand or projected receipts are less than or equal to the requested quantity. In such an instance it would be preferable to round down the confirmed quantity.
- For all the REQIDX fields where ATPQTY_CUM > REQQTYP or (lesser of ATPQTY_CUM, ALLQTY_CUM) is > REQQTY as applicable, increase CNFQTY to the extent of the round down of the above REQIDX. This is an instance in which the stock on hand or projected receipts are more than the requested quantity, in which case the confirmed quantity can be increased to the point that is closest to a rounded requested quantity.

Figure 9
CT_INTRES structure changes the confirmed quantity during the ATP check
To carry out rounding, pick up the base unit of measure of the corresponding IDX field in CT_INTRQ-MATNR. Use function module /SAPAPO/DM_MAT_UNIT_CONV (export parameter E_UMREN) to get the rounding parameter. Using the function module, you provide the input as the material ID or number, and you get the rounding value that should be used.
Note
IDX is a technical field in the user exit standing for the term index number. A base unit of measure can be picked up from a standard SAP table such as MARM, which is a common practice while coding such user exits.
While the above is the recommended approach to rounding specifically in the context of product substitution, there are opportunities to round using the pre-selection functionality in global ATP. This strategy discusses is specifically useful when the work process involves selection of substitutes during an interactive ATP check.
Comparison Chart of Rounding Strategies
While each organization may have unique requirements calling for evaluation of the best rounding strategy, a combination of SAP ECC and global ATP offer a variety of ways to do rounding of quantities within a sales order. Table 3 is a summary of the various approaches.
Srinivas Krishnamoorthy
Srinivas Krishnamoorthy is a mechanical engineer from IIT Delhi. He holds a master’s of business administration degree from IIM Lucknow (India). He has more than 13 years of experience in supply chain planning applications and has executed several end-to-end Demand Planning, Supply Network Planning, and Global Available-to-Promise projects. He has contributed to the APO forum in SDN and has also written several blogs and papers on supply chain topics.
You may contact the author at Srinivas_K@infosys.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.