1: PACKAGE BODY GMI_Reservation_PVT AS
2: /* $Header: GMIVRSVB.pls 115.72 2004/06/07 17:10:35 pkanetka ship $ */
3: /* +=========================================================================+
4: | Copyright (c) 2000 Oracle Corporation |
5: | TVP, Reading, England |
40: | Modified procedure Update_Reservation such that |
41: | reserved quantity is calculated if it is equal to |
42: | FND_API.G_MISS_NUM. |
43: +========================================================================+
44: API Name : GMI_Reservation_PVT
45: Type : Private - Package Body
46: Function : This package contains Private procedures used to
47: OPM reservation process.
48: -
53: */
54:
55:
56: /* Global variables */
57: G_PKG_NAME CONSTANT VARCHAR2(30):='GMI_Reservation_PVT';
58:
59: -- HW BUG#:1941429 OPM cross_docking. Record table to hold information
60:
61: TYPE demRecTyp_opm IS RECORD (
163:
164:
165: BEGIN
166:
167: GMI_reservation_Util.PrintLn('(opm_dbg) entering proc GMI_Reservation_PVT.query_reservation (PVT q)');
168: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_id='||p_query_input.reservation_id||'.');
169: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : organization_id='||p_query_input.organization_id||'.');
170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');
171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */
409: IF ( SQLCODE <> 0
410: AND SQLCODE <> 100)
411: THEN
412: x_error_code := SQLCODE;
413: GMI_reservation_Util.PrintLn('(opm_dbg) in GMI_Reservation_PVT.Query_reservation SQLCODE:error='||SQLCODE||'.');
414: FND_MESSAGE.Set_Name('GMI','GMI_SQL_ERROR');
415: FND_MESSAGE.Set_Token('WHERE', 'Query_Reservation');
416: FND_MESSAGE.Set_Token('SQL_CODE', SQLCODE);
417: FND_MESSAGE.Set_Token('SQL_ERRM', SQLERRM);
516: AND completed_ind = 0
517: AND lot_id <> 0
518: AND delete_mark = 0;
519: BEGIN
520: GMI_reservation_Util.PrintLn('(opm_dbg) Entering proc GMI_Reservation_PVT.Create_reservation ');
521: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : user_id='||FND_GLOBAL.USER_ID||'.');
522: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_id='||p_rsv_rec.reservation_id||'.');
523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');
524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
2332: WHEN fnd_api.g_exc_error THEN
2333: x_return_status := fnd_api.g_ret_sts_error;
2334:
2335: WHEN NO_DATA_FOUND THEN
2336: GMI_RESERVATION_UTIL.PRINTLN('No Data found raised error in GMI_Reservation_PVT.calculate_reservation');
2337:
2338: WHEN OTHERS THEN
2339: x_return_status := FND_API.G_RET_STS_ERROR;
2340: GMI_RESERVATION_UTIL.PRINTLN('RAISE WHEN OTHERS');
2838: EXCEPTION
2839: WHEN FND_API.G_EXC_ERROR THEN
2840: x_return_status := FND_API.G_RET_STS_ERROR;
2841:
2842: GMI_RESERVATION_UTIL.PrintLn('Exeption GMI_Reservation_PVT.calculate_prior_reservations');
2843: FND_MSG_PUB.Add_Exc_Msg (
2844: G_PKG_NAME
2845: , l_api_name);
2846:
2850: , p_data => x_msg_data);
2851:
2852: WHEN NO_DATA_FOUND THEN
2853: x_return_status := FND_API.G_RET_STS_ERROR;
2854: GMI_RESERVATION_UTIL.PrintLn('No Data found Exception GMI_Reservation_PVT.calculate_prior_reservations');
2855:
2856: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME
2857: , l_api_name);
2858:
2863:
2864: WHEN OTHERS THEN
2865: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2866:
2867: GMI_RESERVATION_UTIL.PrintLn('OTHERS Exception GMI_Reservation_PVT.calculate_prior_reservations');
2868:
2869: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME
2870: , l_api_name);
2871:
3284:
3285: END Calc_Reservation_For_shipset;
3286:
3287:
3288: END GMI_Reservation_PVT;