DBA Data[Home] [Help]

APPS.GMF_LOT_COSTING_PUB dependencies on GMF_MATERIAL_LOT_COST_TXNS

Line 287: --* Modified Code to remove the references to trans_id in gmf_material_lot_cost_txns table

283: --* 31-May-2005 Dinesh Vadivel - Bug 4320765(Part B)
284: --* Modified "Explosion_Cursor" to avoid duplicate rows
285: --* 01-Jun-2005 Sukarna Reddy INCONV changes for release 12.
286: --* 07-Jun-2006 Anand Thiyagarajan Bug#5285726
287: --* Modified Code to remove the references to trans_id in gmf_material_lot_cost_txns table
288: --* which caused the lot cost process after a final run to calculate wrong costs
289: --* 07-Jun-2006 Anand Thiyagarajan Bug#5287514
290: --* Modified code to call process_receipts procedure for Purchase Order Return to Vendors
291: --* and for PO Receipt corrections, which are similar to the Purchase Order receipts with a +ve or -ve signs

Line 2060: --* Procedure to create a new linking transaction in gmf_material_lot_cost_txns *

2056:
2057:
2058: --**********************************************************************************************
2059: --* *
2060: --* Procedure to create a new linking transaction in gmf_material_lot_cost_txns *
2061: --* *
2062: --**********************************************************************************************
2063: PROCEDURE create_material_transaction
2064: ( p_header_id IN NUMBER

Line 2108: INSERT INTO gmf_material_lot_cost_txns

2104: fnd_file.put_line(fnd_file.log,'New Cost Ind :'||p_new_cost_ind);
2105: fnd_file.put_line(fnd_file.log,'Lot Number :'||p_lot_number);
2106: END IF;
2107:
2108: INSERT INTO gmf_material_lot_cost_txns
2109: ( cost_trans_id
2110: , cost_header_id
2111: , cost_type_id
2112: , cost_trans_date

Line 2367: --* from the gmf_material_lot_cost_txns. The issue arises if we have the same item in two different lot cost methods

2363: --* HISTORY
2364: --*
2365: --* 27-Nov-2004 Dinesh Vadivel Bug# 4004338
2366: --* Added cost_type_code in where clause of the select query which returns the header_id
2367: --* from the gmf_material_lot_cost_txns. The issue arises if we have the same item in two different lot cost methods
2368: --* and try to run the Lot Actual Cost Process
2369: --*************************************************************************************
2370:
2371: PROCEDURE process_adjustment

Line 2479: --* NEW_COST_IND in gmf_material_lot_cost_txns is used in the Subledger Posting.

2475: --* X$ - where X$ is the cost of the record that is prior to 100 if any exists.
2476: --* This X$ will be set one and only if we get 100 and -100 adjacent.
2477: --*
2478: --* Dinesh -No Bug# - Earlier new_cost_ind was not set up properly.Now corrected along with 4053149
2479: --* NEW_COST_IND in gmf_material_lot_cost_txns is used in the Subledger Posting.
2480: --* If this indicator is set to 1 then that means whatever cost pointed by
2481: --* header_id in gmf_lot_cost_details is the AVERAGE COST and not the actual
2482: --* TRANSACTION COST. The Actual Transaction cost is under the negative of header_id.
2483: --* So, depending on this NEW_COST_IND, the SL will decide on posting at the cost of

Line 2486: --* Dinesh 4227784 - Issue due to the above changes. Since we have added gmf_material_lot_cost_txns

2482: --* TRANSACTION COST. The Actual Transaction cost is under the negative of header_id.
2483: --* So, depending on this NEW_COST_IND, the SL will decide on posting at the cost of
2484: --* header_id or negative of header_id (i.e., -header_id)
2485: --*
2486: --* Dinesh 4227784 - Issue due to the above changes. Since we have added gmf_material_lot_cost_txns
2487: --* to the get_previous_costs_cur CURSOR, while querying for the prev-prev transaction
2488: --* it will ignore the reversal transactions if any, because the reversal transaction will
2489: --* not have the exact header_id as in gmf_lot_costs. Rather it will have the same header_id
2490: --* as that of its original transaction.

Line 2544: FROM gmf_material_lot_cost_txns gmlct

2540: /* Bug 4227784 - Dinesh Added this as we removed txns table from above query */
2541: CURSOR get_material_lot_cost_txns(p_header_id NUMBER)
2542: IS
2543: SELECT gmlct.new_cost_ind
2544: FROM gmf_material_lot_cost_txns gmlct
2545: WHERE gmlct.cost_header_id = p_header_id
2546: ORDER BY cost_trans_id DESC
2547: ;
2548:

Line 2553: l_cost_header_id gmf_material_lot_cost_txns.cost_header_id%TYPE;

2549: l_prev_cost_cnt NUMBER := 0;
2550: l_prev_header_id gmf_lot_costs.header_id%TYPE;
2551: l_prev_prev_header_id gmf_lot_costs.header_id%TYPE := NULL;
2552: l_prev_unit_cost gmf_lot_costs.unit_cost%TYPE;
2553: l_cost_header_id gmf_material_lot_cost_txns.cost_header_id%TYPE;
2554:
2555: l_onhand_qty gmf_lot_costs.onhand_qty%TYPE;
2556: l_header_id gmf_lot_costs.header_id%TYPE;
2557: l_unit_cost gmf_lot_costs.unit_cost%TYPE;

Line 2560: l_prev_new_cost_ind gmf_material_lot_cost_txns.new_cost_ind%TYPE; /* Dinesh No Bug# */

2556: l_header_id gmf_lot_costs.header_id%TYPE;
2557: l_unit_cost gmf_lot_costs.unit_cost%TYPE;
2558: l_prev_trans_unit_cost gmf_lot_cost_details.component_cost%TYPE;
2559: l_cmpnt_cost gmf_lot_cost_details.component_cost%TYPE;
2560: l_prev_new_cost_ind gmf_material_lot_cost_txns.new_cost_ind%TYPE; /* Dinesh No Bug# */
2561: procedure_name VARCHAR2(100);
2562:
2563: BEGIN
2564:

Line 2786: --* in the average cost of the lot. gmf_material_lot_cost_txns will be pointed to the original

2782: --* Desc: New Procedure for handling batch product reversal transactions
2783: --* In process_reversals procedure we check whether the cost record in gmf_lot_costs
2784: --* just prior to reversal transaction is its Original transaction.
2785: --* If so, we will leap frog that record so as to reverse the effect of original transaction
2786: --* in the average cost of the lot. gmf_material_lot_cost_txns will be pointed to the original
2787: --* transaction record, so that subledger posts the entry accordingly. BUT we are not handling
2788: --* the case if original transactions and reversal transactions don't come next to each other.
2789: --* we process it as adjustment and it is a known issue.
2790: --*

Line 2807: FROM gmf_material_lot_cost_txns txns

2803: IS
2804: CURSOR get_orig_trx(p_orig_trans_id NUMBER)
2805: IS
2806: SELECT DECODE(NVL(txns.new_cost_ind,0), 0, txns.cost_header_id, -txns.cost_header_id), txns.new_cost_ind
2807: FROM gmf_material_lot_cost_txns txns
2808: WHERE txns.transaction_id = p_orig_trans_id;
2809:
2810: l_orig_trx_header_id gmf_lot_costs.header_id%TYPE;
2811: l_orig_trx_new_cost_ind NUMBER;

Line 6513: DELETE FROM gmf_material_lot_cost_txns

6509: --
6510: -- Delete all material trx info
6511: --
6512: FORALL indx IN l_indx_from..l_indx_to
6513: DELETE FROM gmf_material_lot_cost_txns
6514: WHERE cost_header_id in l_header_ids_tab(indx);
6515:
6516: l_matl_rows_deleted := l_matl_rows_deleted + SQL%ROWCOUNT;
6517:

Line 6558: fnd_file.put_line(fnd_File.LOG, ' ' || l_matl_rows_deleted || ' rows deleted from gmf_material_lot_cost_txns.');

6554: DELETE FROM gmf_lot_costs
6555: WHERE rowid in l_rowids_tab(indx);
6556:
6557:
6558: fnd_file.put_line(fnd_File.LOG, ' ' || l_matl_rows_deleted || ' rows deleted from gmf_material_lot_cost_txns.');
6559: fnd_file.put_line(fnd_File.LOG, ' ' || l_cdtl_rows_deleted || ' rows deleted from gmf_lot_cost_details.');
6560: fnd_file.put_line(fnd_File.LOG, ' ' || SQL%ROWCOUNT || ' rows deleted from gmf_lot_costs.');
6561:
6562:

Line 6579: FROM gmf_material_lot_cost_txns t

6575:
6576:
6577:
6578: DELETE
6579: FROM gmf_material_lot_cost_txns t
6580: WHERE cost_type_id = l_cost_type_id
6581: AND EXISTS (
6582: SELECT 1
6583: FROM gmf_lot_costs glc,

Line 8242: FROM gmf_material_lot_cost_txns gmlc

8238: AND transaction_action_id = 15;
8239:
8240: SELECT cost_header_id
8241: INTO l_header_id
8242: FROM gmf_material_lot_cost_txns gmlc
8243: WHERE transaction_id = l_trans_id
8244: AND lot_number = transaction_row.lot_number
8245: AND cost_type_id = l_cost_type_id;
8246:

Line 8695: FROM GMF_MATERIAL_LOT_COST_TXNS gmlct

8691: AND mmt.organization_id = lcig.organization_id
8692: AND mmt.transaction_source_type_id = 5
8693: AND mtln.lot_number = nvl(p_lot_no,mtln.lot_number)
8694: AND NOT EXISTS (SELECT 1
8695: FROM GMF_MATERIAL_LOT_COST_TXNS gmlct
8696: WHERE gmlct.transaction_id = mmt.transaction_id /* ANTHIYAG Bug#5285726 07-Jun-2006 */
8697: AND gmlct.cost_type_id = l_cost_type_id
8698: AND gmlct.lot_number = mtln.lot_number
8699: AND gmlct.final_cost_flag = 1)

Line 8740: FROM GMF_MATERIAL_LOT_COST_TXNS gmlct

8736: AND mmt.transaction_source_type_id <> 5
8737: AND mmt.transaction_action_id NOT IN (15,22,6,2) /* PK added subinv Xfer */
8738: AND mtln.lot_number = nvl(p_lot_no,mtln.lot_number)
8739: AND NOT EXISTS (SELECT 1
8740: FROM GMF_MATERIAL_LOT_COST_TXNS gmlct
8741: WHERE gmlct.transaction_id = mmt.transaction_id /* ANTHIYAG Bug#5285726 07-Jun-2006 */
8742: AND gmlct.cost_type_id = l_cost_type_id
8743: AND gmlct.lot_number = mtln.lot_number
8744: AND gmlct.final_cost_flag = 1)

Line 8784: FROM GMF_MATERIAL_LOT_COST_TXNS gmlct

8780: AND mmt.inventory_item_id = lcig.inventory_item_id
8781: AND mmt.organization_id = lcig.organization_id
8782: AND mtln.lot_number = nvl(p_lot_no,mtln.lot_number)
8783: AND NOT EXISTS (SELECT 1
8784: FROM GMF_MATERIAL_LOT_COST_TXNS gmlct
8785: WHERE gmlct.transaction_id = mmt.transaction_id /* ANTHIYAG Bug#5285726 07-Jun-2006 */
8786: AND gmlct.cost_type_id = l_cost_type_id
8787: AND gmlct.lot_number = mtln.lot_number
8788: AND gmlct.final_cost_flag = 1)

Line 8827: FROM GMF_MATERIAL_LOT_COST_TXNS gmlct

8823: AND mmt.transaction_source_type_id IN (8,7,13)
8824: AND mmt.transaction_action_id IN (15,22)
8825: AND mtln.lot_number = nvl(p_lot_no,mtln.lot_number)
8826: AND NOT EXISTS (SELECT 1
8827: FROM GMF_MATERIAL_LOT_COST_TXNS gmlct
8828: WHERE gmlct.transaction_id = mmt.transaction_id /* ANTHIYAG Bug#5285726 07-Jun-2006 */
8829: AND gmlct.cost_type_id = l_cost_type_id
8830: AND gmlct.lot_number = mtln.lot_number
8831: AND gmlct.final_cost_flag = 1)

Line 9256: UPDATE gmf_material_lot_cost_txns

9252: AND lot_number = transaction_row.lot_number)
9253: RETURNING header_id INTO new_cost.header_id;
9254:
9255: -- B3486228 Also set the transaction qty to the residual
9256: UPDATE gmf_material_lot_cost_txns
9257: SET new_onhand_qty = l_residual_qty
9258: WHERE transaction_id = transaction_row.transaction_id /* ANTHIYAG Bug#5285726 07-Jun-2006 */
9259: AND cost_header_id = new_cost.header_id;
9260: END IF;