41: -- 2. Location Id
42: -- 3. Search Criteria
43: -- Valid Values are 'O'-Origin, 'D'-Destination, and 'A'-Any One
44: -- This input criteria will be used to validate only those region
45: -- 4. p_init_msg_list (optional, default FND_API.G_FALSE)
46: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
47: -- if set to FND_API.G_TRUE
48: -- initialize error message list
49: -- if set to FND_API.G_FALSE - not initialize error
42: -- 3. Search Criteria
43: -- Valid Values are 'O'-Origin, 'D'-Destination, and 'A'-Any One
44: -- This input criteria will be used to validate only those region
45: -- 4. p_init_msg_list (optional, default FND_API.G_FALSE)
46: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
47: -- if set to FND_API.G_TRUE
48: -- initialize error message list
49: -- if set to FND_API.G_FALSE - not initialize error
50: -- message list
43: -- Valid Values are 'O'-Origin, 'D'-Destination, and 'A'-Any One
44: -- This input criteria will be used to validate only those region
45: -- 4. p_init_msg_list (optional, default FND_API.G_FALSE)
46: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
47: -- if set to FND_API.G_TRUE
48: -- initialize error message list
49: -- if set to FND_API.G_FALSE - not initialize error
50: -- message list
51:
45: -- 4. p_init_msg_list (optional, default FND_API.G_FALSE)
46: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
47: -- if set to FND_API.G_TRUE
48: -- initialize error message list
49: -- if set to FND_API.G_FALSE - not initialize error
50: -- message list
51:
52: -- Out Parameters
53: -- 1.x_return_status
51:
52: -- Out Parameters
53: -- 1.x_return_status
54: -- if the process succeeds, the value is
55: -- fnd_api.g_ret_sts_success;
56: -- if there is an expected error, the value is
57: -- fnd_api.g_ret_sts_error;
58: -- if there is an unexpected error, the value is
59: -- fnd_api.g_ret_sts_unexp_error;
53: -- 1.x_return_status
54: -- if the process succeeds, the value is
55: -- fnd_api.g_ret_sts_success;
56: -- if there is an expected error, the value is
57: -- fnd_api.g_ret_sts_error;
58: -- if there is an unexpected error, the value is
59: -- fnd_api.g_ret_sts_unexp_error;
60:
61:
55: -- fnd_api.g_ret_sts_success;
56: -- if there is an expected error, the value is
57: -- fnd_api.g_ret_sts_error;
58: -- if there is an unexpected error, the value is
59: -- fnd_api.g_ret_sts_unexp_error;
60:
61:
62: -- 2. x_valid_flag :returns "Y" or "N"
63: -- Y-means entered location is valid, otherwise "N"
65: PROCEDURE Validate_Loc_To_Region(
66: p_lane_id IN NUMBER,
67: p_location_id IN NUMBER,
68: p_search_criteria IN VARCHAR2 default 'A',
69: p_init_msg_list IN VARCHAR2 default fnd_api.g_false,
70: x_return_status OUT NOCOPY VARCHAR2,
71: x_valid_flag OUT NOCOPY VARCHAR2
72: ) is
73:
186: begin
187: SAVEPOINT Validate_Loc_To_Region;
188: -- Initialize message list if p_init_msg_list is set to TRUE.
189: --
190: IF FND_API.to_Boolean( p_init_msg_list ) THEN
191: FND_MSG_PUB.initialize;
192: END IF;
193: -- Initialize API return status to success
194: x_return_status := FND_API.G_RET_STS_SUCCESS;
190: IF FND_API.to_Boolean( p_init_msg_list ) THEN
191: FND_MSG_PUB.initialize;
192: END IF;
193: -- Initialize API return status to success
194: x_return_status := FND_API.G_RET_STS_SUCCESS;
195: x_valid_flag := 'Y';
196: -- Validate Region
197: if p_search_criteria = 'O' then
198: open c_origin_exists_cursor;
225: close c_any_exists_cursor;
226: end if;
227: end if;
228: EXCEPTION
229: WHEN FND_API.G_EXC_ERROR THEN
230: if c_origin_exists_cursor%isopen then
231: close c_origin_exists_cursor;
232: end if;
233: if c_dest_exists_cursor%isopen then
237: close c_any_exists_cursor;
238: end if;
239: x_valid_flag := 'N';
240: ROLLBACK TO Validate_Loc_To_Region;
241: x_return_status := FND_API.G_RET_STS_ERROR;
242: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
243: if c_origin_exists_cursor%isopen then
244: close c_origin_exists_cursor;
245: end if;
238: end if;
239: x_valid_flag := 'N';
240: ROLLBACK TO Validate_Loc_To_Region;
241: x_return_status := FND_API.G_RET_STS_ERROR;
242: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
243: if c_origin_exists_cursor%isopen then
244: close c_origin_exists_cursor;
245: end if;
246: if c_dest_exists_cursor%isopen then
250: close c_any_exists_cursor;
251: end if;
252: x_valid_flag := 'N';
253: ROLLBACK TO Validate_Loc_To_Region;
254: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
255: WHEN OTHERS THEN
256: if c_origin_exists_cursor%isopen then
257: close c_origin_exists_cursor;
258: end if;
263: close c_any_exists_cursor;
264: end if;
265: x_valid_flag := 'N';
266: ROLLBACK TO Validate_Loc_To_Region;
267: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
268: END Validate_Loc_To_Region ;
269: --
270: --========================================================================
271: -- Procdure Name
282: -- 1. Lane Id
283: -- 2. Schedule Id
284: -- 3. Departure Date
285: -- 4. Arrival Date
286: -- 5. p_init_msg_list (optional, default FND_API.G_FALSE)
287: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
288: -- if set to FND_API.G_TRUE
289: -- initialize error message list
290: -- if set to FND_API.G_FALSE - not initialize error
283: -- 2. Schedule Id
284: -- 3. Departure Date
285: -- 4. Arrival Date
286: -- 5. p_init_msg_list (optional, default FND_API.G_FALSE)
287: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
288: -- if set to FND_API.G_TRUE
289: -- initialize error message list
290: -- if set to FND_API.G_FALSE - not initialize error
291: -- message list
284: -- 3. Departure Date
285: -- 4. Arrival Date
286: -- 5. p_init_msg_list (optional, default FND_API.G_FALSE)
287: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
288: -- if set to FND_API.G_TRUE
289: -- initialize error message list
290: -- if set to FND_API.G_FALSE - not initialize error
291: -- message list
292: -- Out Parameters
286: -- 5. p_init_msg_list (optional, default FND_API.G_FALSE)
287: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
288: -- if set to FND_API.G_TRUE
289: -- initialize error message list
290: -- if set to FND_API.G_FALSE - not initialize error
291: -- message list
292: -- Out Parameters
293: -- 1.x_return_status
294: -- if the process succeeds, the value is
291: -- message list
292: -- Out Parameters
293: -- 1.x_return_status
294: -- if the process succeeds, the value is
295: -- fnd_api.g_ret_sts_success;
296: -- if there is an expected error, the value is
297: -- fnd_api.g_ret_sts_error;
298: -- if there is an unexpected error, the value is
299: -- fnd_api.g_ret_sts_unexp_error;
293: -- 1.x_return_status
294: -- if the process succeeds, the value is
295: -- fnd_api.g_ret_sts_success;
296: -- if there is an expected error, the value is
297: -- fnd_api.g_ret_sts_error;
298: -- if there is an unexpected error, the value is
299: -- fnd_api.g_ret_sts_unexp_error;
300:
301:
295: -- fnd_api.g_ret_sts_success;
296: -- if there is an expected error, the value is
297: -- fnd_api.g_ret_sts_error;
298: -- if there is an unexpected error, the value is
299: -- fnd_api.g_ret_sts_unexp_error;
300:
301:
302: -- 2. x_dep_match_flag : returns the following Values
303: -- 1 - Departure Date is Match with Departure Date - MATCH_WITH_DEP_DATE
324: p_schedule_id IN NUMBER,
325:
326: p_departure_date IN DATE,
327: p_arrival_date IN DATE,
328: p_init_msg_list IN VARCHAR2 default fnd_api.g_false,
329: x_return_status OUT NOCOPY VARCHAR2,
330: x_dep_match_flag OUT NOCOPY NUMBER,
331: x_arr_match_flag OUT NOCOPY NUMBER
332: ) is
341: begin
342: SAVEPOINT Validate_Schedule_Date;
343: -- Initialize message list if p_init_msg_list is set to TRUE.
344: --
345: IF FND_API.to_Boolean( p_init_msg_list ) THEN
346: FND_MSG_PUB.initialize;
347: END IF;
348: -- Initialize API return status to success
349: x_return_status := FND_API.G_RET_STS_SUCCESS;
345: IF FND_API.to_Boolean( p_init_msg_list ) THEN
346: FND_MSG_PUB.initialize;
347: END IF;
348: -- Initialize API return status to success
349: x_return_status := FND_API.G_RET_STS_SUCCESS;
350:
351: open c_schedule_cursor;
352: fetch c_schedule_cursor into l_departure_date, l_arrival_date;
353:
396: close c_schedule_cursor;
397: end if;
398: --
399: EXCEPTION
400: WHEN FND_API.G_EXC_ERROR THEN
401: if c_schedule_cursor%isopen then
402: close c_schedule_cursor;
403: end if;
404: ROLLBACK TO Validate_Schedule_Date;
401: if c_schedule_cursor%isopen then
402: close c_schedule_cursor;
403: end if;
404: ROLLBACK TO Validate_Schedule_Date;
405: x_return_status := FND_API.G_RET_STS_ERROR;
406: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
407: if c_schedule_cursor%isopen then
408: close c_schedule_cursor;
409:
402: close c_schedule_cursor;
403: end if;
404: ROLLBACK TO Validate_Schedule_Date;
405: x_return_status := FND_API.G_RET_STS_ERROR;
406: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
407: if c_schedule_cursor%isopen then
408: close c_schedule_cursor;
409:
410: end if;
408: close c_schedule_cursor;
409:
410: end if;
411: ROLLBACK TO Validate_Schedule_Date;
412: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
413: WHEN OTHERS THEN
414: if c_schedule_cursor%isopen then
415: close c_schedule_cursor;
416: end if;
414: if c_schedule_cursor%isopen then
415: close c_schedule_cursor;
416: end if;
417: ROLLBACK TO Validate_Schedule_Date;
418: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
419: END Validate_Schedule_Date;
420: --
421: --========================================================================
422: -- Procdure Name
438:
439: PROCEDURE Validate_Service_Type(
440: p_lane_id IN NUMBER,
441: p_service_type IN VARCHAR2,
442: p_init_msg_list IN VARCHAR2 default fnd_api.g_false,
443: x_return_status OUT NOCOPY VARCHAR2,
444: x_valid_flag OUT NOCOPY VARCHAR2
445: ) is
446: cursor c_service_type is
450:
451: SAVEPOINT Validate_Service_Type;
452: -- Initialize message list if p_init_msg_list is set to TRUE.
453: --
454: IF FND_API.to_Boolean( p_init_msg_list ) THEN
455: FND_MSG_PUB.initialize;
456: END IF;
457: -- Initialize API return status to success
458: x_return_status := FND_API.G_RET_STS_SUCCESS;
454: IF FND_API.to_Boolean( p_init_msg_list ) THEN
455: FND_MSG_PUB.initialize;
456: END IF;
457: -- Initialize API return status to success
458: x_return_status := FND_API.G_RET_STS_SUCCESS;
459: x_valid_flag := 'Y';
460: -- Validate service
461: open c_service_type;
462: fetch c_service_type into x_valid_flag;
468: if c_service_type%ISOPEN then
469: close c_service_type;
470: end if;
471: EXCEPTION
472: WHEN FND_API.G_EXC_ERROR THEN
473: if c_service_type%isopen then
474: close c_service_type;
475: x_valid_flag := 'N';
476: end if;
475: x_valid_flag := 'N';
476: end if;
477: ROLLBACK TO Validate_Service_Type;
478:
479: x_return_status := FND_API.G_RET_STS_ERROR;
480: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
481: if c_service_type%isopen then
482: close c_service_type;
483: x_valid_flag := 'N';
476: end if;
477: ROLLBACK TO Validate_Service_Type;
478:
479: x_return_status := FND_API.G_RET_STS_ERROR;
480: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
481: if c_service_type%isopen then
482: close c_service_type;
483: x_valid_flag := 'N';
484: end if;
482: close c_service_type;
483: x_valid_flag := 'N';
484: end if;
485: ROLLBACK TO Validate_Service_Type;
486: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
487: WHEN OTHERS THEN
488: if c_service_type%isopen then
489: close c_service_type;
490: x_valid_flag := 'N';
490: x_valid_flag := 'N';
491: end if;
492:
493: ROLLBACK TO Validate_Service_Type;
494: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
495: END Validate_Service_Type;
496: --
497: END FTE_CAT_VALIDATE_PKG;