DBA Data[Home] [Help]

APPS.GMF_XLA_PKG dependencies on GMF_INV_TXN_FLAGS_GT

Line 2537: -- Old queries PK Bug 9066162. These queries are now used to insert data in gmf_inv_Txn_flags_gt

2533: END IF;
2534: -- We need to do a single update to mtl_material_transactions so that
2535: -- session will perform all updates together. If any other session has updated any of the records session will wait
2536: -- until lock is available eliminating dead lock.
2537: -- Old queries PK Bug 9066162. These queries are now used to insert data in gmf_inv_Txn_flags_gt
2538: -- Q1
2539: /* UPDATE mtl_material_transactions
2540: SET opm_costed_flag = DECODE(G_accounting_mode, 'D', 'D', 'F', NULL)
2541: , program_update_date = SYSDATE

Line 2603: Old queries are now used to insert data in gmf_inv_Txn_flags_gt. And a single update is used to update all mmt rows.

2599:
2600: /* There may be multiple sessions. Q1 is specific to current session. Q2 and Q3 are performed only when accouting mode is final.
2601: Q2 should not be a problem since there is only one event for Subinventory transfer. We do not have two separate events for
2602: Subinventory transfer. These multiple updates caused deadlock based on how events were distributed amongst workers.
2603: Old queries are now used to insert data in gmf_inv_Txn_flags_gt. And a single update is used to update all mmt rows.
2604: Bug 9066162 new logic follows. We need to sort duplicates. Union can not be used since hard coded values are used for
2605: opm_costed_flag and shipment_costed. Events for these may or may not be processed by the same worker.
2606: */
2607:

Line 2609: Insert into gmf_inv_Txn_flags_gt (transaction_id, opm_costed_flag, shipment_costed)

2605: opm_costed_flag and shipment_costed. Events for these may or may not be processed by the same worker.
2606: */
2607:
2608:
2609: Insert into gmf_inv_Txn_flags_gt (transaction_id, opm_costed_flag, shipment_costed)
2610: SELECT DISTINCT xpae.SOURCE_ID_INT_1 transaction_id,
2611: DECODE(G_accounting_mode, 'D', 'D', 'F', NULL) opm_costed_flag,
2612: NULL shipment_costed
2613: FROM xla_post_acctg_events_v xpae,

Line 2648: -- gmf_inv_Txn_flags_gt. Find duplicates update and eliminate duplicates

2644: AND xpae.event_class_code in ('FOB_RCPT_SENDER_RCPT', 'FOB_SHIP_RECIPIENT_SHIP'))
2645: ;
2646:
2647: -- One session can get both events for shipment and Intransit. In such case there will be duplicate rows in
2648: -- gmf_inv_Txn_flags_gt. Find duplicates update and eliminate duplicates
2649:
2650:
2651: Update gmf_inv_Txn_flags_gt
2652: set opm_costed_flag = NULL,

Line 2651: Update gmf_inv_Txn_flags_gt

2647: -- One session can get both events for shipment and Intransit. In such case there will be duplicate rows in
2648: -- gmf_inv_Txn_flags_gt. Find duplicates update and eliminate duplicates
2649:
2650:
2651: Update gmf_inv_Txn_flags_gt
2652: set opm_costed_flag = NULL,
2653: shipment_costed = 'Y'
2654: where transaction_id IN (select transaction_id
2655: from gmf_inv_Txn_flags_gt

Line 2655: from gmf_inv_Txn_flags_gt

2651: Update gmf_inv_Txn_flags_gt
2652: set opm_costed_flag = NULL,
2653: shipment_costed = 'Y'
2654: where transaction_id IN (select transaction_id
2655: from gmf_inv_Txn_flags_gt
2656: group by transaction_id
2657: having count(transaction_id) > 1);
2658:
2659:

Line 2662: delete from gmf_inv_Txn_flags_gt

2658:
2659:
2660: IF sql%rowcount > 0 THEN
2661:
2662: delete from gmf_inv_Txn_flags_gt
2663: where rowid IN (select min(rowid) from gmf_inv_Txn_flags_gt
2664: group by transaction_id
2665: having count(transaction_id) > 1);
2666:

Line 2663: where rowid IN (select min(rowid) from gmf_inv_Txn_flags_gt

2659:
2660: IF sql%rowcount > 0 THEN
2661:
2662: delete from gmf_inv_Txn_flags_gt
2663: where rowid IN (select min(rowid) from gmf_inv_Txn_flags_gt
2664: group by transaction_id
2665: having count(transaction_id) > 1);
2666:
2667: END IF;

Line 2678: from gmf_inv_Txn_flags_gt txngt

2674:
2675: update mtl_material_transactions mmt
2676: set (opm_costed_flag, shipment_costed) = (select decode(mmt.opm_costed_flag,NULL,NULL,'D',decode(txngt.opm_costed_flag, NULL, NULL,'D'),'N',txngt.opm_costed_flag)
2677: ,decode(mmt.shipment_costed,'Y','Y',decode(txngt.shipment_costed,NULL,NULL,txngt.shipment_costed))
2678: from gmf_inv_Txn_flags_gt txngt
2679: where mmt.transaction_id = txngt.transaction_id)
2680: , program_update_date = SYSDATE
2681: /* Vpedarla bug: 9292668 commenting last_updated_by and last_update_login update*/
2682: -- , last_updated_by = g_user_id

Line 2687: where transaction_id IN (select txngt.transaction_id from gmf_inv_Txn_flags_gt txngt);

2683: -- , last_update_login = g_login_id
2684: , program_application_id= g_prog_appl_id
2685: , program_id = g_program_id
2686: , request_id = g_request_id
2687: where transaction_id IN (select txngt.transaction_id from gmf_inv_Txn_flags_gt txngt);
2688:
2689:
2690: g_log_msg := sql%rowcount || ' rows of Inv Transactions updated to set OPM_costed_flag and shipment_costed flag in mtl_material_transactions table';
2691: