Example: Quantity Determination 
Starting Situation
With a
flexible function, a specific plan quantity can be determined through the template. The example starts as follows: the material transport from inventory to production site in a new plant is a source of overhead costs, which until now have been calculated only on a percentage basis. The template enables us to assign an exact measure of overhead cost in this scenario. The process driver for this process is the number of pallet movements, which the template helps compute based on the production lot size foreseen. In this example, remember the larger production components require more pallet movements than smaller ones. Also keep in mind that a pallet movement is necessary even if only one component is required and the last pallet is empty.The following data is assumed. The information in parentheses is for the data required by IDES.
Units of Measure)of a material
Procedure
Prerequisites
Create an algorithm that calculates the number of pallet movements needed. It should reflect the following points
This algorithm is now entered as the quantity formula of the template.

If the alternative quantity unit has not been maintained, then do this next. This quantity unit must be the same by all components of the BOMs’. In the following example, we create it for one component only: namely, material r-4001.
If you wish to view the alternative quantity unit in IDES only, then see "Alternative Quantity Unit in the IDES".
Entry of Alternative Quantity Units
Results of this Step
The alternative quantity unit has been created. The IDES example indicates the unit PAL (pallets). Column Y indicates the basis quantity units of the alternative quantity unit, or the number of pieces per pallet.
In the next step, enter the algorithm formula for quantity into column Quantity Plan found in the template.
Enter Quantity Formula
If you wish to only view the alternative quantity unit in IDES, go to part see "Alternative quantity unit in the IDES".
This function adds the necessary pallet movements of all BOM items.
This function rounds up the result to the next whole number.
This function provides you the necessary quantity per BOM item; in the IDES example, you are provided with the number of pieces per BOM item (this entails lot size x number of pieces per BOM item).
This function prepares the factor, which the result "lot size x number of pieces of the BOM components" will be divided by.
This entry is necessary to arrive at the correct conversion factor.
The system finds the material number of the BOM item just processed.
Result
The quantity formula is now as follows:
CEIL (BOM_ITEM_REQUIRED_QUANTITY / ALT_QTY_FACTOR_FROM_MATERIAL (MATERIAL_NUMBER = BOM_ITEM_COMPONENTS , ALTERNATIVE_QUANTITY_UNIT = `PAL´ ).
Alternative Quantity Unit in IDES
In column AME you can see the alternative quantity unit (PAL), and in column Y the conversion factor.
View Quantity Formula in IDES
Here you see the entire quantity formula. Leave the function without saving.
Checking and Testing Templates
You are in either screen Create template or Change template. To check the syntax of your entries, choose Test.
Follow these steps to test the template:
IDES produces these results with the following entries in TOTAL_ORDER_QUANTITY:
Entries in TOTAL_ORDER_QUANTITY |
Results (pallet movements) |
1 |
7 |
10 |
8 |
50 |
14 |
100 |
22 |
1000 |
187 |
The results can be clarified as follows:
Seven components belong to material r-4050. The SAP system uses this calculation for the pallet movements.
Lot size (= Entry in TOTAL_ORDER_QUANTITY) * piece per material r-4050 / factor of the alternative quantity unit (piece per pallet). The result is rounded up to the next whole number. With a 100 piece order of material R-4050, the following results are obtained:
Material number |
Quantity per material r-4050 |
Factor of the alternative quantity unit (= pieces per pallet) |
Pallet movements |
r-4001 . |
1 |
200 |
1 |
r-4002 . |
4 |
12.000 |
1 |
r-4003 . |
1 |
60 |
2 |
r-4004 . |
1 |
8 |
13 |
r-4005 . |
1 |
160 |
1 |
r-4006 . |
1 |
160 |
1 |
r-4007 . |
1 |
40 |
3 |
Total pallet movements |
22 | ||
Template Evaluation
To see more details, double click on row Quantity. You receive the following information:
Formula/Method: place holder for the name of the function.
Function list: your are notified by the system that this function works with a flexible function ($1). The parameters of the function are listed (all are type "invisible"). The
l ast row shows the results of the calculation: 22 pallet movements.Result: display total results (22).
Field content: among other information, the system shows the material number you entered.
Template Evaluation - Details
To see the individual results of the calculations, use the button Display Flexible Function and choose the function suggested. The system returns the same information as in the above table: Field content: shows the value of column "Material number", Function list: that of column "Factor of the alternative quantity unit", and Results: that of column "Pallet movements".