99:
100:
101: -- Returns TRUE if RSV record is valid, FALSE otherwise
102: FUNCTION rsv_record_valid
103: ( p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
104: ) RETURN BOOLEAN IS
105:
106: l_api_name VARCHAR2(30);
107: l_debug NUMBER;
167: -- Test with sales order / internal order that is not Booked }}
168: --
169: -- Ensure that sales order / internal order is booked
170: IF p_rsv_rec.demand_source_type_id
171: = inv_reservation_global.g_source_type_oe
172: OR
173: p_rsv_rec.demand_source_type_id
174: = inv_reservation_global.g_source_type_internal_ord
175: THEN
170: IF p_rsv_rec.demand_source_type_id
171: = inv_reservation_global.g_source_type_oe
172: OR
173: p_rsv_rec.demand_source_type_id
174: = inv_reservation_global.g_source_type_internal_ord
175: THEN
176: OPEN c_chk_order_stat (p_rsv_rec.demand_source_line_id);
177: FETCH c_chk_order_stat INTO l_dummy;
178:
205: -- Material in Receiving }}
206: --
207: -- Check demand and supply source types
208: IF (p_rsv_rec.demand_source_type_id
209: NOT IN ( inv_reservation_global.g_source_type_oe
210: , inv_reservation_global.g_source_type_internal_ord
211: )
212: OR
213: p_rsv_rec.supply_source_type_id
206: --
207: -- Check demand and supply source types
208: IF (p_rsv_rec.demand_source_type_id
209: NOT IN ( inv_reservation_global.g_source_type_oe
210: , inv_reservation_global.g_source_type_internal_ord
211: )
212: OR
213: p_rsv_rec.supply_source_type_id
214: NOT IN ( inv_reservation_global.g_source_type_po
210: , inv_reservation_global.g_source_type_internal_ord
211: )
212: OR
213: p_rsv_rec.supply_source_type_id
214: NOT IN ( inv_reservation_global.g_source_type_po
215: , inv_reservation_global.g_source_type_wip
216: , inv_reservation_global.g_source_type_internal_req
217: , inv_reservation_global.g_source_type_asn
218: , inv_reservation_global.g_source_type_intransit
211: )
212: OR
213: p_rsv_rec.supply_source_type_id
214: NOT IN ( inv_reservation_global.g_source_type_po
215: , inv_reservation_global.g_source_type_wip
216: , inv_reservation_global.g_source_type_internal_req
217: , inv_reservation_global.g_source_type_asn
218: , inv_reservation_global.g_source_type_intransit
219: , inv_reservation_global.g_source_type_rcv
212: OR
213: p_rsv_rec.supply_source_type_id
214: NOT IN ( inv_reservation_global.g_source_type_po
215: , inv_reservation_global.g_source_type_wip
216: , inv_reservation_global.g_source_type_internal_req
217: , inv_reservation_global.g_source_type_asn
218: , inv_reservation_global.g_source_type_intransit
219: , inv_reservation_global.g_source_type_rcv
220: )
213: p_rsv_rec.supply_source_type_id
214: NOT IN ( inv_reservation_global.g_source_type_po
215: , inv_reservation_global.g_source_type_wip
216: , inv_reservation_global.g_source_type_internal_req
217: , inv_reservation_global.g_source_type_asn
218: , inv_reservation_global.g_source_type_intransit
219: , inv_reservation_global.g_source_type_rcv
220: )
221: )
214: NOT IN ( inv_reservation_global.g_source_type_po
215: , inv_reservation_global.g_source_type_wip
216: , inv_reservation_global.g_source_type_internal_req
217: , inv_reservation_global.g_source_type_asn
218: , inv_reservation_global.g_source_type_intransit
219: , inv_reservation_global.g_source_type_rcv
220: )
221: )
222: THEN
215: , inv_reservation_global.g_source_type_wip
216: , inv_reservation_global.g_source_type_internal_req
217: , inv_reservation_global.g_source_type_asn
218: , inv_reservation_global.g_source_type_intransit
219: , inv_reservation_global.g_source_type_rcv
220: )
221: )
222: THEN
223: IF l_debug = 1 THEN
254:
255:
256: PROCEDURE process_delivery_detail
257: ( x_return_status OUT NOCOPY VARCHAR2
258: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
259: , p_new_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
260: , p_action_code IN VARCHAR2
261: ) IS
262:
255:
256: PROCEDURE process_delivery_detail
257: ( x_return_status OUT NOCOPY VARCHAR2
258: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
259: , p_new_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
260: , p_action_code IN VARCHAR2
261: ) IS
262:
263: l_api_name VARCHAR2(30);
586:
587:
588: PROCEDURE create_crossdock_reservation
589: ( x_return_status OUT NOCOPY VARCHAR2
590: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
591: ) IS
592:
593: l_api_name VARCHAR2(30);
594: l_debug NUMBER;
628:
629:
630: PROCEDURE update_crossdock_reservation
631: ( x_return_status OUT NOCOPY VARCHAR2
632: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
633: , p_new_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
634: ) IS
635:
636: l_api_name VARCHAR2(30);
629:
630: PROCEDURE update_crossdock_reservation
631: ( x_return_status OUT NOCOPY VARCHAR2
632: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
633: , p_new_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
634: ) IS
635:
636: l_api_name VARCHAR2(30);
637: l_debug NUMBER;
802:
803:
804: PROCEDURE transfer_crossdock_reservation
805: ( x_return_status OUT NOCOPY VARCHAR2
806: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
807: , p_new_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
808: ) IS
809:
810: l_api_name VARCHAR2(30);
803:
804: PROCEDURE transfer_crossdock_reservation
805: ( x_return_status OUT NOCOPY VARCHAR2
806: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
807: , p_new_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
808: ) IS
809:
810: l_api_name VARCHAR2(30);
811: l_debug NUMBER;
848:
849:
850: PROCEDURE delete_crossdock_reservation
851: ( x_return_status OUT NOCOPY VARCHAR2
852: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
853: ) IS
854:
855: l_api_name VARCHAR2(30);
856: l_debug NUMBER;
857: l_msg_count NUMBER;
858: l_msg_data VARCHAR2(2000);
859: l_api_return_status VARCHAR2(1);
860:
861: l_dummy_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
862:
863: BEGIN
864: x_return_status := fnd_api.g_ret_sts_success;
865: l_api_name := 'delete_crossdock_reservation';
967:
968:
969: PROCEDURE relieve_crossdock_reservation
970: ( x_return_status OUT NOCOPY VARCHAR2
971: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
972: ) IS
973:
974: l_api_name VARCHAR2(30);
975: l_debug NUMBER;
976: l_msg_count NUMBER;
977: l_msg_data VARCHAR2(2000);
978: l_api_return_status VARCHAR2(1);
979:
980: l_dummy_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
981:
982: BEGIN
983: x_return_status := fnd_api.g_ret_sts_success;
984: l_api_name := 'relieve_crossdock_reservation';