DBA Data[Home] [Help]

APPS.GMF_VIB dependencies on GMF_BATCH_REQUIREMENTS

Line 86: FROM gmf_batch_requirements

82: BEGIN
83: l_count := 0;
84: SELECT count(*)
85: INTO l_count
86: FROM gmf_batch_requirements
87: WHERE batch_id = p_batch_id AND
88: delete_mark = 0;
89:
90: IF l_count > 0 THEN

Line 123: INSERT INTO gmf_batch_requirements(

119: IF g_debug <= gme_debug.g_log_statement THEN
120: gme_debug.put_line ('inserting into req table from gtmp table');
121: END IF;
122:
123: INSERT INTO gmf_batch_requirements(
124: vib_id,
125: batch_id,
126: product_item_id,
127: prod_material_detail_id,

Line 163: FROM gmf_batch_requirements_gtmp

159: last_update_login,
160: requirement_id,
161: organization_id,
162: vib_profile_value
163: FROM gmf_batch_requirements_gtmp
164: WHERE batch_id = p_batch_id;
165:
166: IF g_debug <= gme_debug.g_log_statement THEN
167: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

Line 243: UPDATE gmf_batch_requirements

239: END IF;
240:
241: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
242:
243: UPDATE gmf_batch_requirements
244: SET delete_mark = 1
245: WHERE
246: batch_id = p_batch_id;
247:

Line 253: INSERT INTO gmf_batch_requirements(

249: IF g_debug <= gme_debug.g_log_statement THEN
250: gme_debug.put_line ('inserting into req table from gtmp');
251: END IF;
252:
253: INSERT INTO gmf_batch_requirements(
254: vib_id,
255: batch_id,
256: product_item_id,
257: prod_material_detail_id,

Line 293: FROM gmf_batch_requirements_gtmp;

289: last_update_login,
290: requirement_id,
291: organization_id,
292: vib_profile_value
293: FROM gmf_batch_requirements_gtmp;
294:
295: IF g_debug <= gme_debug.g_log_statement THEN
296: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');
297: END IF;

Line 379: UPDATE gmf_batch_requirements

375: IF g_debug <= gme_debug.g_log_statement THEN
376: gme_debug.put_line ('deleting batch reqs');
377: END IF;
378:
379: UPDATE gmf_batch_requirements
380: SET delete_mark = 1
381: WHERE
382: batch_id = p_batch_id AND
383: delete_mark = 0;

Line 472: FROM gmf_batch_requirements_gtmp

468:
469: CURSOR c_total_prod_alloc (c_batch_id NUMBER) IS
470: SELECT ing_material_detail_id, batchstep_resource_id,
471: SUM(derived_cost_alloc) total_prod_alloc
472: FROM gmf_batch_requirements_gtmp
473: WHERE batch_id = c_batch_id
474: GROUP BY ing_material_detail_id, batchstep_resource_id;
475:
476:

Line 546: DELETE from gmf_batch_requirements_gtmp;

542:
543: gme_debug.put_line ('profiles. step_dep: ' || l_use_item_step_dep || ' vib: ' || l_vib_profile_value);
544:
545: -- Delete the temp table first
546: DELETE from gmf_batch_requirements_gtmp;
547:
548: -- Get all products and step association
549: IF g_debug <= gme_debug.g_log_statement THEN
550: gme_debug.put_line ('Get all products and step association');

Line 560: INSERT INTO gmf_batch_requirements_gtmp(

556: -- Get all dependant steps for the product step
557: FOR ds IN c_step_dependencies (p_batch_id, p.batchstep_id)
558: LOOP
559: -- insert records into the batch requirements table
560: INSERT INTO gmf_batch_requirements_gtmp(
561: vib_id,
562: batch_id,
563: product_item_id,
564: prod_material_detail_id,

Line 607: INSERT INTO gmf_batch_requirements_gtmp(

603: WHERE batchstep_id = ds.dep_step_id AND
604: s.material_detail_id = m.material_detail_id AND
605: m.line_type <> 1;
606:
607: INSERT INTO gmf_batch_requirements_gtmp(
608: vib_id,
609: batch_id,
610: product_item_id,
611: prod_material_detail_id,

Line 659: INSERT INTO gmf_batch_requirements_gtmp(

655: IF g_debug <= gme_debug.g_log_statement THEN
656: gme_debug.put_line ('Now insert any remaining ingredients which was not used for any product...');
657: END IF;
658:
659: INSERT INTO gmf_batch_requirements_gtmp(
660: vib_id,
661: batch_id,
662: product_item_id,
663: prod_material_detail_id,

Line 710: FROM gmf_batch_requirements_gtmp f

706: nvl(p.cost_alloc,0) <> 0 AND
707: i.line_type <> 1 AND
708: i.material_detail_id NOT IN (
709: SELECT nvl(ing_material_detail_id, -99)
710: FROM gmf_batch_requirements_gtmp f
711: WHERE
712: batch_id = p_batch_id );
713:
714: IF g_debug <= gme_debug.g_log_statement THEN

Line 720: INSERT INTO gmf_batch_requirements_gtmp(

716: gme_debug.put_line ('Now insert any remaining resources which was not used for any product...');
717: END IF;
718:
719:
720: INSERT INTO gmf_batch_requirements_gtmp(
721: vib_id,
722: batch_id,
723: product_item_id,
724: prod_material_detail_id,

Line 770: FROM gmf_batch_requirements_gtmp f

766: decode(p.plan_qty, 0, p.wip_plan_qty, p.plan_qty) <> 0 AND
767: nvl(p.cost_alloc,0) <> 0 AND
768: r.batchstep_resource_id NOT IN (
769: SELECT nvl(batchstep_resource_id, -99)
770: FROM gmf_batch_requirements_gtmp f
771: WHERE
772: batch_id = p_batch_id );
773:
774: IF g_debug <= gme_debug.g_log_statement THEN

Line 783: INSERT INTO gmf_batch_requirements_gtmp(

779: IF g_debug <= gme_debug.g_log_statement THEN
780: gme_debug.put_line ('Now insert any product that may have been missed out...');
781: END IF;
782:
783: INSERT INTO gmf_batch_requirements_gtmp(
784: vib_id,
785: batch_id,
786: product_item_id,
787: prod_material_detail_id,

Line 834: FROM gmf_batch_requirements_gtmp f

830: nvl(p.cost_alloc,0) <> 0 AND
831: i.line_type <> 1 AND
832: p.material_detail_id NOT IN (
833: SELECT prod_material_detail_id
834: FROM gmf_batch_requirements_gtmp f
835: WHERE
836: batch_id = p_batch_id );
837: IF g_debug <= gme_debug.g_log_statement THEN
838: gme_debug.put_line (sql%ROWCOUNT || ' rows inserted');

Line 844: INSERT INTO gmf_batch_requirements_gtmp(

840:
841: IF g_debug <= gme_debug.g_log_statement THEN
842: gme_debug.put_line ('inserting remaining resources');
843: END IF;
844: INSERT INTO gmf_batch_requirements_gtmp(
845: vib_id,
846: batch_id,
847: product_item_id,
848: prod_material_detail_id,

Line 894: FROM gmf_batch_requirements_gtmp f

890: decode(p.plan_qty, 0, p.wip_plan_qty, p.plan_qty) <> 0 AND
891: nvl(p.cost_alloc,0) <> 0 AND
892: p.material_detail_id NOT IN (
893: SELECT prod_material_detail_id
894: FROM gmf_batch_requirements_gtmp f
895: WHERE
896: batch_id = p_batch_id );
897:
898: IF g_debug <= gme_debug.g_log_statement THEN

Line 910: UPDATE gmf_batch_requirements_gtmp

906: END IF;
907:
908: FOR i IN c_total_prod_alloc(p_batch_id) LOOP
909: BEGIN
910: UPDATE gmf_batch_requirements_gtmp
911: SET derived_cost_alloc = derived_cost_alloc/i.total_prod_alloc,
912: required_doc_qty = required_doc_qty/i.total_prod_alloc
913: WHERE
914: batch_id = p_batch_id AND

Line 997: FROM gmf_batch_requirements

993: ) IS
994:
995: CURSOR c_batch_req IS
996: SELECT *
997: FROM gmf_batch_requirements
998: WHERE
999: batch_id = p_tran_rec.transaction_source_id AND
1000: prod_material_detail_id = p_tran_rec.trx_source_line_id AND
1001: delete_mark = 0;

Line 1178: gmf_batch_requirements r

1174:
1175: SELECT count (1)
1176: INTO l_count
1177: FROM gmf_batch_vib_details vib,
1178: gmf_batch_requirements r
1179: WHERE
1180: r.batch_id = p_tran_rec.transaction_source_id AND
1181: r.prod_material_detail_id = p_tran_rec.trx_source_line_id AND
1182: vib.requirement_id = r.requirement_id AND

Line 1255: gmf_batch_requirements r

1251:
1252: SELECT count (1)
1253: INTO l_count
1254: FROM gmf_batch_vib_details vib,
1255: gmf_batch_requirements r
1256: WHERE
1257: r.batch_id = p_tran_rec.transaction_source_id AND
1258: r.prod_material_detail_id = p_tran_rec.trx_source_line_id AND
1259: vib.requirement_id = r.requirement_id AND

Line 1380: gmf_batch_requirements r

1376: IF ing.layer_doc_qty <> ing.remaining_ib_doc_qty THEN
1377: SELECT nvl(sum (consume_ib_doc_qty), 0)
1378: INTO l_prev_consume_ib_doc_qty
1379: FROM gmf_batch_vib_details v,
1380: gmf_batch_requirements r
1381: WHERE
1382: r.batch_id = p_tran_rec.transaction_source_id AND
1383: r.prod_material_detail_id = p_tran_rec.trx_source_line_id AND
1384: v.requirement_id = r.requirement_id AND

Line 1399: gmf_batch_requirements r

1395: SELECT nvl(sum (consume_ib_doc_qty), 0)
1396: INTO l_orig_layer_consumption_qty
1397: FROM gmf_outgoing_material_layers ol,
1398: gmf_batch_vib_details v,
1399: gmf_batch_requirements r
1400: WHERE
1401: ol.mmt_transaction_id = ing.reverse_id AND
1402: v.consume_layer_id = ol.layer_id AND
1403: r.batch_id = p_tran_rec.transaction_source_id AND

Line 1531: gmf_batch_requirements r

1527: IF rsrc.layer_doc_qty <> rsrc.remaining_ib_doc_qty THEN
1528: SELECT nvl(sum (consume_ib_doc_qty), 0)
1529: INTO l_prev_consume_ib_doc_qty
1530: FROM gmf_batch_vib_details v,
1531: gmf_batch_requirements r
1532: WHERE
1533: r.batch_id = p_tran_rec.transaction_source_id AND
1534: r.prod_material_detail_id = p_tran_rec.trx_source_line_id AND
1535: v.requirement_id = r.requirement_id AND

Line 1550: gmf_batch_requirements r

1546: SELECT nvl(sum (consume_ib_doc_qty), 0)
1547: INTO l_orig_layer_consumption_qty
1548: FROM gmf_resource_layers rl,
1549: gmf_batch_vib_details v,
1550: gmf_batch_requirements r
1551: WHERE
1552: rl.poc_trans_id = rsrc.reverse_id AND
1553: v.consume_layer_id = rl.layer_id AND
1554: r.batch_id = p_tran_rec.transaction_source_id AND

Line 1806: FROM gmf_batch_requirements

1802: x_msg_data OUT NOCOPY VARCHAR2) IS
1803:
1804: CURSOR c_batch_req IS
1805: SELECT *
1806: FROM gmf_batch_requirements
1807: WHERE
1808: batch_id = p_batch_id AND
1809: delete_mark = 0
1810: ORDER BY prod_material_detail_id;

Line 1815: gmf_batch_requirements r,

1811:
1812: CURSOR c_null_consume_layers IS
1813: SELECT v.*, l.layer_doc_qty, l.layer_doc_um, l.mmt_transaction_id, l.lot_number, l.mmt_organization_id
1814: FROM gmf_batch_vib_details v,
1815: gmf_batch_requirements r,
1816: gmf_incoming_material_layers l
1817: WHERE
1818: r.batch_id = p_batch_id AND
1819: v.requirement_id = r.requirement_id AND

Line 1881: gmf_batch_requirements r

1877: CURSOR c_finalize_layer_consumption IS
1878: SELECT v.consume_layer_id, v.line_type, sum(v.consume_ib_doc_qty) consume_ib_doc_qty
1879: FROM
1880: gmf_batch_vib_details v,
1881: gmf_batch_requirements r
1882: WHERE
1883: r.batch_id = p_batch_id AND
1884: v.requirement_id = r.requirement_id AND
1885: v.finalize_ind = 1 AND

Line 1945: gmf_batch_requirements r

1941: BEGIN
1942: SELECT count(*)
1943: INTO l_count
1944: FROM gmf_batch_vib_details v,
1945: gmf_batch_requirements r
1946: WHERE
1947: r.batch_id = p_batch_id AND
1948: r.requirement_id = v.requirement_id and
1949: v.finalize_ind = 1;

Line 2540: FROM gmf_batch_vib_details v, gmf_batch_requirements r

2536: x_msg_data OUT NOCOPY VARCHAR2) IS
2537:
2538: CURSOR c_finalize_rows IS
2539: SELECT v.ROWID, v.consume_ib_doc_qty, v.consume_layer_id, v.line_type
2540: FROM gmf_batch_vib_details v, gmf_batch_requirements r
2541: WHERE
2542: r.batch_id = p_batch_id and
2543: r.requirement_id = v.requirement_id and
2544: v.finalize_ind = 1 and

Line 2591: gmf_batch_requirements r

2587: pseudo_layer_id IS NOT NULL AND
2588: layer_id in (
2589: SELECT prod_layer_id
2590: FROM gmf_batch_vib_details v,
2591: gmf_batch_requirements r
2592: WHERE
2593: r.batch_id = p_batch_id AND
2594: r.requirement_id = v.requirement_id AND
2595: v.finalize_ind = 1);

Line 2614: FROM gmf_batch_requirements

2610: finalize_ind = 1 and
2611: consume_layer_id IS NULL and
2612: requirement_id in (
2613: SELECT requirement_id
2614: FROM gmf_batch_requirements
2615: WHERE
2616: Batch_id = p_batch_id);
2617:
2618: IF g_debug <= gme_debug.g_log_statement THEN