DBA Data[Home] [Help]

APPS.CSTPLVCP dependencies on MTL_CST_TXN_COST_DETAILS

Line 391: INTO mtl_cst_txn_cost_details (

387: IF l_so_line_id IS NOT NULL THEN
388: -- A Sales Order is referenced, use the average cost of the Sales Order Issues
389: l_stmt_num := 74;
390: INSERT
391: INTO mtl_cst_txn_cost_details (
392: transaction_id,
393: organization_id,
394: inventory_item_id,
395: cost_element_id,

Line 454: INTO mtl_cst_txn_cost_details (

450: IF SQL%NOTFOUND THEN
451: -- Try the old Code prevention of regression
452: l_stmt_num := 75;
453: INSERT
454: INTO mtl_cst_txn_cost_details (
455: transaction_id,
456: organization_id,
457: inventory_item_id,
458: cost_element_id,

Line 512: INTO mtl_cst_txn_cost_details (

508: -- No Sales Order is referenced and the cost method is FIFO, use the cost of
509: -- earliest positive layer if one exists
510: l_stmt_num := 76;
511: INSERT
512: INTO mtl_cst_txn_cost_details (
513: transaction_id,
514: organization_id,
515: inventory_item_id,
516: cost_element_id,

Line 1831: insert into mtl_cst_txn_cost_details (

1827: if (l_err_num <> 0) then
1828: raise process_error;
1829: end if;
1830: else
1831: insert into mtl_cst_txn_cost_details (
1832: transaction_id,
1833: organization_id,
1834: cost_element_id,
1835: level_type,

Line 2012: FROM mtl_cst_txn_cost_details ctcd

2008: NULL,
2009: 'N',
2010: 0,
2011: 'N'
2012: FROM mtl_cst_txn_cost_details ctcd
2013: WHERE ctcd.transaction_id = l_txn_update_id
2014: AND ctcd.organization_id = l_std_org
2015: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug #3835412
2016:

Line 2121: FROM mtl_cst_txn_cost_details ctcd

2117: NULL,
2118: 'N',
2119: 0,
2120: 'N'
2121: FROM mtl_cst_txn_cost_details ctcd
2122: WHERE ctcd.transaction_id = l_txn_update_id
2123: AND ctcd.organization_id = l_std_org
2124: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug #3835412
2125:

Line 2216: FROM mtl_cst_txn_cost_details ctcd

2212: NULL,
2213: 'N',
2214: 0,
2215: 'N'
2216: FROM mtl_cst_txn_cost_details ctcd
2217: WHERE ctcd.transaction_id = decode(i_txn_org_id, l_std_org, l_txfr_txn_id, l_txn_update_id) -- sending txn id
2218: AND ctcd.organization_id = l_std_org
2219: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug #3835412
2220:

Line 2517: insert into mtl_cst_txn_cost_details (

2513: into l_from_cost_org
2514: from mtl_parameters
2515: where organization_id = i_from_org;
2516:
2517: insert into mtl_cst_txn_cost_details (
2518: transaction_id,
2519: organization_id,
2520: cost_element_id,
2521: level_type,

Line 2565: insert into mtl_cst_txn_cost_details (

2561:
2562: elsif (i_exp_flag = 1) then
2563: l_stmt_num := 15;
2564:
2565: insert into mtl_cst_txn_cost_details (
2566: transaction_id,
2567: organization_id,
2568: cost_element_id,
2569: level_type,

Line 2609: insert into mtl_cst_txn_cost_details (

2605:
2606: else
2607:
2608: l_stmt_num := 20;
2609: insert into mtl_cst_txn_cost_details (
2610: transaction_id,
2611: organization_id,
2612: cost_element_id,
2613: level_type,

Line 2658: from mtl_cst_txn_cost_details mctcd

2654: l_stmt_num := 30;
2655: -- Find out if there is already exist this level material overhead in mctcd.
2656: select count(*)
2657: into l_movh_cnt
2658: from mtl_cst_txn_cost_details mctcd
2659: where mctcd.transaction_id = i_txn_update_id
2660: and mctcd.organization_id = i_to_org
2661: and mctcd.inventory_item_id = i_item_id
2662: and mctcd.level_type = 1

Line 2669: from mtl_cst_txn_cost_details mctcd

2665: if (l_movh_cnt > 0) then
2666: l_stmt_num := 40;
2667: select NVL(mctcd.transaction_cost,0)
2668: into l_rcv_movh
2669: from mtl_cst_txn_cost_details mctcd
2670: where mctcd.transaction_id = i_txn_update_id
2671: and mctcd.organization_id = i_to_org
2672: and mctcd.inventory_item_id = i_item_id
2673: and mctcd.level_type = 1

Line 2699: update mtl_cst_txn_cost_details mctcd

2695: -- If there already exist movh in mctcd, then update mctcd with new movhd
2696: -- value. Otherwise insert the new movhd into mctcd
2697: if (l_movh_cnt > 0) then
2698: l_stmt_num := 50;
2699: update mtl_cst_txn_cost_details mctcd
2700: set mctcd.transaction_cost = l_rcv_movh
2701: where mctcd.transaction_id = i_txn_update_id
2702: and mctcd.organization_id = i_to_org
2703: and mctcd.inventory_item_id = i_item_id

Line 2708: insert into mtl_cst_txn_cost_details (

2704: and mctcd.level_type = 1
2705: and mctcd.cost_element_id = 2;
2706: elsif (l_rcv_movh > 0) then
2707: l_stmt_num := 60;
2708: insert into mtl_cst_txn_cost_details (
2709: transaction_id,
2710: organization_id,
2711: cost_element_id,
2712: level_type,

Line 2893: insert into mtl_cst_txn_cost_details(

2889: -- populate mctcd
2890: if (i_hook = 0) then -- if no hook is used then populate mctcd
2891: if l_temp_element_cost(l_index_counter) <> 0 then
2892: l_stmt_num := 25;
2893: insert into mtl_cst_txn_cost_details(
2894: TRANSACTION_ID,
2895: ORGANIZATION_ID,
2896: COST_ELEMENT_ID,
2897: LEVEL_TYPE,

Line 3180: from mtl_cst_txn_cost_details

3176: -- mctcd will be created before sub_transfer is called.
3177:
3178: select count(*)
3179: into l_txn_cost_exist
3180: from mtl_cst_txn_cost_details
3181: where transaction_id = i_txn_id
3182: and organization_id = i_org_id;
3183:
3184: l_stmt_num := 70;

Line 3689: from mtl_cst_txn_cost_details

3685: if (l_exp_item = 0 and l_layer_chg = 1 and l_to_exp = 0) then
3686: if i_hook = 0 then -- no cost hook
3687: select count(*) -- check for existing mctcd
3688: into l_txn_cost_exist
3689: from mtl_cst_txn_cost_details
3690: where transaction_id = i_txn_id
3691: and organization_id = i_org_id;
3692: if l_txn_cost_exist = 0 then -- populate mctcd if it does not exist
3693: insert into mtl_cst_txn_cost_details(

Line 3693: insert into mtl_cst_txn_cost_details(

3689: from mtl_cst_txn_cost_details
3690: where transaction_id = i_txn_id
3691: and organization_id = i_org_id;
3692: if l_txn_cost_exist = 0 then -- populate mctcd if it does not exist
3693: insert into mtl_cst_txn_cost_details(
3694: transaction_id,
3695: organization_id,
3696: cost_element_id,
3697: level_type,

Line 3822: insert into mtl_cst_txn_cost_details(

3818:
3819: if (l_exp_item = 0 and l_layer_chg = 0 and l_from_exp = 1 and l_to_exp = 0) then
3820: if i_hook = 0 and l_txn_cost_exist = 0 then -- no cost hook and no mctcd
3821: if l_inv_layer_id = 0 then -- no layer cost
3822: insert into mtl_cst_txn_cost_details(
3823: transaction_id,
3824: organization_id,
3825: cost_element_id,
3826: level_type,

Line 3855: insert into mtl_cst_txn_cost_details(

3851: sysdate,
3852: i_item_id,
3853: 0);
3854: else -- has layer cost
3855: insert into mtl_cst_txn_cost_details(
3856: transaction_id,
3857: organization_id,
3858: cost_element_id,
3859: level_type,

Line 4633: insert into mtl_cst_txn_cost_details (

4629: fnd_file.put_line(fnd_file.log, 'inserting to MCTCD for txn: ' || i_txn_id || '. trxCost: ' || l_rcv_txn_cost);
4630: END IF;
4631:
4632: l_stmt_num := 80;
4633: insert into mtl_cst_txn_cost_details (
4634: transaction_id,
4635: organization_id,
4636: cost_element_id,
4637: level_type,