DBA Data[Home] [Help]

APPS.GML_OPM_OM_CONV_MIG_PKG dependencies on GMI_RESERVATION_UTIL

Line 245: GMI_RESERVATION_UTIL.println('START OF GML_OPM_OM_CONV_MIG_PKG.Migrate_opm_om_open_lines - run_id = ' || p_migration_run_id);

241:
242: /* Get all the open lines to be processed */
243: l_table_name := 'MTL_RESERVATIONS';
244: l_opm_table_name := 'IC_TRAN_PND';
245: GMI_RESERVATION_UTIL.println('START OF GML_OPM_OM_CONV_MIG_PKG.Migrate_opm_om_open_lines - run_id = ' || p_migration_run_id);
246: GMI_RESERVATION_UTIL.Println('IC DEFAULT_LOCT is ' || l_IC$DEFAULT_LOCT);
247:
248: FOR open_order_line_rec IN get_open_order_lines LOOP
249: GMI_RESERVATION_UTIL.println('NNNNn - In get_open_order_lines loop which is the main loop');

Line 246: GMI_RESERVATION_UTIL.Println('IC DEFAULT_LOCT is ' || l_IC$DEFAULT_LOCT);

242: /* Get all the open lines to be processed */
243: l_table_name := 'MTL_RESERVATIONS';
244: l_opm_table_name := 'IC_TRAN_PND';
245: GMI_RESERVATION_UTIL.println('START OF GML_OPM_OM_CONV_MIG_PKG.Migrate_opm_om_open_lines - run_id = ' || p_migration_run_id);
246: GMI_RESERVATION_UTIL.Println('IC DEFAULT_LOCT is ' || l_IC$DEFAULT_LOCT);
247:
248: FOR open_order_line_rec IN get_open_order_lines LOOP
249: GMI_RESERVATION_UTIL.println('NNNNn - In get_open_order_lines loop which is the main loop');
250:

Line 249: GMI_RESERVATION_UTIL.println('NNNNn - In get_open_order_lines loop which is the main loop');

245: GMI_RESERVATION_UTIL.println('START OF GML_OPM_OM_CONV_MIG_PKG.Migrate_opm_om_open_lines - run_id = ' || p_migration_run_id);
246: GMI_RESERVATION_UTIL.Println('IC DEFAULT_LOCT is ' || l_IC$DEFAULT_LOCT);
247:
248: FOR open_order_line_rec IN get_open_order_lines LOOP
249: GMI_RESERVATION_UTIL.println('NNNNn - In get_open_order_lines loop which is the main loop');
250:
251: BEGIN
252: /* Get the item controls for the order line */
253: OPEN get_item_details(open_order_line_rec.inventory_item_id,open_order_line_rec.ship_from_org_id);

Line 257: GMI_RESERVATION_UTIL.println('after item controls '||'inventory_item_id : '||open_order_line_rec.inventory_item_id);

253: OPEN get_item_details(open_order_line_rec.inventory_item_id,open_order_line_rec.ship_from_org_id);
254: FETCH get_item_details INTO l_lot_divisible_flag,l_lot_control_code,l_tracking_quantity_ind,l_opm_noninv_ind ;
255: CLOSE get_item_details;
256:
257: GMI_RESERVATION_UTIL.println('after item controls '||'inventory_item_id : '||open_order_line_rec.inventory_item_id);
258: GMI_RESERVATION_UTIL.println('l_opm_noninv_ind : '||l_opm_noninv_ind );
259: GMI_RESERVATION_UTIL.println('l_lot_control_code : '||l_lot_control_code);
260: GMI_RESERVATION_UTIL.println('ordered_quantity : '||open_order_line_rec.qty);
261:

Line 258: GMI_RESERVATION_UTIL.println('l_opm_noninv_ind : '||l_opm_noninv_ind );

254: FETCH get_item_details INTO l_lot_divisible_flag,l_lot_control_code,l_tracking_quantity_ind,l_opm_noninv_ind ;
255: CLOSE get_item_details;
256:
257: GMI_RESERVATION_UTIL.println('after item controls '||'inventory_item_id : '||open_order_line_rec.inventory_item_id);
258: GMI_RESERVATION_UTIL.println('l_opm_noninv_ind : '||l_opm_noninv_ind );
259: GMI_RESERVATION_UTIL.println('l_lot_control_code : '||l_lot_control_code);
260: GMI_RESERVATION_UTIL.println('ordered_quantity : '||open_order_line_rec.qty);
261:
262: IF l_opm_noninv_ind = 0 THEN -- 5475003 only check allocations if an inventory item (control from ic_item_mst)

Line 259: GMI_RESERVATION_UTIL.println('l_lot_control_code : '||l_lot_control_code);

255: CLOSE get_item_details;
256:
257: GMI_RESERVATION_UTIL.println('after item controls '||'inventory_item_id : '||open_order_line_rec.inventory_item_id);
258: GMI_RESERVATION_UTIL.println('l_opm_noninv_ind : '||l_opm_noninv_ind );
259: GMI_RESERVATION_UTIL.println('l_lot_control_code : '||l_lot_control_code);
260: GMI_RESERVATION_UTIL.println('ordered_quantity : '||open_order_line_rec.qty);
261:
262: IF l_opm_noninv_ind = 0 THEN -- 5475003 only check allocations if an inventory item (control from ic_item_mst)
263: /* -- NOTA BENE - we do not create move orders either for a non-inventory item in R12 (in 11i OPM we did ) */

Line 260: GMI_RESERVATION_UTIL.println('ordered_quantity : '||open_order_line_rec.qty);

256:
257: GMI_RESERVATION_UTIL.println('after item controls '||'inventory_item_id : '||open_order_line_rec.inventory_item_id);
258: GMI_RESERVATION_UTIL.println('l_opm_noninv_ind : '||l_opm_noninv_ind );
259: GMI_RESERVATION_UTIL.println('l_lot_control_code : '||l_lot_control_code);
260: GMI_RESERVATION_UTIL.println('ordered_quantity : '||open_order_line_rec.qty);
261:
262: IF l_opm_noninv_ind = 0 THEN -- 5475003 only check allocations if an inventory item (control from ic_item_mst)
263: /* -- NOTA BENE - we do not create move orders either for a non-inventory item in R12 (in 11i OPM we did ) */
264: /* Are there allocations for this? If so create reservations for these allocations */

Line 266: GMI_RESERVATION_UTIL.println('line_id is '|| open_order_line_rec.line_id);

262: IF l_opm_noninv_ind = 0 THEN -- 5475003 only check allocations if an inventory item (control from ic_item_mst)
263: /* -- NOTA BENE - we do not create move orders either for a non-inventory item in R12 (in 11i OPM we did ) */
264: /* Are there allocations for this? If so create reservations for these allocations */
265:
266: GMI_RESERVATION_UTIL.println('line_id is '|| open_order_line_rec.line_id);
267: FOR allocations_for_line_rec IN get_allocations_for_line(open_order_line_rec.line_id)
268: LOOP
269:
270: BEGIN

Line 271: GMI_RESERVATION_UTIL.PrintLn('NNNN In allocations loop');

267: FOR allocations_for_line_rec IN get_allocations_for_line(open_order_line_rec.line_id)
268: LOOP
269:
270: BEGIN
271: GMI_RESERVATION_UTIL.PrintLn('NNNN In allocations loop');
272:
273: /* Fill in the reservation record */
274: l_insert_rsv_rec.reservation_id := NULL; -- cannot know
275: l_insert_rsv_rec.requirement_date := SYSDATE;

Line 320: GMI_RESERVATION_UTIL.Println('subinventoryflag for the whse '|| l_subinventory_ind_flag);

316: OPEN get_whse_details(allocations_for_line_rec.whse_code);
317: FETCH get_whse_details INTO l_subinventory_ind_flag, l_organization_id; -- 5574631
318: CLOSE get_whse_details;
319:
320: GMI_RESERVATION_UTIL.Println('subinventoryflag for the whse '|| l_subinventory_ind_flag);
321: GMI_RESERVATION_UTIL.Println('whse_code '|| allocations_for_line_rec.whse_code);
322: -- 5574631 start
323:
324: IF l_subinventory_ind_flag = 'Y' then -- 5574631

Line 321: GMI_RESERVATION_UTIL.Println('whse_code '|| allocations_for_line_rec.whse_code);

317: FETCH get_whse_details INTO l_subinventory_ind_flag, l_organization_id; -- 5574631
318: CLOSE get_whse_details;
319:
320: GMI_RESERVATION_UTIL.Println('subinventoryflag for the whse '|| l_subinventory_ind_flag);
321: GMI_RESERVATION_UTIL.Println('whse_code '|| allocations_for_line_rec.whse_code);
322: -- 5574631 start
323:
324: IF l_subinventory_ind_flag = 'Y' then -- 5574631
325:

Line 326: GMI_RESERVATION_UTIL.PrintLn(' From Whse is mapped as a subinventory new organization_id is '|| l_organization_id);

322: -- 5574631 start
323:
324: IF l_subinventory_ind_flag = 'Y' then -- 5574631
325:
326: GMI_RESERVATION_UTIL.PrintLn(' From Whse is mapped as a subinventory new organization_id is '|| l_organization_id);
327: -- From Whse is mapped as a subinventory, so need to
328: -- 1 update the SO line with new org (open_order_line_rec.ship_from_org_id) ;
329: -- 2 update any delivery details with new org;
330: -- 3 update wsh_new_deliveries (trips do NOT store orgs) with the new org (all because of GMD's requirements);

Line 335: GMI_RESERVATION_UTIL.PrintLn(' before update to ship_from_org_id of so line '|| open_order_line_rec.line_id);

331: -- 4 use this new org id for the reservation to be created;
332: -- 5 update any mo lines with new org id -- 5731584
333:
334: /* need to update the SO line with new org (open_order_line_rec.ship_from_org_id) */
335: GMI_RESERVATION_UTIL.PrintLn(' before update to ship_from_org_id of so line '|| open_order_line_rec.line_id);
336:
337: UPDATE oe_order_lines_all
338: SET ship_from_org_id = l_organization_id
339: WHERE line_id = open_order_line_rec.line_id;

Line 352: GMI_RESERVATION_UTIL.PrintLn(' before INV_OPM_Item_Migration.get_ODM_item ');

348: AND line_status = 7;
349: -- 5731584 end
350:
351:
352: GMI_RESERVATION_UTIL.PrintLn(' before INV_OPM_Item_Migration.get_ODM_item ');
353:
354:
355: -- if here , then make sure item is in new org from sub inv - call get odm item to generate
356: -- as per Jatinder Gogna

Line 369: GMI_RESERVATION_UTIL.PrintLn(' Failed to get discrete item. Item id :'||to_char(allocations_for_line_rec.item_id));

365: x_failure_count => l_failure_count1);
366:
367: IF (l_failure_count1 > 0) THEN
368: -- Log Error
369: GMI_RESERVATION_UTIL.PrintLn(' Failed to get discrete item. Item id :'||to_char(allocations_for_line_rec.item_id));
370: GMA_COMMON_LOGGING.gma_migration_central_log (
371: p_run_id => p_migration_run_id,
372: p_log_level => FND_LOG.LEVEL_ERROR,
373: p_message_token => 'GMI_MIG_ITEM_MIG_FAILED',

Line 393: GMI_RESERVATION_UTIL.PrintLn(' after update to wsh_delivery_details for organization_id '|| l_organization_id);

389: set organization_id = l_organization_id
390: where source_line_id = open_order_line_rec.line_id;
391:
392:
393: GMI_RESERVATION_UTIL.PrintLn(' after update to wsh_delivery_details for organization_id '|| l_organization_id);
394: /* update the deliveries to reflect the new organization */
395:
396: FOR wsh1 in c_wsh_deliveres (open_order_line_rec.line_id)
397: LOOP

Line 398: GMI_RESERVATION_UTIL.PrintLn(' before update to wsh_delivery_details for organization_id '|| l_organization_id);

394: /* update the deliveries to reflect the new organization */
395:
396: FOR wsh1 in c_wsh_deliveres (open_order_line_rec.line_id)
397: LOOP
398: GMI_RESERVATION_UTIL.PrintLn(' before update to wsh_delivery_details for organization_id '|| l_organization_id);
399:
400: update wsh_new_deliveries
401: set organization_id = l_organization_id
402: where delivery_id = wsh1.delivery_id;

Line 414: GMI_RESERVATION_UTIL.PrintLn('primary_reservation_quantity ' || l_insert_rsv_rec.primary_reservation_quantity );

410:
411: -- 5574631 end
412:
413:
414: GMI_RESERVATION_UTIL.PrintLn('primary_reservation_quantity ' || l_insert_rsv_rec.primary_reservation_quantity );
415:
416: l_insert_rsv_rec.subinventory_id := NULL;
417: GMI_RESERVATION_UTIL.Println('location '|| allocations_for_line_rec.location);
418:

Line 417: GMI_RESERVATION_UTIL.Println('location '|| allocations_for_line_rec.location);

413:
414: GMI_RESERVATION_UTIL.PrintLn('primary_reservation_quantity ' || l_insert_rsv_rec.primary_reservation_quantity );
415:
416: l_insert_rsv_rec.subinventory_id := NULL;
417: GMI_RESERVATION_UTIL.Println('location '|| allocations_for_line_rec.location);
418:
419: l_locator_id := NULL; -- need to initialize this back else will fail
420: l_inventory_location_id := NULL; -- need to initialize this back else will fail
421:

Line 428: GMI_RESERVATION_UTIL.Println('location becomes locator_id '|| l_locator_id);

424: OPEN get_locator_id(allocations_for_line_rec.whse_code,allocations_for_line_rec.location);
425: FETCH get_locator_id INTO l_locator_id, l_inventory_location_id; -- use l_inventory_location_id for get_odm_lot as per J Gogna -
426: CLOSE get_locator_id;
427:
428: GMI_RESERVATION_UTIL.Println('location becomes locator_id '|| l_locator_id);
429: -- as per Jatinder Gogna to support part of bug fix 5595222
430: -- Create locator in discrete ( dynamic locator)
431: IF (l_locator_id is NULL) THEN
432: GMI_RESERVATION_UTIL.Println('location (l_locator_id) was NULL so calling inv_migrate_process_org.create_location');

Line 432: GMI_RESERVATION_UTIL.Println('location (l_locator_id) was NULL so calling inv_migrate_process_org.create_location');

428: GMI_RESERVATION_UTIL.Println('location becomes locator_id '|| l_locator_id);
429: -- as per Jatinder Gogna to support part of bug fix 5595222
430: -- Create locator in discrete ( dynamic locator)
431: IF (l_locator_id is NULL) THEN
432: GMI_RESERVATION_UTIL.Println('location (l_locator_id) was NULL so calling inv_migrate_process_org.create_location');
433: l_failure_count1 := 0;
434: inv_migrate_process_org.create_location(
435: p_migration_run_id => p_migration_run_id,
436: p_organization_id => l_organization_id,

Line 466: GMI_RESERVATION_UTIL.Println('Unable to create the locator for dynamic OPM location :' || allocations_for_line_rec.whse_code ||', '||allocations_for_line_rec.location );

462: p_segment20 => NULL);
463:
464: IF (l_failure_count1 > 0) THEN
465: -- Log error
466: GMI_RESERVATION_UTIL.Println('Unable to create the locator for dynamic OPM location :' || allocations_for_line_rec.whse_code ||', '||allocations_for_line_rec.location );
467: GMA_COMMON_LOGGING.gma_migration_central_log (
468: p_run_id => p_migration_run_id,
469: p_log_level => FND_LOG.LEVEL_ERROR,
470: p_message_token => 'GMI_LOC_CREATION_FAILED',

Line 483: GMI_RESERVATION_UTIL.Println('after calling inv_migrate_process_org.create_location - locator_id '|| l_locator_id);

479: p_app_short_name => 'GMI');
480: l_failure_count := l_failure_count + l_failure_count1;
481: raise FND_API.G_EXC_ERROR;
482: END IF; -- IF (l_failure_count1 > 0) THEN
483: GMI_RESERVATION_UTIL.Println('after calling inv_migrate_process_org.create_location - locator_id '|| l_locator_id);
484:
485: END IF; -- IF (l_locator_id is NULL) THEN
486:
487:

Line 503: GMI_RESERVATION_UTIL.Println('locator_id is '|| l_insert_rsv_rec.locator_id);

499: l_insert_rsv_rec.subinventory_code := NULL;
500:
501: END IF; -- IF(allocations_for_line_rec.location <> 'l_IC$DEFAULT_LOCT') THEN
502:
503: GMI_RESERVATION_UTIL.Println('locator_id is '|| l_insert_rsv_rec.locator_id);
504: GMI_RESERVATION_UTIL.Println('Before the lot_id if');
505: GMI_RESERVATION_UTIL.Println('allocations_for_line_rec.lot id is '|| allocations_for_line_rec.lot_id);
506:
507: IF(allocations_for_line_rec.lot_id > 0 ) THEN

Line 504: GMI_RESERVATION_UTIL.Println('Before the lot_id if');

500:
501: END IF; -- IF(allocations_for_line_rec.location <> 'l_IC$DEFAULT_LOCT') THEN
502:
503: GMI_RESERVATION_UTIL.Println('locator_id is '|| l_insert_rsv_rec.locator_id);
504: GMI_RESERVATION_UTIL.Println('Before the lot_id if');
505: GMI_RESERVATION_UTIL.Println('allocations_for_line_rec.lot id is '|| allocations_for_line_rec.lot_id);
506:
507: IF(allocations_for_line_rec.lot_id > 0 ) THEN
508: GMI_RESERVATION_UTIL.Println('in the lot_id if and lot_id > 0 and = ' || allocations_for_line_rec.lot_id );

Line 505: GMI_RESERVATION_UTIL.Println('allocations_for_line_rec.lot id is '|| allocations_for_line_rec.lot_id);

501: END IF; -- IF(allocations_for_line_rec.location <> 'l_IC$DEFAULT_LOCT') THEN
502:
503: GMI_RESERVATION_UTIL.Println('locator_id is '|| l_insert_rsv_rec.locator_id);
504: GMI_RESERVATION_UTIL.Println('Before the lot_id if');
505: GMI_RESERVATION_UTIL.Println('allocations_for_line_rec.lot id is '|| allocations_for_line_rec.lot_id);
506:
507: IF(allocations_for_line_rec.lot_id > 0 ) THEN
508: GMI_RESERVATION_UTIL.Println('in the lot_id if and lot_id > 0 and = ' || allocations_for_line_rec.lot_id );
509:

Line 508: GMI_RESERVATION_UTIL.Println('in the lot_id if and lot_id > 0 and = ' || allocations_for_line_rec.lot_id );

504: GMI_RESERVATION_UTIL.Println('Before the lot_id if');
505: GMI_RESERVATION_UTIL.Println('allocations_for_line_rec.lot id is '|| allocations_for_line_rec.lot_id);
506:
507: IF(allocations_for_line_rec.lot_id > 0 ) THEN
508: GMI_RESERVATION_UTIL.Println('in the lot_id if and lot_id > 0 and = ' || allocations_for_line_rec.lot_id );
509:
510: OPEN get_lot_sublot(allocations_for_line_rec.item_id,allocations_for_line_rec.lot_id);
511: FETCH get_lot_sublot INTO l_lot_no,l_sublot_no;
512: CLOSE get_lot_sublot;

Line 531: GMI_RESERVATION_UTIL.Println('get odm_lot: X_FAILURE_COUNT is '||l_count);

527: X_PARENT_LOT_NUMBER => l_parent_lot_num,
528: X_FAILURE_COUNT => l_count
529: );
530:
531: GMI_RESERVATION_UTIL.Println('get odm_lot: X_FAILURE_COUNT is '||l_count);
532:
533: IF (l_count > 0)
534: THEN
535: -- Log Error

Line 536: GMI_RESERVATION_UTIL.Println('Failed to migrate lot - OPM lot_id = '|| to_char(allocations_for_line_rec.lot_id));

532:
533: IF (l_count > 0)
534: THEN
535: -- Log Error
536: GMI_RESERVATION_UTIL.Println('Failed to migrate lot - OPM lot_id = '|| to_char(allocations_for_line_rec.lot_id));
537: GMI_RESERVATION_UTIL.Println('Failed to migrate lot - OPM lot_no = '|| l_lot_no);
538: GMA_COMMON_LOGGING.gma_migration_central_log (
539: p_run_id => p_migration_run_id,
540: p_log_level => FND_LOG.LEVEL_ERROR,

Line 537: GMI_RESERVATION_UTIL.Println('Failed to migrate lot - OPM lot_no = '|| l_lot_no);

533: IF (l_count > 0)
534: THEN
535: -- Log Error
536: GMI_RESERVATION_UTIL.Println('Failed to migrate lot - OPM lot_id = '|| to_char(allocations_for_line_rec.lot_id));
537: GMI_RESERVATION_UTIL.Println('Failed to migrate lot - OPM lot_no = '|| l_lot_no);
538: GMA_COMMON_LOGGING.gma_migration_central_log (
539: p_run_id => p_migration_run_id,
540: p_log_level => FND_LOG.LEVEL_ERROR,
541: p_message_token => 'GMI_MIG_LOT_MIG_FAILED',

Line 553: GMI_RESERVATION_UTIL.Println('get odm_lot succes: l_odm_lot_num is '||l_odm_lot_num);

549: p_db_error => NULL,
550: p_app_short_name => 'GMI');
551: raise FND_API.G_EXC_ERROR;
552: ELSE
553: GMI_RESERVATION_UTIL.Println('get odm_lot succes: l_odm_lot_num is '||l_odm_lot_num);
554:
555: END IF;
556: -- 5574631
557:

Line 567: GMI_RESERVATION_UTIL.Println('after the lot_id if');

563: l_parent_lot_num := NULL;
564: END IF;
565: END IF; -- IF(allocations_for_line_rec.lot_id > 0 ) THEN
566:
567: GMI_RESERVATION_UTIL.Println('after the lot_id if');
568:
569: l_insert_rsv_rec.lot_number := l_odm_lot_num;
570: l_insert_rsv_rec.lot_number_id := NULL;
571: l_insert_rsv_rec.pick_slip_number := NULL;

Line 595: GMI_RESERVATION_UTIL.PrintLn('about to call create_reservation');

591:
592:
593: inv_reservation_pvt.print_rsv_rec(l_insert_rsv_rec);
594:
595: GMI_RESERVATION_UTIL.PrintLn('about to call create_reservation');
596:
597: fnd_msg_pub.initialize;
598: INV_RESERVATION_PUB.create_reservation(
599: p_api_version_number => 1.0

Line 617: GMI_RESERVATION_UTIL.PrintLn(' Create reservation failed');

613: );
614:
615: -- Return an error if the create reservation call failed
616: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
617: GMI_RESERVATION_UTIL.PrintLn(' Create reservation failed');
618: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);
619: FND_MSG_PUB.Count_AND_GET (p_count => l_msg_count, p_data => l_msg_data);
620: FOR i in 1..l_msg_count LOOP
621:

Line 618: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);

614:
615: -- Return an error if the create reservation call failed
616: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
617: GMI_RESERVATION_UTIL.PrintLn(' Create reservation failed');
618: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);
619: FND_MSG_PUB.Count_AND_GET (p_count => l_msg_count, p_data => l_msg_data);
620: FOR i in 1..l_msg_count LOOP
621:
622: GMA_COMMON_LOGGING.gma_migration_central_log (

Line 657: GMI_RESERVATION_UTIL.PrintLn(' Create reservation succeeded - Reservation_id : '|| l_reservation_id);

653: fnd_message.set_name('INV', 'INV_CREATE_RSV_FAILED');
654: fnd_msg_pub.ADD;
655: RAISE fnd_api.g_exc_unexpected_error;
656: ELSE
657: GMI_RESERVATION_UTIL.PrintLn(' Create reservation succeeded - Reservation_id : '|| l_reservation_id);
658: GMI_RESERVATION_UTIL.PrintLn(' l_qty_reserved : '|| l_qty_reserved);
659: GMI_RESERVATION_UTIL.PrintLn(' l_sec_qty_reserved : '|| l_sec_qty_reserved);
660: GMI_RESERVATION_UTIL.PrintLn(' Created at least one detailed reservation ');
661: /* Created atleast one detailed reservation */

Line 658: GMI_RESERVATION_UTIL.PrintLn(' l_qty_reserved : '|| l_qty_reserved);

654: fnd_msg_pub.ADD;
655: RAISE fnd_api.g_exc_unexpected_error;
656: ELSE
657: GMI_RESERVATION_UTIL.PrintLn(' Create reservation succeeded - Reservation_id : '|| l_reservation_id);
658: GMI_RESERVATION_UTIL.PrintLn(' l_qty_reserved : '|| l_qty_reserved);
659: GMI_RESERVATION_UTIL.PrintLn(' l_sec_qty_reserved : '|| l_sec_qty_reserved);
660: GMI_RESERVATION_UTIL.PrintLn(' Created at least one detailed reservation ');
661: /* Created atleast one detailed reservation */
662: l_detail_reservations := 1;

Line 659: GMI_RESERVATION_UTIL.PrintLn(' l_sec_qty_reserved : '|| l_sec_qty_reserved);

655: RAISE fnd_api.g_exc_unexpected_error;
656: ELSE
657: GMI_RESERVATION_UTIL.PrintLn(' Create reservation succeeded - Reservation_id : '|| l_reservation_id);
658: GMI_RESERVATION_UTIL.PrintLn(' l_qty_reserved : '|| l_qty_reserved);
659: GMI_RESERVATION_UTIL.PrintLn(' l_sec_qty_reserved : '|| l_sec_qty_reserved);
660: GMI_RESERVATION_UTIL.PrintLn(' Created at least one detailed reservation ');
661: /* Created atleast one detailed reservation */
662: l_detail_reservations := 1;
663: END IF; -- IF l_api_return_status <> fnd_api.g_ret_sts_success THEN

Line 660: GMI_RESERVATION_UTIL.PrintLn(' Created at least one detailed reservation ');

656: ELSE
657: GMI_RESERVATION_UTIL.PrintLn(' Create reservation succeeded - Reservation_id : '|| l_reservation_id);
658: GMI_RESERVATION_UTIL.PrintLn(' l_qty_reserved : '|| l_qty_reserved);
659: GMI_RESERVATION_UTIL.PrintLn(' l_sec_qty_reserved : '|| l_sec_qty_reserved);
660: GMI_RESERVATION_UTIL.PrintLn(' Created at least one detailed reservation ');
661: /* Created atleast one detailed reservation */
662: l_detail_reservations := 1;
663: END IF; -- IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
664:

Line 668: -- GMI_RESERVATION_UTIL.PrintLn('Non inventory item..doing nothing');

664:
665:
666: EXCEPTION
667: --WHEN NON_INV_ITEM THEN
668: -- GMI_RESERVATION_UTIL.PrintLn('Non inventory item..doing nothing');
669: -- NULL;
670:
671: WHEN FND_API.g_exc_unexpected_error THEN
672: l_failure_count := l_failure_count + 1;

Line 707: GMI_RESERVATION_UTIL.PrintLn('Non inventory item..so doing nothing for reservations or move orders');

703: END IF; -- IF( l_detail_reservations = 0 ) THEN
704:
705: ELSE
706: -- NON INV ITEM
707: GMI_RESERVATION_UTIL.PrintLn('Non inventory item..so doing nothing for reservations or move orders');
708:
709: END IF; -- IF l_opm_noninv_ind = 0 THEN -- 5475003 only check if an inventory item
710:
711:

Line 725: GMI_RESERVATION_UTIL.PrintLn('In move_order_line_rec cursor and this is an inventory item - Sales Order line_id : ic_txn_request_lines line id '|| to_char(open_order_line_rec.line_id)||':'||to_char(move_order_line_rec.line_id));

721:
722: IF l_opm_noninv_ind = 0 THEN -- -- 5475003 rework 10/19 - only create Move Orders if an inventory item (control from ic_item_mst)
723: /* - we do not create move orders for a non-inventory item in R12 (in 11i OPM we did ) */
724:
725: GMI_RESERVATION_UTIL.PrintLn('In move_order_line_rec cursor and this is an inventory item - Sales Order line_id : ic_txn_request_lines line id '|| to_char(open_order_line_rec.line_id)||':'||to_char(move_order_line_rec.line_id));
726:
727: /* Look for the move order header, has an mtl move order header been created for this already? */
728: OPEN get_move_order_header (move_order_line_rec.line_id);
729: FETCH get_move_order_header INTO l_ic_mo_header_rec;

Line 731: GMI_RESERVATION_UTIL.PrintLn('in move order header id and attribute15 '|| to_char(l_ic_mo_header_rec.header_id)||' and '||l_ic_mo_header_rec.attribute15);

727: /* Look for the move order header, has an mtl move order header been created for this already? */
728: OPEN get_move_order_header (move_order_line_rec.line_id);
729: FETCH get_move_order_header INTO l_ic_mo_header_rec;
730: CLOSE get_move_order_header;
731: GMI_RESERVATION_UTIL.PrintLn('in move order header id and attribute15 '|| to_char(l_ic_mo_header_rec.header_id)||' and '||l_ic_mo_header_rec.attribute15);
732:
733: -- need to get location_id and pick_grouping rule_id from wsh_shipping_parameters
734: -- for grouping_rule_id for MO header and for to_locator_id for MO line -- 5601081
735: OPEN get_shipping_parameters(move_order_line_rec.organization_id);

Line 738: GMI_RESERVATION_UTIL.PrintLn('shipping params l_to_locator_id = ' || l_to_locator_id );

734: -- for grouping_rule_id for MO header and for to_locator_id for MO line -- 5601081
735: OPEN get_shipping_parameters(move_order_line_rec.organization_id);
736: FETCH get_shipping_parameters INTO l_to_locator_id,l_grouping_rule_id;
737: CLOSE get_shipping_parameters;
738: GMI_RESERVATION_UTIL.PrintLn('shipping params l_to_locator_id = ' || l_to_locator_id );
739:
740: IF(l_ic_mo_header_rec.attribute15 IS NOT NULL) THEN
741:
742: --l_mo_header_id := to_number(l_ic_mo_header_rec.header_id); -- 5111050 COMMENTED OUT

Line 747: GMI_RESERVATION_UTIL.PrintLn('if here then l_ic_mo_header_rec.attribute15 is null');

743: l_mo_header_id := to_number(l_ic_mo_header_rec.attribute15); -- 5111050
744:
745: ELSE /* No move order header exists, create one. */
746:
747: GMI_RESERVATION_UTIL.PrintLn('if here then l_ic_mo_header_rec.attribute15 is null');
748:
749:
750: l_trohdr_rec := l_empty_trohdr_rec;
751: --not initializing this was causing problems of unique constraints.

Line 770: GMI_RESERVATION_UTIL.PrintLn('before call to INV_Move_Order_PUB.Create_move_order_header');

766: l_trohdr_rec.db_flag := FND_API.G_TRUE;
767: l_trohdr_rec.operation := INV_GLOBALS.G_OPR_CREATE;
768: l_trohdr_rec.move_order_type := INV_GLOBALS.G_MOVE_ORDER_PICK_WAVE; -- 5601081 type changed
769: l_trohdr_rec.grouping_rule_id := l_grouping_rule_id ; -- 5601081
770: GMI_RESERVATION_UTIL.PrintLn('before call to INV_Move_Order_PUB.Create_move_order_header');
771:
772: fnd_msg_pub.initialize;
773: INV_Move_Order_PUB.Create_move_order_header ( p_api_version_number => 1.0 ,
774: p_init_msg_list => 'T',

Line 787: GMI_RESERVATION_UTIL.PrintLn(' Create_move_order_header failed ');

783: x_trohdr_val_rec => l_trohdr_val_rec
784: );
785:
786: IF l_return_status <> fnd_api.g_ret_sts_success THEN
787: GMI_RESERVATION_UTIL.PrintLn(' Create_move_order_header failed ');
788: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);
789: FND_MSG_PUB.Count_AND_GET (p_count => l_msg_count, p_data => l_msg_data);
790: FOR i in 1..l_msg_count LOOP
791:

Line 788: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);

784: );
785:
786: IF l_return_status <> fnd_api.g_ret_sts_success THEN
787: GMI_RESERVATION_UTIL.PrintLn(' Create_move_order_header failed ');
788: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);
789: FND_MSG_PUB.Count_AND_GET (p_count => l_msg_count, p_data => l_msg_data);
790: FOR i in 1..l_msg_count LOOP
791:
792: GMA_COMMON_LOGGING.gma_migration_central_log (

Line 827: GMI_RESERVATION_UTIL.PrintLn(' Create_move_order_header succeeded - header_id : '|| l_trohdr_rec.header_id);

823: fnd_message.set_name('INV', 'INV_ERROR_CREATING_MO');
824: fnd_msg_pub.ADD;
825: RAISE fnd_api.g_exc_unexpected_error;
826: ELSE
827: GMI_RESERVATION_UTIL.PrintLn(' Create_move_order_header succeeded - header_id : '|| l_trohdr_rec.header_id);
828: l_mo_header_id := l_trohdr_rec.header_id;
829: -- only do this if the create move order header above suceeded
830: /* Update attribute15 in ic_txn_request_headers */
831: GMI_RESERVATION_UTIL.PrintLn(' before update to attribute15 of in ic_txn_request_headers: '||to_char(l_trohdr_rec.header_id));

Line 831: GMI_RESERVATION_UTIL.PrintLn(' before update to attribute15 of in ic_txn_request_headers: '||to_char(l_trohdr_rec.header_id));

827: GMI_RESERVATION_UTIL.PrintLn(' Create_move_order_header succeeded - header_id : '|| l_trohdr_rec.header_id);
828: l_mo_header_id := l_trohdr_rec.header_id;
829: -- only do this if the create move order header above suceeded
830: /* Update attribute15 in ic_txn_request_headers */
831: GMI_RESERVATION_UTIL.PrintLn(' before update to attribute15 of in ic_txn_request_headers: '||to_char(l_trohdr_rec.header_id));
832:
833: UPDATE ic_txn_request_headers
834: SET attribute15 = to_char(l_trohdr_rec.header_id)
835: WHERE header_id = l_ic_mo_header_rec.header_id;

Line 837: GMI_RESERVATION_UTIL.PrintLn(' after update to attribute15 of in ic_txn_request_headers');

833: UPDATE ic_txn_request_headers
834: SET attribute15 = to_char(l_trohdr_rec.header_id)
835: WHERE header_id = l_ic_mo_header_rec.header_id;
836:
837: GMI_RESERVATION_UTIL.PrintLn(' after update to attribute15 of in ic_txn_request_headers');
838:
839: END IF; -- IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
840:
841: END IF; -- IF(l_ic_mo_header_rec.attribute15 IS NOT NULL) THEN

Line 844: GMI_RESERVATION_UTIL.PrintLn(' Now for lines - ic_txn_request_lines attribute15: '||move_order_line_rec.attribute15);

840:
841: END IF; -- IF(l_ic_mo_header_rec.attribute15 IS NOT NULL) THEN
842:
843: /* Now Create a line */
844: GMI_RESERVATION_UTIL.PrintLn(' Now for lines - ic_txn_request_lines attribute15: '||move_order_line_rec.attribute15);
845:
846: IF(move_order_line_rec.attribute15 IS NOT NULL) THEN
847: l_mo_line_id := to_number(move_order_line_rec.attribute15);
848:

Line 851: GMI_RESERVATION_UTIL.PrintLn('debug messages start for create move order line ********************************');

847: l_mo_line_id := to_number(move_order_line_rec.attribute15);
848:
849: ELSE /* Create a move order line */
850:
851: GMI_RESERVATION_UTIL.PrintLn('debug messages start for create move order line ********************************');
852: GMI_RESERVATION_UTIL.PrintLn('ic_txn_request_lines attribute15 = null ');
853: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);
854: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);

Line 852: GMI_RESERVATION_UTIL.PrintLn('ic_txn_request_lines attribute15 = null ');

848:
849: ELSE /* Create a move order line */
850:
851: GMI_RESERVATION_UTIL.PrintLn('debug messages start for create move order line ********************************');
852: GMI_RESERVATION_UTIL.PrintLn('ic_txn_request_lines attribute15 = null ');
853: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);
854: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);

Line 853: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);

849: ELSE /* Create a move order line */
850:
851: GMI_RESERVATION_UTIL.PrintLn('debug messages start for create move order line ********************************');
852: GMI_RESERVATION_UTIL.PrintLn('ic_txn_request_lines attribute15 = null ');
853: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);
854: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);

Line 854: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);

850:
851: GMI_RESERVATION_UTIL.PrintLn('debug messages start for create move order line ********************************');
852: GMI_RESERVATION_UTIL.PrintLn('ic_txn_request_lines attribute15 = null ');
853: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);
854: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);

Line 855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);

851: GMI_RESERVATION_UTIL.PrintLn('debug messages start for create move order line ********************************');
852: GMI_RESERVATION_UTIL.PrintLn('ic_txn_request_lines attribute15 = null ');
853: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);
854: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);

Line 856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);

852: GMI_RESERVATION_UTIL.PrintLn('ic_txn_request_lines attribute15 = null ');
853: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);
854: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);

Line 857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);

853: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);
854: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);

Line 858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);

854: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);

Line 859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);

855: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
863: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);

Line 860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);

856: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
863: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
864: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);

Line 861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);

857: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
863: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
864: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);
865: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);

Line 862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);

858: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
863: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
864: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);
865: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);
866: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_detailed : '|| move_order_line_rec.secondary_quantity_detailed);

Line 863: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);

859: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
863: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
864: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);
865: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);
866: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_detailed : '|| move_order_line_rec.secondary_quantity_detailed);
867:

Line 864: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);

860: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
863: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
864: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);
865: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);
866: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_detailed : '|| move_order_line_rec.secondary_quantity_detailed);
867:
868: -- need to get sales_order_id from mtl_sales_orders for this order to populate field txn_source_id -- 5601081

Line 865: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);

861: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
863: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
864: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);
865: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);
866: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_detailed : '|| move_order_line_rec.secondary_quantity_detailed);
867:
868: -- need to get sales_order_id from mtl_sales_orders for this order to populate field txn_source_id -- 5601081
869:

Line 866: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_detailed : '|| move_order_line_rec.secondary_quantity_detailed);

862: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
863: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
864: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);
865: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);
866: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_detailed : '|| move_order_line_rec.secondary_quantity_detailed);
867:
868: -- need to get sales_order_id from mtl_sales_orders for this order to populate field txn_source_id -- 5601081
869:
870: OPEN get_sales_order_id (open_order_line_rec.header_id);

Line 873: GMI_RESERVATION_UTIL.PrintLn('l_sales_order_id : '|| l_sales_order_id);

869:
870: OPEN get_sales_order_id (open_order_line_rec.header_id);
871: FETCH get_sales_order_id INTO l_sales_order_id;
872: CLOSE get_sales_order_id;
873: GMI_RESERVATION_UTIL.PrintLn('l_sales_order_id : '|| l_sales_order_id);
874:
875: begin
876: -- need to get delivery_detail_id from wsh_delivery_details for this old ic MO in order to populate field txn_source_line_detail_id -- 5601081
877: OPEN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id);

Line 883: GMI_RESERVATION_UTIL.PrintLn(' no data found for delivery details before create MO line so' );

879: CLOSE get_delivery_details;
880: EXCEPTION
881: WHEN OTHERS THEN
882:
883: GMI_RESERVATION_UTIL.PrintLn(' no data found for delivery details before create MO line so' );
884: GMI_RESERVATION_UTIL.PrintLn('not erroring out here');
885: NULL;
886:
887: end;

Line 884: GMI_RESERVATION_UTIL.PrintLn('not erroring out here');

880: EXCEPTION
881: WHEN OTHERS THEN
882:
883: GMI_RESERVATION_UTIL.PrintLn(' no data found for delivery details before create MO line so' );
884: GMI_RESERVATION_UTIL.PrintLn('not erroring out here');
885: NULL;
886:
887: end;
888:

Line 889: GMI_RESERVATION_UTIL.PrintLn('l_delivery_detail_id : '|| l_delivery_detail_id);

885: NULL;
886:
887: end;
888:
889: GMI_RESERVATION_UTIL.PrintLn('l_delivery_detail_id : '|| l_delivery_detail_id);
890:
891: l_line_num := l_line_num + 1;
892: --l_trolin_tbl(l_order_count).header_id := l_trohdr_rec.header_id; -- 5111050 commented out
893: l_trolin_tbl(l_order_count).header_id := l_mo_header_id; -- 5111050 5474923

Line 945: GMI_RESERVATION_UTIL.PrintLn(' Create_Move_Order_Lines failed ');

941: x_trolin_tbl => l_trolin_tbl,
942: x_trolin_val_tbl => l_trolin_val_tbl);
943:
944: IF l_return_status <> fnd_api.g_ret_sts_success THEN
945: GMI_RESERVATION_UTIL.PrintLn(' Create_Move_Order_Lines failed ');
946: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);
947: FND_MSG_PUB.Count_AND_GET (p_count => l_msg_count, p_data => l_msg_data);
948: FOR i in 1..l_msg_count LOOP
949:

Line 946: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);

942: x_trolin_val_tbl => l_trolin_val_tbl);
943:
944: IF l_return_status <> fnd_api.g_ret_sts_success THEN
945: GMI_RESERVATION_UTIL.PrintLn(' Create_Move_Order_Lines failed ');
946: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);
947: FND_MSG_PUB.Count_AND_GET (p_count => l_msg_count, p_data => l_msg_data);
948: FOR i in 1..l_msg_count LOOP
949:
950: GMA_COMMON_LOGGING.gma_migration_central_log (

Line 985: GMI_RESERVATION_UTIL.PrintLn(' Create_move_order_lines succeeded - line_id : '|| to_char(l_trolin_tbl(l_order_count).line_id));

981: fnd_message.set_name('INV', 'INV_ERROR_CREATING_MO');
982: fnd_msg_pub.ADD;
983: RAISE fnd_api.g_exc_unexpected_error;
984: ELSE
985: GMI_RESERVATION_UTIL.PrintLn(' Create_move_order_lines succeeded - line_id : '|| to_char(l_trolin_tbl(l_order_count).line_id));
986:
987: /* Update OPM move order line attribute15 */
988:
989: l_mo_line_id := l_trolin_tbl(l_order_count).line_id;

Line 991: GMI_RESERVATION_UTIL.PrintLn(' before update of ic_txn_request_lines to attribute15 to line: '||to_char(l_mo_line_id));

987: /* Update OPM move order line attribute15 */
988:
989: l_mo_line_id := l_trolin_tbl(l_order_count).line_id;
990:
991: GMI_RESERVATION_UTIL.PrintLn(' before update of ic_txn_request_lines to attribute15 to line: '||to_char(l_mo_line_id));
992:
993: UPDATE ic_txn_request_lines
994: SET attribute15 = to_char(l_trolin_tbl(l_order_count).line_id)
995: WHERE line_id = move_order_line_rec.line_id;

Line 997: GMI_RESERVATION_UTIL.PrintLn(' after update to ic_txn_request_lines to attribute15 to line: '||to_char(l_mo_line_id));

993: UPDATE ic_txn_request_lines
994: SET attribute15 = to_char(l_trolin_tbl(l_order_count).line_id)
995: WHERE line_id = move_order_line_rec.line_id;
996:
997: GMI_RESERVATION_UTIL.PrintLn(' after update to ic_txn_request_lines to attribute15 to line: '||to_char(l_mo_line_id));
998:
999: l_line_id := l_trolin_tbl(l_order_count).line_id;
1000: -- 5601081 rework
1001: -- need to populate to_locator_id as Create_move_order_line API

Line 1007: GMI_RESERVATION_UTIL.PrintLn(' newly created move_order_line :-' || l_line_id);

1003:
1004: UPDATE mtl_txn_request_lines
1005: SET to_locator_id = l_to_locator_id
1006: WHERE line_id = l_line_id;
1007: GMI_RESERVATION_UTIL.PrintLn(' newly created move_order_line :-' || l_line_id);
1008: GMI_RESERVATION_UTIL.PrintLn(' locator_id updated to :- ' || l_to_locator_id);
1009:
1010: END IF; -- IF l_return_status <> fnd_api.g_ret_sts_success THEN
1011:

Line 1008: GMI_RESERVATION_UTIL.PrintLn(' locator_id updated to :- ' || l_to_locator_id);

1004: UPDATE mtl_txn_request_lines
1005: SET to_locator_id = l_to_locator_id
1006: WHERE line_id = l_line_id;
1007: GMI_RESERVATION_UTIL.PrintLn(' newly created move_order_line :-' || l_line_id);
1008: GMI_RESERVATION_UTIL.PrintLn(' locator_id updated to :- ' || l_to_locator_id);
1009:
1010: END IF; -- IF l_return_status <> fnd_api.g_ret_sts_success THEN
1011:
1012:

Line 1023: GMI_RESERVATION_UTIL.PrintLn(' before update of wsh_delivery_detail for move order line id');

1019: NULL;
1020: END IF; -- IF l_opm_noninv_ind = 0 THEN -- 5475003 rework 10/19
1021:
1022: /* UPDATE the WSH_DELIVERY_DETAILS with this new move order info */
1023: GMI_RESERVATION_UTIL.PrintLn(' before update of wsh_delivery_detail for move order line id');
1024:
1025: -- need to incororate this into fix for non inv items and MOs
1026:
1027: FOR delivery_detail_rec IN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id)

Line 1029: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail delivery_detail_rec.delivery_detail_id '||to_char(delivery_detail_rec.delivery_detail_id));

1025: -- need to incororate this into fix for non inv items and MOs
1026:
1027: FOR delivery_detail_rec IN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id)
1028: LOOP
1029: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail delivery_detail_rec.delivery_detail_id '||to_char(delivery_detail_rec.delivery_detail_id));
1030: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail old ic_txn_request_lines line_id '||to_char(move_order_line_rec.line_id));
1031: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail open_order_line_rec.line_id '||to_char(open_order_line_rec.line_id));
1032: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail l_opm_noninv_ind '||to_char(l_opm_noninv_ind ));
1033:

Line 1030: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail old ic_txn_request_lines line_id '||to_char(move_order_line_rec.line_id));

1026:
1027: FOR delivery_detail_rec IN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id)
1028: LOOP
1029: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail delivery_detail_rec.delivery_detail_id '||to_char(delivery_detail_rec.delivery_detail_id));
1030: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail old ic_txn_request_lines line_id '||to_char(move_order_line_rec.line_id));
1031: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail open_order_line_rec.line_id '||to_char(open_order_line_rec.line_id));
1032: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail l_opm_noninv_ind '||to_char(l_opm_noninv_ind ));
1033:
1034: -- if non_inv item need to set dd to staged 5475003

Line 1031: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail open_order_line_rec.line_id '||to_char(open_order_line_rec.line_id));

1027: FOR delivery_detail_rec IN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id)
1028: LOOP
1029: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail delivery_detail_rec.delivery_detail_id '||to_char(delivery_detail_rec.delivery_detail_id));
1030: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail old ic_txn_request_lines line_id '||to_char(move_order_line_rec.line_id));
1031: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail open_order_line_rec.line_id '||to_char(open_order_line_rec.line_id));
1032: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail l_opm_noninv_ind '||to_char(l_opm_noninv_ind ));
1033:
1034: -- if non_inv item need to set dd to staged 5475003
1035: IF l_opm_noninv_ind = 1 THEN -- 5475003 rework - if here then this is non inventory item (as per OPM)

Line 1032: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail l_opm_noninv_ind '||to_char(l_opm_noninv_ind ));

1028: LOOP
1029: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail delivery_detail_rec.delivery_detail_id '||to_char(delivery_detail_rec.delivery_detail_id));
1030: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail old ic_txn_request_lines line_id '||to_char(move_order_line_rec.line_id));
1031: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail open_order_line_rec.line_id '||to_char(open_order_line_rec.line_id));
1032: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail l_opm_noninv_ind '||to_char(l_opm_noninv_ind ));
1033:
1034: -- if non_inv item need to set dd to staged 5475003
1035: IF l_opm_noninv_ind = 1 THEN -- 5475003 rework - if here then this is non inventory item (as per OPM)
1036: UPDATE wsh_delivery_details

Line 1050: GMI_RESERVATION_UTIL.PrintLn(' in loop after update');

1046:
1047: END IF; -- IF l_opm_noninv_ind = 1 THEN -- 5475003
1048:
1049:
1050: GMI_RESERVATION_UTIL.PrintLn(' in loop after update');
1051:
1052: END LOOP; /* FOR delivery_detail_rec IN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id) */
1053:
1054: EXCEPTION

Line 1057: GMI_RESERVATION_UTIL.PrintLn(' in When Others of move order loop : sqlerrm '||sqlerrm);

1053:
1054: EXCEPTION
1055: WHEN OTHERS THEN
1056:
1057: GMI_RESERVATION_UTIL.PrintLn(' in When Others of move order loop : sqlerrm '||sqlerrm);
1058: GMI_RESERVATION_UTIL.PrintLn(' NULL so not erroring out here in move order loop');
1059:
1060: NULL;
1061:

Line 1058: GMI_RESERVATION_UTIL.PrintLn(' NULL so not erroring out here in move order loop');

1054: EXCEPTION
1055: WHEN OTHERS THEN
1056:
1057: GMI_RESERVATION_UTIL.PrintLn(' in When Others of move order loop : sqlerrm '||sqlerrm);
1058: GMI_RESERVATION_UTIL.PrintLn(' NULL so not erroring out here in move order loop');
1059:
1060: NULL;
1061:
1062: END; /* Begin for Move Order Loop */

Line 1075: GMI_RESERVATION_UTIL.println('END OF GML_OPM_OM_CONV_MIG_PKG.Migrate_opm_om_open_lines OM MIGRATION RUN ');

1071: END; /* Begin for open_order_line_rec Loop */
1072:
1073: END LOOP; /* FOR open_order_line_rec IN get_open_order_lines LOOP */
1074:
1075: GMI_RESERVATION_UTIL.println('END OF GML_OPM_OM_CONV_MIG_PKG.Migrate_opm_om_open_lines OM MIGRATION RUN ');
1076:
1077: /* End by logging a message that the migration has been succesful IF SO */
1078:
1079: if L_FAILURE_COUNT < 1 THEN