406:
407:
408:
409: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
410: v_cto_cost cst_item_costs.item_cost%type := null ;
411: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
412: v_valuation_cost cst_item_costs.item_cost%type := null ;
413: v_buy_cost cst_item_costs.item_cost%type := null ;
414:
407:
408:
409: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
410: v_cto_cost cst_item_costs.item_cost%type := null ;
411: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
412: v_valuation_cost cst_item_costs.item_cost%type := null ;
413: v_buy_cost cst_item_costs.item_cost%type := null ;
414:
415: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
408:
409: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
410: v_cto_cost cst_item_costs.item_cost%type := null ;
411: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
412: v_valuation_cost cst_item_costs.item_cost%type := null ;
413: v_buy_cost cst_item_costs.item_cost%type := null ;
414:
415: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
416: v_buy_cost_type_id cst_item_costs.cost_type_id%type ;
409: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
410: v_cto_cost cst_item_costs.item_cost%type := null ;
411: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
412: v_valuation_cost cst_item_costs.item_cost%type := null ;
413: v_buy_cost cst_item_costs.item_cost%type := null ;
414:
415: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
416: v_buy_cost_type_id cst_item_costs.cost_type_id%type ;
417: v_rolledup_cost_count number ;
411: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
412: v_valuation_cost cst_item_costs.item_cost%type := null ;
413: v_buy_cost cst_item_costs.item_cost%type := null ;
414:
415: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
416: v_buy_cost_type_id cst_item_costs.cost_type_id%type ;
417: v_rolledup_cost_count number ;
418: v_rolledup_cost number ;
419: lBuyCostType varchar2(30);
412: v_valuation_cost cst_item_costs.item_cost%type := null ;
413: v_buy_cost cst_item_costs.item_cost%type := null ;
414:
415: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
416: v_buy_cost_type_id cst_item_costs.cost_type_id%type ;
417: v_rolledup_cost_count number ;
418: v_rolledup_cost number ;
419: lBuyCostType varchar2(30);
420:
2133: lXMessageName varchar2(100);
2134: lXTableName varchar2(100);
2135:
2136: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
2137: v_cto_cost cst_item_costs.item_cost%type := null ;
2138: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
2139: v_valuation_cost cst_item_costs.item_cost%type := null ;
2140: v_buy_cost cst_item_costs.item_cost%type := null ;
2141:
2134: lXTableName varchar2(100);
2135:
2136: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
2137: v_cto_cost cst_item_costs.item_cost%type := null ;
2138: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
2139: v_valuation_cost cst_item_costs.item_cost%type := null ;
2140: v_buy_cost cst_item_costs.item_cost%type := null ;
2141:
2142: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2135:
2136: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
2137: v_cto_cost cst_item_costs.item_cost%type := null ;
2138: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
2139: v_valuation_cost cst_item_costs.item_cost%type := null ;
2140: v_buy_cost cst_item_costs.item_cost%type := null ;
2141:
2142: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2143:
2136: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
2137: v_cto_cost cst_item_costs.item_cost%type := null ;
2138: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
2139: v_valuation_cost cst_item_costs.item_cost%type := null ;
2140: v_buy_cost cst_item_costs.item_cost%type := null ;
2141:
2142: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2143:
2144: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
2140: v_buy_cost cst_item_costs.item_cost%type := null ;
2141:
2142: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2143:
2144: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
2145: v_buy_cost_type_id cst_item_costs.cost_type_id%type ;
2146: v_rolledup_cost_count number ;
2147: v_rolledup_cost number ;
2148: lBuyCostType varchar2(30);
2141:
2142: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2143:
2144: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
2145: v_buy_cost_type_id cst_item_costs.cost_type_id%type ;
2146: v_rolledup_cost_count number ;
2147: v_rolledup_cost number ;
2148: lBuyCostType varchar2(30);
2149:
2270:
2271: lStmtNum := 30;
2272: begin
2273:
2274: select item_cost into v_cto_cost from cst_item_costs
2275: where inventory_item_id = pConfigId
2276: and organization_id = p_cost_organization_id -- 3116778
2277: and cost_type_id = v_cto_cost_type_id ;
2278:
2307:
2308: lStmtNum := 35;
2309: begin
2310:
2311: select item_cost into v_valuation_cost from cst_item_costs
2312: where inventory_item_id = pConfigId
2313: and organization_id = p_cost_organization_id -- 3116778
2314: and cost_type_id = v_primary_cost_method ;
2315:
2369: lStmtNum := 40;
2370:
2371: if( lBuyCostType is not null ) then
2372: begin
2373: select item_cost into v_buy_cost from cst_item_costs
2374: where inventory_item_id = pConfigId
2375: and organization_id = p_cost_organization_id -- 3116778
2376: and cost_type_id = v_buy_cost_type_id ;
2377: