Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
Showing results for 
Search instead for 
Did you mean: 
Active Contributor

Like to share the Reservation Quantity Rounding off issue:

In Bill of Material used concept of Alternative Item Group ID. Ie; there will be two similar materials with different material number, different priority, strategy one and different probability usage of the material is given in percentage. When Production order is created, based on the usage probability % defined reservation quantity will be planned. System is rounding off the reservation quantity on higher side.


For Material 5361020100001, Production Order created for 21 qty. System generated the reservations for the BOM items 3331570200001 and 8311502510101.

Item 1 - 3331570200001 (END CONSTN A/E)

Alternative group item 1.

Usage Probability = 75

Calculated value is 21 * (75/100) = 15.75. Standard SAP rounded the qty as 16.

Item 2 - 8311502510101 (END CONSTN Alarm)

Alternative group item 2.

Usage Probability = 25

Calculated value is 21 * (25/100) = 5.25. Standard SAP rounded the qty as 6.

Requirement is BOM Item 1 3331570200001 (END CONSTN A/E) to be rounded off to 16 and BOM Item 2 - 8311502510101 (END CONSTN Alarm) to be rounded off as 5.

Tried solution through SAP Note 391846:

SAP note 391846 which will re-explode the BOM when planned order is converted to production order. During this explosion alternative items with probability % is considered and according the reservation qty rounding off to higher and lower side is achieved.

Applying this note requires 9 access keys to make the necessary changes as suggested in the note. This note implementation is addressing only rounding off the components qty in Production order. But if the component has another planned order which gets converted to production order, rounding off the planned order qty is not happening. Hence this note implementation is not pursued.

Final Solution Implemented:

With technical help debugged the process of MD50 with certain test data and below is the corresponding analysis and workaround of getting the Round-off logic without any Note implementation:

  • Planning against the Sale order and the Qty processing processes with two database tables ‘PLAF - Planned order’ & ‘MDRS - Reading View of
    Dep.Reqmnt/Material Reservation’.
  • The Material along with Planning Plant is given as input and the Qty is fetched from PLAF for planned order initial processing.


  • The Reservation details, RSNUM & RSPOS are passed as input and Requirement Qty is fetched from MDRS for further calculations.


  • The function module ‘AUFBAUEN_MDPSX_DISPOSITION’ processes the above mentioned functionality.

On a summary, a suitable Enhancement point after the process of the Function module can help us achieve Rounding off functionality.

  • The Include program ‘MM61XFBT_DISPONIEREN_MATERIAL_’ gets triggered exactly after the Order Qty processing of the Function module.
  • So, we added an Enhancement ‘ZMD50_PLANNED_ORDER_QTY’ to enable Rounding off and below is the coded-logic:
  • The Transaction code is captured and the Enhancement processing is restricted only for MD50.
  • Material (MATNR) is fetched from runtime.
  • The fetched Material is validated whether it’s an HALB Item; if it’s an HALB item then the
    process will continue.
  • Reservation number (RSNUM) and Reservation Item (RSPOS) are fetched form the Planned order items.
  • Material and Reservation details are passed into MDRS table and the record is validated for ‘Alternative item indicator’ (ALPOS)
    equal to ‘X’. If the ALPOS is flagged, then the ‘Required quantity ‘(NOMNG),and ‘Usage probability in %’ (EWAHR) are fetched for further processing.
  • The Qty is calculated using the formula :

        Child ALPOS planned order qty = (System generated planned order qty of the parent * EWAHR of the child)/100 = (NOMNG * EWAHR) / 100.

  • This Qty is rounded off to the nearest integer value.
  • Incase the Calculated Qty has less than or equal to 0.500 decimal value, then BDMNG – ‘Requirement Quantity’ & ERFMG – ‘Quantity in Unit of Entry ‘ are updated in the Reservation table, RESB with the least rounded value of the Qty for corresponding RSNUM & RSPOS.

Pasted below are the screenshots showing the updated values in MD50 & RESB for after implementing the solution.

  • RESB


  • Transaction code – CO41


1 Comment