DBA Data[Home] [Help]

APPS.GME_POST_MIGRATION dependencies on GME_COMMON_PVT

Line 10: l_batch_tbl gme_common_pvt.batch_headers_tab;

6: ret_code OUT NOCOPY VARCHAR2) IS
7: l_api_name VARCHAR2(30) := 'RECREATE_OPEN_BATCHES';
8: l_item_rec mtl_system_items_vl%ROWTYPE;
9: l_batch_header gme_batch_header%ROWTYPE;
10: l_batch_tbl gme_common_pvt.batch_headers_tab;
11: l_mtl_dtl_mig_tbl gme_post_migration.mtl_dtl_mig_tab;
12: l_mtl_dtl_tbl gme_common_pvt.material_details_tab;
13: l_in_mtl_dtl_tbl gme_common_pvt.material_details_tab;
14: l_steps_mig_tbl gme_post_migration.steps_mig_tab;

Line 12: l_mtl_dtl_tbl gme_common_pvt.material_details_tab;

8: l_item_rec mtl_system_items_vl%ROWTYPE;
9: l_batch_header gme_batch_header%ROWTYPE;
10: l_batch_tbl gme_common_pvt.batch_headers_tab;
11: l_mtl_dtl_mig_tbl gme_post_migration.mtl_dtl_mig_tab;
12: l_mtl_dtl_tbl gme_common_pvt.material_details_tab;
13: l_in_mtl_dtl_tbl gme_common_pvt.material_details_tab;
14: l_steps_mig_tbl gme_post_migration.steps_mig_tab;
15: l_steps_tbl gme_common_pvt.steps_tab;
16: l_activities_mig_tbl gme_post_migration.activ_mig_tab;

Line 13: l_in_mtl_dtl_tbl gme_common_pvt.material_details_tab;

9: l_batch_header gme_batch_header%ROWTYPE;
10: l_batch_tbl gme_common_pvt.batch_headers_tab;
11: l_mtl_dtl_mig_tbl gme_post_migration.mtl_dtl_mig_tab;
12: l_mtl_dtl_tbl gme_common_pvt.material_details_tab;
13: l_in_mtl_dtl_tbl gme_common_pvt.material_details_tab;
14: l_steps_mig_tbl gme_post_migration.steps_mig_tab;
15: l_steps_tbl gme_common_pvt.steps_tab;
16: l_activities_mig_tbl gme_post_migration.activ_mig_tab;
17: l_activities_tbl gme_common_pvt.activities_tab;

Line 15: l_steps_tbl gme_common_pvt.steps_tab;

11: l_mtl_dtl_mig_tbl gme_post_migration.mtl_dtl_mig_tab;
12: l_mtl_dtl_tbl gme_common_pvt.material_details_tab;
13: l_in_mtl_dtl_tbl gme_common_pvt.material_details_tab;
14: l_steps_mig_tbl gme_post_migration.steps_mig_tab;
15: l_steps_tbl gme_common_pvt.steps_tab;
16: l_activities_mig_tbl gme_post_migration.activ_mig_tab;
17: l_activities_tbl gme_common_pvt.activities_tab;
18: l_resources_mig_tbl gme_post_migration.rsrc_mig_tab;
19: l_resources_tbl gme_common_pvt.resources_tab;

Line 17: l_activities_tbl gme_common_pvt.activities_tab;

13: l_in_mtl_dtl_tbl gme_common_pvt.material_details_tab;
14: l_steps_mig_tbl gme_post_migration.steps_mig_tab;
15: l_steps_tbl gme_common_pvt.steps_tab;
16: l_activities_mig_tbl gme_post_migration.activ_mig_tab;
17: l_activities_tbl gme_common_pvt.activities_tab;
18: l_resources_mig_tbl gme_post_migration.rsrc_mig_tab;
19: l_resources_tbl gme_common_pvt.resources_tab;
20: l_proc_param_mig_tbl gme_post_migration.process_param_mig_tab;
21: l_proc_param_tbl gme_post_migration.process_param_tab;

Line 19: l_resources_tbl gme_common_pvt.resources_tab;

15: l_steps_tbl gme_common_pvt.steps_tab;
16: l_activities_mig_tbl gme_post_migration.activ_mig_tab;
17: l_activities_tbl gme_common_pvt.activities_tab;
18: l_resources_mig_tbl gme_post_migration.rsrc_mig_tab;
19: l_resources_tbl gme_common_pvt.resources_tab;
20: l_proc_param_mig_tbl gme_post_migration.process_param_mig_tab;
21: l_proc_param_tbl gme_post_migration.process_param_tab;
22: l_rsrc_txns_mig_tbl gme_post_migration.rsrc_txns_mig_tab;
23: l_rsrc_txns_tbl gme_post_migration.rsrc_txns_tab;

Line 152: gme_common_pvt.set_timestamp;

148: BEGIN
149: IF (g_debug <= gme_debug.g_log_statement) THEN
150: gme_debug.put_line('Current batch is '||get_batches.plant_code||'-'||get_batches.batch_no);
151: END IF;
152: gme_common_pvt.set_timestamp;
153: IF (l_current_org_id <> get_batches.organization_id) THEN
154: IF (g_debug <= gme_debug.g_log_statement) THEN
155: gme_debug.put_line('Doing setup for org = '||get_batches.organization_id);
156: END IF;

Line 159: gme_common_pvt.g_setup_done := FALSE;

155: gme_debug.put_line('Doing setup for org = '||get_batches.organization_id);
156: END IF;
157:
158: -- Bug 9164563 - Reset the global flag to make sure setup is done for new org.
159: gme_common_pvt.g_setup_done := FALSE;
160:
161: IF NOT (gme_common_pvt.setup(p_org_id => get_batches.organization_id)) THEN
162: RAISE setup_failed;
163: END IF;

Line 161: IF NOT (gme_common_pvt.setup(p_org_id => get_batches.organization_id)) THEN

157:
158: -- Bug 9164563 - Reset the global flag to make sure setup is done for new org.
159: gme_common_pvt.g_setup_done := FALSE;
160:
161: IF NOT (gme_common_pvt.setup(p_org_id => get_batches.organization_id)) THEN
162: RAISE setup_failed;
163: END IF;
164: l_current_org_id := get_batches.organization_id;
165: END IF;

Line 182: WHERE entity_type = DECODE(get_batches.batch_type, 10, gme_common_pvt.g_wip_entity_type_fpo, gme_common_pvt.g_wip_entity_type_batch)

178: WHERE batch_id = get_batches.batch_id;
179:
180: UPDATE wip_entities
181: SET wip_entity_name = wip_entity_name||'-M'
182: WHERE entity_type = DECODE(get_batches.batch_type, 10, gme_common_pvt.g_wip_entity_type_fpo, gme_common_pvt.g_wip_entity_type_batch)
183: AND organization_id = get_batches.organization_id
184: AND wip_entity_name = l_prefix||get_batches.batch_no;
185:
186: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 235: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident

231: ,entity_type
232: ,gen_object_id
233: ,primary_item_id)
234: VALUES (l_wip_entity_id, l_batch_header.organization_id
235: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
236: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
237: ,l_prefix||l_batch_header.batch_no
238: ,DECODE (l_batch_header.batch_type
239: ,0, gme_common_pvt.g_wip_entity_type_batch

Line 236: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident

232: ,gen_object_id
233: ,primary_item_id)
234: VALUES (l_wip_entity_id, l_batch_header.organization_id
235: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
236: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
237: ,l_prefix||l_batch_header.batch_no
238: ,DECODE (l_batch_header.batch_type
239: ,0, gme_common_pvt.g_wip_entity_type_batch
240: ,gme_common_pvt.g_wip_entity_type_fpo)

Line 239: ,0, gme_common_pvt.g_wip_entity_type_batch

235: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
236: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
237: ,l_prefix||l_batch_header.batch_no
238: ,DECODE (l_batch_header.batch_type
239: ,0, gme_common_pvt.g_wip_entity_type_batch
240: ,gme_common_pvt.g_wip_entity_type_fpo)
241: ,mtl_gen_object_id_s.NEXTVAL
242: ,l_primary_item_id);
243:

Line 240: ,gme_common_pvt.g_wip_entity_type_fpo)

236: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
237: ,l_prefix||l_batch_header.batch_no
238: ,DECODE (l_batch_header.batch_type
239: ,0, gme_common_pvt.g_wip_entity_type_batch
240: ,gme_common_pvt.g_wip_entity_type_fpo)
241: ,mtl_gen_object_id_s.NEXTVAL
242: ,l_primary_item_id);
243:
244: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 278: ,PRECISION => gme_common_pvt.g_precision

274: CLOSE Cur_get_item;
275: IF (l_item_rec.primary_uom_code <> l_mtl_dtl_tbl(i).dtl_um) THEN
276: l_temp_qty := inv_convert.inv_um_convert(item_id => l_mtl_dtl_tbl(i).inventory_item_id
277: ,organization_id => l_mtl_dtl_tbl(i).organization_id
278: ,PRECISION => gme_common_pvt.g_precision
279: ,from_quantity => l_mtl_dtl_tbl(i).original_qty
280: ,from_unit => l_mtl_dtl_tbl(i).dtl_um
281: ,to_unit => l_item_rec.primary_uom_code
282: ,from_name => NULL

Line 484: gme_common_pvt.calc_mtl_req_date(p_batch_header_rec => l_batch_header

480: gme_debug.put_line('After create transfers');
481: END IF;
482:
483: FOR i IN 1..l_mtl_dtl_tbl.count LOOP
484: gme_common_pvt.calc_mtl_req_date(p_batch_header_rec => l_batch_header
485: ,p_batchstep_rec => NULL
486: ,p_mtl_dtl_rec => l_mtl_dtl_tbl(i)
487: ,x_mtl_req_date => l_mtl_dtl_tbl(i).material_requirement_date
488: ,x_return_status => l_return_status);

Line 501: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type

497:
498: IF l_batch_header.batch_type = 0 AND NVL (l_batch_header.update_inventory_ind, 'Y') = 'Y' THEN
499: gme_move_orders_pvt.create_move_order_hdr
500: (p_organization_id => l_batch_header.organization_id
501: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type
502: ,x_move_order_header_id => l_batch_header.move_order_header_id
503: ,x_return_status => l_return_status);
504: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
505: RAISE create_mo_hdr_err;

Line 510: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type

506: ELSE
507: l_in_mtl_dtl_tbl := l_mtl_dtl_tbl;
508: gme_move_orders_pvt.create_move_order_lines
509: (p_move_order_header_id => l_batch_header.move_order_header_id
510: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type
511: ,p_material_details_tbl => l_in_mtl_dtl_tbl
512: ,x_material_details_tbl => l_mtl_dtl_tbl
513: ,x_trolin_tbl => l_trolin_tbl
514: ,x_return_status => l_return_status);

Line 563: p_param1 => gme_common_pvt.g_organization_code,

559: p_table_name => 'GME_BATCH_HEADER',
560: p_context => 'RECREATE_OPEN_BATCHES',
561: p_app_short_name => 'INV',
562: p_token1 => 'ORG',
563: p_param1 => gme_common_pvt.g_organization_code,
564: p_token2 => 'ITEM',
565: p_param2 => l_item_no);
566: WHEN setup_failed OR calc_mtl_req_date_err OR create_mo_hdr_err OR create_mo_line_err THEN
567: ROLLBACK;

Line 568: gme_common_pvt.count_and_get(x_count => l_msg_count

564: p_token2 => 'ITEM',
565: p_param2 => l_item_no);
566: WHEN setup_failed OR calc_mtl_req_date_err OR create_mo_hdr_err OR create_mo_line_err THEN
567: ROLLBACK;
568: gme_common_pvt.count_and_get(x_count => l_msg_count
569: ,x_data => l_msg_data);
570: gma_common_logging.gma_migration_central_log
571: (p_run_id => g_migration_run_id,
572: p_log_level => fnd_log.level_error,

Line 617: gme_common_pvt.g_transaction_header_id := NULL;

613: IF (g_debug <= gme_debug.g_log_statement) THEN
614: gme_debug.put_line('Release batches');
615: END IF;
616:
617: gme_common_pvt.g_transaction_header_id := NULL;
618: release_batches;
619:
620: IF (g_debug <= gme_debug.g_log_statement) THEN
621: gme_debug.put_line('Create transactions');

Line 767: x_mtl_dtl OUT NOCOPY gme_common_pvt.material_details_tab) IS

763: x_batch_header.terminate_reason_id := p_batch_header_mig.terminate_reason_id;
764: END build_batch_hdr;
765:
766: PROCEDURE build_mtl_dtl(p_mtl_dtl_mig IN gme_post_migration.mtl_dtl_mig_tab,
767: x_mtl_dtl OUT NOCOPY gme_common_pvt.material_details_tab) IS
768: BEGIN
769: FOR i IN 1..p_mtl_dtl_mig.count LOOP
770: x_mtl_dtl(i).material_detail_id := p_mtl_dtl_mig(i).material_detail_id;
771: x_mtl_dtl(i).batch_id := p_mtl_dtl_mig(i).batch_id;

Line 849: x_steps OUT NOCOPY gme_common_pvt.steps_tab) IS

845: END LOOP;
846: END build_mtl_dtl;
847:
848: PROCEDURE build_steps(p_steps_mig IN gme_post_migration.steps_mig_tab,
849: x_steps OUT NOCOPY gme_common_pvt.steps_tab) IS
850: BEGIN
851: FOR i IN 1..p_steps_mig.count LOOP
852: x_steps(i).batch_id := p_steps_mig(i).batch_id;
853: x_steps(i).batchstep_id := p_steps_mig(i).batchstep_id;

Line 930: x_activities IN OUT NOCOPY gme_common_pvt.activities_tab) IS

926: END LOOP;
927: END build_steps;
928:
929: PROCEDURE build_activities(p_activities_mig IN gme_post_migration.activ_mig_tab,
930: x_activities IN OUT NOCOPY gme_common_pvt.activities_tab) IS
931: l_cnt NUMBER := 0;
932: BEGIN
933: l_cnt := x_activities.count;
934: FOR i IN 1..p_activities_mig.count LOOP

Line 994: x_resources IN OUT NOCOPY gme_common_pvt.resources_tab) IS

990: END LOOP;
991: END build_activities;
992:
993: PROCEDURE build_resources(p_resources_mig IN gme_post_migration.rsrc_mig_tab,
994: x_resources IN OUT NOCOPY gme_common_pvt.resources_tab) IS
995: l_cnt NUMBER := 0;
996: BEGIN
997: l_cnt := x_resources.count;
998: FOR i IN 1..p_resources_mig.count LOOP

Line 1508: gme_common_pvt.g_user_ident,

1504: SUBSTR(p_batch_header_mig.batch_no,1,30)||'-M',
1505: p_batch_header.organization_id,
1506: p_batch_header.batch_id,
1507: p_batch_header.batch_no,
1508: gme_common_pvt.g_user_ident,
1509: gme_common_pvt.g_timestamp,
1510: gme_common_pvt.g_user_ident,
1511: gme_common_pvt.g_timestamp);
1512: END create_batch_mapping;

Line 1509: gme_common_pvt.g_timestamp,

1505: p_batch_header.organization_id,
1506: p_batch_header.batch_id,
1507: p_batch_header.batch_no,
1508: gme_common_pvt.g_user_ident,
1509: gme_common_pvt.g_timestamp,
1510: gme_common_pvt.g_user_ident,
1511: gme_common_pvt.g_timestamp);
1512: END create_batch_mapping;
1513:

Line 1510: gme_common_pvt.g_user_ident,

1506: p_batch_header.batch_id,
1507: p_batch_header.batch_no,
1508: gme_common_pvt.g_user_ident,
1509: gme_common_pvt.g_timestamp,
1510: gme_common_pvt.g_user_ident,
1511: gme_common_pvt.g_timestamp);
1512: END create_batch_mapping;
1513:
1514: PROCEDURE create_phantom_links IS

Line 1511: gme_common_pvt.g_timestamp);

1507: p_batch_header.batch_no,
1508: gme_common_pvt.g_user_ident,
1509: gme_common_pvt.g_timestamp,
1510: gme_common_pvt.g_user_ident,
1511: gme_common_pvt.g_timestamp);
1512: END create_batch_mapping;
1513:
1514: PROCEDURE create_phantom_links IS
1515: CURSOR Cur_get_phantoms IS

Line 1533: AND line_type = gme_common_pvt.g_line_type_prod

1529: CURSOR Cur_new_phant_prod(v_batch_id NUMBER, v_inventory_item_id NUMBER) IS
1530: SELECT material_detail_id
1531: FROM gme_material_details
1532: WHERE batch_id = v_batch_id
1533: AND line_type = gme_common_pvt.g_line_type_prod
1534: AND inventory_item_id = v_inventory_item_id
1535: ORDER BY line_no;
1536:
1537: l_api_name VARCHAR2(30) := 'create_phantom_links';

Line 1628: WHERE o.batch_status = gme_common_pvt.g_batch_wip

1624: PROCEDURE release_batches IS
1625: CURSOR Cur_wip_batches IS
1626: SELECT m.*, o.actual_start_date
1627: FROM gme_batch_header_mig o, gme_batch_mapping_mig m
1628: WHERE o.batch_status = gme_common_pvt.g_batch_wip
1629: AND m.old_batch_id = o.batch_id
1630: AND o.parentline_id IS NULL
1631: AND m.new_batch_id NOT IN (SELECT batch_id
1632: FROM gme_batch_header

Line 1634: AND batch_status = gme_common_pvt.g_batch_wip)

1630: AND o.parentline_id IS NULL
1631: AND m.new_batch_id NOT IN (SELECT batch_id
1632: FROM gme_batch_header
1633: WHERE batch_id = m.new_batch_id
1634: AND batch_status = gme_common_pvt.g_batch_wip)
1635: ORDER BY m.organization_id, m.new_batch_no;
1636:
1637: CURSOR Cur_get_steps(v_old_batch_id NUMBER, v_new_batch_id NUMBER) IS
1638: SELECT s.*, m.step_status old_step_status, m.actual_start_date old_actual_start_date,

Line 1643: AND m.step_status > gme_common_pvt.g_step_pending

1639: m.actual_cmplt_date old_actual_cmplt_date
1640: FROM gme_batch_steps_mig m, gme_batch_steps s
1641: WHERE m.batch_id = v_old_batch_id
1642: AND s.batch_id = v_new_batch_id
1643: AND m.step_status > gme_common_pvt.g_step_pending
1644: AND s.batchstep_no = m.batchstep_no
1645: AND NOT(s.step_status = m.step_status)
1646: ORDER BY s.batchstep_no;
1647:

Line 1686: l_exception_tbl gme_common_pvt.exceptions_tab;

1682: l_batch_header gme_batch_header%ROWTYPE;
1683: l_batch_header_out gme_batch_header%ROWTYPE;
1684: l_step_rec gme_batch_steps%ROWTYPE;
1685: l_step_rec_out gme_batch_steps%ROWTYPE;
1686: l_exception_tbl gme_common_pvt.exceptions_tab;
1687: no_open_period_err EXCEPTION;
1688: step_release_err EXCEPTION;
1689: step_cmplt_err EXCEPTION;
1690: release_batch_err EXCEPTION;

Line 1735: p_validation_level => gme_common_pvt.g_max_errors,

1731: -- Reset the date variables now.
1732: l_min_start_date := l_date;
1733:
1734: gme_api_pub.release_batch(p_api_version => 2.0,
1735: p_validation_level => gme_common_pvt.g_max_errors,
1736: p_init_msg_list => fnd_api.g_false,
1737: p_commit => fnd_api.g_true,
1738: x_message_count => l_msg_cnt,
1739: x_message_list => l_msg_data,

Line 1780: p_validation_level => gme_common_pvt.g_max_errors,

1776: l_step_rec.actual_cmplt_date := NULL;
1777:
1778: -- Bug 12557461 - Rearrange code to call release batch regardless of step status
1779: gme_api_pub.release_step(p_api_version => 2.0,
1780: p_validation_level => gme_common_pvt.g_max_errors,
1781: p_init_msg_list => fnd_api.g_false,
1782: p_commit => fnd_api.g_true,
1783: x_message_count => l_msg_cnt,
1784: x_message_list => l_msg_data,

Line 1820: IF get_steps.old_step_status IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed) THEN

1816: AND r.batch_id = t.doc_id
1817: AND t.line_id = r.batchstep_resource_id);
1818: END IF;
1819:
1820: IF get_steps.old_step_status IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed) THEN
1821:
1822: l_step_rec.actual_cmplt_date := get_steps.old_actual_cmplt_date;
1823:
1824: -- 13706812 - If actual cmplt date is earlier than actual start then set cmplt to start.

Line 1831: p_validation_level => gme_common_pvt.g_max_errors,

1827: l_step_rec.actual_cmplt_date := get_steps.old_actual_start_date;
1828: END IF;
1829:
1830: gme_api_pub.complete_step(p_api_version => 2.0,
1831: p_validation_level => gme_common_pvt.g_max_errors,
1832: p_init_msg_list => fnd_api.g_false,
1833: p_commit => fnd_api.g_true,
1834: x_message_count => l_msg_cnt,
1835: x_message_list => l_msg_data,

Line 1923: gme_common_pvt.count_and_get(x_count => l_msg_cnt

1919: p_app_short_name => 'GME',
1920: p_token1 => 'BATCH_NO',
1921: p_param1 => get_wip_batches.plant_code||'-'||get_wip_batches.new_batch_no);
1922: WHEN release_batch_err THEN
1923: gme_common_pvt.count_and_get(x_count => l_msg_cnt
1924: ,x_data => l_msg_data);
1925: gma_common_logging.gma_migration_central_log
1926: (p_run_id => g_migration_run_id,
1927: p_log_level => fnd_log.level_error,

Line 1973: transaction_date => gme_common_pvt.g_timestamp,

1969: period_id => l_period_id,
1970: open_past_period => l_open_period);
1971: IF (l_period_id <= 0) THEN
1972: invttmtx.tdatechk(org_id => p_organization_id,
1973: transaction_date => gme_common_pvt.g_timestamp,
1974: period_id => l_period_id,
1975: open_past_period => l_open_period);
1976: IF (l_period_id <= 0) THEN
1977: RAISE no_open_periods;

Line 1979: x_date := gme_common_pvt.g_timestamp;

1975: open_past_period => l_open_period);
1976: IF (l_period_id <= 0) THEN
1977: RAISE no_open_periods;
1978: ELSE
1979: x_date := gme_common_pvt.g_timestamp;
1980: END IF;
1981: ELSE
1982: x_date := p_date;
1983: END IF;

Line 2089: AND effectivity_date <= gme_common_pvt.g_timestamp

2085: SELECT revision
2086: FROM mtl_item_revisions
2087: WHERE organization_id = p_organization_id
2088: AND inventory_item_id = p_inventory_item_id
2089: AND effectivity_date <= gme_common_pvt.g_timestamp
2090: ORDER BY effectivity_date DESC;
2091: l_revision VARCHAR2(3);
2092: BEGIN
2093: OPEN Cur_get_revision;

Line 2249: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

2245:
2246: l_batch_hdr gme_batch_header%ROWTYPE;
2247: l_mtl_rec Cur_mtl_dtl%ROWTYPE;
2248: l_mmti_rec mtl_transactions_interface%ROWTYPE;
2249: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
2250: l_mtl_dtl_rec gme_material_details%ROWTYPE;
2251: l_plot_out_rec gme_pending_product_lots%ROWTYPE;
2252: l_plot_in_rec gme_pending_product_lots%ROWTYPE;
2253: l_mmt_rec mtl_material_transactions%ROWTYPE;

Line 2254: l_mmln_rec gme_common_pvt.mtl_trans_lots_num_tbl;

2250: l_mtl_dtl_rec gme_material_details%ROWTYPE;
2251: l_plot_out_rec gme_pending_product_lots%ROWTYPE;
2252: l_plot_in_rec gme_pending_product_lots%ROWTYPE;
2253: l_mmt_rec mtl_material_transactions%ROWTYPE;
2254: l_mmln_rec gme_common_pvt.mtl_trans_lots_num_tbl;
2255: uom_conversion_fail EXCEPTION;
2256: setup_failed EXCEPTION;
2257: create_txn_rsv_pp_err EXCEPTION;
2258: batch_fetch_err EXCEPTION;

Line 2282: gme_common_pvt.g_transaction_header_id := NULL;

2278: IF (g_debug <= gme_debug.g_log_statement) THEN
2279: gme_debug.put_line('Processing trans_id = '||l_txns_tbl(i).trans_id);
2280: gme_debug.put_line('l_curr_org_id = '||l_curr_org_id||' l_txns_tbl(i).organization_id = '||l_txns_tbl(i).organization_id);
2281: END IF;
2282: gme_common_pvt.g_transaction_header_id := NULL;
2283: l_lot_number := NULL;
2284: l_subinventory := NULL;
2285: l_locator_id := NULL;
2286: l_org_id := NULL;

Line 2293: gme_common_pvt.g_setup_done := FALSE;

2289: l_new_data := NULL;
2290: l_mmli_tbl.delete;
2291: IF (l_curr_org_id <> l_txns_tbl(i).organization_id) THEN
2292: -- Bug 9164563 - Reset the global flag to make sure setup is done for new org.
2293: gme_common_pvt.g_setup_done := FALSE;
2294:
2295: IF NOT (gme_common_pvt.setup(p_org_id => l_txns_tbl(i).organization_id)) THEN
2296: RAISE setup_failed;
2297: END IF;

Line 2295: IF NOT (gme_common_pvt.setup(p_org_id => l_txns_tbl(i).organization_id)) THEN

2291: IF (l_curr_org_id <> l_txns_tbl(i).organization_id) THEN
2292: -- Bug 9164563 - Reset the global flag to make sure setup is done for new org.
2293: gme_common_pvt.g_setup_done := FALSE;
2294:
2295: IF NOT (gme_common_pvt.setup(p_org_id => l_txns_tbl(i).organization_id)) THEN
2296: RAISE setup_failed;
2297: END IF;
2298: l_curr_org_id := l_txns_tbl(i).organization_id;
2299: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 2300: gme_debug.put_line('gme_common_pvt.g_organization_id = '||gme_common_pvt.g_organization_id||' gme_common_pvt.g_organization_code = '||gme_common_pvt.g_organization_code);

2296: RAISE setup_failed;
2297: END IF;
2298: l_curr_org_id := l_txns_tbl(i).organization_id;
2299: IF (g_debug <= gme_debug.g_log_statement) THEN
2300: gme_debug.put_line('gme_common_pvt.g_organization_id = '||gme_common_pvt.g_organization_id||' gme_common_pvt.g_organization_code = '||gme_common_pvt.g_organization_code);
2301: END IF;
2302: END IF;
2303:
2304: IF (l_curr_batch_id <> l_txns_tbl(i).new_batch_id) THEN

Line 2322: gme_debug.put_line('Processing transaction for Batch = '||gme_common_pvt.g_organization_code||'-'||l_batch_hdr.batch_no||' Line Type = '||l_mtl_rec.line_type||' Line No = '||l_mtl_rec.line_no||' Phantom_type = '||l_mtl_rec.phantom_type);

2318: CLOSE Cur_mtl_dtl;
2319: END IF;
2320:
2321: IF (g_debug <= gme_debug.g_log_statement) THEN
2322: gme_debug.put_line('Processing transaction for Batch = '||gme_common_pvt.g_organization_code||'-'||l_batch_hdr.batch_no||' Line Type = '||l_mtl_rec.line_type||' Line No = '||l_mtl_rec.line_no||' Phantom_type = '||l_mtl_rec.phantom_type);
2323: END IF;
2324:
2325: /* Do not create phantom ing txns these will be created by phantom prod txns */
2326: IF NOT(l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing AND l_mtl_rec.phantom_type IN (gme_common_pvt.g_auto_phantom, gme_common_pvt.g_manual_phantom)) THEN

Line 2326: IF NOT(l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing AND l_mtl_rec.phantom_type IN (gme_common_pvt.g_auto_phantom, gme_common_pvt.g_manual_phantom)) THEN

2322: gme_debug.put_line('Processing transaction for Batch = '||gme_common_pvt.g_organization_code||'-'||l_batch_hdr.batch_no||' Line Type = '||l_mtl_rec.line_type||' Line No = '||l_mtl_rec.line_no||' Phantom_type = '||l_mtl_rec.phantom_type);
2323: END IF;
2324:
2325: /* Do not create phantom ing txns these will be created by phantom prod txns */
2326: IF NOT(l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing AND l_mtl_rec.phantom_type IN (gme_common_pvt.g_auto_phantom, gme_common_pvt.g_manual_phantom)) THEN
2327: IF (g_debug <= gme_debug.g_log_statement) THEN
2328: gme_debug.put_line('Not a phantom ing txn');
2329: END IF;
2330:

Line 2346: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;

2342: l_msg_name := 'GME_MIG_ITEM_NOT_TXNS_ENABLED';
2343: RAISE defined_error;
2344: END IF;
2345:
2346: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;
2347: IF (g_debug <= gme_debug.g_log_statement) THEN
2348: gme_debug.put_line('Transaction header ID = '||gme_common_pvt.g_transaction_header_id);
2349: END IF;
2350:

Line 2348: gme_debug.put_line('Transaction header ID = '||gme_common_pvt.g_transaction_header_id);

2344: END IF;
2345:
2346: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;
2347: IF (g_debug <= gme_debug.g_log_statement) THEN
2348: gme_debug.put_line('Transaction header ID = '||gme_common_pvt.g_transaction_header_id);
2349: END IF;
2350:
2351: l_mmti_rec.transaction_source_id := l_mtl_rec.batch_id;
2352: l_mmti_rec.trx_source_line_id := l_mtl_rec.material_detail_id;

Line 2387: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN

2383: IF (l_mmti_rec.transaction_date < l_batch_hdr.actual_start_date) THEN
2384: l_mmti_rec.transaction_date := l_batch_hdr.actual_start_date;
2385: END IF;
2386:
2387: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2388: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2389: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2390: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;

Line 2388: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;

2384: l_mmti_rec.transaction_date := l_batch_hdr.actual_start_date;
2385: END IF;
2386:
2387: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2388: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2389: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2390: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2392: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;

Line 2389: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;

2385: END IF;
2386:
2387: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2388: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2389: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2390: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2392: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2393: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN

Line 2390: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN

2386:
2387: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2388: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2389: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2390: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2392: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2393: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2394: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;

Line 2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;

2387: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2388: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2389: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2390: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2392: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2393: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2394: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2395: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;

Line 2392: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;

2388: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2389: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2390: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2392: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2393: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2394: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2395: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;
2396: END IF;

Line 2393: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN

2389: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2390: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2392: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2393: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2394: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2395: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;
2396: END IF;
2397:

Line 2394: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;

2390: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2392: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2393: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2394: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2395: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;
2396: END IF;
2397:
2398: l_mmti_rec.primary_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty),5);

Line 2395: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;

2391: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2392: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2393: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2394: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2395: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;
2396: END IF;
2397:
2398: l_mmti_rec.primary_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty),5);
2399: l_mmti_rec.secondary_transaction_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty2),5);

Line 2402: l_mmti_rec.transaction_source_type_id := gme_common_pvt.g_txn_source_type;

2398: l_mmti_rec.primary_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty),5);
2399: l_mmti_rec.secondary_transaction_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty2),5);
2400: l_mmti_rec.secondary_uom_code := l_mtl_rec.secondary_uom_code;
2401: l_mmti_rec.transaction_uom := l_mtl_rec.dtl_um;
2402: l_mmti_rec.transaction_source_type_id := gme_common_pvt.g_txn_source_type;
2403: l_mmti_rec.wip_entity_type := gme_common_pvt.g_wip_entity_type_batch;
2404: l_mmti_rec.reason_id := get_reason(l_txns_tbl(i).reason_code);
2405:
2406: IF (l_txns_tbl(i).reason_code IS NOT NULL AND l_mmti_rec.reason_id IS NULL) THEN

Line 2403: l_mmti_rec.wip_entity_type := gme_common_pvt.g_wip_entity_type_batch;

2399: l_mmti_rec.secondary_transaction_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty2),5);
2400: l_mmti_rec.secondary_uom_code := l_mtl_rec.secondary_uom_code;
2401: l_mmti_rec.transaction_uom := l_mtl_rec.dtl_um;
2402: l_mmti_rec.transaction_source_type_id := gme_common_pvt.g_txn_source_type;
2403: l_mmti_rec.wip_entity_type := gme_common_pvt.g_wip_entity_type_batch;
2404: l_mmti_rec.reason_id := get_reason(l_txns_tbl(i).reason_code);
2405:
2406: IF (l_txns_tbl(i).reason_code IS NOT NULL AND l_mmti_rec.reason_id IS NULL) THEN
2407: l_txn_data := 'item no '||l_mtl_rec.item_no||'->'||'whse code '||l_txns_tbl(i).whse_code||'->'||

Line 2483: gme_api_pub.save_batch(p_header_id => gme_common_pvt.g_transaction_header_id,

2479: RAISE expected_error;
2480: END IF;
2481:
2482: -- Bug 14361428 Call SAVE BATCH to make sure inventory is available to transact.
2483: gme_api_pub.save_batch(p_header_id => gme_common_pvt.g_transaction_header_id,
2484: p_table => gme_common_pvt.g_interface_table,
2485: p_commit => FND_API.G_FALSE,
2486: x_return_status => l_return_status);
2487:

Line 2484: p_table => gme_common_pvt.g_interface_table,

2480: END IF;
2481:
2482: -- Bug 14361428 Call SAVE BATCH to make sure inventory is available to transact.
2483: gme_api_pub.save_batch(p_header_id => gme_common_pvt.g_transaction_header_id,
2484: p_table => gme_common_pvt.g_interface_table,
2485: p_commit => FND_API.G_FALSE,
2486: x_return_status => l_return_status);
2487:
2488: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

Line 2496: IF NOT (gme_common_pvt.check_subinventory(p_organization_id => l_mtl_rec.organization_id

2492: ELSE
2493: IF (g_debug <= gme_debug.g_log_statement) THEN
2494: gme_debug.put_line('All in same org');
2495: END IF;
2496: IF NOT (gme_common_pvt.check_subinventory(p_organization_id => l_mtl_rec.organization_id
2497: ,p_subinventory => l_subinventory
2498: ,p_inventory_item_id => l_mtl_rec.inventory_item_id
2499: ,p_restrict_subinv => l_mtl_rec.restrict_subinventories_code)) THEN
2500: l_subinventory := NULL;

Line 2509: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,

2505:
2506: get_subinv_locator_type(p_subinventory => l_subinventory,
2507: p_organization_id => l_mtl_rec.organization_id,
2508: x_locator_type => l_sub_loc_type);
2509: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,
2510: p_subinventory => l_subinventory,
2511: p_inventory_item_id => l_mtl_rec.inventory_item_id,
2512: p_org_control => gme_common_pvt.g_org_locator_control,
2513: p_sub_control => l_sub_loc_type,

Line 2512: p_org_control => gme_common_pvt.g_org_locator_control,

2508: x_locator_type => l_sub_loc_type);
2509: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,
2510: p_subinventory => l_subinventory,
2511: p_inventory_item_id => l_mtl_rec.inventory_item_id,
2512: p_org_control => gme_common_pvt.g_org_locator_control,
2513: p_sub_control => l_sub_loc_type,
2514: p_item_control => NVL(l_mtl_rec.location_control_code,1),
2515: p_item_loc_restrict => l_mtl_rec.restrict_locators_code,
2516: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

Line 2516: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

2512: p_org_control => gme_common_pvt.g_org_locator_control,
2513: p_sub_control => l_sub_loc_type,
2514: p_item_control => NVL(l_mtl_rec.location_control_code,1),
2515: p_item_loc_restrict => l_mtl_rec.restrict_locators_code,
2516: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,
2517: p_action => l_mmti_rec.transaction_action_id);
2518: IF (l_eff_loc_control = 1) THEN
2519: l_locator_id := NULL;
2520: ELSE

Line 2531: IF NOT (Gme_Common_Pvt.check_locator

2527: END IF;
2528: END IF;
2529:
2530: IF (l_locator_id IS NOT NULL) THEN
2531: IF NOT (Gme_Common_Pvt.check_locator
2532: (p_organization_id => l_mtl_rec.organization_id
2533: ,p_locator_id => l_locator_id
2534: ,p_subinventory => l_subinventory
2535: ,p_inventory_item_id => l_mtl_rec.inventory_item_id

Line 2536: ,p_org_control => Gme_Common_Pvt.g_org_locator_control

2532: (p_organization_id => l_mtl_rec.organization_id
2533: ,p_locator_id => l_locator_id
2534: ,p_subinventory => l_subinventory
2535: ,p_inventory_item_id => l_mtl_rec.inventory_item_id
2536: ,p_org_control => Gme_Common_Pvt.g_org_locator_control
2537: ,p_sub_control => l_sub_loc_type
2538: ,p_item_control => NVL(l_mtl_rec.location_control_code,1)
2539: ,p_item_loc_restrict => l_mtl_rec.restrict_locators_code
2540: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv

Line 2540: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv

2536: ,p_org_control => Gme_Common_Pvt.g_org_locator_control
2537: ,p_sub_control => l_sub_loc_type
2538: ,p_item_control => NVL(l_mtl_rec.location_control_code,1)
2539: ,p_item_loc_restrict => l_mtl_rec.restrict_locators_code
2540: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv
2541: ,p_txn_action_id => l_mmti_rec.transaction_action_id)) THEN
2542: l_locator_id := NULL;
2543: l_msg_name := 'GME_MIG_LOCATOR_NOT_FOUND';
2544: RAISE defined_error;

Line 2603: ,PRECISION => gme_common_pvt.g_precision

2599: IF (l_mtl_rec.dtl_um <> l_mtl_rec.primary_uom_code) THEN
2600: l_mmti_rec.transaction_quantity := inv_convert.inv_um_convert(item_id => l_mtl_rec.inventory_item_id
2601: ,lot_number => l_lot_number
2602: ,organization_id => l_mtl_rec.organization_id
2603: ,PRECISION => gme_common_pvt.g_precision
2604: ,from_quantity => ABS(l_txns_tbl(i).trans_qty)
2605: ,from_unit => l_mtl_rec.primary_uom_code
2606: ,to_unit => l_mtl_rec.dtl_um
2607: ,from_name => NULL

Line 2630: l_new_data := 'CR MATL TXN org '||gme_common_pvt.g_organization_code||'->'||'item no '||l_mtl_rec.item_no||'->'||

2626: -- l_mmli_tbl(1).lot_expiration_date := TO_DATE('31-AUG-2012 00:00:00', 'DD-MON-YYYY HH24:MI:SS');
2627: -- END IF;
2628: END IF;
2629:
2630: l_new_data := 'CR MATL TXN org '||gme_common_pvt.g_organization_code||'->'||'item no '||l_mtl_rec.item_no||'->'||
2631: 'rev '||l_mmti_rec.revision||'->'||'subinventory '||l_mmti_rec.subinventory_code||'->'||
2632: 'locator id '||l_mmti_rec.locator_id||'->'||'lot_number '||l_lot_number||'->'||
2633: 'trans qty '||l_mmti_rec.transaction_quantity||'->'||'trans uom '||l_mmti_rec.transaction_uom||'->'||
2634: 'trans date '||to_char(l_mmti_rec.transaction_date, 'DD-MON-YYYY HH24:MI:SS');

Line 2640: p_validation_level => gme_common_pvt.g_max_errors,

2636: IF (g_debug <= gme_debug.g_log_statement) THEN
2637: gme_debug.put_line('Creating TXN with '||l_new_data);
2638: END IF;
2639: gme_api_pub.create_material_txn(p_api_version => 2.0,
2640: p_validation_level => gme_common_pvt.g_max_errors,
2641: p_init_msg_list => fnd_api.g_false,
2642: p_commit => fnd_api.g_false,
2643: x_message_count => l_msg_cnt,
2644: x_message_list => l_msg_data,

Line 2676: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN

2672: l_mmti_rec.trx_source_line_id := l_mtl_rec.material_detail_id;
2673: l_mmti_rec.inventory_item_id := l_mtl_rec.inventory_item_id;
2674: l_mmti_rec.organization_id := l_mtl_rec.organization_id;
2675:
2676: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2677: IF (g_debug <= gme_debug.g_log_statement) THEN
2678: gme_debug.put_line('Ing so we will create a reservation');
2679: END IF;
2680:

Line 2794: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;

2790: RAISE defined_error;
2791: END IF;
2792:
2793: l_mmti_rec.transaction_date := l_date;
2794: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;
2795: IF (g_debug <= gme_debug.g_log_statement) THEN
2796: gme_debug.put_line('Transaction header ID for reservation is '||gme_common_pvt.g_transaction_header_id);
2797: END IF;
2798:

Line 2796: gme_debug.put_line('Transaction header ID for reservation is '||gme_common_pvt.g_transaction_header_id);

2792:
2793: l_mmti_rec.transaction_date := l_date;
2794: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;
2795: IF (g_debug <= gme_debug.g_log_statement) THEN
2796: gme_debug.put_line('Transaction header ID for reservation is '||gme_common_pvt.g_transaction_header_id);
2797: END IF;
2798:
2799: l_in_subinventory := l_subinventory;
2800: create_issue_receipt(p_curr_org_id => l_org_id,

Line 2816: gme_api_pub.save_batch(p_header_id => gme_common_pvt.g_transaction_header_id,

2812: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2813: RAISE expected_error;
2814: END IF;
2815:
2816: gme_api_pub.save_batch(p_header_id => gme_common_pvt.g_transaction_header_id,
2817: p_table => gme_common_pvt.g_interface_table,
2818: p_commit => FND_API.G_FALSE,
2819: x_return_status => l_return_status);
2820: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

Line 2817: p_table => gme_common_pvt.g_interface_table,

2813: RAISE expected_error;
2814: END IF;
2815:
2816: gme_api_pub.save_batch(p_header_id => gme_common_pvt.g_transaction_header_id,
2817: p_table => gme_common_pvt.g_interface_table,
2818: p_commit => FND_API.G_FALSE,
2819: x_return_status => l_return_status);
2820: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
2821: l_msg_name := 'GME_MIG_INV_TRANSFER_FAIL';

Line 2830: IF NOT (gme_common_pvt.check_subinventory(p_organization_id => l_mtl_rec.organization_id

2826: gme_debug.put_line('No transfer for this reservation needed');
2827: END IF;
2828:
2829: IF (l_subinventory IS NOT NULL) THEN
2830: IF NOT (gme_common_pvt.check_subinventory(p_organization_id => l_mtl_rec.organization_id
2831: ,p_subinventory => l_subinventory
2832: ,p_inventory_item_id => l_mtl_rec.inventory_item_id
2833: ,p_restrict_subinv => l_mtl_rec.restrict_subinventories_code)) THEN
2834: l_subinventory := NULL;

Line 2847: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,

2843: l_msg_name := 'GME_MIG_SUBINV_NOT_FOUND';
2844: RAISE defined_error;
2845: END IF;
2846:
2847: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,
2848: p_subinventory => l_subinventory,
2849: p_inventory_item_id => l_mtl_rec.inventory_item_id,
2850: p_org_control => gme_common_pvt.g_org_locator_control,
2851: p_sub_control => l_sub_loc_type,

Line 2850: p_org_control => gme_common_pvt.g_org_locator_control,

2846:
2847: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,
2848: p_subinventory => l_subinventory,
2849: p_inventory_item_id => l_mtl_rec.inventory_item_id,
2850: p_org_control => gme_common_pvt.g_org_locator_control,
2851: p_sub_control => l_sub_loc_type,
2852: p_item_control => NVL(l_mtl_rec.location_control_code,1),
2853: p_item_loc_restrict => l_mtl_rec.restrict_locators_code,
2854: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

Line 2854: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

2850: p_org_control => gme_common_pvt.g_org_locator_control,
2851: p_sub_control => l_sub_loc_type,
2852: p_item_control => NVL(l_mtl_rec.location_control_code,1),
2853: p_item_loc_restrict => l_mtl_rec.restrict_locators_code,
2854: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,
2855: p_action => 1);
2856: IF (l_eff_loc_control = 1) THEN
2857: l_locator_id := NULL;
2858: ELSE

Line 2868: IF NOT (Gme_Common_Pvt.check_locator

2864: x_failure_count => l_failure_count);
2865: END IF;
2866: END IF;
2867: IF (l_locator_id IS NOT NULL) THEN
2868: IF NOT (Gme_Common_Pvt.check_locator
2869: (p_organization_id => l_mtl_rec.organization_id
2870: ,p_locator_id => l_locator_id
2871: ,p_subinventory => l_subinventory
2872: ,p_inventory_item_id => l_mtl_rec.inventory_item_id

Line 2873: ,p_org_control => Gme_Common_Pvt.g_org_locator_control

2869: (p_organization_id => l_mtl_rec.organization_id
2870: ,p_locator_id => l_locator_id
2871: ,p_subinventory => l_subinventory
2872: ,p_inventory_item_id => l_mtl_rec.inventory_item_id
2873: ,p_org_control => Gme_Common_Pvt.g_org_locator_control
2874: ,p_sub_control => l_sub_loc_type
2875: ,p_item_control => NVL(l_mtl_rec.location_control_code,1)
2876: ,p_item_loc_restrict => l_mtl_rec.restrict_locators_code
2877: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv

Line 2877: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv

2873: ,p_org_control => Gme_Common_Pvt.g_org_locator_control
2874: ,p_sub_control => l_sub_loc_type
2875: ,p_item_control => NVL(l_mtl_rec.location_control_code,1)
2876: ,p_item_loc_restrict => l_mtl_rec.restrict_locators_code
2877: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv
2878: ,p_txn_action_id => 1)) THEN
2879: l_locator_id := NULL;
2880: l_msg_name := 'GME_MIG_LOCATOR_NOT_FOUND';
2881: RAISE defined_error;

Line 2943: l_new_data := 'CR RSRV org '||gme_common_pvt.g_organization_code||'->'||'item no '||l_mtl_rec.item_no||'->'||

2939: END IF;
2940:
2941: l_mtl_dtl_rec.revision := l_mmti_rec.revision;
2942:
2943: l_new_data := 'CR RSRV org '||gme_common_pvt.g_organization_code||'->'||'item no '||l_mtl_rec.item_no||'->'||
2944: 'rev '||l_mmti_rec.revision||'->'||'subinventory '||l_subinventory||'->'||
2945: 'locator id '||l_locator_id||'->'||'lot_number '||l_lot_number||'->'||
2946: 'trans qty '||ABS(l_txns_tbl(i).trans_qty)||'->'||'primary uom '||l_mtl_rec.primary_uom_code;
2947:

Line 3036: ,PRECISION => gme_common_pvt.g_precision

3032: IF (l_mtl_rec.primary_uom_code <> l_mtl_rec.dtl_um) THEN
3033: l_plot_in_rec.quantity := inv_convert.inv_um_convert(item_id => l_mtl_rec.inventory_item_id
3034: ,lot_number => l_plot_in_rec.lot_number
3035: ,organization_id => l_mtl_rec.organization_id
3036: ,PRECISION => gme_common_pvt.g_precision
3037: ,from_quantity => ABS(l_txns_tbl(i).trans_qty)
3038: ,from_unit => l_mtl_rec.primary_uom_code
3039: ,to_unit => l_mtl_rec.dtl_um
3040: ,from_name => NULL

Line 3053: l_new_data := 'PPL org '||gme_common_pvt.g_organization_code||'->'||'item no '||l_mtl_rec.item_no||'->'||

3049: l_plot_in_rec.secondary_quantity := l_txns_tbl(i).trans_qty2;
3050: l_plot_in_rec.reason_id := get_reason(l_txns_tbl(i).reason_code);
3051: l_plot_in_rec.sequence := NULL;
3052:
3053: l_new_data := 'PPL org '||gme_common_pvt.g_organization_code||'->'||'item no '||l_mtl_rec.item_no||'->'||
3054: 'rev '||l_plot_in_rec.revision||'->'||'lot_number '||l_plot_in_rec.lot_number||'->'||
3055: 'trans qty '||l_plot_in_rec.quantity||'->'||'matl uom '||l_mtl_dtl_rec.dtl_um;
3056:
3057: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 3062: p_validation_level => gme_common_pvt.g_max_errors,

3058: gme_debug.put_line('Creating pending product lot with '||l_new_data);
3059: END IF;
3060:
3061: gme_api_pub.create_pending_product_lot(p_api_version => 2.0,
3062: p_validation_level => gme_common_pvt.g_max_errors,
3063: p_init_msg_list => fnd_api.g_false,
3064: p_commit => fnd_api.g_false,
3065: x_message_count => l_msg_cnt,
3066: x_message_list => l_msg_data,

Line 3069: p_org_code => gme_common_pvt.g_organization_code,

3065: x_message_count => l_msg_cnt,
3066: x_message_list => l_msg_data,
3067: x_return_status => l_return_status,
3068: p_batch_header_rec => l_batch_hdr,
3069: p_org_code => gme_common_pvt.g_organization_code,
3070: p_create_lot => fnd_api.g_false,
3071: p_generate_lot => fnd_api.g_false,
3072: p_generate_parent_lot => fnd_api.g_false,
3073: p_material_detail_rec => l_mtl_dtl_rec,

Line 3084: END IF; /* IF NOT(l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing AND l_mtl_rec.phantom_type IN (gme_common_pvt.g_auto_phantom, gme_common_pvt.g_manual_phantom)) THEN */

3080: END IF;
3081: END IF;
3082: END IF;
3083: END IF;
3084: END IF; /* IF NOT(l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing AND l_mtl_rec.phantom_type IN (gme_common_pvt.g_auto_phantom, gme_common_pvt.g_manual_phantom)) THEN */
3085:
3086: -- Bug 13706812 - Changed update statement to take advantage of existing index which includes batch_id.
3087: UPDATE gme_batch_txns_mig
3088: SET migrated_ind = 1

Line 3098: gme_common_pvt.count_and_get(x_count => l_msg_cnt

3094: END IF;
3095: COMMIT;
3096: EXCEPTION
3097: WHEN setup_failed OR batch_fetch_err THEN
3098: gme_common_pvt.count_and_get(x_count => l_msg_cnt
3099: ,x_data => l_msg_data);
3100: gma_common_logging.gma_migration_central_log
3101: (p_run_id => g_migration_run_id,
3102: p_log_level => fnd_log.level_error,

Line 3119: gme_common_pvt.count_and_get(x_count => l_msg_cnt

3115: 'trans qty '||l_txns_tbl(i).trans_qty||'->'||'primary uom '||l_mtl_rec.primary_uom_code||'->'||
3116: 'detail uom '||l_mtl_rec.dtl_um||'->'||
3117: 'trans date '||to_char(l_txns_tbl(i).trans_date, 'DD-MON-YYYY HH24:MI:SS');
3118:
3119: gme_common_pvt.count_and_get(x_count => l_msg_cnt
3120: ,x_data => l_msg_data);
3121: gma_common_logging.gma_migration_central_log
3122: (p_run_id => g_migration_run_id,
3123: p_log_level => fnd_log.level_error,

Line 3184: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE

3180: p_token5 => 'TO_UOM',
3181: p_param5 => l_mtl_rec.dtl_um);
3182: ROLLBACK;
3183: WHEN create_txn_rsv_pp_err THEN
3184: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE
3185: ,x_count => l_msg_cnt
3186: ,x_data => l_msg_data);
3187:
3188: l_txn_data := 'item no '||l_mtl_rec.item_no||'->'||'whse code '||l_txns_tbl(i).whse_code||'->'||

Line 3384: IF NOT (gme_common_pvt.check_subinventory(p_organization_id => p_curr_org_id

3380: gme_debug.put_line('Before subinventory');
3381: END IF;
3382:
3383: /* Validate if sub found is valid in this org */
3384: IF NOT (gme_common_pvt.check_subinventory(p_organization_id => p_curr_org_id
3385: ,p_subinventory => p_subinventory
3386: ,p_inventory_item_id => p_inventory_item_id
3387: ,p_restrict_subinv => l_item_rec.restrict_subinventories_code)) THEN
3388: l_msg_name := 'GME_MIG_SUBINV_NOT_FOUND';

Line 3395: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => p_curr_org_id,

3391:
3392: get_subinv_locator_type(p_subinventory => p_subinventory,
3393: p_organization_id => p_curr_org_id,
3394: x_locator_type => l_sub_loc_type);
3395: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => p_curr_org_id,
3396: p_subinventory => p_subinventory,
3397: p_inventory_item_id => p_inventory_item_id,
3398: p_org_control => l_org_loc_control,
3399: p_sub_control => l_sub_loc_type,

Line 3419: IF NOT (Gme_Common_Pvt.check_locator

3415: END IF;
3416: END IF;
3417:
3418: IF (l_locator_id IS NOT NULL) THEN
3419: IF NOT (Gme_Common_Pvt.check_locator
3420: (p_organization_id => p_curr_org_id
3421: ,p_locator_id => l_locator_id
3422: ,p_subinventory => p_subinventory
3423: ,p_inventory_item_id => p_inventory_item_id

Line 3488: gme_common_pvt.log_message(p_product_code => 'INV', p_message_code => 'INV_NO_OPEN_PERIOD');

3484: 'trans qty '||p_txn_rec.trans_qty||'->'||'trans um '||p_txn_rec.trans_um||'->'||
3485: 'primary um '||l_item_rec.primary_uom_code||'->'||
3486: 'trans date '||to_char(p_txn_rec.trans_date, 'DD-MON-YYYY HH24:MI:SS');
3487:
3488: gme_common_pvt.log_message(p_product_code => 'INV', p_message_code => 'INV_NO_OPEN_PERIOD');
3489: RAISE no_open_period_err;
3490: ELSE
3491: l_issue_rec.transaction_date := l_date;
3492: END IF;

Line 3497: l_issue_rec.transaction_header_id := gme_common_pvt.g_transaction_header_id;

3493:
3494: /* Create a misc issue in original org/sub/loc and then a reciept in final org/sub/loc */
3495: SELECT mtl_material_transactions_s.NEXTVAL INTO
3496: l_issue_rec.transaction_interface_id FROM DUAL;
3497: l_issue_rec.transaction_header_id := gme_common_pvt.g_transaction_header_id;
3498: l_issue_rec.source_code := 'OPM_GME_MIGRATION';
3499: l_issue_rec.source_line_id := p_txn_rec.trans_id;
3500: l_issue_rec.source_header_id := p_txn_rec.doc_id;
3501: l_issue_rec.inventory_item_id := p_inventory_item_id;

Line 3517: l_issue_rec.transaction_batch_id := gme_common_pvt.g_transaction_header_id;

3513: l_issue_rec.secondary_transaction_quantity := -1 * ABS(p_mmti_rec.secondary_transaction_quantity);
3514: l_issue_rec.secondary_uom_code := p_mmti_rec.secondary_uom_code;
3515: l_issue_rec.process_flag := 1;
3516: l_issue_rec.transaction_mode := 2;
3517: l_issue_rec.transaction_batch_id := gme_common_pvt.g_transaction_header_id;
3518: l_issue_rec.transaction_batch_seq := 0;
3519: l_issue_rec.last_update_date := p_txn_rec.last_update_date;
3520: l_issue_rec.last_updated_by := p_txn_rec.last_updated_by;
3521: l_issue_rec.creation_date := p_txn_rec.creation_date;

Line 3552: l_org := gme_common_pvt.g_organization_code;

3548: OPEN Cur_item_dtl(p_batch_org_id, p_inventory_item_id);
3549: FETCH Cur_item_dtl INTO l_item_rec;
3550: IF (Cur_item_dtl%NOTFOUND) THEN
3551: CLOSE Cur_item_dtl;
3552: l_org := gme_common_pvt.g_organization_code;
3553: RAISE item_not_defined;
3554: END IF;
3555: CLOSE Cur_item_dtl;
3556:

Line 3588: gme_common_pvt.log_message(p_product_code => 'INV', p_message_code => 'INV_NO_OPEN_PERIOD');

3584: 'trans qty '||p_txn_rec.trans_qty||'->'||'trans um '||p_txn_rec.trans_um||'->'||
3585: 'primary um '||l_item_rec.primary_uom_code||'->'||
3586: 'trans date '||to_char(p_txn_rec.trans_date, 'DD-MON-YYYY HH24:MI:SS');
3587:
3588: gme_common_pvt.log_message(p_product_code => 'INV', p_message_code => 'INV_NO_OPEN_PERIOD');
3589: RAISE no_open_period_err;
3590: ELSE
3591: l_receipt_rec.transaction_date := l_date;
3592: END IF;

Line 3607: l_receipt_rec.subinventory_code := gme_common_pvt.g_organization_code;

3603: FROM ic_whse_mst
3604: WHERE mtl_organization_id = p_batch_org_id;
3605: EXCEPTION
3606: WHEN OTHERS THEN
3607: l_receipt_rec.subinventory_code := gme_common_pvt.g_organization_code;
3608: END;
3609:
3610: get_distribution_account(p_subinventory => l_receipt_rec.subinventory_code,
3611: p_org_id => p_batch_org_id,

Line 3618: get_subinv_locator_type(p_subinventory => gme_common_pvt.g_organization_code,

3614: l_receipt_rec.transaction_type_id := 42; --Misc Receipt
3615: l_receipt_rec.transaction_action_id := 27;
3616: l_receipt_rec.transaction_quantity := -1 * l_receipt_rec.transaction_quantity;
3617: l_receipt_rec.secondary_transaction_quantity := -1 * l_receipt_rec.secondary_transaction_quantity;
3618: get_subinv_locator_type(p_subinventory => gme_common_pvt.g_organization_code,
3619: p_organization_id => p_batch_org_id,
3620: x_locator_type => l_sub_loc_type);
3621:
3622: /* Check for the eff locator control of this org */

Line 3623: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => p_batch_org_id,

3619: p_organization_id => p_batch_org_id,
3620: x_locator_type => l_sub_loc_type);
3621:
3622: /* Check for the eff locator control of this org */
3623: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => p_batch_org_id,
3624: p_subinventory => l_receipt_rec.subinventory_code,
3625: p_inventory_item_id => p_inventory_item_id,
3626: p_org_control => gme_common_pvt.g_org_locator_control,
3627: p_sub_control => l_sub_loc_type,

Line 3626: p_org_control => gme_common_pvt.g_org_locator_control,

3622: /* Check for the eff locator control of this org */
3623: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => p_batch_org_id,
3624: p_subinventory => l_receipt_rec.subinventory_code,
3625: p_inventory_item_id => p_inventory_item_id,
3626: p_org_control => gme_common_pvt.g_org_locator_control,
3627: p_sub_control => l_sub_loc_type,
3628: p_item_control => NVL(l_item_rec.location_control_code,1),
3629: p_item_loc_restrict => l_item_rec.restrict_locators_code,
3630: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

Line 3630: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

3626: p_org_control => gme_common_pvt.g_org_locator_control,
3627: p_sub_control => l_sub_loc_type,
3628: p_item_control => NVL(l_item_rec.location_control_code,1),
3629: p_item_loc_restrict => l_item_rec.restrict_locators_code,
3630: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,
3631: p_action => 27);
3632:
3633: IF (l_eff_loc_control = 1) THEN
3634: l_locator_id := NULL;

Line 3733: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE

3729: p_token2 => 'ITEM',
3730: p_param2 => p_item_no);
3731: x_return_status := FND_API.G_RET_STS_ERROR;
3732: WHEN no_open_period_err THEN
3733: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE
3734: ,x_count => l_msg_cnt
3735: ,x_data => l_msg_data);
3736: gma_common_logging.gma_migration_central_log
3737: (p_run_id => g_migration_run_id,

Line 3759: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE

3755: 'trans qty '||p_txn_rec.trans_qty||'->'||'trans um '||p_txn_rec.trans_um||'->'||
3756: 'primary um '||l_item_rec.primary_uom_code||'->'||
3757: 'trans date '||to_char(p_txn_rec.trans_date, 'DD-MON-YYYY HH24:MI:SS');
3758:
3759: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE
3760: ,x_count => l_msg_cnt
3761: ,x_data => l_msg_data);
3762: gma_common_logging.gma_migration_central_log
3763: (p_run_id => g_migration_run_id,

Line 3830: l_mti_tbl gme_common_pvt.mtl_tran_int_tbl;

3826:
3827: PROCEDURE insert_interface_recs(p_mti_rec IN mtl_transactions_interface%ROWTYPE,
3828: p_mtli_rec IN mtl_transaction_lots_interface%ROWTYPE,
3829: x_return_status OUT NOCOPY VARCHAR2) IS
3830: l_mti_tbl gme_common_pvt.mtl_tran_int_tbl;
3831: l_mtli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
3832: l_api_name VARCHAR2(30) := 'insert_interface_recs';
3833: BEGIN
3834: IF (g_debug <= gme_debug.g_log_procedure) THEN

Line 3831: l_mtli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

3827: PROCEDURE insert_interface_recs(p_mti_rec IN mtl_transactions_interface%ROWTYPE,
3828: p_mtli_rec IN mtl_transaction_lots_interface%ROWTYPE,
3829: x_return_status OUT NOCOPY VARCHAR2) IS
3830: l_mti_tbl gme_common_pvt.mtl_tran_int_tbl;
3831: l_mtli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
3832: l_api_name VARCHAR2(30) := 'insert_interface_recs';
3833: BEGIN
3834: IF (g_debug <= gme_debug.g_log_procedure) THEN
3835: gme_debug.put_line('Start procedure '||l_api_name);

Line 3869: WHERE m.step_status = gme_common_pvt.g_step_closed

3865: PROCEDURE close_steps IS
3866: CURSOR Cur_get_steps IS
3867: SELECT s.batchstep_id, m.step_close_date, bm.new_batch_no, s.batchstep_no, bm.plant_code, bm.old_batch_id
3868: FROM gme_batch_steps_mig m, gme_batch_steps s, gme_batch_mapping_mig bm
3869: WHERE m.step_status = gme_common_pvt.g_step_closed
3870: AND bm.old_batch_id = m.batch_id
3871: AND s.batch_id = bm.new_batch_id
3872: AND s.batchstep_no = m.batchstep_no
3873: AND NOT(s.step_status = m.step_status)

Line 3874: AND s.step_status = gme_common_pvt.g_step_completed

3870: AND bm.old_batch_id = m.batch_id
3871: AND s.batch_id = bm.new_batch_id
3872: AND s.batchstep_no = m.batchstep_no
3873: AND NOT(s.step_status = m.step_status)
3874: AND s.step_status = gme_common_pvt.g_step_completed
3875: ORDER BY s.batch_id, s.batchstep_no;
3876: CURSOR Cur_verify_txns(v_batchstep_id NUMBER, v_old_batch_id NUMBER) IS
3877: SELECT 1
3878: FROM gme_batch_step_items bsi, gme_material_details gmdn,

Line 3909: p_validation_level => gme_common_pvt.g_max_errors,

3905: FETCH Cur_verify_txns INTO l_found;
3906: IF (Cur_verify_txns%NOTFOUND) THEN
3907: CLOSE Cur_verify_txns;
3908: gme_api_pub.close_step (p_api_version => 2,
3909: p_validation_level => gme_common_pvt.g_max_errors,
3910: p_init_msg_list => fnd_api.g_true,
3911: p_commit => fnd_api.g_true,
3912: x_message_count => l_msg_cnt,
3913: x_message_list => l_msg_data,

Line 4041: p_validation_level => gme_common_pvt.g_max_errors,

4037: l_plot_in_rec.quantity := get_lots.qty;
4038: l_plot_in_rec.secondary_quantity := get_lots.qty2;
4039: l_plot_in_rec.lot_number := l_lot_number;
4040: gme_api_pub.create_pending_product_lot(p_api_version => 2.0,
4041: p_validation_level => gme_common_pvt.g_max_errors,
4042: p_init_msg_list => fnd_api.g_false,
4043: p_commit => fnd_api.g_false,
4044: x_message_count => l_msg_cnt,
4045: x_message_list => l_msg_data,

Line 4067: gme_common_pvt.count_and_get(x_count => l_msg_cnt

4063: END IF;
4064: COMMIT;
4065: EXCEPTION
4066: WHEN batch_fetch_err THEN
4067: gme_common_pvt.count_and_get(x_count => l_msg_cnt
4068: ,x_data => l_msg_data);
4069: gma_common_logging.gma_migration_central_log
4070: (p_run_id => g_migration_run_id,
4071: p_log_level => fnd_log.level_error,

Line 4082: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE

4078: p_token2 => 'MSG',
4079: p_param2 => l_msg_data);
4080: ROLLBACK;
4081: WHEN create_pp_lot_err THEN
4082: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE
4083: ,x_count => l_msg_cnt
4084: ,x_data => l_msg_data);
4085: l_txn_data := l_item_rec.segment1||'->'||get_lots.lot_id||'->'||get_lots.qty||'->'||get_lots.qty2;
4086: l_new_data := l_item_rec.segment1||'->'||l_lot_number||'->'||get_lots.qty||'->'||get_lots.qty2;