Start of Content Area

Function documentation Material Quantity Calculation With Batch Data  Locate the document in its SAP Library structure

Use

If you use materials that are subject to batch management, you may need to take quantities and properties of specific batches into account when your perform material quantity calculations in the process order. Depending on the active ingredient concentration of a component batch, you may need, for example, different quantities of another component, that is used as a filling material.

Since no batches are assigned in the master recipe, you must use the values planned in the material item when you perform calculations there. In the process order, however, you must perform the same calculation again after you have carried out batch determination due to the values of one, or in case of a batch split, several batches selected.

For this reason, SAP provides the functions described below to enable you to use the data of a material item in the master recipe and the data of subordinate batches after the batch determination in the process order. These functions can be used in addition to the functions described in Basic Functions of Material Quantity Calculation.

Note

Material quantity calculation is not automatically performed after batch determination in the order.

Integration

If you use active ingredient proportions, you can use exact active ingredient quantities to plan the quantity structure of your orders.

See also:

LO - Batch Management

Prerequisites

To be able to use material quantity calculation in a master recipe, you must have defined a production version for the master recipe.

To transfer the data from material quantity calculation from a master recipe to the process order, you must create the process order with the corresponding production version.

For you to be able to take into account batch properties such as the active ingredient potency in material quantity calculation, the following requirements must be met:

Material quantity calculation uses the following values:

If multiple values or value ranges have been defined, the system uses the lowest value.

Caution

In the material master record, you can also enter a planned value for the batch characteristic for active ingredient management (Additional data, Proportion/prod.unit tab page). To avoid inconsistencies between active ingredient management and material quantity calculation, we recommend using the lowest characteristic value from material classification.

Features

The following sections provide an overview of the functions of material quantity calculation that take the batch data of a material component into account. In the expressions used:

The examples refer to the following data:

This graphic is explained in the accompanying text

Determining the Number of Batches in a Material Item

Use the following function:

CNUM(<material item>)

The function determines the number of batches that belong to a material item. As long as no batch has been assigned to the material item, the function has value 1.

Example

CNUM(004) = 3

Adding up Batch Quantities or Characteristic Values

This function adds up the batch quantities or the values in the characteristic column you specified for all batches of a material item. As long as no batches have been assigned to the material item, the function returns the quantity of the material item or the characteristic value of the material item.

Use the following function:

CSUM(<material item>)

Example

CSUM(004) = 40 + 50 + 3 = 93

CSUM(<material item>;<characteristic column>)

Example

CSUM(004;002) = 90 + 80 + 70 = 240

Calculating the Arithmetic Mean of Batch Quantities or Characteristic Values

This function calculates the arithmetic mean of the batch quantities or the characteristic column you specified from all batches of a material item. As long as no batches have been assigned to the material item, the function returns the quantity of the material item or the corresponding characteristic value of the material item.

Use the following function:

CAMV(<material item>)

Example

CAMV(004) = (40 + 50 + 3) / 3 = 31

CAMV(<material item>;<characteristic column>)

Example

CAMV(004;002) = (90 + 80 + 70) / 3 = 80

Adding up Weighted Batch Quantities or Characteristic Values: Product Sum

For each batch of a material item, this function multiplies the batch quantity by the value of the characteristic column you specified or the values of both characteristic columns specified. It then adds up the results. The system interprets the characteristic value that you use to weight the first value as a percentage if the description of its unit contains a percent sign (%).

As long as no batches have been assigned to the material item, the function calculates the product of the quantity and characteristic value of the material item or the product of the two characteristic values of the material item.

You may need this function, for example, to calculate the total of the active ingredient quantities from physical batch quantities based on the active ingredient concentration. Use the following function:

CPSM(<material item>;<characteristic column>)

Example

CPSM(004;002) = (40 * 0.9) + (50 * 0.8) + (3 * 0.7) = 78.1

CPSM(<material item>;<characteristic column 1>;<characteristic column 2>)

Example

CPSM(004;002;003) = (90 * 0.04) + (80 * 0.035) + (70 * 0.05) = 9.9

Adding up Weighted Batch Quantities or Characteristic Values: Quotient Sum

For each batch of a material item, this function divides the batch quantities by the value of the characteristic column you specified or the value of the first characteristic column by that of the second column. It then adds up the results. The system interprets the characteristic value that you use to weight the first value as a percentage if the description of its unit contains a percent sign (%).

As long as no batches have been assigned to the material item, the function divides the quantity of the material item by the corresponding characteristic value or the first characteristic value of the material item by that of the second value.

You may need this function, for example, to calculate the total of the physical batch quantities from the active ingredient quantities of batches based on the active ingredient concentration. Use the following function:

CQSM(<material item>;<characteristic column>)

Example

CQSM(008;002) = (4 / 0.5) + (3 / 0.6) = 13

CQSM(<material item>;<characteristic column 1>;<characteristic column 2>)

Example

CQSM(008;002;003) = (50 / 0.25) + (60 / 0.2) = 500

Examples