Most organizations would like to have alternate components determined during the creation of the production order and not while creating planned orders if the procurement lead time in days is not too long. Learn about a custom solution to allocate the quantity of alternate components while creating production orders.
Key Concept
The development of a custom program to split the alternate components among production orders enables a specific order to use an alternate item to meet total quantity requirements.
An SAP system’s standard approach for the quantity allocation of alternate components (substitutable components) in production orders is to create planned orders in a material requirements planning (MRP) run. The alternate components are allocated based on their usage probabilities maintained in bill of materials (BOM). This approach requires maintenance of production version master data as a prerequisite (even though organizations prefer to avoid any extra data maintenance.)
Most organizations like to have alternate components determined during the creation of the production order and not while creating planned orders if the lead time in days is not long. I describe a custom solution to accomplish the alternate components quantity allocation while creating production orders. By allocating alternate components optimally among multiple production orders, businesses should be able to procure alternate components from different vendors against real-time demand, ensure on-time delivery, and reduce cost.
Alternate components, by definition, are components that can be substituted for one another to build a product. They are listed in BOM master data with their expected percentage use. A typical business requirement is to use one of the alternate components to meet the full quantity requirement in a production order build and to use any other alternate components having the full quantity allocated in a separate production order during mass creation of production orders. You can achieve this objective with a simple enhancement that involves developing a rule set to split the components among multiple production orders leveraging the usage probabilities defined in the BOM. Because alternate components could be procured from different vendors, this rule set helps you to ensure on-time delivery of components and to allocate the cost of procurement optimally among vendors.
Business Requirements
By having multiple suppliers to procure the production order alternate items and split the component quantity proportionately among orders, an organization can reduce the risk of a component shortage, reduce cost, and maintain good relationships with different vendors.
The system must consider the number of production orders being converted from planned orders in total. It needs to use a rule to split the total number of production orders proportionately based on the usage probabilities maintained among alternate items in a BOM as:
Note
The standard SAP system functionality of quota arrangements is not considered because it allocates a components quota in an MRP run among all planned orders. The business need is to allocate the proportion among production orders when selected planned orders are converted into production orders so that the alternate items allocation split is close to actual production execution. This enhancement also eliminates the need for maintaining production versions for materials if quota arrangements were used.
The Details of the Requirements
To develop the custom program to meet the business requirements, you first need to define a new program (Figure 1).

Figure 1
Populate the Plant and Material fields of the selection screen
Note
I describe the development of a new custom program. Therefore, Figure 1 is a depiction of a selection screen with two fields shown to be created by the programmer. Because it is a custom program, a user is free to use any custom transaction code name he or she wants as the name. The only requirement is it should start with the letter Z or Y.
In Figure 1 the fields that you need to populate are Plant and Material. In my example, enter 0001 for the plant and 1148030 for the material. Now you are ready to split the production order component quantity between two alternate BOM components with usage probabilities. Consider the example BOM displayed in Figure 2.

Figure 2
BOM components that are alternates at the item level
In Figure 2, the components 1148031 and 1148032 are substitutable (alternate items) because in the Group column both have been assigned a value of A1 for alternate item group.
The alternative item group specifies the proportion of material that is used based on usage probability. Component 1148031 has a usage probability of 60 percent as shown in Figure 3. An example on probability maintenance of a BOM item is given in Figure 3.

Figure 3
Details of alternate item1 with use probability
Component 1148032 has a use probability of 40 percent as shown in Figure 4.

Figure 4
Details of alternate item 2 with use probability
Now, if there are n production orders converted from planned orders, the system allocates BOM components in the production order using a specific rule. I show you two examples of allocations.
In example 1, the planned orders converted into production orders are more than the number of BOM alternate items (Figure 5).

Figure 5
Split of alternate items in a production order component overview screen for example 1
Display the production order using transaction CO03 and navigate to the Component Overview screen. In this example, one of the components is to be allocated at the full required quantity (100 percent allocation) and the others at 0 percent.
Display another production order using transaction code CO03 and navigate to the Component Overview screen. In example 2, the number of planned orders converted is less than or equal to the number of BOM alternate items. In this example, each converted production order needs to have quantities of alternate items split proportionately to use probabilities as shown in Figure 6.

Figure 6
Split of alternate items in a production order component overview screen for example 2
Solution Development
b. The number of planned orders converted (n1) is less than or equal to the number of alternate items (n2) converted
Note
The number of planned orders converted is n1, and the number of alternate items is n2.
In scenario a, consider that three planned orders are converted into production orders, (n1>2) and (n2 = 2).
The components A and B have usage probabilities of 0.6 (60 percent) and 0.4 (40 percent), respectively. Program the system to consider the alternate component with the higher usage probability first (that is, component A). Get the value of (n* use probability) for component A, say, X = 3* (0.6) = 1.8. Get the nearest next integer if the result is a decimal. It is 2. Consider each record of planned orders one at a time and carry out the check shown in Table 1 to allocate a percentage for alternate components for production orders.
Order list iteration
|
Is X greater than or equal to the iteration? |
Component A allocation percent |
Component B allocation percent |
1
|
Yes
|
100 |
0 |
2
|
Yes
|
100 |
0 |
3
|
No
|
0 |
100 |
Table 1
Percentage allocation of components during iterations within a production order list of three orders
Accordingly, two orders will have 100 percent of the requirement quantity allocated to component A, and one order will have 100 percent of the requirement quantity allocated to component B.
In scenario b, you program the system to allocate component quantities proportionately to the BOM usage probabilities.
Note
The rule can be extended for more than two vendors. For example, consider the case that there are three vendors.
Suppose there are n production orders being converted, and you need them to be allocated to three alternate components—A, B, and C—in respective proportions of 50, 30, and 20.
Consider, for example, five production orders. The proportion of production orders for component A is 50 percent of 5 = 2.5.
Table 2 is the iteration table –for this scenario.
Order list iteration
|
Is X greater than or equal to the iteration? |
Comp A allocation percent
|
Comp B allocation percent |
Comp C allocation percent |
1
|
Yes
|
100
|
0 |
0 |
2
|
Yes
|
100
|
0 |
0 |
3
|
No
|
0
|
100 |
0 |
Table 2
Percentage allocation of components during three iterations within a production order list of five orders
Since the quota for component A has been fulfilled, remove component A from consideration. For the remaining order iterations, you should consider component B next, but should use the sum percentage of A and B of total orders—that is, (50+30) percent of 5 = 4.
Table 3 shows the new value of X = 4.
Order list iteration |
Is X greater than or equal to the iteration?
|
Comp B allocation percent
|
Comp C allocation percent |
4
|
Yes
|
100
|
0 |
5
|
No
|
0
|
100 |
Table 3
Percentage allocation of components during the last two iterations within a production order list of five orders
Accordingly, for a total of five orders, you would get the component allocations A, B, and C, respectively, as 2, 2, and 1.
In a similar manner, for a total of nine orders, you would get the component allocations A, B, and C, respectively, as 4, 3, and 2.
Program Execution
There are two parts to the overall process:
a. Gather data for planned orders and determine the parameters to be used for production order conversion
b. Allocate the production order alternate item components for the converted orders based on the use probabilities maintained in the BOM
I explain the steps involved below.
For part a, you gather the list of planned orders and determine the parameters for production order.
Use the values of Plant and Material from selection screen. Get the list of planned orders using the function module BAPI_PLANNEDORDER_GET_DET_LIST. The developer could use this function module to extract the list of planned orders based on the selection screen entries and display the list similar to the screen shown in Figure 7.

Figure 7
Convert planned orders to production orders
For part b, convert the planned orders to production orders.
The next step is for the user to execute the conversion of planned orders to production orders by selecting the records and clicking the Convert orders button.
Use BAPI_PRODORD_CREATE_FROM_PLORD for converting planned orders to production orders. After you select orders and execute the program for Convert orders, the system is expected to create production orders as per the rules.
The user could select the Planned orders to convert them into production orders from the list shown in Figure 7. As an example, the selected lines are highlighted as shown in Figure 8.

Figure 8
Planned orders selected for converting into production orders
Now, click the Convert orders’ button shown in Figure 8. The program should use BAPI_PRODORD_CREATE_FROM_PLORD to convert the planned orders into production orders. For the production orders being created, apply the component allocation rule discussed earlier. The status messages on the production orders created appear in Figure 9.

Figure 9
Production order conversion status messages
To view the result of component allocation, use transaction code CO03 to display a sample production order created and navigate to the Component Overview screen shown in Figure 10. In Figure 10, the example shows that the system allocated a total required quantity of 100 to component 1400031 and allocated a quantity of 0 to its alternate item component, 1400032.

Figure 10
Component 1 has 100 percent and component 2 has 0 percent allocated quantity
In a similar manner, you can use transaction code CO03 and navigate to the Component Overview screen to view how the system carried out alternate item allocations for the production order. Figure 11 shows the case of a sample production order where the program allocated a total required quantity of 100 to component 1400032 and allocated a quantity of 0 to its alternate item component, 1400031.

Figure 11
Component 1 has 0 percent and component 2 has 100 percent allocated quantity
Yet another case is that the planned orders to be converted to production orders are fewer than the number of alternative components. Follow the steps in the instructions before Figure 10 to display the production order Component Overview screen. In this screen you can display a sample production order of this scenario in which both components share the quantities proportionately in an order as shown in Figure 12.

Figure 12
Components 1 and 2 have components allocated proportionately
This article contains general information only and Deloitte is not, by means of its publication, rendering accounting, business, financial, investment, legal, tax, or other professional advice or services. This article is not a substitute for such professional advice or services, nor should it be used as a basis for any decision or action that may affect your business. Before making any decision or taking any action that may affect your business, you should consult a qualified professional advisor.
Deloitte shall not be responsible for any loss sustained by any person who relies on this article.
As used in this document, "Deloitte" means Deloitte Consulting LLP, a subsidiary of Deloitte LLP. Please see
www.deloitte.com/us/about for a detailed description of the legal structure of Deloitte LLP and its subsidiaries. Certain services may not be available to attest clients under the rules and regulations of public accounting.
Copyright © 2017 Deloitte Development LLC. All rights reserved.
Janev K. Veettil
Janev K Veettil has more than 15 years of SAP experience in SAP Production Planning and logistics modules. He has worked on various SAP implementation projects for different industries and his key focus is on manufacturing.
You may contact the author at jveettil@deloitte.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.