DBA Data[Home] [Help]

APPS.INV_CONSUMPTION_ADVICE_PROC dependencies on MTL_CONSUMPTION_TRANSACTIONS

Line 98: -- COMMENT : Update mtl_consumption_transactions table with the

94: /* Bug 4969421 Starts here*/
95: --========================================================================
96: -- PROCEDURE : Update_PO_Distrubution_Id PRIVATE
97: -- PARAMETERS : -
98: -- COMMENT : Update mtl_consumption_transactions table with the
99: -- po_distribution_id and the blanket_price for all the
100: -- processed transactions
101: --========================================================================
102: PROCEDURE update_po_distrubution_id

Line 122: MTL_CONSUMPTION_TRANSACTIONS mct

118: /* Bug 5373370 - Start */
119: , mct.interface_distribution_ref
120: /* Bug 5373370 - End */
121: FROM
122: MTL_CONSUMPTION_TRANSACTIONS mct
123: WHERE
124: ( mct.blanket_price IS NULL OR mct.po_distribution_id IS NULL )
125: AND mct.net_qty > 0
126: AND mct.request_id = g_request_id

Line 182: MTL_CONSUMPTION_TRANSACTIONS mct,

178: -- Bug 5092489, Query modified to avoid use of MMT
179: SELECT pod.po_distribution_id
180: INTO l_po_distribution_id
181: FROM
182: MTL_CONSUMPTION_TRANSACTIONS mct,
183: --MTL_MATERIAL_TRANSACTIONS mmt,
184: po_line_locations_all poll,
185: po_distributions_all pod,
186: po_lines_all pol

Line 225: MTL_CONSUMPTION_TRANSACTIONS mct,

221: -- Bug 5092489, Query modified to avoid use of MMT
222: SELECT pod.po_distribution_id
223: INTO l_po_distribution_id
224: FROM
225: MTL_CONSUMPTION_TRANSACTIONS mct,
226: --MTL_MATERIAL_TRANSACTIONS mmt,
227: po_line_locations_all poll,
228: po_distributions_all pod,
229: po_lines_all pol

Line 265: ( 'Updating MTL_CONSUMPTION_TRANSACTIONS with po_distrubution_id '

261:
262: IF (l_debug = 1)
263: THEN
264: INV_LOG_UTIL.trace
265: ( 'Updating MTL_CONSUMPTION_TRANSACTIONS with po_distrubution_id '
266: ||l_po_distribution_id
267: , 9
268: );
269: END IF;

Line 271: UPDATE MTL_CONSUMPTION_TRANSACTIONS

267: , 9
268: );
269: END IF;
270:
271: UPDATE MTL_CONSUMPTION_TRANSACTIONS
272: SET po_distribution_id = l_po_distribution_id
273: WHERE transaction_id = l_transaction_id ;
274:
275: COMMIT;

Line 333: -- COMMENT : Update mtl_consumption_transactions table

329: -- p_accrual_account_id Accrual account
330: -- p_variance_account_id Variance account
331: -- p_charg_account_id Charge account
332: -- p_transaction_date Date of transaction
333: -- COMMENT : Update mtl_consumption_transactions table
334: -- This procedure is called by the Create_Consumption_Advice
335: -- procedures after creation of the
336: -- document. Update the table with the appropriate release
337: -- info or the po_header info.

Line 484: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct

480:
481: IF NVL(FND_PROFILE.value('INV_SUPPLIER_CONSIGNED_GROUPING'),'N') = 'N'
482: THEN
483: -- Bug 5092489, Query modified to eliminate use of MMT in subquery
484: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct
485: SET mct.consumption_po_header_id = p_consumption_po_header_id
486: , mct.consumption_release_id = p_consumption_release_id
487: , mct.consumption_processed_flag = l_consumption_processed_flag
488: , mct.error_code = p_error_code

Line 513: /* UPDATE MTL_CONSUMPTION_TRANSACTIONS mct

509: FROM MTL_CONSUMPTION_TXN_TEMP
510: WHERE transaction_source_id = p_transaction_source_id));
511: */
512: -- Bug 5092489, Query modified to eliminate use of MMT in subquery
513: /* UPDATE MTL_CONSUMPTION_TRANSACTIONS mct
514: SET mct.consumption_po_header_id = p_consumption_po_header_id
515: , mct.consumption_release_id = p_consumption_release_id
516: , mct.consumption_processed_flag = l_consumption_processed_flag
517: , mct.error_code = p_error_code

Line 543: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct

539: */
540:
541: ELSE
542: -- Bug 5092489, Query modified to eliminate use of MMT in subquery
543: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct
544: SET mct.consumption_po_header_id = p_consumption_po_header_id
545: , mct.consumption_release_id = p_consumption_release_id
546: , mct.consumption_processed_flag = l_consumption_processed_flag
547: , mct.error_code = p_error_code

Line 575: UPDATE MTL_CONSUMPTION_TRANSACTIONS

571: WHERE transaction_source_id = p_transaction_source_id));
572: */
573: END IF;
574:
575: UPDATE MTL_CONSUMPTION_TRANSACTIONS
576: SET consumption_po_header_id = p_consumption_po_header_id
577: , consumption_release_id = p_consumption_release_id
578: , consumption_processed_flag = l_consumption_processed_flag
579: , error_code = p_error_code

Line 583: FROM MTL_CONSUMPTION_TRANSACTIONS mct

579: , error_code = p_error_code
580: , error_explanation = l_error_explanation
581: WHERE parent_transaction_id IN
582: (SELECT mct.transaction_id
583: FROM MTL_CONSUMPTION_TRANSACTIONS mct
584: WHERE mct.batch_id = p_batch_id
585: AND mct.charge_account_id = p_charge_account_id
586: AND mct.variance_account_id = p_variance_account_id
587: AND NVL(mct.rate_type,'##') = NVL(p_global_rate_type,'##')

Line 609: -- from MTL_CONSUMPTION_TRANSACTIONS to

605:
606: --========================================================================
607: -- PROCEDURE : Load_Combination PRIVATE
608: -- COMMENT : This procedure will load all the records of a context batch
609: -- from MTL_CONSUMPTION_TRANSACTIONS to
610: -- MTL_CONSUMPTION_TRANSACTIONS_TEMP
611: -- If the batch_id passed is -1 then the call is from the
612: -- manager in which case all records with a
613: -- processed_consumption_flag are loaded.

Line 610: -- MTL_CONSUMPTION_TRANSACTIONS_TEMP

606: --========================================================================
607: -- PROCEDURE : Load_Combination PRIVATE
608: -- COMMENT : This procedure will load all the records of a context batch
609: -- from MTL_CONSUMPTION_TRANSACTIONS to
610: -- MTL_CONSUMPTION_TRANSACTIONS_TEMP
611: -- If the batch_id passed is -1 then the call is from the
612: -- manager in which case all records with a
613: -- processed_consumption_flag are loaded.
614: -- The insert statement will also be selective by the

Line 689: MTL_CONSUMPTION_TRANSACTIONS mct

685: , TRUNC(mct.transaction_date)
686: , mct.global_agreement_flag
687: , SUM(mct.net_qty)
688: FROM
689: MTL_CONSUMPTION_TRANSACTIONS mct
690: , po_vendor_sites_all pvsa
691: WHERE mct.owning_organization_id = pvsa.vendor_site_id
692: AND pvsa.vendor_id = NVL(p_vendor_id,pvsa.vendor_id)
693: AND mct.owning_organization_id =

Line 743: MTL_CONSUMPTION_TRANSACTIONS mct

739: , NVL(mct.rate,-1)
740: , TRUNC(mmt.transaction_date)
741: , mct.global_agreement_flag
742: FROM
743: MTL_CONSUMPTION_TRANSACTIONS mct
744: , MTL_MATERIAL_TRANSACTIONS mmt
745: , po_vendor_sites_all pvsa
746: WHERE mct.transaction_id = mmt.transaction_id
747: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 793: -- from MTL_CONSUMPTION_TRANSACTIONS to

789:
790: --========================================================================
791: -- PROCEDURE : Load_Combination_prf PRIVATE
792: -- COMMENT : This procedure will load all the records of a context batch
793: -- from MTL_CONSUMPTION_TRANSACTIONS to
794: -- MTL_CONSUMPTION_TRANSACTIONS_TEMP
795: -- If the batch_id passed is -1 then the call is from the
796: -- manager in which case all records with a
797: -- processed_consumption_flag are loaded.

Line 794: -- MTL_CONSUMPTION_TRANSACTIONS_TEMP

790: --========================================================================
791: -- PROCEDURE : Load_Combination_prf PRIVATE
792: -- COMMENT : This procedure will load all the records of a context batch
793: -- from MTL_CONSUMPTION_TRANSACTIONS to
794: -- MTL_CONSUMPTION_TRANSACTIONS_TEMP
795: -- If the batch_id passed is -1 then the call is from the
796: -- manager in which case all records with a
797: -- processed_consumption_flag are loaded.
798: -- The insert statement will also be selective by the

Line 870: MTL_CONSUMPTION_TRANSACTIONS mct

866: /* End Bug 6388514 */
867: , mct.global_agreement_flag
868: , SUM(mct.net_qty)
869: FROM
870: MTL_CONSUMPTION_TRANSACTIONS mct
871: , po_vendor_sites_all pvsa
872: WHERE mct.owning_organization_id = pvsa.vendor_site_id
873: AND pvsa.vendor_id = NVL(p_vendor_id,pvsa.vendor_id)
874: AND mct.owning_organization_id =

Line 953: MTL_CONSUMPTION_TRANSACTIONS mct

949: , NVL(mct.rate,-1)
950: , TRUNC(mmt.transaction_date)
951: , mct.global_agreement_flag
952: FROM
953: MTL_CONSUMPTION_TRANSACTIONS mct
954: , MTL_MATERIAL_TRANSACTIONS mmt
955: , po_vendor_sites_all pvsa
956: WHERE mct.transaction_id = mmt.transaction_id
957: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 1016: MTL_CONSUMPTION_TRANSACTIONS mct

1012: , NVL(mct.rate_type,'##')
1013: , NVL(mct.rate,-1)
1014: , mct.global_agreement_flag
1015: FROM
1016: MTL_CONSUMPTION_TRANSACTIONS mct
1017: , MTL_MATERIAL_TRANSACTIONS mmt
1018: , po_vendor_sites_all pvsa
1019: WHERE mct.transaction_id = mmt.transaction_id
1020: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 1072: MTL_CONSUMPTION_TRANSACTIONS mct

1068: , NVL(mct.rate,-1)
1069: , mct.global_agreement_flag
1070: , SUM(mct.net_qty)
1071: FROM
1072: MTL_CONSUMPTION_TRANSACTIONS mct
1073: , po_vendor_sites_all pvsa
1074: WHERE mct.owning_organization_id = pvsa.vendor_site_id
1075: AND pvsa.vendor_id = NVL(p_vendor_id,pvsa.vendor_id)
1076: AND mct.owning_organization_id =

Line 1110: -- MTL_CONSUMPTION_TRANSACTIONS mct

1106: -- (SELECT
1107: -- TRUNC(MAX(mct.transaction_date))
1108: -- FROM
1109: -- --MTL_MATERIAL_TRANSACTIONS mmt
1110: -- MTL_CONSUMPTION_TRANSACTIONS mct
1111: -- WHERE --mct.transaction_id = mmt.transaction_id AND
1112: -- mct.transaction_source_id = mctt.transaction_source_id
1113: -- AND mct.inventory_item_id = mctt.inventory_item_id
1114: -- AND mct.organization_id = mctt.organization_id

Line 1139: MTL_CONSUMPTION_TRANSACTIONS mct

1135: (SELECT
1136: TRUNC(MAX(mct.transaction_date))
1137: FROM
1138: --MTL_MATERIAL_TRANSACTIONS mmt
1139: MTL_CONSUMPTION_TRANSACTIONS mct
1140: WHERE --mct.transaction_id = mmt.transaction_id AND
1141: mct.transaction_source_id = mctt.transaction_source_id
1142: AND mct.inventory_item_id = mctt.inventory_item_id
1143: AND mct.organization_id = mctt.organization_id

Line 1319: UPDATE mtl_consumption_transactions SET

1315: /* bug 5113064 - Start */
1316: /* delete all records in MCT_TEMP that have valid flag as 'N' */
1317: /* Also update MCT records with error status and message */
1318: /*Bug 5092489. Query is modified to eliminate use of MMT. */
1319: UPDATE mtl_consumption_transactions SET
1320: consumption_processed_flag = 'E'
1321: , error_code = l_error_msg
1322: WHERE transaction_source_id = l_header_id
1323: AND inventory_item_id = l_item_id

Line 2413: UPDATE mtl_consumption_transactions

2409: PO_DISTRIBUTION_ID */
2410:
2411: /* MMT no longer used in this query */
2412:
2413: UPDATE mtl_consumption_transactions
2414: SET interface_distribution_ref = TO_CHAR(l_dist_interface_header_id)
2415: WHERE transaction_id IN
2416: ( SELECT mct.transaction_id
2417: FROM MTL_CONSUMPTION_TRANSACTIONS mct

Line 2417: FROM MTL_CONSUMPTION_TRANSACTIONS mct

2413: UPDATE mtl_consumption_transactions
2414: SET interface_distribution_ref = TO_CHAR(l_dist_interface_header_id)
2415: WHERE transaction_id IN
2416: ( SELECT mct.transaction_id
2417: FROM MTL_CONSUMPTION_TRANSACTIONS mct
2418: WHERE mct.consumption_processed_flag IN ('N','E')
2419: AND mct.inventory_item_id = l_item_id
2420: AND mct.transaction_source_id = l_blanket_id
2421: AND mct.blanket_price = l_blanket_price

Line 2749: -- MTL_CONSUMPTION_TRANSACTIONS for a unique combination of

2745:
2746: --========================================================================
2747: -- PROCEDURE : Load_Summarized_Quantity PRIVATE
2748: -- COMMENT : This procedure summarizes records in
2749: -- MTL_CONSUMPTION_TRANSACTIONS for a unique combination of
2750: -- transaction_source_id, inventory_item_id, organization_id
2751: -- transaction cost, tax code id, accrual account, variance
2752: -- account, charge account
2753: -- present in MTL_CONSUMPTION_TXN_TEMP. The result updates the

Line 2843: FROM MTL_CONSUMPTION_TRANSACTIONS mct

2839: UPDATE/*+ leading(mctt) */ MTL_CONSUMPTION_TXN_TEMP mctt
2840: SET (mctt.net_qty,mctt.secondary_net_qty) =
2841: (SELECT SUM(mct.net_qty),SUM(mct.secondary_net_qty)
2842:
2843: FROM MTL_CONSUMPTION_TRANSACTIONS mct
2844: --, MTL_MATERIAL_TRANSACTIONS mmt
2845: WHERE --mmt.transaction_id = mct.transaction_id AND
2846: mct.transaction_source_id = p_txn_source_tab(i)
2847: AND mct.inventory_item_id = p_inventory_item_tab(i)

Line 2924: -- MTL_CONSUMPTION_TRANSACTIONS for a unique combination of

2920:
2921: --========================================================================
2922: -- PROCEDURE : Load_Summarized_Quantity_prf PRIVATE
2923: -- COMMENT : This procedure summarizes records in
2924: -- MTL_CONSUMPTION_TRANSACTIONS for a unique combination of
2925: -- transaction_source_id, inventory_item_id, organization_id
2926: -- transaction cost, tax code id, accrual account, variance
2927: -- account, charge account
2928: -- present in MTL_CONSUMPTION_TXN_TEMP. The result updates the

Line 3017: FROM MTL_CONSUMPTION_TRANSACTIONS mct

3013: UPDATE/*+ leading(mctt) */ MTL_CONSUMPTION_TXN_TEMP mctt
3014: SET (mctt.net_qty,mctt.secondary_net_qty) =
3015: (SELECT SUM(mct.net_qty),SUM(mct.secondary_net_qty)
3016:
3017: FROM MTL_CONSUMPTION_TRANSACTIONS mct
3018: --, MTL_MATERIAL_TRANSACTIONS mmt
3019: WHERE --mmt.transaction_id = mct.transaction_id AND
3020: mct.transaction_source_id = p_txn_source_tab(i)
3021: AND mct.inventory_item_id = p_inventory_item_tab(i)

Line 3066: FROM MTL_CONSUMPTION_TRANSACTIONS mct

3062: FORALL i IN p_txn_source_tab.FIRST..p_txn_source_tab.LAST
3063: UPDATE/*+ leading(mctt) */ MTL_CONSUMPTION_TXN_TEMP mctt
3064: SET mctt.net_qty =
3065: (SELECT SUM(mct.net_qty)
3066: FROM MTL_CONSUMPTION_TRANSACTIONS mct
3067: --, MTL_MATERIAL_TRANSACTIONS mmt
3068: WHERE --mmt.transaction_id = mct.transaction_id AND
3069: mct.transaction_source_id = p_txn_source_tab(i)
3070: AND mct.inventory_item_id = p_inventory_item_tab(i)

Line 3142: -- : MTL_CONSUMPTION_TRANSACTIONS should not be

3138: -- PROCEDURE : Delete Record PRIVATE
3139: -- COMMENT : If the billing date for the current asl entry
3140: -- : has not elapsed yet then the associated
3141: -- : change of ownership transactions held in
3142: -- : MTL_CONSUMPTION_TRANSACTIONS should not be
3143: -- : processed yet. The current record slipped
3144: -- : into this loop for that reason and should
3145: -- : therefore be deleted from the current batch
3146:

Line 3193: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct

3189: AND mctt.rate = p_rate
3190: AND mctt.rate_type = p_rate_type;
3191:
3192: -- Bug 5092489. Query modified for better performance
3193: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct
3194: SET mct.batch_id = NULL
3195: WHERE mct.transaction_source_id = p_txn_source_id
3196: AND mct.inventory_item_id = p_inventory_item_id
3197: AND mct.organization_id = p_organization_id

Line 3353: FROM MTL_CONSUMPTION_TRANSACTIONS mct

3349:
3350: CURSOR con_ad_err_cur IS
3351: SELECT mct.transaction_id
3352: , mct.error_code
3353: FROM MTL_CONSUMPTION_TRANSACTIONS mct
3354: WHERE mct.consumption_processed_flag = 'E'
3355: AND mct.batch_id = p_batch_id;
3356:
3357: --=================

Line 3415: -- from MTL_CONSUMPTION_TRANSACTIONS to

3411:
3412: --========================================================================
3413: -- PROCEDURE : Consumption_Txn_Worker PRIVATE
3414: -- COMMENT : This procedure will copy all the records of a context batch
3415: -- from MTL_CONSUMPTION_TRANSACTIONS to
3416: -- MTL_CONSUMPTION_TRANSACTIONS_TEMP
3417: -- summarize the net quantity and call the create consumption
3418: -- advice procedure
3419: --=========================================================================

Line 3416: -- MTL_CONSUMPTION_TRANSACTIONS_TEMP

3412: --========================================================================
3413: -- PROCEDURE : Consumption_Txn_Worker PRIVATE
3414: -- COMMENT : This procedure will copy all the records of a context batch
3415: -- from MTL_CONSUMPTION_TRANSACTIONS to
3416: -- MTL_CONSUMPTION_TRANSACTIONS_TEMP
3417: -- summarize the net quantity and call the create consumption
3418: -- advice procedure
3419: --=========================================================================
3420: PROCEDURE consumption_txn_worker

Line 3513: -- from MTL_CONSUMPTION_TRANSACTIONS

3509: );
3510: END IF;
3511:
3512: -- Call procedure to load MTL_CONSUMPTION_TXNS_TEMP
3513: -- from MTL_CONSUMPTION_TRANSACTIONS
3514: -- with records that belong to the specified batch
3515:
3516: IF NVL(FND_PROFILE.value('INV_SUPPLIER_CONSIGNED_GROUPING'),'N') = 'N'
3517: THEN

Line 3590: -- MTL_CONSUMPTION_TRANSACTIONS associated with

3586: EXIT WHEN l_bulk_count = cons_temp_csr_type%ROWCOUNT;
3587: /* Bug 5006151 - End */
3588:
3589: -- Summarize the net quantity of all records in
3590: -- MTL_CONSUMPTION_TRANSACTIONS associated with
3591: -- records in MTL_CONSUMPTION_TXNS_TEMP.
3592: -- Record the result in MTL_CONSUMPTION_TXNS_TEMP.
3593:
3594: /* BUg 5092489. Following IF block is commented becasue quantity is populated during insert

Line 3820: UPDATE mtl_consumption_transactions

3816: ,x_return_status => l_return_status);
3817: /* Bug 4599072 - Start */
3818: /* bug 5113064 - Start */
3819: /* clean up invalid records in MCT */
3820: UPDATE mtl_consumption_transactions
3821: SET batch_id = NULL
3822: WHERE batch_id = p_batch_id
3823: AND consumption_processed_flag IN ('N','E')
3824: AND consumption_po_header_id IS NULL

Line 3850: -- the records in MTL_CONSUMPTION_TRANSACTIONS

3846: -- FUNCTION : Generate_Batch_Id PRIVATE
3847: -- PARAMETERS: None
3848: -- RETURNS : NUMBER
3849: -- COMMENT : This function returns the next batch id to be assigned to
3850: -- the records in MTL_CONSUMPTION_TRANSACTIONS
3851: --=========================================================================
3852: FUNCTION generate_batch_id
3853: RETURN NUMBER
3854: IS

Line 4129: -- associated records in MTL_CONSUMPTION_TRANSACTIONS are

4125: -- PROCEDURE : Batch Allocation PRIVATE
4126: -- COMMENT : This procedure will be called exclusively from the manager.
4127: -- It divides candidate unprocessed records into batches.
4128: -- Once the contents of a batch are established the
4129: -- associated records in MTL_CONSUMPTION_TRANSACTIONS are
4130: -- updated with a batch id and a concurrent program submitted.
4131: -- If there are more candidate unprocessed records then further
4132: -- batches are established and concurrent programs submitted.
4133: -- Thus for large numbers of records concurrency can be achieved.

Line 4302: -- Allocate a batch id to records in MTL_CONSUMPTION_TRANSACTIONS

4298: END LOOP;
4299:
4300: CLOSE cons_temp_csr_type;
4301:
4302: -- Allocate a batch id to records in MTL_CONSUMPTION_TRANSACTIONS
4303: -- A new batch is started if the current batch is full or if the
4304: -- number of summarized records in the next batch exceeds
4305: -- the size remaining in the current batch. The only exception to
4306: -- this rule is when the first record a new batch is being

Line 4442: MTL_CONSUMPTION_TRANSACTIONS mct

4438: --THEN
4439: FORALL i IN l_previous_cons_index..l_current_cons_index
4440: --Bug 5092489, Query modified to eliminate use of MMT
4441: UPDATE
4442: MTL_CONSUMPTION_TRANSACTIONS mct
4443: SET mct.batch_id = l_current_batch_id
4444: /* request id stamped to MCT - bug 5200436 - Start*/
4445: , mct.request_id = g_request_id
4446: WHERE mct.transaction_source_id = l_txn_source_tab(i)

Line 4492: -- UPDATE MTL_CONSUMPTION_TRANSACTIONS mct

4488: --ELSE
4489:
4490: --FORALL i IN l_previous_cons_index..l_current_cons_index
4491: -- --Bug 5092489, Query modified to eliminate use of MMT
4492: -- UPDATE MTL_CONSUMPTION_TRANSACTIONS mct
4493: -- SET mct.batch_id = l_current_batch_id
4494: -- /* request id stamped to MCT - bug 5200436 - Start*/
4495: -- , mct.request_id = g_request_id
4496: -- WHERE mct.transaction_source_id = l_txn_source_tab(i)

Line 4545: -- Update the table MTL_CONSUMPTION_TRANSACTIONS with the

4541:
4542: -- Bug 5092489. l_previous_cons_index has to be set as l_current_cons_index
4543: l_previous_cons_index := l_current_cons_index+1;
4544:
4545: -- Update the table MTL_CONSUMPTION_TRANSACTIONS with the
4546: -- current batch id for Transfer to consigned txns.
4547:
4548:
4549: UPDATE

Line 4550: MTL_CONSUMPTION_TRANSACTIONS mct

4546: -- current batch id for Transfer to consigned txns.
4547:
4548:
4549: UPDATE
4550: MTL_CONSUMPTION_TRANSACTIONS mct
4551: SET mct.batch_id = l_current_batch_id
4552: WHERE mct.parent_transaction_id IN
4553: (SELECT
4554: mct_in.transaction_id

Line 4556: MTL_CONSUMPTION_TRANSACTIONS mct_in

4552: WHERE mct.parent_transaction_id IN
4553: (SELECT
4554: mct_in.transaction_id
4555: FROM
4556: MTL_CONSUMPTION_TRANSACTIONS mct_in
4557: WHERE mct_in.batch_id = l_current_batch_id
4558: --AND mct.consumption_processed_flag <> 'Y');
4559: --Bug 5092489
4560: AND mct_in.consumption_processed_flag IN ('N', 'E'))

Line 4678: -- MTL_CONSUMPTION_TRANSACTIONS to a batch and then call the

4674:
4675: --========================================================================
4676: -- PROCEDURE : Consumption_Txn_Manager PUBLIC
4677: -- COMMENT : This procedure will assign each unprocessed record in
4678: -- MTL_CONSUMPTION_TRANSACTIONS to a batch and then call the
4679: -- Consumption_Transaction_Worker for that batch. The manager
4680: -- will continue until all records
4681: -- in MTL_CONSUMPTION_TRANSACTIONS
4682: -- have been assigned to a batch.

Line 4681: -- in MTL_CONSUMPTION_TRANSACTIONS

4677: -- COMMENT : This procedure will assign each unprocessed record in
4678: -- MTL_CONSUMPTION_TRANSACTIONS to a batch and then call the
4679: -- Consumption_Transaction_Worker for that batch. The manager
4680: -- will continue until all records
4681: -- in MTL_CONSUMPTION_TRANSACTIONS
4682: -- have been assigned to a batch.
4683: --=========================================================================
4684: PROCEDURE consumption_txn_manager
4685: ( p_batch_size IN NUMBER

Line 4783: -- MTL_CONSUMPTION_TRANSACTIONS

4779: the null batch_ids to -1. A parallely running consumption advice program
4780: will NOT pick up these 'marked' records. Prevents release duplication */
4781: -- Bug 5092489. Following query is commented in included with other query.
4782: --UPDATE
4783: -- MTL_CONSUMPTION_TRANSACTIONS
4784: --SET
4785: -- batch_id = l_batch_id
4786: --/* bug 5200436 - request_id stamped in batch_allocation */
4787: --, request_id = g_request_id

Line 4802: MTL_CONSUMPTION_TRANSACTIONS mct

4798: COUNT(*)
4799: INTO
4800: l_count
4801: FROM
4802: MTL_CONSUMPTION_TRANSACTIONS mct
4803: , MTL_MATERIAL_TRANSACTIONS mmt
4804: , po_vendor_sites_all pvsa
4805: WHERE mct.transaction_id = mmt.transaction_id
4806: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 4834: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct

4830:
4831: IF l_count > 0 THEN
4832:
4833: --Bug 5092489: New condition added
4834: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct
4835: SET (mct.batch_id, mct.transaction_source_id, mct.inventory_item_id,
4836: mct.accrual_account_id, mct.organization_id,
4837: mct.owning_organization_id, mct.transaction_date)
4838: = (SELECT

Line 4857: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct

4853: AND NVL(net_qty,0) > 0
4854: AND ( mct.batch_id = l_batch_id OR mct.batch_id IS NULL);
4855:
4856:
4857: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct
4858: SET (mct.global_agreement_flag) =
4859: (SELECT NVL(global_agreement_flag,'N') FROM po_headers_all
4860: WHERE po_header_id = mct.transaction_source_id)
4861: WHERE mct.consumption_processed_flag IN ('N', 'E')

Line 4878: mtl_consumption_transactions mct

4874:
4875: l_blanket_query := 'SELECT DISTINCT
4876: mmt.transaction_source_id
4877: FROM
4878: mtl_consumption_transactions mct
4879: , mtl_material_transactions mmt
4880: , po_vendor_sites_all pvsa
4881: WHERE mct.transaction_id = mmt.transaction_id
4882: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 4899: mtl_consumption_transactions mct

4895:
4896: l_blanket_query := 'SELECT DISTINCT
4897: mmt.transaction_source_id
4898: FROM
4899: mtl_consumption_transactions mct
4900: , mtl_material_transactions mmt
4901: , po_vendor_sites_all pvsa
4902: WHERE mct.transaction_id = mmt.transaction_id
4903: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 4919: mtl_consumption_transactions mct

4915:
4916: l_blanket_query := 'SELECT DISTINCT
4917: mmt.transaction_source_id
4918: FROM
4919: mtl_consumption_transactions mct
4920: , mtl_material_transactions mmt
4921: , po_vendor_sites_all pvsa
4922: WHERE mct.transaction_id = mmt.transaction_id
4923: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 4939: mtl_consumption_transactions mct

4935:
4936: l_blanket_query := 'SELECT DISTINCT
4937: mmt.transaction_source_id
4938: FROM
4939: mtl_consumption_transactions mct
4940: , mtl_material_transactions mmt
4941: , po_vendor_sites_all pvsa
4942: WHERE mct.transaction_id = mmt.transaction_id
4943: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 4958: mtl_consumption_transactions mct

4954:
4955: l_blanket_query := 'SELECT DISTINCT
4956: mmt.transaction_source_id
4957: FROM
4958: mtl_consumption_transactions mct
4959: , mtl_material_transactions mmt
4960: , po_vendor_sites_all pvsa
4961: WHERE mct.transaction_id = mmt.transaction_id
4962: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 4978: mtl_consumption_transactions mct

4974:
4975: l_blanket_query := 'SELECT DISTINCT
4976: mmt.transaction_source_id
4977: FROM
4978: mtl_consumption_transactions mct
4979: , mtl_material_transactions mmt
4980: , po_vendor_sites_all pvsa
4981: WHERE mct.transaction_id = mmt.transaction_id
4982: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 4997: mtl_consumption_transactions mct

4993:
4994: l_blanket_query := 'SELECT DISTINCT
4995: mmt.transaction_source_id
4996: FROM
4997: mtl_consumption_transactions mct
4998: , mtl_material_transactions mmt
4999: , po_vendor_sites_all pvsa
5000: WHERE mct.transaction_id = mmt.transaction_id
5001: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5016: mtl_consumption_transactions mct

5012:
5013: l_blanket_query := 'SELECT DISTINCT
5014: mmt.transaction_source_id
5015: FROM
5016: mtl_consumption_transactions mct
5017: , mtl_material_transactions mmt
5018: , po_vendor_sites_all pvsa
5019: WHERE mct.transaction_id = mmt.transaction_id
5020: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5034: mtl_consumption_transactions mct

5030:
5031: l_blanket_query := 'SELECT DISTINCT
5032: mmt.transaction_source_id
5033: FROM
5034: mtl_consumption_transactions mct
5035: , mtl_material_transactions mmt
5036: , po_vendor_sites_all pvsa
5037: WHERE mct.transaction_id = mmt.transaction_id
5038: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5056: mtl_consumption_transactions mct

5052:
5053: l_blanket_query := 'SELECT DISTINCT
5054: mmt.transaction_source_id
5055: FROM
5056: mtl_consumption_transactions mct
5057: , mtl_material_transactions mmt
5058: , po_vendor_sites_all pvsa
5059: WHERE mct.transaction_id = mmt.transaction_id
5060: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5077: mtl_consumption_transactions mct

5073:
5074: l_blanket_query := 'SELECT DISTINCT
5075: mmt.transaction_source_id
5076: FROM
5077: mtl_consumption_transactions mct
5078: , mtl_material_transactions mmt
5079: , po_vendor_sites_all pvsa
5080: WHERE mct.transaction_id = mmt.transaction_id
5081: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5098: mtl_consumption_transactions mct

5094:
5095: l_blanket_query := 'SELECT DISTINCT
5096: mmt.transaction_source_id
5097: FROM
5098: mtl_consumption_transactions mct
5099: , mtl_material_transactions mmt
5100: , po_vendor_sites_all pvsa
5101: WHERE mct.transaction_id = mmt.transaction_id
5102: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5118: mtl_consumption_transactions mct

5114:
5115: l_blanket_query := 'SELECT DISTINCT
5116: mmt.transaction_source_id
5117: FROM
5118: mtl_consumption_transactions mct
5119: , mtl_material_transactions mmt
5120: , po_vendor_sites_all pvsa
5121: WHERE mct.transaction_id = mmt.transaction_id
5122: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5139: mtl_consumption_transactions mct

5135:
5136: l_blanket_query := 'SELECT DISTINCT
5137: mmt.transaction_source_id
5138: FROM
5139: mtl_consumption_transactions mct
5140: , mtl_material_transactions mmt
5141: , po_vendor_sites_all pvsa
5142: WHERE mct.transaction_id = mmt.transaction_id
5143: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5159: mtl_consumption_transactions mct

5155:
5156: l_blanket_query := 'SELECT DISTINCT
5157: mmt.transaction_source_id
5158: FROM
5159: mtl_consumption_transactions mct
5160: , mtl_material_transactions mmt
5161: , po_vendor_sites_all pvsa
5162: WHERE mct.transaction_id = mmt.transaction_id
5163: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5179: mtl_consumption_transactions mct

5175:
5176: l_blanket_query := 'SELECT DISTINCT
5177: mmt.transaction_source_id
5178: FROM
5179: mtl_consumption_transactions mct
5180: , mtl_material_transactions mmt
5181: , po_vendor_sites_all pvsa
5182: WHERE mct.transaction_id = mmt.transaction_id
5183: AND mmt.owning_organization_id = pvsa.vendor_site_id

Line 5236: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct

5232: ,x_global_agreement_flag => l_agreement_flag);
5233:
5234: -- Bug: 5092489, statement is modified to include three new columns,
5235: -- mct.transaction_source_id and mct.inventory_item_id, mct.accrual_account_id
5236: UPDATE MTL_CONSUMPTION_TRANSACTIONS mct
5237: SET mct.global_agreement_flag = l_agreement_flag
5238: WHERE mct.transaction_source_id = l_transaction_source_id
5239: AND mct.consumption_processed_flag IN ('N', 'E') ;
5240:

Line 5257: -- with unprocessed data from MTL_CONSUMPTION_TRANSACTIONS

5253: END LOOP;
5254:
5255:
5256: -- Call procedure to load MTL_CONSUMPTION_TXNS_TEMP
5257: -- with unprocessed data from MTL_CONSUMPTION_TRANSACTIONS
5258:
5259: IF (l_debug = 1)
5260: THEN
5261: INV_LOG_UTIL.trace

Line 5302: -- in MTL_CONSUMPTION_TRANSACTIONS and call the worker to

5298:
5299: END IF;
5300:
5301: -- Call procedure to assign a batch_id to unprocessed data
5302: -- in MTL_CONSUMPTION_TRANSACTIONS and call the worker to
5303: -- process a batch
5304:
5305: IF (l_debug = 1)
5306: THEN