DBA Data[Home] [Help]

APPS.CSTPAVCP dependencies on MTL_CST_TXN_COST_DETAILS

Line 455: INTO mtl_cst_txn_cost_details (

451: IF l_so_line_id IS NOT NULL THEN
452: -- A Sales Order is referenced, use the average cost of the Sales Order Issues
453: l_stmt_num := 86;
454: INSERT
455: INTO mtl_cst_txn_cost_details (
456: transaction_id,
457: organization_id,
458: inventory_item_id,
459: cost_element_id,

Line 908: FROM mtl_cst_txn_cost_details ctcd,

904: ),
905: 0
906: )
907: )
908: FROM mtl_cst_txn_cost_details ctcd,
909: cst_quantity_layers cql,
910: cst_layer_cost_details clcd
911: WHERE ctcd.transaction_id = i_txn_id
912: AND ctcd.organization_id = i_org_id

Line 2420: from mtl_cst_txn_cost_details

2416: --
2417:
2418: Select count(*)
2419: into l_txn_cost_exist
2420: from mtl_cst_txn_cost_details
2421: where transaction_id = i_txn_id
2422: and organization_id = i_org_id
2423: /* and transaction_cost >= 0 */; -- modified for bug#3835412
2424:

Line 2487: FROM mtl_cst_txn_cost_details ctcd

2483: NULL,
2484: 'Y',
2485: 0,
2486: 'N'
2487: FROM mtl_cst_txn_cost_details ctcd
2488: WHERE ctcd.transaction_id = i_txn_id
2489: AND ctcd.organization_id = i_org_id
2490: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug#3835412
2491:

Line 5245: insert into mtl_cst_txn_cost_details (

5241: IF g_debug = 'Y' THEN
5242: fnd_file.put_line(fnd_file.log, '<< 5243: END IF;
5244: else
5245: insert into mtl_cst_txn_cost_details (
5246: transaction_id,
5247: organization_id,
5248: cost_element_id,
5249: level_type,

Line 5394: FROM mtl_cst_txn_cost_details ctcd

5390: NULL,
5391: 'N',
5392: 0,
5393: 'N'
5394: FROM mtl_cst_txn_cost_details ctcd
5395: WHERE ctcd.transaction_id = l_txn_update_id
5396: AND ctcd.organization_id = l_std_org
5397: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug#3835412
5398:

Line 5476: FROM mtl_cst_txn_cost_details ctcd

5472: NULL,
5473: 'N',
5474: 0,
5475: 'N'
5476: FROM mtl_cst_txn_cost_details ctcd
5477: WHERE ctcd.transaction_id = l_txn_update_id
5478: AND ctcd.organization_id = l_std_org
5479: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug#3835412
5480:

Line 5570: FROM mtl_cst_txn_cost_details ctcd

5566: NULL,
5567: 'N',
5568: 0,
5569: 'N'
5570: FROM mtl_cst_txn_cost_details ctcd
5571: WHERE ctcd.transaction_id = decode(i_txn_org_id, l_std_org, l_txfr_txn_id, l_txn_update_id) -- sending txn id
5572: AND ctcd.organization_id = l_std_org
5573: /* AND ctcd.transaction_cost >= 0 */; -- modified for bug#3835412
5574:

Line 5956: insert into mtl_cst_txn_cost_details(

5952: -- populate mctcd
5953: if (i_hook = 0) then -- if no hook is used then pouplate mctcd
5954: if l_temp_element_cost(l_index_counter) <> 0 then -- if element cost is not 0 then insert into MCTCD
5955: l_stmt_num := 20;
5956: insert into mtl_cst_txn_cost_details(
5957: TRANSACTION_ID,
5958: ORGANIZATION_ID,
5959: COST_ELEMENT_ID,
5960: LEVEL_TYPE,

Line 5992: from mtl_cst_txn_cost_details

5988: end if;
5989: if l_index_counter = 5 then
5990: l_count :=0;
5991: Select count(*) into l_count
5992: from mtl_cst_txn_cost_details
5993: where transaction_id = i_txn_id;
5994:
5995: if (l_count = 0) then
5996: for i in 1..5 loop

Line 5999: insert into mtl_cst_txn_cost_details(

5995: if (l_count = 0) then
5996: for i in 1..5 loop
5997: if (l_cost_element(i) <> 0) then
5998: /* Insert int MCTCD only if cost element exists in MCACD with zero transaction cost */
5999: insert into mtl_cst_txn_cost_details(
6000: TRANSACTION_ID,
6001: ORGANIZATION_ID,
6002: COST_ELEMENT_ID,
6003: LEVEL_TYPE,

Line 6216: insert into mtl_cst_txn_cost_details (

6212: into l_from_cost_org
6213: from mtl_parameters
6214: where organization_id = i_from_org;
6215:
6216: insert into mtl_cst_txn_cost_details (
6217: transaction_id,
6218: organization_id,
6219: cost_element_id,
6220: level_type,

Line 6265: insert into mtl_cst_txn_cost_details (

6261: else
6262:
6263: l_stmt_num := 20;
6264: IF (i_hook_used = 0) THEN
6265: insert into mtl_cst_txn_cost_details (
6266: transaction_id,
6267: organization_id,
6268: cost_element_id,
6269: level_type,

Line 6309: insert into mtl_cst_txn_cost_details (

6305: ELSE
6306: IF g_debug = 'Y' THEN
6307: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used, inserting in MCTCD from MCACD');
6308: END IF;
6309: insert into mtl_cst_txn_cost_details (
6310: transaction_id,
6311: organization_id,
6312: cost_element_id,
6313: level_type,

Line 6357: insert into mtl_cst_txn_cost_details (

6353:
6354: --bug 4210943 - insert a dummy mctcd record for the transaction if there is no cost defined for the item in the sending org
6355: if SQL%ROWCOUNT = 0 then
6356: l_stmt_num := 25;
6357: insert into mtl_cst_txn_cost_details (
6358: transaction_id,
6359: organization_id,
6360: cost_element_id,
6361: level_type,

Line 6401: from mtl_cst_txn_cost_details mctcd

6397: l_stmt_num := 30;
6398: -- Find out if there is already exist this level material overhead in mctcd.
6399: select count(*)
6400: into l_movh_cnt
6401: from mtl_cst_txn_cost_details mctcd
6402: where mctcd.transaction_id = i_txn_update_id
6403: and mctcd.organization_id = i_to_org
6404: and mctcd.inventory_item_id = i_item_id
6405: and mctcd.level_type = 1

Line 6412: from mtl_cst_txn_cost_details mctcd

6408: if (l_movh_cnt > 0) then
6409: l_stmt_num := 40;
6410: select NVL(mctcd.transaction_cost,0)
6411: into l_rcv_movh
6412: from mtl_cst_txn_cost_details mctcd
6413: where mctcd.transaction_id = i_txn_update_id
6414: and mctcd.organization_id = i_to_org
6415: and mctcd.inventory_item_id = i_item_id
6416: and mctcd.level_type = 1

Line 6442: update mtl_cst_txn_cost_details mctcd

6438: -- If there already exist movh in mctcd, then update mctcd with new movhd
6439: -- value. Otherwise insert the new movhd into mctcd
6440: if (l_movh_cnt > 0) then
6441: l_stmt_num := 50;
6442: update mtl_cst_txn_cost_details mctcd
6443: set mctcd.transaction_cost = l_rcv_movh
6444: where mctcd.transaction_id = i_txn_update_id
6445: and mctcd.organization_id = i_to_org
6446: and mctcd.inventory_item_id = i_item_id

Line 6451: insert into mtl_cst_txn_cost_details (

6447: and mctcd.level_type = 1
6448: and mctcd.cost_element_id = 2;
6449: elsif (l_rcv_movh > 0) then
6450: l_stmt_num := 60;
6451: insert into mtl_cst_txn_cost_details (
6452: transaction_id,
6453: organization_id,
6454: cost_element_id,
6455: level_type,

Line 6756: from mtl_cst_txn_cost_details

6752:
6753: if (c_mmt_txn_rec.logical_transaction = 1 OR c_mmt_txn_rec.transaction_type_id = 20) then
6754: select count(*)
6755: into l_mctcd_count
6756: from mtl_cst_txn_cost_details
6757: where transaction_id = c_mmt_txn_rec.transaction_id;
6758:
6759: if (l_mctcd_count = 0) then
6760: if (c_mmt_txn_rec.transaction_type_id = 20) then

Line 6882: FROM mtl_cst_txn_cost_details ctcd

6878: NULL,
6879: 'N',
6880: 0,
6881: 'N'
6882: FROM mtl_cst_txn_cost_details ctcd
6883: WHERE transaction_id = c_mmt_txn_rec.transaction_id;
6884:
6885: if (g_debug = 'Y') then
6886: fnd_file.put_line (fnd_file.log, 'Inserted in mcacd:' || sql%rowcount);

Line 9040: insert into mtl_cst_txn_cost_details (

9036: fnd_file.put_line(fnd_file.log, 'inserting to MCTCD for txn: ' || i_txn_id || '. trxCost: ' || l_rcv_txn_cost);
9037: END IF;
9038:
9039: l_stmt_num := 80;
9040: insert into mtl_cst_txn_cost_details (
9041: transaction_id,
9042: organization_id,
9043: cost_element_id,
9044: level_type,