DBA Data[Home] [Help]

APPS.GML_OPM_OM_CONV_MIG_PKG dependencies on GMI_RESERVATION_UTIL

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

414:
415: -- 5574631 end
416:
417:
418: GMI_RESERVATION_UTIL.PrintLn('primary_reservation_quantity ' || l_insert_rsv_rec.primary_reservation_quantity );
419:
420: l_insert_rsv_rec.subinventory_id := NULL;
421: GMI_RESERVATION_UTIL.Println('location '|| allocations_for_line_rec.location);
422:

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

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

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

428: OPEN get_locator_id(allocations_for_line_rec.whse_code,allocations_for_line_rec.location);
429: 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 -
430: CLOSE get_locator_id;
431:
432: GMI_RESERVATION_UTIL.Println('location becomes locator_id '|| l_locator_id);
433: -- as per Jatinder Gogna to support part of bug fix 5595222
434: -- Create locator in discrete ( dynamic locator)
435: IF (l_locator_id is NULL) THEN
436: GMI_RESERVATION_UTIL.Println('location (l_locator_id) was NULL so calling inv_migrate_process_org.create_location');

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

531: X_PARENT_LOT_NUMBER => l_parent_lot_num,
532: X_FAILURE_COUNT => l_count
533: );
534:
535: GMI_RESERVATION_UTIL.Println('get odm_lot: X_FAILURE_COUNT is '||l_count);
536:
537: IF (l_count > 0)
538: THEN
539: -- Log Error

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

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

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

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

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

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

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

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

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

595:
596:
597: inv_reservation_pvt.print_rsv_rec(l_insert_rsv_rec);
598:
599: GMI_RESERVATION_UTIL.PrintLn('about to call create_reservation');
600:
601: fnd_msg_pub.initialize;
602: INV_RESERVATION_PUB.create_reservation(
603: p_api_version_number => 1.0

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

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

Line 622: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);

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

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

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

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

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

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

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

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

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

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

668:
669:
670: EXCEPTION
671: --WHEN NON_INV_ITEM THEN
672: -- GMI_RESERVATION_UTIL.PrintLn('Non inventory item..doing nothing');
673: -- NULL;
674:
675: WHEN FND_API.g_exc_unexpected_error THEN
676: l_failure_count := l_failure_count + 1;

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

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

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

725:
726: IF l_opm_noninv_ind = 0 THEN -- -- 5475003 rework 10/19 - only create Move Orders if an inventory item (control from ic_item_mst)
727: /* - we do not create move orders for a non-inventory item in R12 (in 11i OPM we did ) */
728:
729: 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));
730:
731: /* Look for the move order header, has an mtl move order header been created for this already? */
732: OPEN get_move_order_header (move_order_line_rec.line_id);
733: FETCH get_move_order_header INTO l_ic_mo_header_rec;

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

731: /* Look for the move order header, has an mtl move order header been created for this already? */
732: OPEN get_move_order_header (move_order_line_rec.line_id);
733: FETCH get_move_order_header INTO l_ic_mo_header_rec;
734: CLOSE get_move_order_header;
735: 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);
736:
737: -- need to get location_id and pick_grouping rule_id from wsh_shipping_parameters
738: -- for grouping_rule_id for MO header and for to_locator_id for MO line -- 5601081
739: OPEN get_shipping_parameters(move_order_line_rec.organization_id);

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

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

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

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

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

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

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

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

Line 792: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

856: GMI_RESERVATION_UTIL.PrintLn('ic_txn_request_lines attribute15 = null ');
857: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);
858: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
859: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
860: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
861: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
862: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
863: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
864: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);

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

857: GMI_RESERVATION_UTIL.PrintLn('l_trohdr_rec.header_id : '|| l_trohdr_rec.header_id);
858: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
859: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
860: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
861: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
862: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
863: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
864: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
865: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);

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

858: GMI_RESERVATION_UTIL.PrintLn('l_mo_header_id : '|| l_mo_header_id);
859: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
860: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
861: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
862: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
863: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
864: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
865: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
866: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);

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

859: GMI_RESERVATION_UTIL.PrintLn('from_subinventory_code : '|| move_order_line_rec.from_subinventory_code);
860: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
861: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
862: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
863: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
864: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
865: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
866: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
867: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);

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

860: GMI_RESERVATION_UTIL.PrintLn('inventory_item_id : '|| move_order_line_rec.inventory_item_id);
861: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
862: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
863: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
864: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
865: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
866: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
867: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
868: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);

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

861: GMI_RESERVATION_UTIL.PrintLn('line_number : '|| l_line_num);
862: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
863: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
864: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
865: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
866: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
867: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
868: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);
869: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);

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

862: GMI_RESERVATION_UTIL.PrintLn('organization_id : '|| move_order_line_rec.organization_id);
863: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
864: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
865: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
866: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
867: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
868: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);
869: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);
870: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_detailed : '|| move_order_line_rec.secondary_quantity_detailed);

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

863: GMI_RESERVATION_UTIL.PrintLn('quantity : '|| move_order_line_rec.quantity);
864: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity : '|| move_order_line_rec.secondary_quantity);
865: GMI_RESERVATION_UTIL.PrintLn('to_subinventory_code : '|| move_order_line_rec.to_subinventory_code);
866: GMI_RESERVATION_UTIL.PrintLn('uom_code : '|| move_order_line_rec.uom_code);
867: GMI_RESERVATION_UTIL.PrintLn('secondary_uom : '|| move_order_line_rec.secondary_uom_code);
868: GMI_RESERVATION_UTIL.PrintLn('grade_code : '|| move_order_line_rec.qc_grade);
869: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_delivered : '|| move_order_line_rec.secondary_quantity_delivered);
870: GMI_RESERVATION_UTIL.PrintLn('secondary_quantity_detailed : '|| move_order_line_rec.secondary_quantity_detailed);
871:

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

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

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

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

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

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

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

873:
874: OPEN get_sales_order_id (open_order_line_rec.header_id);
875: FETCH get_sales_order_id INTO l_sales_order_id;
876: CLOSE get_sales_order_id;
877: GMI_RESERVATION_UTIL.PrintLn('l_sales_order_id : '|| l_sales_order_id);
878:
879: begin
880: -- 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
881: OPEN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id);

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

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

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

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

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

889: NULL;
890:
891: end;
892:
893: GMI_RESERVATION_UTIL.PrintLn('l_delivery_detail_id : '|| l_delivery_detail_id);
894:
895: l_line_num := l_line_num + 1;
896: --l_trolin_tbl(l_order_count).header_id := l_trohdr_rec.header_id; -- 5111050 commented out
897: l_trolin_tbl(l_order_count).header_id := l_mo_header_id; -- 5111050 5474923

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

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

Line 950: GMI_RESERVATION_UTIL.PrintLn(l_msg_data);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1029: -- need to incororate this into fix for non inv items and MOs
1030:
1031: FOR delivery_detail_rec IN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id)
1032: LOOP
1033: 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));
1034: 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));
1035: 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));
1036: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail l_opm_noninv_ind '||to_char(l_opm_noninv_ind ));
1037:

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

1030:
1031: FOR delivery_detail_rec IN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id)
1032: LOOP
1033: 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));
1034: 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));
1035: 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));
1036: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail l_opm_noninv_ind '||to_char(l_opm_noninv_ind ));
1037:
1038: -- if non_inv item need to set dd to staged 5475003

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

1031: FOR delivery_detail_rec IN get_delivery_details(move_order_line_rec.line_id,open_order_line_rec.line_id)
1032: LOOP
1033: 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));
1034: 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));
1035: 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));
1036: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail l_opm_noninv_ind '||to_char(l_opm_noninv_ind ));
1037:
1038: -- if non_inv item need to set dd to staged 5475003
1039: IF l_opm_noninv_ind = 1 THEN -- 5475003 rework - if here then this is non inventory item (as per OPM)

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

1032: LOOP
1033: 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));
1034: 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));
1035: 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));
1036: GMI_RESERVATION_UTIL.PrintLn(' in loop to update wsh_delivery_detail l_opm_noninv_ind '||to_char(l_opm_noninv_ind ));
1037:
1038: -- if non_inv item need to set dd to staged 5475003
1039: IF l_opm_noninv_ind = 1 THEN -- 5475003 rework - if here then this is non inventory item (as per OPM)
1040: UPDATE wsh_delivery_details

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

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

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

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

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

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

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

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