1 PACKAGE FTE_CAT_VALIDATE_PKG AUTHID CURRENT_USER AS
2 /* $Header: FTECATVS.pls 115.5 2002/11/21 00:22:32 hbhagava noship $ */
3
4 --
5 -- Package
6 -- FTE_CAT_VALIDATE_PKG
7 --
8 --
9 -- Purpose
10 -- This package does the following:
11 -- 1. Validate a stop location belongs to origin/destination region
12 -- of a lane/schedule
13 -- 2. Validate stop times (departure and arrival dates )
14 -- against lane/schedule
15
16 -- 3. Validate Service type of a Lane
17 --
18 G_PACKAGE_NAME CONSTANT VARCHAR2(50) := 'FTE_CAT_VALIDATE_PKG';
19
20 --
21 -- Declaring Constant Variables
22 -- 1 - Departure Date is Match with Departure Date - G_MATCH_WITH_DEP_DATE
23 -- 2 - Departure Date is Match with Arrival Date - G_MATCH_WITH_ARR_DATE
24 -- 3 - Departure Date is between Departure and Arrival Dates - G_BETWEEN_DATES
25
26 -- 4 - Departure Date is Outside the Range ( before ). -G_BEFORE_DEP_DATE
27
28 -- 5 - Departure Date is Outside the Range ( after). - G_AFTER_ARRIVAL_DATE
29 --
30
31 G_MATCH_WITH_DEP_DATE CONSTANT NUMBER := 1 ;
32 G_MATCH_WITH_ARR_DATE CONSTANT NUMBER := 2 ;
33 G_BETWEEN_DATES CONSTANT NUMBER := 3 ;
34 G_BEFORE_DEP_DATE CONSTANT NUMBER := 4 ;
35 G_AFTER_ARRIVAL_DATE CONSTANT NUMBER := 5 ;
36
37 -- Procedure Name
38 --
39 -- PROCEDURE Validate_Loc_To_Region
40 --
41
42 -- Purpose
43 -- Validate a stop location belongs to origin/destination region
44 -- of a lane/schedule
45 --
46 -- IN Parameters
47 -- 1. Lane Id
48 -- 2. Location Id
49 -- 3. Search Criteria
50 -- Valid Values are 'O'-Origin, 'D'-Destination, and 'A'-Any One
51 -- This input criteria will be used to validate only those region
52 -- Out Parameters
53 -- 1. x_valid_flag :returns "Y" or "N"
54 -- Y-means entered location is valid, otherwise "N"
55
56
57 PROCEDURE Validate_Loc_To_Region(
58 p_lane_id IN NUMBER,
59 p_location_id IN NUMBER,
60 p_search_criteria IN VARCHAR2 default 'A',
61 p_init_msg_list IN VARCHAR2 default fnd_api.g_false,
62 x_return_status OUT NOCOPY VARCHAR2,
63 x_valid_flag OUT NOCOPY VARCHAR2
64 );
65
66 -- Procdure Name
67 --
68 -- PROCEDURE Validate_Schedule_Date
69
70 --
71 -- Purpose
72 -- Validate stop times (departure and arrival dates )
73 -- against lane/schedule
74 --
75 -- IN Parameters
76 -- 1. Lane Id
77 -- 2. Schedule Id
78 -- 3. Departure Date
79 -- 4. Arrival Date
80 -- Out Parameters
81 -- 1. x_dep_match_flag : returns the following Values
82 -- MD - Departure Date is Match with Departure Date - MATCH_WITH_DEP_DATE
83
84 -- MA - Departure Date is Match with Arrival Date - MATCH_WITH_ARR_DATE
85
86 -- BW - Departure Date is between Departure and Arrival Dates - BETWEEN_DATES
87
88 -- BD - Departure Date is Outside the Range ( before ). -BEFORE_DEP_DATE
89
90 -- AA - Departure Date is Outside the Range ( after). - AFTER_ARRIVAL_DATE
91
92
93 -- 2. x_arr_match_flag : returns the following Values
94 -- D - Arrival Date is Match with Departure Date
95 -- A - Arrival Date is Match with Arrival Date
96 -- W - Arrival Date is between Departure and Arrival Dates
97 -- B - Arrival Date is Outside the Range ( before ).
98 -- O - Arrival Date is Outside the Range ( after ).
99
100 PROCEDURE Validate_Schedule_Date(
101 p_lane_id IN NUMBER,
102 p_schedule_id IN NUMBER,
103 p_departure_date IN DATE,
104 p_arrival_date IN DATE,
105
106 p_init_msg_list IN VARCHAR2 default fnd_api.g_false,
107 x_return_status OUT NOCOPY VARCHAR2,
108 x_dep_match_flag OUT NOCOPY NUMBER,
109 x_arr_match_flag OUT NOCOPY NUMBER
110 );
111
112 -- Procdure Name
113 --
114 -- PROCEDURE Validate_Service_Type
115 --
116 -- Purpose
117 -- Validate Service type of a Lane
118 --
119
120 -- IN Parameters
121 -- 1. Lane Id
122 -- 2. Service Type
123 -- Out Parameters
124 -- 1. x_valid_flag :returns "Y" or "N"
125 -- Y-means entered service type is valid, otherwise "N"
126
127 PROCEDURE Validate_Service_Type(
128 p_lane_id IN NUMBER,
129 p_service_type IN VARCHAR2,
130 p_init_msg_list IN VARCHAR2 default fnd_api.g_false,
131 x_return_status OUT NOCOPY VARCHAR2,
132 x_valid_flag OUT NOCOPY VARCHAR2
133
134 );
135
136 END FTE_CAT_VALIDATE_PKG;