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:
2193: lXMessageName varchar2(100);
2194: lXTableName varchar2(100);
2195:
2196: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
2197: v_cto_cost cst_item_costs.item_cost%type := null ;
2198: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
2199: v_valuation_cost cst_item_costs.item_cost%type := null ;
2200: v_buy_cost cst_item_costs.item_cost%type := null ;
2201:
2194: lXTableName varchar2(100);
2195:
2196: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
2197: v_cto_cost cst_item_costs.item_cost%type := null ;
2198: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
2199: v_valuation_cost cst_item_costs.item_cost%type := null ;
2200: v_buy_cost cst_item_costs.item_cost%type := null ;
2201:
2202: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2195:
2196: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
2197: v_cto_cost cst_item_costs.item_cost%type := null ;
2198: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
2199: v_valuation_cost cst_item_costs.item_cost%type := null ;
2200: v_buy_cost cst_item_costs.item_cost%type := null ;
2201:
2202: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2203:
2196: v_primary_cost_method mtl_parameters.primary_cost_method%type := null ;
2197: v_cto_cost cst_item_costs.item_cost%type := null ;
2198: v_cto_cost_xudc cst_item_costs.item_cost%type := null ;
2199: v_valuation_cost cst_item_costs.item_cost%type := null ;
2200: v_buy_cost cst_item_costs.item_cost%type := null ;
2201:
2202: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2203:
2204: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
2200: v_buy_cost cst_item_costs.item_cost%type := null ;
2201:
2202: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2203:
2204: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
2205: v_buy_cost_type_id cst_item_costs.cost_type_id%type ;
2206: v_rolledup_cost_count number ;
2207: v_rolledup_cost number ;
2208: lBuyCostType varchar2(30);
2201:
2202: v_organization_type bom_cto_src_orgs.organization_type%type := null ;
2203:
2204: v_cto_cost_type_id cst_item_costs.cost_type_id%type ;
2205: v_buy_cost_type_id cst_item_costs.cost_type_id%type ;
2206: v_rolledup_cost_count number ;
2207: v_rolledup_cost number ;
2208: lBuyCostType varchar2(30);
2209:
2330:
2331: lStmtNum := 30;
2332: begin
2333:
2334: select item_cost into v_cto_cost from cst_item_costs
2335: where inventory_item_id = pConfigId
2336: and organization_id = p_cost_organization_id -- 3116778
2337: and cost_type_id = v_cto_cost_type_id ;
2338:
2367:
2368: lStmtNum := 35;
2369: begin
2370:
2371: select item_cost into v_valuation_cost from cst_item_costs
2372: where inventory_item_id = pConfigId
2373: and organization_id = p_cost_organization_id -- 3116778
2374: and cost_type_id = v_primary_cost_method ;
2375:
2429: lStmtNum := 40;
2430:
2431: if( lBuyCostType is not null ) then
2432: begin
2433: select item_cost into v_buy_cost from cst_item_costs
2434: where inventory_item_id = pConfigId
2435: and organization_id = p_cost_organization_id -- 3116778
2436: and cost_type_id = v_buy_cost_type_id ;
2437: