DBA Data[Home] [Help]

APPS.CSTPAVCP dependencies on MTL_CST_TXN_COST_DETAILS

Line 458: INSERT INTO mtl_cst_txn_cost_details (

454: l_stmt_num := 87;
455: --
456: -- Cost owned transactions within the same ledger across inv org
457: --
458: INSERT INTO mtl_cst_txn_cost_details (
459: transaction_id,
460: organization_id,
461: inventory_item_id,
462: cost_element_id,

Line 524: INTO mtl_cst_txn_cost_details (

520: -- A Sales Order is referenced, use the average cost of the Sales Order Issues
521: -- Try the old Code prevention of regression
522: l_stmt_num := 86;
523: INSERT
524: INTO mtl_cst_txn_cost_details (
525: transaction_id,
526: organization_id,
527: inventory_item_id,
528: cost_element_id,

Line 977: FROM mtl_cst_txn_cost_details ctcd,

973: ),
974: 0
975: )
976: )
977: FROM mtl_cst_txn_cost_details ctcd,
978: cst_quantity_layers cql,
979: cst_layer_cost_details clcd
980: WHERE ctcd.transaction_id = i_txn_id
981: AND ctcd.organization_id = i_org_id

Line 2587: from mtl_cst_txn_cost_details

2583: --
2584:
2585: Select count(*)
2586: into l_txn_cost_exist
2587: from mtl_cst_txn_cost_details
2588: where transaction_id = i_txn_id
2589: and organization_id = i_org_id
2590: /* and transaction_cost >= 0 */; -- modified for bug#3835412
2591:

Line 2654: FROM mtl_cst_txn_cost_details ctcd

2650: NULL,
2651: 'Y',
2652: 0,
2653: 'N'
2654: FROM mtl_cst_txn_cost_details ctcd
2655: WHERE ctcd.transaction_id = i_txn_id
2656: AND ctcd.organization_id = i_org_id
2657: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug#3835412
2658:

Line 5438: insert into mtl_cst_txn_cost_details (

5434: IF g_debug = 'Y' THEN
5435: fnd_file.put_line(fnd_file.log, '<< 5436: END IF;
5437: else
5438: insert into mtl_cst_txn_cost_details (
5439: transaction_id,
5440: organization_id,
5441: cost_element_id,
5442: level_type,

Line 5587: FROM mtl_cst_txn_cost_details ctcd

5583: NULL,
5584: 'N',
5585: 0,
5586: 'N'
5587: FROM mtl_cst_txn_cost_details ctcd
5588: WHERE ctcd.transaction_id = l_txn_update_id
5589: AND ctcd.organization_id = l_std_org
5590: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug#3835412
5591:

Line 5669: FROM mtl_cst_txn_cost_details ctcd

5665: NULL,
5666: 'N',
5667: 0,
5668: 'N'
5669: FROM mtl_cst_txn_cost_details ctcd
5670: WHERE ctcd.transaction_id = l_txn_update_id
5671: AND ctcd.organization_id = l_std_org
5672: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug#3835412
5673:

Line 5763: FROM mtl_cst_txn_cost_details ctcd

5759: NULL,
5760: 'N',
5761: 0,
5762: 'N'
5763: FROM mtl_cst_txn_cost_details ctcd
5764: WHERE ctcd.transaction_id = decode(i_txn_org_id, l_std_org, l_txfr_txn_id, l_txn_update_id) -- sending txn id
5765: AND ctcd.organization_id = l_std_org
5766: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug#3835412
5767:

Line 6149: insert into mtl_cst_txn_cost_details(

6145: -- populate mctcd
6146: if (i_hook = 0) then -- if no hook is used then pouplate mctcd
6147: if l_temp_element_cost(l_index_counter) <> 0 then -- if element cost is not 0 then insert into MCTCD
6148: l_stmt_num := 20;
6149: insert into mtl_cst_txn_cost_details(
6150: TRANSACTION_ID,
6151: ORGANIZATION_ID,
6152: COST_ELEMENT_ID,
6153: LEVEL_TYPE,

Line 6185: from mtl_cst_txn_cost_details

6181: end if;
6182: if l_index_counter = 5 then
6183: l_count :=0;
6184: Select count(*) into l_count
6185: from mtl_cst_txn_cost_details
6186: where transaction_id = i_txn_id;
6187:
6188: if (l_count = 0) then
6189: for i in 1..5 loop

Line 6192: insert into mtl_cst_txn_cost_details(

6188: if (l_count = 0) then
6189: for i in 1..5 loop
6190: if (l_cost_element(i) <> 0) then
6191: /* Insert int MCTCD only if cost element exists in MCACD with zero transaction cost */
6192: insert into mtl_cst_txn_cost_details(
6193: TRANSACTION_ID,
6194: ORGANIZATION_ID,
6195: COST_ELEMENT_ID,
6196: LEVEL_TYPE,

Line 6409: insert into mtl_cst_txn_cost_details (

6405: into l_from_cost_org
6406: from mtl_parameters
6407: where organization_id = i_from_org;
6408:
6409: insert into mtl_cst_txn_cost_details (
6410: transaction_id,
6411: organization_id,
6412: cost_element_id,
6413: level_type,

Line 6458: insert into mtl_cst_txn_cost_details (

6454: else
6455:
6456: l_stmt_num := 20;
6457: IF (i_hook_used = 0) THEN
6458: insert into mtl_cst_txn_cost_details (
6459: transaction_id,
6460: organization_id,
6461: cost_element_id,
6462: level_type,

Line 6502: insert into mtl_cst_txn_cost_details (

6498: ELSE
6499: IF g_debug = 'Y' THEN
6500: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used, inserting in MCTCD from MCACD');
6501: END IF;
6502: insert into mtl_cst_txn_cost_details (
6503: transaction_id,
6504: organization_id,
6505: cost_element_id,
6506: level_type,

Line 6550: insert into mtl_cst_txn_cost_details (

6546:
6547: --bug 4210943 - insert a dummy mctcd record for the transaction if there is no cost defined for the item in the sending org
6548: if SQL%ROWCOUNT = 0 then
6549: l_stmt_num := 25;
6550: insert into mtl_cst_txn_cost_details (
6551: transaction_id,
6552: organization_id,
6553: cost_element_id,
6554: level_type,

Line 6594: from mtl_cst_txn_cost_details mctcd

6590: l_stmt_num := 30;
6591: -- Find out if there is already exist this level material overhead in mctcd.
6592: select count(*)
6593: into l_movh_cnt
6594: from mtl_cst_txn_cost_details mctcd
6595: where mctcd.transaction_id = i_txn_update_id
6596: and mctcd.organization_id = i_to_org
6597: and mctcd.inventory_item_id = i_item_id
6598: and mctcd.level_type = 1

Line 6605: from mtl_cst_txn_cost_details mctcd

6601: if (l_movh_cnt > 0) then
6602: l_stmt_num := 40;
6603: select NVL(mctcd.transaction_cost,0)
6604: into l_rcv_movh
6605: from mtl_cst_txn_cost_details mctcd
6606: where mctcd.transaction_id = i_txn_update_id
6607: and mctcd.organization_id = i_to_org
6608: and mctcd.inventory_item_id = i_item_id
6609: and mctcd.level_type = 1

Line 6635: update mtl_cst_txn_cost_details mctcd

6631: -- If there already exist movh in mctcd, then update mctcd with new movhd
6632: -- value. Otherwise insert the new movhd into mctcd
6633: if (l_movh_cnt > 0) then
6634: l_stmt_num := 50;
6635: update mtl_cst_txn_cost_details mctcd
6636: set mctcd.transaction_cost = l_rcv_movh
6637: where mctcd.transaction_id = i_txn_update_id
6638: and mctcd.organization_id = i_to_org
6639: and mctcd.inventory_item_id = i_item_id

Line 6644: insert into mtl_cst_txn_cost_details (

6640: and mctcd.level_type = 1
6641: and mctcd.cost_element_id = 2;
6642: elsif (l_rcv_movh > 0) then
6643: l_stmt_num := 60;
6644: insert into mtl_cst_txn_cost_details (
6645: transaction_id,
6646: organization_id,
6647: cost_element_id,
6648: level_type,

Line 6949: from mtl_cst_txn_cost_details

6945:
6946: if (c_mmt_txn_rec.logical_transaction = 1 OR c_mmt_txn_rec.transaction_type_id = 20) then
6947: select count(*)
6948: into l_mctcd_count
6949: from mtl_cst_txn_cost_details
6950: where transaction_id = c_mmt_txn_rec.transaction_id;
6951:
6952: if (l_mctcd_count = 0) then
6953: if (c_mmt_txn_rec.transaction_type_id = 20) then

Line 7075: FROM mtl_cst_txn_cost_details ctcd

7071: NULL,
7072: 'N',
7073: 0,
7074: 'N'
7075: FROM mtl_cst_txn_cost_details ctcd
7076: WHERE transaction_id = c_mmt_txn_rec.transaction_id;
7077:
7078: if (g_debug = 'Y') then
7079: fnd_file.put_line (fnd_file.log, 'Inserted in mcacd:' || sql%rowcount);

Line 9237: insert into mtl_cst_txn_cost_details (

9233: fnd_file.put_line(fnd_file.log, 'inserting to MCTCD for txn: ' || i_txn_id || '. trxCost: ' || l_rcv_txn_cost);
9234: END IF;
9235:
9236: l_stmt_num := 80;
9237: insert into mtl_cst_txn_cost_details (
9238: transaction_id,
9239: organization_id,
9240: cost_element_id,
9241: level_type,