DBA Data[Home] [Help]

APPS.CST_REVENUECOGSMATCH_PVT dependencies on CST_REVENUE_COGS_MATCH_LINES

Line 879: cst_revenue_cogs_match_lines crcml,

875: cce.cogs_percentage cogs_percentage,
876: sum(cce.event_quantity) prior_event_quantity
877: FROM mtl_material_transactions mmt,
878: oe_order_lines_all ool,
879: cst_revenue_cogs_match_lines crcml,
880: cst_cogs_events cce,
881: mtl_system_items_b item
882: ,cst_acct_info_v caiv --BUG#7463298
883: ,mtl_parameters mp --BUG#9306124

Line 947: cst_revenue_cogs_match_lines crcml,

943: cce.cogs_percentage cogs_percentage,
944: sum(cce.event_quantity) prior_event_quantity
945: FROM mtl_material_transactions mmt,
946: oe_order_lines_all ool,
947: cst_revenue_cogs_match_lines crcml,
948: cst_cogs_events cce,
949: mtl_system_items_b item
950: ,cst_acct_info_v caiv --BUG#7463298
951: ,mtl_parameters mp --BUG#9306124

Line 1279: cst_revenue_cogs_match_lines crcml,

1275: crcml.cogs_acct_id,
1276: nvl(mp.process_enabled_flag,'N'),
1277: oap.acct_period_id -- acct period ID, I should store this in CCE so I don't keep having to go back to OAP
1278: FROM cst_cogs_events cce,
1279: cst_revenue_cogs_match_lines crcml,
1280: mtl_parameters mp,
1281: org_acct_periods oap,
1282: cst_acct_info_v caiv,
1283: mtl_system_items msi

Line 1590: FROM cst_revenue_cogs_match_lines crcml,

1586: ,MAX(mmt.transaction_date) mmt_transaction_date
1587: ,MAX(mmt.acct_period_id) mmt_period_id
1588: --}
1589: ,MAX(crrl.rowid) l_rowid
1590: FROM cst_revenue_cogs_match_lines crcml,
1591: cst_revenue_recognition_lines crrl,
1592: cst_cogs_events cce,
1593: mtl_parameters mp,
1594: gl_period_statuses gps,

Line 1772: cst_revenue_cogs_match_lines crcml,

1768: FROM ( SELECT
1769: DISTINCT caiv.organization_id,
1770: caiv.legal_entity
1771: FROM cst_revenue_recognition_lines crrl,
1772: cst_revenue_cogs_match_lines crcml,
1773: cst_acct_info_v caiv
1774: WHERE crrl.potentially_unmatched_flag='Y'
1775: AND crcml.revenue_om_line_id =crrl.revenue_om_line_id
1776: AND DECODE(p_neg_req_id,NULL,NVL(crrl.request_id,-99),p_neg_req_id) = NVL(crrl.request_id,-99)

Line 1834: ,cst_revenue_cogs_match_lines crcml

1830: INTO l_max_period_num --l_rev_cogs_period_num
1831: ,l_min_period_num
1832: FROM gl_period_statuses glp
1833: ,cst_revenue_recognition_lines crrl
1834: ,cst_revenue_cogs_match_lines crcml
1835: ,cst_cogs_events cce
1836: WHERE crrl.acct_period_num = l_per_num_tab(j)
1837: AND crrl.potentially_unmatched_flag = 'Y'
1838: AND crrl.revenue_om_line_id = crcml.revenue_om_line_id

Line 2698: INSERT INTO cst_revenue_cogs_match_lines (

2694: -- Insert a new row into CRCML - if it already has this row, the unique index will be violated (DUP_VAL_ON_INDEX)
2695: BEGIN
2696: l_stmt_num := 30;
2697: debug(l_stmt_num);
2698: INSERT INTO cst_revenue_cogs_match_lines (
2699: cogs_om_line_id,
2700: revenue_om_line_id,
2701: cogs_acct_id,
2702: deferred_cogs_acct_id,

Line 3182: cst_revenue_cogs_match_lines crcml,

3178: crcml.cogs_acct_id,
3179: nvl(mp.process_enabled_flag,'N'),
3180: oap.acct_period_id
3181: FROM cst_cogs_events cce,
3182: cst_revenue_cogs_match_lines crcml,
3183: mtl_parameters mp,
3184: org_acct_periods oap,
3185: cst_acct_info_v caiv,
3186: mtl_system_items msi

Line 3532: UPDATE cst_revenue_cogs_match_lines crcml

3528: -- It's possible that two or more MMT transactions get created for the same sales
3529: -- order line, that's why it is necessary to first check whether the quantity
3530: -- already has a value and, if so, perform an average of the new parameters
3531: -- and whatever is already in the table already for these columns.
3532: UPDATE cst_revenue_cogs_match_lines crcml
3533: SET unit_material_cost = decode(original_shipped_qty, NULL, p_unit_material_cost,
3534: ((unit_material_cost*original_shipped_qty) +
3535: (p_unit_material_cost*p_txn_quantity)) /
3536: (original_shipped_qty + p_txn_quantity)),

Line 3794: FROM cst_revenue_cogs_match_lines crcml

3790: l_elemental_cost(5),
3791: l_unit_cost,
3792: l_def_cogs_acct_id,
3793: l_cogs_acct_id
3794: FROM cst_revenue_cogs_match_lines crcml
3795: WHERE cogs_om_line_id = p_cogs_om_line_id
3796: AND pac_cost_type_id IS NULL;
3797:
3798: IF l_stmtLog THEN

Line 4076: FROM cst_revenue_cogs_match_lines crcml

4072: l_elemental_cost(4),
4073: l_elemental_cost(5),
4074: l_cogs_acct_id,
4075: l_def_cogs_acct_id
4076: FROM cst_revenue_cogs_match_lines crcml
4077: WHERE cogs_om_line_id = p_cogs_om_line_id
4078: AND pac_cost_type_id IS NULL;
4079:
4080: FOR i IN 1..5 LOOP

Line 4220: cst_revenue_cogs_match_lines crcml,

4216: crcml.unit_cost,
4217: sob.currency_code,
4218: NVL(mmt.transaction_source_id, -1)
4219: FROM cst_cogs_events cce,
4220: cst_revenue_cogs_match_lines crcml,
4221: mtl_parameters mp,
4222: gl_sets_of_books sob,
4223: mtl_material_transactions mmt -- joining here to use the index on costed_flag
4224: WHERE

Line 4808: INTO cst_revenue_cogs_match_lines crcml

4804: );
4805: END IF;
4806:
4807: MERGE
4808: INTO cst_revenue_cogs_match_lines crcml
4809: USING (
4810: SELECT cogs_om_line_id,
4811: p_cost_type_id pac_cost_type_id,
4812: revenue_om_line_id,

Line 4821: FROM cst_revenue_cogs_match_lines

4817: operating_unit_id,
4818: ledger_id,
4819: sales_order_issue_date,
4820: original_shipped_qty
4821: FROM cst_revenue_cogs_match_lines
4822: WHERE cogs_om_line_id = l_cogs_om_line_id
4823: AND pac_cost_type_id IS NULL
4824: ) X
4825: ON (

Line 4989: FROM cst_revenue_cogs_match_lines crcml

4985: l_elemental_cost(4),
4986: l_elemental_cost(5),
4987: l_def_cogs_acct_id,
4988: l_cogs_acct_id
4989: FROM cst_revenue_cogs_match_lines crcml
4990: WHERE cogs_om_line_id = p_cogs_om_line_id
4991: AND pac_cost_type_id = p_ae_txn_rec.cost_type_id;
4992:
4993:

Line 5178: FROM cst_revenue_cogs_match_lines crcml

5174: l_elemental_cost(4),
5175: l_elemental_cost(5),
5176: l_def_cogs_acct_id,
5177: l_cogs_acct_id
5178: FROM cst_revenue_cogs_match_lines crcml
5179: WHERE cogs_om_line_id = p_ae_txn_rec.om_line_id
5180: AND pac_cost_type_id = p_ae_txn_rec.cost_type_id;
5181:
5182: l_stmt_num := 20;

Line 6088: CST_REVENUE_COGS_MATCH_LINES CRCML,

6084: CRCML.DEFERRED_COGS_ACCT_ID,
6085: sum(decode(mta.accounting_line_type, 35, MTA.BASE_TRANSACTION_VALUE,0)) COGS_BALANCE,
6086: sum(decode(mta.accounting_line_type, 36, MTA.BASE_TRANSACTION_VALUE,0)) DEF_COGS_BALANCE
6087: FROM
6088: CST_REVENUE_COGS_MATCH_LINES CRCML,
6089: CST_COGS_EVENTS CCE,
6090: GL_PERIOD_STATUSES GPS,
6091: OE_ORDER_LINES_ALL OOL,
6092: OE_ORDER_HEADERS_ALL OOH,

Line 6136: CST_REVENUE_COGS_MATCH_LINES CRCML,

6132: CRCML.DEFERRED_COGS_ACCT_ID,
6133: sum(decode(mta.accounting_line_type, 35, MTA.BASE_TRANSACTION_VALUE,0)) COGS_BALANCE,
6134: sum(decode(mta.accounting_line_type, 36, MTA.BASE_TRANSACTION_VALUE,0)) DEF_COGS_BALANCE
6135: FROM
6136: CST_REVENUE_COGS_MATCH_LINES CRCML,
6137: CST_COGS_EVENTS CCE,
6138: GL_PERIOD_STATUSES GPS,
6139: OE_ORDER_LINES_ALL OOL,
6140: OE_ORDER_HEADERS_ALL OOH,

Line 6468: CST_REVENUE_COGS_MATCH_LINES CRCML,

6464: CRCML.DEFERRED_COGS_ACCT_ID,
6465: sum(decode(CAL.ae_line_type_code, 35, nvl(CAL.accounted_dr,0) - nvl(CAL.accounted_cr,0),0)) COGS_BALANCE,
6466: sum(decode(CAL.ae_line_type_code, 36, nvl(CAL.accounted_dr,0) - nvl(CAL.accounted_cr,0),0)) DEF_COGS_BALANCE
6467: FROM
6468: CST_REVENUE_COGS_MATCH_LINES CRCML,
6469: CST_COGS_EVENTS CCE,
6470: OE_ORDER_LINES_ALL OOL,
6471: OE_ORDER_HEADERS_ALL OOH,
6472: CST_COST_GROUP_ASSIGNMENTS CCGA,

Line 7492: FROM cst_revenue_cogs_match_lines CRCML

7488: FROM cst_revenue_recognition_lines CRRL
7489: WHERE CRRL.potentially_unmatched_flag = 'Y'
7490: AND CRRL.ledger_id = p_ledger_id
7491: AND (NOT EXISTS (SELECT NULL
7492: FROM cst_revenue_cogs_match_lines CRCML
7493: WHERE CRCML.revenue_om_line_id = CRRL.revenue_om_line_id
7494: AND CRCML.ledger_id = p_ledger_id)
7495: OR EXISTS
7496: (SELECT 1

Line 7497: FROM mtl_transactions_interface mti , cst_revenue_cogs_match_lines crcml

7493: WHERE CRCML.revenue_om_line_id = CRRL.revenue_om_line_id
7494: AND CRCML.ledger_id = p_ledger_id)
7495: OR EXISTS
7496: (SELECT 1
7497: FROM mtl_transactions_interface mti , cst_revenue_cogs_match_lines crcml
7498: WHERE mti.trx_source_line_id = crcml.cogs_om_line_id
7499: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7500: UNION
7501: SELECT 1

Line 7502: FROM mtl_material_transactions_temp mmtt, cst_revenue_cogs_match_lines crcml

7498: WHERE mti.trx_source_line_id = crcml.cogs_om_line_id
7499: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7500: UNION
7501: SELECT 1
7502: FROM mtl_material_transactions_temp mmtt, cst_revenue_cogs_match_lines crcml
7503: WHERE mmtt.trx_source_line_id = crcml.cogs_om_line_id
7504: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7505: UNION
7506: SELECT 1

Line 7507: FROM mtl_material_transactions mmt, cst_revenue_cogs_match_lines crcml

7503: WHERE mmtt.trx_source_line_id = crcml.cogs_om_line_id
7504: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7505: UNION
7506: SELECT 1
7507: FROM mtl_material_transactions mmt, cst_revenue_cogs_match_lines crcml
7508: WHERE mmt.trx_source_line_id = crcml.cogs_om_line_id
7509: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7510: AND mmt.cogs_recognition_percent is null
7511: AND mmt.so_issue_account_type = 2

Line 7516: FROM mtl_material_transactions mmt, cst_revenue_cogs_match_lines crcml

7512: AND mmt.transaction_type_id = 33
7513: AND Nvl(mmt.logical_transactions_created,2)=2
7514: UNION
7515: SELECT 1
7516: FROM mtl_material_transactions mmt, cst_revenue_cogs_match_lines crcml
7517: WHERE mmt.trx_source_line_id = crcml.cogs_om_line_id
7518: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7519: AND mmt.cogs_recognition_percent IS null
7520: AND mmt.so_issue_account_type = 2

Line 7529: FROM cst_revenue_cogs_match_lines CRCML

7525: FROM cst_revenue_recognition_lines CRRL
7526: WHERE CRRL.potentially_unmatched_flag = 'P'
7527: AND CRRL.ledger_id = p_ledger_id
7528: AND EXISTS (SELECT NULL
7529: FROM cst_revenue_cogs_match_lines CRCML
7530: WHERE CRCML.revenue_om_line_id = CRRL.revenue_om_line_id
7531: AND CRCML.ledger_id = p_ledger_id)
7532: and not exists
7533: (SELECT 1

Line 7534: FROM mtl_transactions_interface mti , cst_revenue_cogs_match_lines crcml

7530: WHERE CRCML.revenue_om_line_id = CRRL.revenue_om_line_id
7531: AND CRCML.ledger_id = p_ledger_id)
7532: and not exists
7533: (SELECT 1
7534: FROM mtl_transactions_interface mti , cst_revenue_cogs_match_lines crcml
7535: WHERE mti.trx_source_line_id = crcml.cogs_om_line_id
7536: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7537: UNION
7538: SELECT 1

Line 7539: FROM mtl_material_transactions_temp mmtt, cst_revenue_cogs_match_lines crcml

7535: WHERE mti.trx_source_line_id = crcml.cogs_om_line_id
7536: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7537: UNION
7538: SELECT 1
7539: FROM mtl_material_transactions_temp mmtt, cst_revenue_cogs_match_lines crcml
7540: WHERE mmtt.trx_source_line_id = crcml.cogs_om_line_id
7541: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7542: UNION
7543: SELECT 1

Line 7544: FROM mtl_material_transactions mmt, cst_revenue_cogs_match_lines crcml

7540: WHERE mmtt.trx_source_line_id = crcml.cogs_om_line_id
7541: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7542: UNION
7543: SELECT 1
7544: FROM mtl_material_transactions mmt, cst_revenue_cogs_match_lines crcml
7545: WHERE mmt.trx_source_line_id = crcml.cogs_om_line_id
7546: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7547: AND mmt.cogs_recognition_percent is null
7548: AND mmt.so_issue_account_type = 2

Line 7553: FROM mtl_material_transactions mmt, cst_revenue_cogs_match_lines crcml

7549: AND mmt.transaction_type_id = 33
7550: AND Nvl(mmt.logical_transactions_created,2)=2
7551: UNION
7552: SELECT 1
7553: FROM mtl_material_transactions mmt, cst_revenue_cogs_match_lines crcml
7554: WHERE mmt.trx_source_line_id = crcml.cogs_om_line_id
7555: AND crcml.revenue_om_line_id=crrl.revenue_om_line_id
7556: AND mmt.cogs_recognition_percent IS null
7557: AND mmt.so_issue_account_type = 2

Line 7571: , cst_revenue_cogs_match_lines crcml

7567: --
7568: SELECT crrl.rowid l_rowid
7569: , DECODE(crrl.acct_period_num,latest_rev.mper,'Y',NULL) flag
7570: FROM cst_revenue_recognition_lines CRRL
7571: , cst_revenue_cogs_match_lines crcml
7572: , cst_cogs_events cce
7573: , gl_period_statuses glp
7574: , (SELECT MAX(crrl3.acct_period_num) mper
7575: , crrl3.revenue_om_line_id