Page 1 of 1

opm error

Posted: Tue Sep 01, 2009 8:37 am
by satyaprasadpv
cannot calculate the total output quantity or total input quantity for this formula .the items in this formula may not have UOM conversions to the GMD :yield type UOM.

This is the common error that appears while defining a new formula in OPM module ple explain.

Posted: Mon Sep 07, 2009 9:43 am
by edmattu
Hi,
Check the Organization parameter (In OPM), GMD:Yield Type UOM is set in which UOM.

Check the ingrdient/product or by-product have different UOM than the above.
If yes, enter conversion factor for the item with the Parameter UOm.

Check the issue

Say You have GMD:yield Type UOM---Weight (Kilogram)

you have items with UOM Liter or Ea.

So enter conversion factor 1 EA = XX Kg. like that

Reagrds

Posted: Tue Jun 05, 2012 5:09 am
by ata_rehman70
Solution
In addition to the Ingredients which have their 'Contribute To Yield'
flag set, ALL Products, Co-Products and By-Products defined in a Formula
must be convertible to the 'GMD: Yield Type' UOM Class.

Usually, if you try to create a Batch using this Formula you will receive an
error message which specifies both the Item and the UOM Conversion which
is causing the problem.

If you are still unable to establish which Item is causing the error
message to appear, there are some scripts in MetaLink Note 372871.1
which may be helpful.

Please note, however, that this error message can also be displayed if
there is an Ingredient which can not be converted to the Product's Unit
of Measure - that is to say, it may not involve the 'GMD: Yield Type'
Profile Option at all.


regards,
Ata ur Rehman

Posted: Tue Jun 05, 2012 5:14 am
by ata_rehman70
Running the Script
Script 1. Enter the formula number and version where the comment '-- change this' is present.

Script 2. Returns the Unit of Measure class defined the 'GMD: Yield Type UOM' Profile Option.

Script 3. Use the output from script 2.

Script 4. Enter the item ids as reported in script 1. The um_type as required will not be present.


Caution
This script is provided for educational purposes only and not supported by Oracle Support Services. It has been tested internally, however, and works as documented. We do not guarantee that it will work for you, so be sure to test it in your environment before relying on it.
Proofread this script before using it! Due to the differences in the way text editors, e-mail packages and operating systems handle text formatting (spaces, tabs and carriage returns), this script may not be in an executable state when you first receive it. Check over the script to ensure that errors of this type are corrected.

Script
Script 1 (Lists Item_Ids which can not convert to Yield UOM Type)

set serveroutput on size 1000000
alter session set nls_language=american;
declare
l_temp_qty NUMBER := 0;
l_um_type sy_uoms_typ.um_type%TYPE;

CURSOR get_sy_std_um(pUm_type sy_uoms_typ.um_type%type) IS
SELECT std_um
FROM sy_uoms_typ
WHERE um_type = pUm_type;


l_count NUMBER(5) DEFAULT 0;
l_material_tab GMD_COMMON_SCALE.scale_tab;

CURSOR Get_formula_lines (P_formula_id NUMBER) IS
SELECT line_no, line_type, item_id, qty, item_um, scale_type,
contribute_yield_ind, scale_multiple, scale_rounding_variance,
rounding_direction
FROM fm_matl_dtl
WHERE formula_id = p_formula_id
ORDER BY line_type;

CURSOR Get_formula_id IS
select formula_id
from fm_form_mst
where formula_no='JGC_07/06/2006' -- change this
and formula_vers='1'; -- change this

v_errorcode number;
v_errortext varchar2(200);
v_formula_id number;
x_uom sy_uoms_mst.UM_CODE%type;
begin

OPEN get_formula_id;
FETCH get_formula_id INTO v_formula_id;
CLOSE get_formula_id;

l_um_type := fnd_profile.value('FM_YIELD_TYPE');

OPEN get_sy_std_um(l_um_type);
FETCH get_sy_std_um INTO x_uom;
IF get_sy_std_um%NOTFOUND then
x_uom := NULL;
End if;
CLOSE get_sy_std_um;

FOR l_rec IN Get_formula_lines (v_formula_id) LOOP
l_count := l_count + 1;
l_material_tab(l_count).line_no := l_rec.line_no;
l_material_tab(l_count).line_type := l_rec.line_type;
l_material_tab(l_count).item_id := l_rec.item_id;
l_material_tab(l_count).qty := l_rec.qty;
l_material_tab(l_count).item_um := l_rec.item_um;
l_material_tab(l_count).scale_type := l_rec.scale_type;
l_material_tab(l_count).contribute_yield_ind := l_rec.contribute_yield_ind;
l_material_tab(l_count).scale_multiple := l_rec.scale_multiple;
l_material_tab(l_count).scale_rounding_variance := l_rec.scale_rounding_variance;
l_material_tab(l_count).rounding_direction := l_rec.rounding_direction;
END LOOP;

dbms_output.put_line('Testing '||l_material_tab.COUNT||' items');
FOR i IN 1..l_material_tab.COUNT LOOP
IF l_material_tab(i).line_type = -1 AND
l_material_tab(i).contribute_yield_ind = 'Y' THEN
l_temp_qty := GMICUOM.uom_conversion (pitem_id => l_material_tab(i).item_id
,plot_id => 0
,pcur_qty => l_material_tab(i).qty
,pcur_uom => l_material_tab(i).item_um
,pnew_uom => x_uom
,patomic => 0);

IF l_temp_qty < 0 THEN
dbms_output.put_line('ingredient with item_id '||l_material_tab(i).item_id|| ' will not
convert');
END IF;
END IF;
END LOOP;

/* Now let us calculate the product total quantities */
FOR i IN 1..l_material_tab.COUNT LOOP
IF l_material_tab(i).line_type IN (1,2) THEN
l_temp_qty := GMICUOM.uom_conversion (pitem_id => l_material_tab(i).item_id
,plot_id => 0
,pcur_qty => l_material_tab(i).qty
,pcur_uom => l_material_tab(i).item_um
,pnew_uom => x_uom
,patomic => 0);
IF l_temp_qty < 0 THEN
dbms_output.put_line('Product with item_id '||l_material_tab(i).item_id|| ' will not
convert');
END IF;
END IF;
END LOOP;
dbms_output.put_line('completed');
exception
when others then

v_errorcode := sqlcode;
v_errortext := substr(sqlerrm,1,200);
dbms_output.put_line('error number '||v_errorcode || ' message '||v_errortext);
end;
/

Script 2 (Show current value of Yield UOM Type profile)

select fnd_profile.value('FM_YIELD_TYPE') from dual;

Script 3 (Show Base Unit for the Yield Type)

select TYPE_DESC, STD_UM from sy_uoms_typ where um_type='&um_type';

Script 4 (Show Item Details for a given value of Item_Id

select i.item_no
,c.item_id
,c.um_type
,c.lot_id
,c.TYPE_FACTOR
from
ic_item_cnv c
,ic_item_mst_b i
where
i.item_id = &item_id
and i.item_id=c.item_id
order by item_no
,c.um_type
, c.lot_id
/

regards,
Ata ur Rehman

Posted: Tue Nov 20, 2012 4:33 am
by emma99
hi...
I think OPM error is an overpunched mintmark (OPM) is a coin specimen that exhibits more than one different mintmark, one punched on top of the other.

Posted: Tue Nov 27, 2012 6:02 am
by ata_rehman70
Please create the conversion between value of profile 'GMD: Yield Type' and the Product's UOM and the Ingredient's UOM in Item Lot/Sublot Standard conversion for produced Item.

Go in OPM Inventory Control -> Setup -> Item/Lot conversion

Ata