cancel
Showing results for 
Search instead for 
Did you mean: 

Multi item order with line item zero.

Former Member
0 Kudos

Hi,

We are creating trim order in APO using 'BAPI_MOSRVAPS_SAVETMPLPPM'. Then we are converting Trim order into production order by marking conversion indicator. It creates multi item order in ECC and transfers back to APO.

Some time we are facing problem

Order header quantity-3000

Item 1.-2000

Item2-0.

Though parameter in BAPI states operation quantity is sum of item quantity how this difference?

Why production order item quantity 0.

Regards,

Santosh

Accepted Solutions (0)

Answers (1)

Answers (1)

frank_horlacher
Employee
Employee
0 Kudos

The BAPI has an import parameter OrderComponents.

OrderComponents has a field QUAN_CALC_RULE which is used to specify whether and how the specified quantity for the relevant component should be used for calculating the operations quantity and therefore the capacity requirements and duration.

You can use this field to infuence the operation quantities.

The docuementation can also be found in the transaction BAPI.

The documentation for this field explains the possible fixed values and different options for operation quantity calculation

BAPI10503TMPLPPMCALCRULE

Relevance of Quantity for Operation Quantity

Definition

This indicator is used to set what effect the quantity has on the calculation of the operation quantity.

The valid fixed values are set in the domains.

The following values and combinations of values are possible:

or 'B' can be used for all other components.

This fixed value can be used for both input and output components. However, within an order this fixed value can only be used by either Input OR output components. That is, both input and output components cannotbe used together in one order to determine the operation quantity.

The operation quantity is the same for all operations.

This fixed value is useful if, for example, the operation quantity needs to be the same as the total of certain input or output components, but the operation quantity does not correspond to the main component quantity.

C:

You can determine the operation quantity with the following BAdI:

Determination of Operation Quantity in Template Order (/SAPAPO/TMPLPPM_CREA)

Method Determination of Operation Quantity in Template Orders. (CALC_OPERATION_QUANTITY)

1 (only valid for PPM)

All components with this fixed value are used to determine a "flow quantity" which then represents theoperation quantity for a certain operation within an order.

In contrast to the other fixed values and determination types for operation quantities, the "flow quantity" canbe used to give each operation a different quantity.

The term "flow quantity" is therefore used as it represents the material flow or quantity flow within an order. That means that within an order the operation quantity changes when material is added to an operation or when it is used or taken away. For this, a material is added at the beginning of an order but the material withdrawal takes place at the end of the operation and will not have an effect on the quantityof this operation, just on the subsequent operation.

On the basis of the first operation (in the order) the flow quantity is calculated according to the following algorithm:

Flow quantity = flow quantity + input quantity - output quantity

These quantities are calculated as follows:

Input quantity: Total of all input quantities to operations before and at the operation in question.

Output quantity. Total of all output quantities before the operation in quantity.

Note, that this is only valid for component quantities for which the fixed value '1' has been set.

The operation quantity of a certain operation therefore corresponds to the flow quantity through or at this operation.

Example for calculating the operation quantity using the flow quantity (fixed value '1').

Order structure Quantity Fixed Value Flow Qty/Operation Qty

OPR30----

-


8

| _______

| | ACT1 |---<> OUT1 5 1 8

| ¯¯¯|¯¯¯

OPR20----

-


18

| _______/---<> OUT1 10 1 18

| | ACT1 |---<> OUT1 4 18

| ¯¯¯|¯¯¯---<> INP1 3 1 18

OPR10----

-


30

| ___|___

| | ACT1 |---<> OUT1 10 1 30

| ¯¯¯|¯¯¯

| ___|___/---<> OUT2 3 1 30

| | ACT2 |---<> OUT2 5 30

| ¯¯¯|¯¯¯---<> INP1 4 30

| ___|___

| | ACT1 |----<> OUT1 2 1 30

| ¯¯¯|¯¯¯----<> INP1 30 1 30

|----

-


OPR = Operation

ACT = Activity

OUT = Output Component

INP = Input Component

Former Member
0 Kudos

Thanks a Lot.

We are passing calculation rule B only to BAPI. As it is not happening to all orders I will check in program how these values are getting passed.

Regards,

Santosh