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 114: gme_common_pvt.set_timestamp;

110: BEGIN
111: IF (g_debug <= gme_debug.g_log_statement) THEN
112: gme_debug.put_line('Current batch is '||get_batches.plant_code||'-'||get_batches.batch_no);
113: END IF;
114: gme_common_pvt.set_timestamp;
115: IF (l_current_org_id <> get_batches.organization_id) THEN
116: IF (g_debug <= gme_debug.g_log_statement) THEN
117: gme_debug.put_line('Doing setup for org = '||get_batches.organization_id);
118: END IF;

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

115: IF (l_current_org_id <> get_batches.organization_id) THEN
116: IF (g_debug <= gme_debug.g_log_statement) THEN
117: gme_debug.put_line('Doing setup for org = '||get_batches.organization_id);
118: END IF;
119: IF NOT (gme_common_pvt.setup(p_org_id => get_batches.organization_id)) THEN
120: RAISE setup_failed;
121: END IF;
122: l_current_org_id := get_batches.organization_id;
123: END IF;

Line 134: 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)

130: SET batch_no = SUBSTR(batch_no,1,30)||'-M'
131: WHERE batch_id = get_batches.batch_id;
132: UPDATE wip_entities
133: SET wip_entity_name = wip_entity_name||'-M'
134: 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)
135: AND organization_id = get_batches.organization_id
136: AND wip_entity_name = l_prefix||get_batches.batch_no;
137: IF (g_debug <= gme_debug.g_log_statement) THEN
138: gme_debug.put_line('Start batch header');

Line 162: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident

158: ,wip_entity_name
159: ,entity_type
160: ,gen_object_id)
161: VALUES (l_wip_entity_id, l_batch_header.organization_id
162: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
163: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
164: ,l_prefix||l_batch_header.batch_no
165: ,DECODE (l_batch_header.batch_type
166: ,0, gme_common_pvt.g_wip_entity_type_batch

Line 163: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident

159: ,entity_type
160: ,gen_object_id)
161: VALUES (l_wip_entity_id, l_batch_header.organization_id
162: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
163: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
164: ,l_prefix||l_batch_header.batch_no
165: ,DECODE (l_batch_header.batch_type
166: ,0, gme_common_pvt.g_wip_entity_type_batch
167: ,gme_common_pvt.g_wip_entity_type_fpo)

Line 166: ,0, gme_common_pvt.g_wip_entity_type_batch

162: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
163: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
164: ,l_prefix||l_batch_header.batch_no
165: ,DECODE (l_batch_header.batch_type
166: ,0, gme_common_pvt.g_wip_entity_type_batch
167: ,gme_common_pvt.g_wip_entity_type_fpo)
168: ,mtl_gen_object_id_s.NEXTVAL);
169: IF (g_debug <= gme_debug.g_log_statement) THEN
170: gme_debug.put_line('After wip entities');

Line 167: ,gme_common_pvt.g_wip_entity_type_fpo)

163: ,gme_common_pvt.g_timestamp, gme_common_pvt.g_user_ident
164: ,l_prefix||l_batch_header.batch_no
165: ,DECODE (l_batch_header.batch_type
166: ,0, gme_common_pvt.g_wip_entity_type_batch
167: ,gme_common_pvt.g_wip_entity_type_fpo)
168: ,mtl_gen_object_id_s.NEXTVAL);
169: IF (g_debug <= gme_debug.g_log_statement) THEN
170: gme_debug.put_line('After wip entities');
171: END IF;

Line 199: ,PRECISION => gme_common_pvt.g_precision

195: CLOSE Cur_get_item;
196: IF (l_item_rec.primary_uom_code <> l_mtl_dtl_tbl(i).dtl_um) THEN
197: l_temp_qty := inv_convert.inv_um_convert(item_id => l_mtl_dtl_tbl(i).inventory_item_id
198: ,organization_id => l_mtl_dtl_tbl(i).organization_id
199: ,PRECISION => gme_common_pvt.g_precision
200: ,from_quantity => l_mtl_dtl_tbl(i).original_qty
201: ,from_unit => l_mtl_dtl_tbl(i).dtl_um
202: ,to_unit => l_item_rec.primary_uom_code
203: ,from_name => NULL

Line 380: gme_common_pvt.calc_mtl_req_date(p_batch_header_rec => l_batch_header

376: IF (g_debug <= gme_debug.g_log_statement) THEN
377: gme_debug.put_line('After create transfers');
378: END IF;
379: FOR i IN 1..l_mtl_dtl_tbl.count LOOP
380: gme_common_pvt.calc_mtl_req_date(p_batch_header_rec => l_batch_header
381: ,p_batchstep_rec => NULL
382: ,p_mtl_dtl_rec => l_mtl_dtl_tbl(i)
383: ,x_mtl_req_date => l_mtl_dtl_tbl(i).material_requirement_date
384: ,x_return_status => l_return_status);

Line 395: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type

391: END IF;
392: IF l_batch_header.batch_type = 0 AND NVL (l_batch_header.update_inventory_ind, 'Y') = 'Y' THEN
393: gme_move_orders_pvt.create_move_order_hdr
394: (p_organization_id => l_batch_header.organization_id
395: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type
396: ,x_move_order_header_id => l_batch_header.move_order_header_id
397: ,x_return_status => l_return_status);
398: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
399: RAISE create_mo_hdr_err;

Line 404: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type

400: ELSE
401: l_in_mtl_dtl_tbl := l_mtl_dtl_tbl;
402: gme_move_orders_pvt.create_move_order_lines
403: (p_move_order_header_id => l_batch_header.move_order_header_id
404: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type
405: ,p_material_details_tbl => l_in_mtl_dtl_tbl
406: ,x_material_details_tbl => l_mtl_dtl_tbl
407: ,x_trolin_tbl => l_trolin_tbl
408: ,x_return_status => l_return_status);

Line 452: p_param1 => gme_common_pvt.g_organization_code,

448: p_table_name => 'GME_BATCH_HEADER',
449: p_context => 'RECREATE_OPEN_BATCHES',
450: p_app_short_name => 'INV',
451: p_token1 => 'ORG',
452: p_param1 => gme_common_pvt.g_organization_code,
453: p_token2 => 'ITEM',
454: p_param2 => l_item_no);
455: WHEN setup_failed OR calc_mtl_req_date_err OR create_mo_hdr_err OR create_mo_line_err THEN
456: ROLLBACK;

Line 457: gme_common_pvt.count_and_get(x_count => l_msg_count

453: p_token2 => 'ITEM',
454: p_param2 => l_item_no);
455: WHEN setup_failed OR calc_mtl_req_date_err OR create_mo_hdr_err OR create_mo_line_err THEN
456: ROLLBACK;
457: gme_common_pvt.count_and_get(x_count => l_msg_count
458: ,x_data => l_msg_data);
459: gma_common_logging.gma_migration_central_log
460: (p_run_id => g_migration_run_id,
461: p_log_level => fnd_log.level_error,

Line 501: gme_common_pvt.g_transaction_header_id := NULL;

497: create_txns_reservations(0);
498: IF (g_debug <= gme_debug.g_log_statement) THEN
499: gme_debug.put_line('Release batches');
500: END IF;
501: gme_common_pvt.g_transaction_header_id := NULL;
502: release_batches;
503: IF (g_debug <= gme_debug.g_log_statement) THEN
504: gme_debug.put_line('Create transactions');
505: END IF;

Line 645: x_mtl_dtl OUT NOCOPY gme_common_pvt.material_details_tab) IS

641: x_batch_header.terminate_reason_id := p_batch_header_mig.terminate_reason_id;
642: END build_batch_hdr;
643:
644: PROCEDURE build_mtl_dtl(p_mtl_dtl_mig IN gme_post_migration.mtl_dtl_mig_tab,
645: x_mtl_dtl OUT NOCOPY gme_common_pvt.material_details_tab) IS
646: BEGIN
647: FOR i IN 1..p_mtl_dtl_mig.count LOOP
648: x_mtl_dtl(i).material_detail_id := p_mtl_dtl_mig(i).material_detail_id;
649: x_mtl_dtl(i).batch_id := p_mtl_dtl_mig(i).batch_id;

Line 727: x_steps OUT NOCOPY gme_common_pvt.steps_tab) IS

723: END LOOP;
724: END build_mtl_dtl;
725:
726: PROCEDURE build_steps(p_steps_mig IN gme_post_migration.steps_mig_tab,
727: x_steps OUT NOCOPY gme_common_pvt.steps_tab) IS
728: BEGIN
729: FOR i IN 1..p_steps_mig.count LOOP
730: x_steps(i).batch_id := p_steps_mig(i).batch_id;
731: x_steps(i).batchstep_id := p_steps_mig(i).batchstep_id;

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

804: END LOOP;
805: END build_steps;
806:
807: PROCEDURE build_activities(p_activities_mig IN gme_post_migration.activ_mig_tab,
808: x_activities IN OUT NOCOPY gme_common_pvt.activities_tab) IS
809: l_cnt NUMBER := 0;
810: BEGIN
811: l_cnt := x_activities.count;
812: FOR i IN 1..p_activities_mig.count LOOP

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

868: END LOOP;
869: END build_activities;
870:
871: PROCEDURE build_resources(p_resources_mig IN gme_post_migration.rsrc_mig_tab,
872: x_resources IN OUT NOCOPY gme_common_pvt.resources_tab) IS
873: l_cnt NUMBER := 0;
874: BEGIN
875: l_cnt := x_resources.count;
876: FOR i IN 1..p_resources_mig.count LOOP

Line 1377: gme_common_pvt.g_user_ident,

1373: SUBSTR(p_batch_header_mig.batch_no,1,30)||'-M',
1374: p_batch_header.organization_id,
1375: p_batch_header.batch_id,
1376: p_batch_header.batch_no,
1377: gme_common_pvt.g_user_ident,
1378: gme_common_pvt.g_timestamp,
1379: gme_common_pvt.g_user_ident,
1380: gme_common_pvt.g_timestamp);
1381: END create_batch_mapping;

Line 1378: gme_common_pvt.g_timestamp,

1374: p_batch_header.organization_id,
1375: p_batch_header.batch_id,
1376: p_batch_header.batch_no,
1377: gme_common_pvt.g_user_ident,
1378: gme_common_pvt.g_timestamp,
1379: gme_common_pvt.g_user_ident,
1380: gme_common_pvt.g_timestamp);
1381: END create_batch_mapping;
1382:

Line 1379: gme_common_pvt.g_user_ident,

1375: p_batch_header.batch_id,
1376: p_batch_header.batch_no,
1377: gme_common_pvt.g_user_ident,
1378: gme_common_pvt.g_timestamp,
1379: gme_common_pvt.g_user_ident,
1380: gme_common_pvt.g_timestamp);
1381: END create_batch_mapping;
1382:
1383: PROCEDURE create_phantom_links IS

Line 1380: gme_common_pvt.g_timestamp);

1376: p_batch_header.batch_no,
1377: gme_common_pvt.g_user_ident,
1378: gme_common_pvt.g_timestamp,
1379: gme_common_pvt.g_user_ident,
1380: gme_common_pvt.g_timestamp);
1381: END create_batch_mapping;
1382:
1383: PROCEDURE create_phantom_links IS
1384: CURSOR Cur_get_phantoms IS

Line 1400: AND line_type = gme_common_pvt.g_line_type_prod

1396: CURSOR Cur_new_phant_prod(v_batch_id NUMBER, v_inventory_item_id NUMBER) IS
1397: SELECT material_detail_id
1398: FROM gme_material_details
1399: WHERE batch_id = v_batch_id
1400: AND line_type = gme_common_pvt.g_line_type_prod
1401: AND inventory_item_id = v_inventory_item_id
1402: ORDER BY line_no;
1403: l_api_name VARCHAR2(30) := 'create_phantom_links';
1404: l_new_phantom_id NUMBER;

Line 1494: WHERE o.batch_status = gme_common_pvt.g_batch_wip

1490: PROCEDURE release_batches IS
1491: CURSOR Cur_wip_batches IS
1492: SELECT m.*, o.actual_start_date
1493: FROM gme_batch_header_mig o, gme_batch_mapping_mig m
1494: WHERE o.batch_status = gme_common_pvt.g_batch_wip
1495: AND m.old_batch_id = o.batch_id
1496: AND o.parentline_id IS NULL
1497: AND m.new_batch_id NOT IN (SELECT batch_id
1498: FROM gme_batch_header

Line 1500: AND batch_status = gme_common_pvt.g_batch_wip)

1496: AND o.parentline_id IS NULL
1497: AND m.new_batch_id NOT IN (SELECT batch_id
1498: FROM gme_batch_header
1499: WHERE batch_id = m.new_batch_id
1500: AND batch_status = gme_common_pvt.g_batch_wip)
1501: ORDER BY m.organization_id, m.new_batch_no;
1502: CURSOR Cur_get_steps(v_old_batch_id NUMBER, v_new_batch_id NUMBER) IS
1503: SELECT s.*, m.step_status old_step_status, m.actual_start_date old_actual_start_date,
1504: m.actual_cmplt_date old_actual_cmplt_date

Line 1508: AND m.step_status > gme_common_pvt.g_step_pending

1504: m.actual_cmplt_date old_actual_cmplt_date
1505: FROM gme_batch_steps_mig m, gme_batch_steps s
1506: WHERE m.batch_id = v_old_batch_id
1507: AND s.batch_id = v_new_batch_id
1508: AND m.step_status > gme_common_pvt.g_step_pending
1509: AND s.batchstep_no = m.batchstep_no
1510: AND NOT(s.step_status = m.step_status)
1511: ORDER BY s.batchstep_no;
1512: CURSOR Cur_verify_phantoms(v_batch_id NUMBER) IS

Line 1531: l_exception_tbl gme_common_pvt.exceptions_tab;

1527: l_batch_header gme_batch_header%ROWTYPE;
1528: l_batch_header_out gme_batch_header%ROWTYPE;
1529: l_step_rec gme_batch_steps%ROWTYPE;
1530: l_step_rec_out gme_batch_steps%ROWTYPE;
1531: l_exception_tbl gme_common_pvt.exceptions_tab;
1532: no_open_period_err EXCEPTION;
1533: step_release_err EXCEPTION;
1534: step_cmplt_err EXCEPTION;
1535: release_batch_err EXCEPTION;

Line 1565: p_validation_level => gme_common_pvt.g_max_errors,

1561: ELSE
1562: l_batch_header.actual_start_date := l_date;
1563: END IF;
1564: gme_api_pub.release_batch(p_api_version => 2.0,
1565: p_validation_level => gme_common_pvt.g_max_errors,
1566: p_init_msg_list => fnd_api.g_false,
1567: p_commit => fnd_api.g_true,
1568: x_message_count => l_msg_cnt,
1569: x_message_list => l_msg_data,

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

1591: l_step_rec.batchstep_id := get_steps.batchstep_id;
1592: l_step_rec.batch_id := get_steps.batch_id;
1593: l_step_rec.actual_start_date := get_steps.old_actual_start_date;
1594: l_step_rec.actual_cmplt_date := get_steps.old_actual_cmplt_date;
1595: IF (get_steps.old_step_status IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed)) THEN
1596: gme_api_pub.complete_step(p_api_version => 2.0,
1597: p_validation_level => gme_common_pvt.g_max_errors,
1598: p_init_msg_list => fnd_api.g_false,
1599: p_commit => fnd_api.g_true,

Line 1597: p_validation_level => gme_common_pvt.g_max_errors,

1593: l_step_rec.actual_start_date := get_steps.old_actual_start_date;
1594: l_step_rec.actual_cmplt_date := get_steps.old_actual_cmplt_date;
1595: IF (get_steps.old_step_status IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed)) THEN
1596: gme_api_pub.complete_step(p_api_version => 2.0,
1597: p_validation_level => gme_common_pvt.g_max_errors,
1598: p_init_msg_list => fnd_api.g_false,
1599: p_commit => fnd_api.g_true,
1600: x_message_count => l_msg_cnt,
1601: x_message_list => l_msg_data,

Line 1616: p_validation_level => gme_common_pvt.g_max_errors,

1612: RAISE step_cmplt_err;
1613: END IF;
1614: ELSE
1615: gme_api_pub.release_step(p_api_version => 2.0,
1616: p_validation_level => gme_common_pvt.g_max_errors,
1617: p_init_msg_list => fnd_api.g_false,
1618: p_commit => fnd_api.g_true,
1619: x_message_count => l_msg_cnt,
1620: x_message_list => l_msg_data,

Line 1707: gme_common_pvt.count_and_get(x_count => l_msg_cnt

1703: p_app_short_name => 'GME',
1704: p_token1 => 'BATCH_NO',
1705: p_param1 => get_wip_batches.plant_code||'-'||get_wip_batches.new_batch_no);
1706: WHEN release_batch_err THEN
1707: gme_common_pvt.count_and_get(x_count => l_msg_cnt
1708: ,x_data => l_msg_data);
1709: gma_common_logging.gma_migration_central_log
1710: (p_run_id => g_migration_run_id,
1711: p_log_level => fnd_log.level_error,

Line 1757: transaction_date => gme_common_pvt.g_timestamp,

1753: period_id => l_period_id,
1754: open_past_period => l_open_period);
1755: IF (l_period_id <= 0) THEN
1756: invttmtx.tdatechk(org_id => p_organization_id,
1757: transaction_date => gme_common_pvt.g_timestamp,
1758: period_id => l_period_id,
1759: open_past_period => l_open_period);
1760: IF (l_period_id <= 0) THEN
1761: RAISE no_open_periods;

Line 1763: x_date := gme_common_pvt.g_timestamp;

1759: open_past_period => l_open_period);
1760: IF (l_period_id <= 0) THEN
1761: RAISE no_open_periods;
1762: ELSE
1763: x_date := gme_common_pvt.g_timestamp;
1764: END IF;
1765: ELSE
1766: x_date := p_date;
1767: END IF;

Line 1873: AND effectivity_date <= gme_common_pvt.g_timestamp

1869: SELECT revision
1870: FROM mtl_item_revisions
1871: WHERE organization_id = p_organization_id
1872: AND inventory_item_id = p_inventory_item_id
1873: AND effectivity_date <= gme_common_pvt.g_timestamp
1874: ORDER BY effectivity_date DESC;
1875: l_revision VARCHAR2(3);
1876: BEGIN
1877: OPEN Cur_get_revision;

Line 2031: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

2027: WHERE lot_id = v_lot_id;
2028: l_batch_hdr gme_batch_header%ROWTYPE;
2029: l_mtl_rec Cur_mtl_dtl%ROWTYPE;
2030: l_mmti_rec mtl_transactions_interface%ROWTYPE;
2031: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
2032: l_mtl_dtl_rec gme_material_details%ROWTYPE;
2033: l_plot_out_rec gme_pending_product_lots%ROWTYPE;
2034: l_plot_in_rec gme_pending_product_lots%ROWTYPE;
2035: l_mmt_rec mtl_material_transactions%ROWTYPE;

Line 2036: l_mmln_rec gme_common_pvt.mtl_trans_lots_num_tbl;

2032: l_mtl_dtl_rec gme_material_details%ROWTYPE;
2033: l_plot_out_rec gme_pending_product_lots%ROWTYPE;
2034: l_plot_in_rec gme_pending_product_lots%ROWTYPE;
2035: l_mmt_rec mtl_material_transactions%ROWTYPE;
2036: l_mmln_rec gme_common_pvt.mtl_trans_lots_num_tbl;
2037: uom_conversion_fail EXCEPTION;
2038: setup_failed EXCEPTION;
2039: create_txn_rsv_pp_err EXCEPTION;
2040: batch_fetch_err EXCEPTION;

Line 2061: gme_common_pvt.g_transaction_header_id := NULL;

2057: IF (g_debug <= gme_debug.g_log_statement) THEN
2058: gme_debug.put_line('Processing trans_id = '||l_txns_tbl(i).trans_id);
2059: gme_debug.put_line('l_curr_org_id = '||l_curr_org_id||' l_txns_tbl(i).organization_id = '||l_txns_tbl(i).organization_id);
2060: END IF;
2061: gme_common_pvt.g_transaction_header_id := NULL;
2062: l_lot_number := NULL;
2063: l_subinventory := NULL;
2064: l_locator_id := NULL;
2065: l_org_id := NULL;

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

2067: l_txn_data := NULL;
2068: l_new_data := NULL;
2069: l_mmli_tbl.delete;
2070: IF (l_curr_org_id <> l_txns_tbl(i).organization_id) THEN
2071: IF NOT (gme_common_pvt.setup(p_org_id => l_txns_tbl(i).organization_id)) THEN
2072: RAISE setup_failed;
2073: END IF;
2074: l_curr_org_id := l_txns_tbl(i).organization_id;
2075: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 2076: 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);

2072: RAISE setup_failed;
2073: END IF;
2074: l_curr_org_id := l_txns_tbl(i).organization_id;
2075: IF (g_debug <= gme_debug.g_log_statement) THEN
2076: 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);
2077: END IF;
2078: END IF;
2079: IF (l_curr_batch_id <> l_txns_tbl(i).new_batch_id) THEN
2080: l_batch_hdr.batch_id := l_txns_tbl(i).new_batch_id;

Line 2095: 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);

2091: FETCH Cur_mtl_dtl INTO l_mtl_rec;
2092: CLOSE Cur_mtl_dtl;
2093: END IF;
2094: IF (g_debug <= gme_debug.g_log_statement) THEN
2095: 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);
2096: END IF;
2097: /* Do not create phantom ing txns these will be created by phantom prod txns */
2098: 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
2099: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 2098: 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

2094: IF (g_debug <= gme_debug.g_log_statement) THEN
2095: 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);
2096: END IF;
2097: /* Do not create phantom ing txns these will be created by phantom prod txns */
2098: 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
2099: IF (g_debug <= gme_debug.g_log_statement) THEN
2100: gme_debug.put_line('Not a phantom ing txn');
2101: END IF;
2102: IF (l_txns_tbl(i).completed_ind = 1) THEN

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

2110: IF (l_mtl_rec.mtl_transactions_enabled_flag <> 'Y') THEN
2111: l_msg_name := 'GME_MIG_ITEM_NOT_TXNS_ENABLED';
2112: RAISE defined_error;
2113: END IF;
2114: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;
2115: IF (g_debug <= gme_debug.g_log_statement) THEN
2116: gme_debug.put_line('Transaction header ID = '||gme_common_pvt.g_transaction_header_id);
2117: END IF;
2118: l_mmti_rec.transaction_source_id := l_mtl_rec.batch_id;

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

2112: RAISE defined_error;
2113: END IF;
2114: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;
2115: IF (g_debug <= gme_debug.g_log_statement) THEN
2116: gme_debug.put_line('Transaction header ID = '||gme_common_pvt.g_transaction_header_id);
2117: END IF;
2118: l_mmti_rec.transaction_source_id := l_mtl_rec.batch_id;
2119: l_mmti_rec.trx_source_line_id := l_mtl_rec.material_detail_id;
2120: l_mmti_rec.inventory_item_id := l_mtl_rec.inventory_item_id;

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

2139: l_msg_name := 'GME_NO_OPEN_PERIODS_TXN';
2140: RAISE defined_error;
2141: END IF;
2142: l_mmti_rec.transaction_date := l_date;
2143: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2144: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2145: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2146: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2147: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;

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

2140: RAISE defined_error;
2141: END IF;
2142: l_mmti_rec.transaction_date := l_date;
2143: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2144: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2145: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2146: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2147: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2148: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;

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

2141: END IF;
2142: l_mmti_rec.transaction_date := l_date;
2143: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2144: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2145: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2146: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2147: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2148: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2149: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN

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

2142: l_mmti_rec.transaction_date := l_date;
2143: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2144: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2145: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2146: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2147: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2148: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2149: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2150: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;

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

2143: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2144: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2145: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2146: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2147: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2148: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2149: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2150: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2151: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;

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

2144: l_mmti_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
2145: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2146: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2147: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2148: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2149: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2150: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2151: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;
2152: END IF;

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

2145: l_mmti_rec.transaction_action_id := gme_common_pvt.g_ing_issue_txn_action;
2146: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2147: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2148: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2149: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2150: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2151: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;
2152: END IF;
2153: l_mmti_rec.primary_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty),5);

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

2146: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_prod) THEN
2147: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2148: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2149: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2150: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2151: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;
2152: END IF;
2153: l_mmti_rec.primary_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty),5);
2154: l_mmti_rec.secondary_transaction_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty2),5);

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

2147: l_mmti_rec.transaction_type_id := gme_common_pvt.g_prod_completion;
2148: l_mmti_rec.transaction_action_id := gme_common_pvt.g_prod_comp_txn_action;
2149: ELSIF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_byprod) THEN
2150: l_mmti_rec.transaction_type_id := gme_common_pvt.g_byprod_completion;
2151: l_mmti_rec.transaction_action_id := gme_common_pvt.g_byprod_comp_txn_action;
2152: END IF;
2153: l_mmti_rec.primary_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty),5);
2154: l_mmti_rec.secondary_transaction_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty2),5);
2155: l_mmti_rec.secondary_uom_code := l_mtl_rec.secondary_uom_code;

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

2153: l_mmti_rec.primary_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty),5);
2154: l_mmti_rec.secondary_transaction_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty2),5);
2155: l_mmti_rec.secondary_uom_code := l_mtl_rec.secondary_uom_code;
2156: l_mmti_rec.transaction_uom := l_mtl_rec.dtl_um;
2157: l_mmti_rec.transaction_source_type_id := gme_common_pvt.g_txn_source_type;
2158: l_mmti_rec.wip_entity_type := gme_common_pvt.g_wip_entity_type_batch;
2159: l_mmti_rec.reason_id := get_reason(l_txns_tbl(i).reason_code);
2160: IF (l_txns_tbl(i).reason_code IS NOT NULL AND l_mmti_rec.reason_id IS NULL) THEN
2161: l_txn_data := l_mtl_rec.item_no||'->'||l_txns_tbl(i).whse_code||'->'||l_txns_tbl(i).location||'->'||

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

2154: l_mmti_rec.secondary_transaction_quantity := ROUND(ABS(l_txns_tbl(i).trans_qty2),5);
2155: l_mmti_rec.secondary_uom_code := l_mtl_rec.secondary_uom_code;
2156: l_mmti_rec.transaction_uom := l_mtl_rec.dtl_um;
2157: l_mmti_rec.transaction_source_type_id := gme_common_pvt.g_txn_source_type;
2158: l_mmti_rec.wip_entity_type := gme_common_pvt.g_wip_entity_type_batch;
2159: l_mmti_rec.reason_id := get_reason(l_txns_tbl(i).reason_code);
2160: IF (l_txns_tbl(i).reason_code IS NOT NULL AND l_mmti_rec.reason_id IS NULL) THEN
2161: l_txn_data := l_mtl_rec.item_no||'->'||l_txns_tbl(i).whse_code||'->'||l_txns_tbl(i).location||'->'||
2162: l_txns_tbl(i).lot_id||'->'||l_txns_tbl(i).trans_qty||'->'||l_mtl_rec.primary_uom_code||'->'||to_char(l_txns_tbl(i).trans_date, 'DD-MON-YYYY HH24:MI:SS');

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

2229: ELSE
2230: IF (g_debug <= gme_debug.g_log_statement) THEN
2231: gme_debug.put_line('All in same org');
2232: END IF;
2233: IF NOT (gme_common_pvt.check_subinventory(p_organization_id => l_mtl_rec.organization_id
2234: ,p_subinventory => l_subinventory
2235: ,p_inventory_item_id => l_mtl_rec.inventory_item_id
2236: ,p_restrict_subinv => l_mtl_rec.restrict_subinventories_code)) THEN
2237: l_subinventory := NULL;

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

2241: END IF;
2242: get_subinv_locator_type(p_subinventory => l_subinventory,
2243: p_organization_id => l_mtl_rec.organization_id,
2244: x_locator_type => l_sub_loc_type);
2245: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,
2246: p_subinventory => l_subinventory,
2247: p_inventory_item_id => l_mtl_rec.inventory_item_id,
2248: p_org_control => gme_common_pvt.g_org_locator_control,
2249: p_sub_control => l_sub_loc_type,

Line 2248: p_org_control => gme_common_pvt.g_org_locator_control,

2244: x_locator_type => l_sub_loc_type);
2245: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,
2246: p_subinventory => l_subinventory,
2247: p_inventory_item_id => l_mtl_rec.inventory_item_id,
2248: p_org_control => gme_common_pvt.g_org_locator_control,
2249: p_sub_control => l_sub_loc_type,
2250: p_item_control => NVL(l_mtl_rec.location_control_code,1),
2251: p_item_loc_restrict => l_mtl_rec.restrict_locators_code,
2252: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

Line 2252: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

2248: p_org_control => gme_common_pvt.g_org_locator_control,
2249: p_sub_control => l_sub_loc_type,
2250: p_item_control => NVL(l_mtl_rec.location_control_code,1),
2251: p_item_loc_restrict => l_mtl_rec.restrict_locators_code,
2252: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,
2253: p_action => l_mmti_rec.transaction_action_id);
2254: IF (l_eff_loc_control = 1) THEN
2255: l_locator_id := NULL;
2256: ELSE

Line 2266: IF NOT (Gme_Common_Pvt.check_locator

2262: x_failure_count => l_failure_count);
2263: END IF;
2264: END IF;
2265: IF (l_locator_id IS NOT NULL) THEN
2266: IF NOT (Gme_Common_Pvt.check_locator
2267: (p_organization_id => l_mtl_rec.organization_id
2268: ,p_locator_id => l_locator_id
2269: ,p_subinventory => l_subinventory
2270: ,p_inventory_item_id => l_mtl_rec.inventory_item_id

Line 2271: ,p_org_control => Gme_Common_Pvt.g_org_locator_control

2267: (p_organization_id => l_mtl_rec.organization_id
2268: ,p_locator_id => l_locator_id
2269: ,p_subinventory => l_subinventory
2270: ,p_inventory_item_id => l_mtl_rec.inventory_item_id
2271: ,p_org_control => Gme_Common_Pvt.g_org_locator_control
2272: ,p_sub_control => l_sub_loc_type
2273: ,p_item_control => NVL(l_mtl_rec.location_control_code,1)
2274: ,p_item_loc_restrict => l_mtl_rec.restrict_locators_code
2275: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv

Line 2275: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv

2271: ,p_org_control => Gme_Common_Pvt.g_org_locator_control
2272: ,p_sub_control => l_sub_loc_type
2273: ,p_item_control => NVL(l_mtl_rec.location_control_code,1)
2274: ,p_item_loc_restrict => l_mtl_rec.restrict_locators_code
2275: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv
2276: ,p_txn_action_id => l_mmti_rec.transaction_action_id)) THEN
2277: l_locator_id := NULL;
2278: l_msg_name := 'GME_MIG_LOCATOR_NOT_FOUND';
2279: RAISE defined_error;

Line 2314: ,PRECISION => gme_common_pvt.g_precision

2310: IF (l_mtl_rec.dtl_um <> l_mtl_rec.primary_uom_code) THEN
2311: l_mmti_rec.transaction_quantity := inv_convert.inv_um_convert(item_id => l_mtl_rec.inventory_item_id
2312: ,lot_number => l_lot_number
2313: ,organization_id => l_mtl_rec.organization_id
2314: ,PRECISION => gme_common_pvt.g_precision
2315: ,from_quantity => ABS(l_txns_tbl(i).trans_qty)
2316: ,from_unit => l_mtl_rec.primary_uom_code
2317: ,to_unit => l_mtl_rec.dtl_um
2318: ,from_name => NULL

Line 2330: l_new_data := gme_common_pvt.g_organization_code||'->'||l_mtl_rec.item_no||'->'||l_mmti_rec.revision||'->'||

2326: IF (l_mmli_tbl.count > 0) THEN
2327: l_mmli_tbl(1).transaction_quantity := l_mmti_rec.transaction_quantity;
2328: l_mmli_tbl(1).secondary_transaction_quantity := l_mmti_rec.secondary_transaction_quantity;
2329: END IF;
2330: l_new_data := gme_common_pvt.g_organization_code||'->'||l_mtl_rec.item_no||'->'||l_mmti_rec.revision||'->'||
2331: l_mmti_rec.subinventory_code||'->'||l_mmti_rec.locator_id||'->'||l_lot_number||'->'||l_mmti_rec.transaction_quantity||'->'||l_mmti_rec.transaction_uom||'->'||TO_CHAR(l_mmti_rec.transaction_date, 'DD-MON-YYYY HH24:MI:SS');
2332: IF (g_debug <= gme_debug.g_log_statement) THEN
2333: gme_debug.put_line('Creating TXN with '||l_new_data);
2334: END IF;

Line 2336: p_validation_level => gme_common_pvt.g_max_errors,

2332: IF (g_debug <= gme_debug.g_log_statement) THEN
2333: gme_debug.put_line('Creating TXN with '||l_new_data);
2334: END IF;
2335: gme_api_pub.create_material_txn(p_api_version => 2.0,
2336: p_validation_level => gme_common_pvt.g_max_errors,
2337: p_init_msg_list => fnd_api.g_false,
2338: p_commit => fnd_api.g_false,
2339: x_message_count => l_msg_cnt,
2340: x_message_list => l_msg_data,

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

2361: l_mmti_rec.transaction_source_id := l_mtl_rec.batch_id;
2362: l_mmti_rec.trx_source_line_id := l_mtl_rec.material_detail_id;
2363: l_mmti_rec.inventory_item_id := l_mtl_rec.inventory_item_id;
2364: l_mmti_rec.organization_id := l_mtl_rec.organization_id;
2365: IF (l_mtl_rec.line_type = gme_common_pvt.g_line_type_ing) THEN
2366: IF (g_debug <= gme_debug.g_log_statement) THEN
2367: gme_debug.put_line('Ing so we will create a reservation');
2368: END IF;
2369: IF (l_mtl_rec.reservable_type <> 1) THEN

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

2470: l_msg_name := 'GME_NO_OPEN_PERIODS_TXN';
2471: RAISE defined_error;
2472: END IF;
2473: l_mmti_rec.transaction_date := l_date;
2474: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;
2475: IF (g_debug <= gme_debug.g_log_statement) THEN
2476: gme_debug.put_line('Transaction header ID for reservation is '||gme_common_pvt.g_transaction_header_id);
2477: END IF;
2478: l_in_subinventory := l_subinventory;

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

2472: END IF;
2473: l_mmti_rec.transaction_date := l_date;
2474: SELECT mtl_material_transactions_s.NEXTVAL INTO gme_common_pvt.g_transaction_header_id FROM DUAL;
2475: IF (g_debug <= gme_debug.g_log_statement) THEN
2476: gme_debug.put_line('Transaction header ID for reservation is '||gme_common_pvt.g_transaction_header_id);
2477: END IF;
2478: l_in_subinventory := l_subinventory;
2479: create_issue_receipt(p_curr_org_id => l_org_id,
2480: p_inventory_item_id => l_mtl_rec.inventory_item_id,

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

2490: x_return_status => l_return_status);
2491: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2492: RAISE expected_error;
2493: END IF;
2494: gme_api_pub.save_batch(p_header_id => gme_common_pvt.g_transaction_header_id,
2495: p_table => gme_common_pvt.g_interface_table,
2496: p_commit => FND_API.G_FALSE,
2497: x_return_status => l_return_status);
2498: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

Line 2495: p_table => gme_common_pvt.g_interface_table,

2491: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2492: RAISE expected_error;
2493: END IF;
2494: gme_api_pub.save_batch(p_header_id => gme_common_pvt.g_transaction_header_id,
2495: p_table => gme_common_pvt.g_interface_table,
2496: p_commit => FND_API.G_FALSE,
2497: x_return_status => l_return_status);
2498: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
2499: l_msg_name := 'GME_MIG_INV_TRANSFER_FAIL';

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

2503: IF (g_debug <= gme_debug.g_log_statement) THEN
2504: gme_debug.put_line('No transfer for this reservation needed');
2505: END IF;
2506: IF (l_subinventory IS NOT NULL) THEN
2507: IF NOT (gme_common_pvt.check_subinventory(p_organization_id => l_mtl_rec.organization_id
2508: ,p_subinventory => l_subinventory
2509: ,p_inventory_item_id => l_mtl_rec.inventory_item_id
2510: ,p_restrict_subinv => l_mtl_rec.restrict_subinventories_code)) THEN
2511: l_subinventory := NULL;

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

2519: ELSE
2520: l_msg_name := 'GME_MIG_SUBINV_NOT_FOUND';
2521: RAISE defined_error;
2522: END IF;
2523: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,
2524: p_subinventory => l_subinventory,
2525: p_inventory_item_id => l_mtl_rec.inventory_item_id,
2526: p_org_control => gme_common_pvt.g_org_locator_control,
2527: p_sub_control => l_sub_loc_type,

Line 2526: p_org_control => gme_common_pvt.g_org_locator_control,

2522: END IF;
2523: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => l_mtl_rec.organization_id,
2524: p_subinventory => l_subinventory,
2525: p_inventory_item_id => l_mtl_rec.inventory_item_id,
2526: p_org_control => gme_common_pvt.g_org_locator_control,
2527: p_sub_control => l_sub_loc_type,
2528: p_item_control => NVL(l_mtl_rec.location_control_code,1),
2529: p_item_loc_restrict => l_mtl_rec.restrict_locators_code,
2530: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

Line 2530: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

2526: p_org_control => gme_common_pvt.g_org_locator_control,
2527: p_sub_control => l_sub_loc_type,
2528: p_item_control => NVL(l_mtl_rec.location_control_code,1),
2529: p_item_loc_restrict => l_mtl_rec.restrict_locators_code,
2530: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,
2531: p_action => 1);
2532: IF (l_eff_loc_control = 1) THEN
2533: l_locator_id := NULL;
2534: ELSE

Line 2544: IF NOT (Gme_Common_Pvt.check_locator

2540: x_failure_count => l_failure_count);
2541: END IF;
2542: END IF;
2543: IF (l_locator_id IS NOT NULL) THEN
2544: IF NOT (Gme_Common_Pvt.check_locator
2545: (p_organization_id => l_mtl_rec.organization_id
2546: ,p_locator_id => l_locator_id
2547: ,p_subinventory => l_subinventory
2548: ,p_inventory_item_id => l_mtl_rec.inventory_item_id

Line 2549: ,p_org_control => Gme_Common_Pvt.g_org_locator_control

2545: (p_organization_id => l_mtl_rec.organization_id
2546: ,p_locator_id => l_locator_id
2547: ,p_subinventory => l_subinventory
2548: ,p_inventory_item_id => l_mtl_rec.inventory_item_id
2549: ,p_org_control => Gme_Common_Pvt.g_org_locator_control
2550: ,p_sub_control => l_sub_loc_type
2551: ,p_item_control => NVL(l_mtl_rec.location_control_code,1)
2552: ,p_item_loc_restrict => l_mtl_rec.restrict_locators_code
2553: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv

Line 2553: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv

2549: ,p_org_control => Gme_Common_Pvt.g_org_locator_control
2550: ,p_sub_control => l_sub_loc_type
2551: ,p_item_control => NVL(l_mtl_rec.location_control_code,1)
2552: ,p_item_loc_restrict => l_mtl_rec.restrict_locators_code
2553: ,p_org_neg_allowed => Gme_Common_Pvt.g_allow_neg_inv
2554: ,p_txn_action_id => 1)) THEN
2555: l_locator_id := NULL;
2556: l_msg_name := 'GME_MIG_LOCATOR_NOT_FOUND';
2557: RAISE defined_error;

Line 2595: l_new_data := gme_common_pvt.g_organization_code||'->'||l_mtl_rec.item_no||'->'||l_mmti_rec.revision||'->'||l_subinventory||'->'||l_locator_id||'->'||l_lot_number||'->'||ABS(l_txns_tbl(i).trans_qty)||'->'||l_mtl_rec.primary_uom_code;

2591: IF (g_debug <= gme_debug.g_log_statement) THEN
2592: gme_debug.put_line('Lot is '||l_lot_number);
2593: END IF;
2594: l_mtl_dtl_rec.revision := l_mmti_rec.revision;
2595: l_new_data := gme_common_pvt.g_organization_code||'->'||l_mtl_rec.item_no||'->'||l_mmti_rec.revision||'->'||l_subinventory||'->'||l_locator_id||'->'||l_lot_number||'->'||ABS(l_txns_tbl(i).trans_qty)||'->'||l_mtl_rec.primary_uom_code;
2596: IF (g_debug <= gme_debug.g_log_statement) THEN
2597: gme_debug.put_line('Creating reservation with '||l_new_data);
2598: END IF;
2599: gme_reservations_pvt.create_material_reservation(p_matl_dtl_rec => l_mtl_dtl_rec,

Line 2660: ,PRECISION => gme_common_pvt.g_precision

2656: IF (l_mtl_rec.primary_uom_code <> l_mtl_rec.dtl_um) THEN
2657: l_plot_in_rec.quantity := inv_convert.inv_um_convert(item_id => l_mtl_rec.inventory_item_id
2658: ,lot_number => l_plot_in_rec.lot_number
2659: ,organization_id => l_mtl_rec.organization_id
2660: ,PRECISION => gme_common_pvt.g_precision
2661: ,from_quantity => ABS(l_txns_tbl(i).trans_qty)
2662: ,from_unit => l_mtl_rec.primary_uom_code
2663: ,to_unit => l_mtl_rec.dtl_um
2664: ,from_name => NULL

Line 2675: l_new_data := gme_common_pvt.g_organization_code||'->'||l_mtl_rec.item_no||'->'||l_plot_in_rec.revision||'->'||l_plot_in_rec.lot_number||'->'||l_plot_in_rec.quantity||'->'||l_mtl_dtl_rec.dtl_um;

2671: END IF;
2672: l_plot_in_rec.secondary_quantity := l_txns_tbl(i).trans_qty2;
2673: l_plot_in_rec.reason_id := get_reason(l_txns_tbl(i).reason_code);
2674: l_plot_in_rec.sequence := NULL;
2675: l_new_data := gme_common_pvt.g_organization_code||'->'||l_mtl_rec.item_no||'->'||l_plot_in_rec.revision||'->'||l_plot_in_rec.lot_number||'->'||l_plot_in_rec.quantity||'->'||l_mtl_dtl_rec.dtl_um;
2676: IF (g_debug <= gme_debug.g_log_statement) THEN
2677: gme_debug.put_line('Creating pending product lot with '||l_new_data);
2678: END IF;
2679: gme_api_pub.create_pending_product_lot(p_api_version => 2.0,

Line 2680: p_validation_level => gme_common_pvt.g_max_errors,

2676: IF (g_debug <= gme_debug.g_log_statement) THEN
2677: gme_debug.put_line('Creating pending product lot with '||l_new_data);
2678: END IF;
2679: gme_api_pub.create_pending_product_lot(p_api_version => 2.0,
2680: p_validation_level => gme_common_pvt.g_max_errors,
2681: p_init_msg_list => fnd_api.g_false,
2682: p_commit => fnd_api.g_false,
2683: x_message_count => l_msg_cnt,
2684: x_message_list => l_msg_data,

Line 2687: p_org_code => gme_common_pvt.g_organization_code,

2683: x_message_count => l_msg_cnt,
2684: x_message_list => l_msg_data,
2685: x_return_status => l_return_status,
2686: p_batch_header_rec => l_batch_hdr,
2687: p_org_code => gme_common_pvt.g_organization_code,
2688: p_create_lot => fnd_api.g_false,
2689: p_generate_lot => fnd_api.g_false,
2690: p_generate_parent_lot => fnd_api.g_false,
2691: p_material_detail_rec => l_mtl_dtl_rec,

Line 2701: 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 */

2697: RAISE create_txn_rsv_pp_err;
2698: END IF;
2699: END IF;
2700: END IF;
2701: 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 */
2702: UPDATE gme_batch_txns_mig
2703: SET migrated_ind = 1
2704: WHERE trans_id = l_txns_tbl(i).trans_id;
2705: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 2711: gme_common_pvt.count_and_get(x_count => l_msg_cnt

2707: END IF;
2708: COMMIT;
2709: EXCEPTION
2710: WHEN setup_failed OR batch_fetch_err THEN
2711: gme_common_pvt.count_and_get(x_count => l_msg_cnt
2712: ,x_data => l_msg_data);
2713: gma_common_logging.gma_migration_central_log
2714: (p_run_id => g_migration_run_id,
2715: p_log_level => fnd_log.level_error,

Line 2728: gme_common_pvt.count_and_get(x_count => l_msg_cnt

2724: ROLLBACK;
2725: WHEN expected_error THEN
2726: l_txn_data := l_mtl_rec.item_no||'->'||l_txns_tbl(i).whse_code||'->'||l_txns_tbl(i).location||'->'||
2727: l_txns_tbl(i).lot_id||'->'||l_txns_tbl(i).trans_qty||'->'||l_mtl_rec.primary_uom_code||'->'||to_char(l_txns_tbl(i).trans_date, 'DD-MON-YYYY HH24:MI:SS');
2728: gme_common_pvt.count_and_get(x_count => l_msg_cnt
2729: ,x_data => l_msg_data);
2730: gma_common_logging.gma_migration_central_log
2731: (p_run_id => g_migration_run_id,
2732: p_log_level => fnd_log.level_error,

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

2779: p_token5 => 'TO_UOM',
2780: p_param5 => l_mtl_rec.dtl_um);
2781: ROLLBACK;
2782: WHEN create_txn_rsv_pp_err THEN
2783: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE
2784: ,x_count => l_msg_cnt
2785: ,x_data => l_msg_data);
2786: l_txn_data := l_mtl_rec.item_no||'->'||l_txns_tbl(i).whse_code||'->'||l_txns_tbl(i).location||'->'||
2787: l_txns_tbl(i).lot_id||'->'||l_txns_tbl(i).trans_qty||'->'||l_mtl_rec.primary_uom_code||'->'||TO_CHAR(l_txns_tbl(i).trans_date, 'DD-MON-YYYY HH24:MI:SS');

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

2942: IF (g_debug <= gme_debug.g_log_statement) THEN
2943: gme_debug.put_line('Before subinventory');
2944: END IF;
2945: /* Validate if sub found is valid in this org */
2946: IF NOT (gme_common_pvt.check_subinventory(p_organization_id => p_curr_org_id
2947: ,p_subinventory => p_subinventory
2948: ,p_inventory_item_id => p_inventory_item_id
2949: ,p_restrict_subinv => l_item_rec.restrict_subinventories_code)) THEN
2950: l_msg_name := 'GME_MIG_SUBINV_NOT_FOUND';

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

2952: END IF;
2953: get_subinv_locator_type(p_subinventory => p_subinventory,
2954: p_organization_id => p_curr_org_id,
2955: x_locator_type => l_sub_loc_type);
2956: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => p_curr_org_id,
2957: p_subinventory => p_subinventory,
2958: p_inventory_item_id => p_inventory_item_id,
2959: p_org_control => l_org_loc_control,
2960: p_sub_control => l_sub_loc_type,

Line 2979: IF NOT (Gme_Common_Pvt.check_locator

2975: l_locator_id := p_locator_id;
2976: END IF;
2977: END IF;
2978: IF (l_locator_id IS NOT NULL) THEN
2979: IF NOT (Gme_Common_Pvt.check_locator
2980: (p_organization_id => p_curr_org_id
2981: ,p_locator_id => l_locator_id
2982: ,p_subinventory => p_subinventory
2983: ,p_inventory_item_id => p_inventory_item_id

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

3017: x_return_status => l_return_status);
3018: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3019: l_txn_data := l_organization_code||'->'||p_item_no||'->'||p_txn_rec.whse_code||'->'||p_txn_rec.location||'->'||p_txn_rec.lot_id||'->'||
3020: p_txn_rec.trans_qty||'->'||l_item_rec.primary_uom_code||'->'||to_char(p_txn_rec.trans_date, 'DD-MON-YYYY HH24:MI:SS');
3021: gme_common_pvt.log_message(p_product_code => 'INV', p_message_code => 'INV_NO_OPEN_PERIOD');
3022: RAISE no_open_period_err;
3023: ELSE
3024: l_issue_rec.transaction_date := l_date;
3025: END IF;

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

3025: END IF;
3026: /* Create a misc issue in original org/sub/loc and then a reciept in final org/sub/loc */
3027: SELECT mtl_material_transactions_s.NEXTVAL INTO
3028: l_issue_rec.transaction_interface_id FROM DUAL;
3029: l_issue_rec.transaction_header_id := gme_common_pvt.g_transaction_header_id;
3030: l_issue_rec.source_code := 'OPM_GME_MIGRATION';
3031: l_issue_rec.source_line_id := p_txn_rec.trans_id;
3032: l_issue_rec.source_header_id := p_txn_rec.doc_id;
3033: l_issue_rec.inventory_item_id := p_inventory_item_id;

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

3045: l_issue_rec.secondary_transaction_quantity := -1 * ABS(p_mmti_rec.secondary_transaction_quantity);
3046: l_issue_rec.secondary_uom_code := p_mmti_rec.secondary_uom_code;
3047: l_issue_rec.process_flag := 1;
3048: l_issue_rec.transaction_mode := 2;
3049: l_issue_rec.transaction_batch_id := gme_common_pvt.g_transaction_header_id;
3050: l_issue_rec.transaction_batch_seq := 0;
3051: l_issue_rec.last_update_date := p_txn_rec.last_update_date;
3052: l_issue_rec.last_updated_by := p_txn_rec.last_updated_by;
3053: l_issue_rec.creation_date := p_txn_rec.creation_date;

Line 3081: l_org := gme_common_pvt.g_organization_code;

3077: OPEN Cur_item_dtl(p_batch_org_id, p_inventory_item_id);
3078: FETCH Cur_item_dtl INTO l_item_rec;
3079: IF (Cur_item_dtl%NOTFOUND) THEN
3080: CLOSE Cur_item_dtl;
3081: l_org := gme_common_pvt.g_organization_code;
3082: RAISE item_not_defined;
3083: END IF;
3084: CLOSE Cur_item_dtl;
3085: IF (l_item_rec.mtl_transactions_enabled_flag <> 'Y') THEN

Line 3106: l_txn_data := gme_common_pvt.g_organization_code||'->'||p_item_no||'->'||p_txn_rec.whse_code||'->'||p_txn_rec.location||'->'||p_txn_rec.lot_id||'->'||

3102: p_date => l_receipt_rec.transaction_date,
3103: x_date => l_date,
3104: x_return_status => l_return_status);
3105: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3106: l_txn_data := gme_common_pvt.g_organization_code||'->'||p_item_no||'->'||p_txn_rec.whse_code||'->'||p_txn_rec.location||'->'||p_txn_rec.lot_id||'->'||
3107: p_txn_rec.trans_qty||'->'||l_item_rec.primary_uom_code||'->'||to_char(p_txn_rec.trans_date, 'DD-MON-YYYY HH24:MI:SS');
3108: gme_common_pvt.log_message(p_product_code => 'INV', p_message_code => 'INV_NO_OPEN_PERIOD');
3109: RAISE no_open_period_err;
3110: ELSE

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

3104: x_return_status => l_return_status);
3105: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3106: l_txn_data := gme_common_pvt.g_organization_code||'->'||p_item_no||'->'||p_txn_rec.whse_code||'->'||p_txn_rec.location||'->'||p_txn_rec.lot_id||'->'||
3107: p_txn_rec.trans_qty||'->'||l_item_rec.primary_uom_code||'->'||to_char(p_txn_rec.trans_date, 'DD-MON-YYYY HH24:MI:SS');
3108: gme_common_pvt.log_message(p_product_code => 'INV', p_message_code => 'INV_NO_OPEN_PERIOD');
3109: RAISE no_open_period_err;
3110: ELSE
3111: l_receipt_rec.transaction_date := l_date;
3112: END IF;

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

3120: FROM ic_whse_mst
3121: WHERE mtl_organization_id = p_batch_org_id;
3122: EXCEPTION
3123: WHEN OTHERS THEN
3124: l_receipt_rec.subinventory_code := gme_common_pvt.g_organization_code;
3125: END;
3126: get_distribution_account(p_subinventory => l_receipt_rec.subinventory_code,
3127: p_org_id => p_batch_org_id,
3128: x_dist_acct_id => l_receipt_rec.distribution_account_id);

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

3129: l_receipt_rec.transaction_type_id := 42; --Misc Receipt
3130: l_receipt_rec.transaction_action_id := 27;
3131: l_receipt_rec.transaction_quantity := -1 * l_receipt_rec.transaction_quantity;
3132: l_receipt_rec.secondary_transaction_quantity := -1 * l_receipt_rec.secondary_transaction_quantity;
3133: get_subinv_locator_type(p_subinventory => gme_common_pvt.g_organization_code,
3134: p_organization_id => p_batch_org_id,
3135: x_locator_type => l_sub_loc_type);
3136: /* Check for the eff locator control of this org */
3137: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => p_batch_org_id,

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

3133: get_subinv_locator_type(p_subinventory => gme_common_pvt.g_organization_code,
3134: p_organization_id => p_batch_org_id,
3135: x_locator_type => l_sub_loc_type);
3136: /* Check for the eff locator control of this org */
3137: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => p_batch_org_id,
3138: p_subinventory => l_receipt_rec.subinventory_code,
3139: p_inventory_item_id => p_inventory_item_id,
3140: p_org_control => gme_common_pvt.g_org_locator_control,
3141: p_sub_control => l_sub_loc_type,

Line 3140: p_org_control => gme_common_pvt.g_org_locator_control,

3136: /* Check for the eff locator control of this org */
3137: l_eff_loc_control := gme_common_pvt.eff_locator_control(p_organization_id => p_batch_org_id,
3138: p_subinventory => l_receipt_rec.subinventory_code,
3139: p_inventory_item_id => p_inventory_item_id,
3140: p_org_control => gme_common_pvt.g_org_locator_control,
3141: p_sub_control => l_sub_loc_type,
3142: p_item_control => NVL(l_item_rec.location_control_code,1),
3143: p_item_loc_restrict => l_item_rec.restrict_locators_code,
3144: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

Line 3144: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,

3140: p_org_control => gme_common_pvt.g_org_locator_control,
3141: p_sub_control => l_sub_loc_type,
3142: p_item_control => NVL(l_item_rec.location_control_code,1),
3143: p_item_loc_restrict => l_item_rec.restrict_locators_code,
3144: p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv,
3145: p_action => 27);
3146: IF (l_eff_loc_control = 1) THEN
3147: l_locator_id := NULL;
3148: ELSE

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

3199: p_token2 => 'ITEM',
3200: p_param2 => p_item_no);
3201: x_return_status := FND_API.G_RET_STS_ERROR;
3202: WHEN no_open_period_err THEN
3203: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE
3204: ,x_count => l_msg_cnt
3205: ,x_data => l_msg_data);
3206: gma_common_logging.gma_migration_central_log
3207: (p_run_id => g_migration_run_id,

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

3219: x_return_status := l_return_status;
3220: WHEN expected_error THEN
3221: l_txn_data := p_item_no||'->'||p_txn_rec.whse_code||'->'||p_txn_rec.location||'->'||p_txn_rec.lot_id||'->'||
3222: p_txn_rec.trans_qty||'->'||l_item_rec.primary_uom_code||'->'||to_char(p_txn_rec.trans_date, 'DD-MON-YYYY HH24:MI:SS');
3223: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE
3224: ,x_count => l_msg_cnt
3225: ,x_data => l_msg_data);
3226: gma_common_logging.gma_migration_central_log
3227: (p_run_id => g_migration_run_id,

Line 3280: l_mti_tbl gme_common_pvt.mtl_tran_int_tbl;

3276:
3277: PROCEDURE insert_interface_recs(p_mti_rec IN mtl_transactions_interface%ROWTYPE,
3278: p_mtli_rec IN mtl_transaction_lots_interface%ROWTYPE,
3279: x_return_status OUT NOCOPY VARCHAR2) IS
3280: l_mti_tbl gme_common_pvt.mtl_tran_int_tbl;
3281: l_mtli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
3282: l_api_name VARCHAR2(30) := 'insert_interface_recs';
3283: BEGIN
3284: IF (g_debug <= gme_debug.g_log_procedure) THEN

Line 3281: l_mtli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

3277: PROCEDURE insert_interface_recs(p_mti_rec IN mtl_transactions_interface%ROWTYPE,
3278: p_mtli_rec IN mtl_transaction_lots_interface%ROWTYPE,
3279: x_return_status OUT NOCOPY VARCHAR2) IS
3280: l_mti_tbl gme_common_pvt.mtl_tran_int_tbl;
3281: l_mtli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
3282: l_api_name VARCHAR2(30) := 'insert_interface_recs';
3283: BEGIN
3284: IF (g_debug <= gme_debug.g_log_procedure) THEN
3285: gme_debug.put_line('Start procedure '||l_api_name);

Line 3319: WHERE m.step_status = gme_common_pvt.g_step_closed

3315: PROCEDURE close_steps IS
3316: CURSOR Cur_get_steps IS
3317: SELECT s.batchstep_id, m.step_close_date, bm.new_batch_no, s.batchstep_no, bm.plant_code, bm.old_batch_id
3318: FROM gme_batch_steps_mig m, gme_batch_steps s, gme_batch_mapping_mig bm
3319: WHERE m.step_status = gme_common_pvt.g_step_closed
3320: AND bm.old_batch_id = m.batch_id
3321: AND s.batch_id = bm.new_batch_id
3322: AND s.batchstep_no = m.batchstep_no
3323: AND NOT(s.step_status = m.step_status)

Line 3324: AND s.step_status = gme_common_pvt.g_step_completed

3320: AND bm.old_batch_id = m.batch_id
3321: AND s.batch_id = bm.new_batch_id
3322: AND s.batchstep_no = m.batchstep_no
3323: AND NOT(s.step_status = m.step_status)
3324: AND s.step_status = gme_common_pvt.g_step_completed
3325: ORDER BY s.batch_id, s.batchstep_no;
3326: CURSOR Cur_verify_txns(v_batchstep_id NUMBER, v_old_batch_id NUMBER) IS
3327: SELECT 1
3328: FROM gme_batch_step_items bsi, gme_material_details gmdn,

Line 3359: p_validation_level => gme_common_pvt.g_max_errors,

3355: FETCH Cur_verify_txns INTO l_found;
3356: IF (Cur_verify_txns%NOTFOUND) THEN
3357: CLOSE Cur_verify_txns;
3358: gme_api_pub.close_step (p_api_version => 2,
3359: p_validation_level => gme_common_pvt.g_max_errors,
3360: p_init_msg_list => fnd_api.g_true,
3361: p_commit => fnd_api.g_true,
3362: x_message_count => l_msg_cnt,
3363: x_message_list => l_msg_data,

Line 3491: p_validation_level => gme_common_pvt.g_max_errors,

3487: l_plot_in_rec.quantity := get_lots.qty;
3488: l_plot_in_rec.secondary_quantity := get_lots.qty2;
3489: l_plot_in_rec.lot_number := l_lot_number;
3490: gme_api_pub.create_pending_product_lot(p_api_version => 2.0,
3491: p_validation_level => gme_common_pvt.g_max_errors,
3492: p_init_msg_list => fnd_api.g_false,
3493: p_commit => fnd_api.g_false,
3494: x_message_count => l_msg_cnt,
3495: x_message_list => l_msg_data,

Line 3517: gme_common_pvt.count_and_get(x_count => l_msg_cnt

3513: END IF;
3514: COMMIT;
3515: EXCEPTION
3516: WHEN batch_fetch_err THEN
3517: gme_common_pvt.count_and_get(x_count => l_msg_cnt
3518: ,x_data => l_msg_data);
3519: gma_common_logging.gma_migration_central_log
3520: (p_run_id => g_migration_run_id,
3521: p_log_level => fnd_log.level_error,

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

3528: p_token2 => 'MSG',
3529: p_param2 => l_msg_data);
3530: ROLLBACK;
3531: WHEN create_pp_lot_err THEN
3532: gme_common_pvt.count_and_get(p_encoded => FND_API.G_FALSE
3533: ,x_count => l_msg_cnt
3534: ,x_data => l_msg_data);
3535: l_txn_data := l_item_rec.segment1||'->'||get_lots.lot_id||'->'||get_lots.qty||'->'||get_lots.qty2;
3536: l_new_data := l_item_rec.segment1||'->'||l_lot_number||'->'||get_lots.qty||'->'||get_lots.qty2;