7: type t_wsm_rsv_v_tbl_type is table of wsm_reservations_v%rowtype index by binary_integer;
8: type t_wsm_reservations is table of wsm_reservations%rowtype index by binary_integer;
9: --type r_mtl_rsv_rec_type is record of mtl_reservations%rowtype;
10: --MP: Sale order changes
11: l_mtl_rsv_rec inv_reservation_global.mtl_maintain_rsv_rec_type;
12:
13: g_log_level_unexpected NUMBER := FND_LOG.LEVEL_UNEXPECTED ;
14: g_log_level_error number := FND_LOG.LEVEL_ERROR ;
15: g_log_level_exception number := FND_LOG.LEVEL_EXCEPTION ;
36: p_sj_also_rj_index IN NUMBER,
37: x_return_status OUT NOCOPY VARCHAR2,
38: x_msg_count OUT NOCOPY NUMBER,
39: x_msg_data OUT NOCOPY VARCHAR2 ) IS
40: l_rsv_old inv_reservation_global.mtl_reservation_rec_type;
41: l_rsv_new inv_reservation_global.mtl_reservation_rec_type;
42: --l_mtl_rsv_rec inv_reservations_global.mtl_rsv_tbl_type;
43: l_wsm_rsv_v_tbl t_wsm_rsv_v_tbl_type;
44: l_dummy_sn inv_reservation_global.serial_number_tbl_type;
37: x_return_status OUT NOCOPY VARCHAR2,
38: x_msg_count OUT NOCOPY NUMBER,
39: x_msg_data OUT NOCOPY VARCHAR2 ) IS
40: l_rsv_old inv_reservation_global.mtl_reservation_rec_type;
41: l_rsv_new inv_reservation_global.mtl_reservation_rec_type;
42: --l_mtl_rsv_rec inv_reservations_global.mtl_rsv_tbl_type;
43: l_wsm_rsv_v_tbl t_wsm_rsv_v_tbl_type;
44: l_dummy_sn inv_reservation_global.serial_number_tbl_type;
45: l_new_rsv_id NUMBER;
40: l_rsv_old inv_reservation_global.mtl_reservation_rec_type;
41: l_rsv_new inv_reservation_global.mtl_reservation_rec_type;
42: --l_mtl_rsv_rec inv_reservations_global.mtl_rsv_tbl_type;
43: l_wsm_rsv_v_tbl t_wsm_rsv_v_tbl_type;
44: l_dummy_sn inv_reservation_global.serial_number_tbl_type;
45: l_new_rsv_id NUMBER;
46: l_rsv_exists boolean;
47: l_rsvd_qty number;
48: l_rj_index number;
406: --old reservation info populated
407: l_rsv_old.reservation_id := l_wsm_rsv_v_tbl(i).reservation_id;
408: --these might not be needed as reservation_id itself would be sufficient--
409: l_rsv_old.supply_source_header_id := p_starting_jobs_tbl(l_counter).wip_entity_id;
410: l_rsv_old.supply_source_type_id := inv_reservation_global.g_source_type_wip;
411: l_rsv_old.inventory_item_id := p_starting_jobs_tbl(l_counter).primary_item_id;
412: l_rsv_old.organization_id := p_starting_jobs_tbl(l_counter).organization_id;
413:
414: --Transfer to resulting job;
413:
414: --Transfer to resulting job;
415: --l_rj_index := p_resulting_jobs_tbl.first;
416: l_rsv_new.supply_source_header_id := p_resulting_jobs_tbl(l_rj_index).wip_entity_id;
417: l_rsv_new.supply_source_type_id := inv_reservation_global.g_source_type_wip;
418:
419: l_return_status := FND_API.G_RET_STS_SUCCESS;
420: l_msg_count := 0;
421: l_msg_data := null;
632: x_return_status OUT NOCOPY VARCHAR2,
633: x_msg_count OUT NOCOPY NUMBER,
634: x_msg_data OUT NOCOPY VARCHAR2)
635: is
636: l_rsv_old inv_reservation_global.mtl_reservation_rec_type;
637: l_rsv_new inv_reservation_global.mtl_reservation_rec_type;
638: l_dummy_sn inv_reservation_global.serial_number_tbl_type;
639: --l_mtl_rsv_rec inv_reservations_global.mtl_rsv_tbl_type;
640: l_wsm_rsvn_tbl t_wsm_reservations;
633: x_msg_count OUT NOCOPY NUMBER,
634: x_msg_data OUT NOCOPY VARCHAR2)
635: is
636: l_rsv_old inv_reservation_global.mtl_reservation_rec_type;
637: l_rsv_new inv_reservation_global.mtl_reservation_rec_type;
638: l_dummy_sn inv_reservation_global.serial_number_tbl_type;
639: --l_mtl_rsv_rec inv_reservations_global.mtl_rsv_tbl_type;
640: l_wsm_rsvn_tbl t_wsm_reservations;
641:
634: x_msg_data OUT NOCOPY VARCHAR2)
635: is
636: l_rsv_old inv_reservation_global.mtl_reservation_rec_type;
637: l_rsv_new inv_reservation_global.mtl_reservation_rec_type;
638: l_dummy_sn inv_reservation_global.serial_number_tbl_type;
639: --l_mtl_rsv_rec inv_reservations_global.mtl_rsv_tbl_type;
640: l_wsm_rsvn_tbl t_wsm_reservations;
641:
642: l_new_rsv_id NUMBER;
964: x_return_status OUT NOCOPY VARCHAR2,
965: x_msg_count OUT NOCOPY NUMBER,
966: x_msg_data OUT NOCOPY VARCHAR2)
967: is
968: l_rsv inv_reservation_global.mtl_reservation_rec_type;
969: l_dummy_sn inv_reservation_global.serial_number_tbl_type;
970: --l_mtl_rsv_rec inv_reservations_global.mtl_rsv_tbl_type;
971:
972: l_rsv_id NUMBER;
965: x_msg_count OUT NOCOPY NUMBER,
966: x_msg_data OUT NOCOPY VARCHAR2)
967: is
968: l_rsv inv_reservation_global.mtl_reservation_rec_type;
969: l_dummy_sn inv_reservation_global.serial_number_tbl_type;
970: --l_mtl_rsv_rec inv_reservations_global.mtl_rsv_tbl_type;
971:
972: l_rsv_id NUMBER;
973: l_rsv_exists number := 0;