1 PACKAGE WSH_USA_CATEGORIES_PVT as
2 /* $Header: WSHUSACS.pls 120.0.12000000.1 2007/01/16 05:52:19 appldev ship $ */
3
4
5 TYPE ChangedDetailRec IS RECORD(
6
7 EARLIEST_PICKUP_DATE WSH_DELIVERY_DETAILS.EARLIEST_PICKUP_DATE%TYPE,
8 LATEST_PICKUP_DATE WSH_DELIVERY_DETAILS.LATEST_PICKUP_DATE%TYPE,
9 EARLIEST_DROPOFF_DATE WSH_DELIVERY_DETAILS.EARLIEST_DROPOFF_DATE%TYPE,
10 LATEST_DROPOFF_DATE WSH_DELIVERY_DETAILS.LATEST_DROPOFF_DATE%TYPE
11
12 );
13
14
15 --
16 -- Procedure: Check_Attributes
17 -- Parameters:
18 -- p_source_code source code to update
19 -- p_attributes_rec record of attributes to change
20 -- x_update_allowed flag to indicate if the delivery lines can be updated
21 -- 'Y' - update is allowed, 'N' - update is disallowed
22 -- x_return_status return status
23 --
24 -- Description:
25 -- Calls Change_xxx APIs to check the attributes being updated.
26 PROCEDURE Check_Attributes(
27 p_source_code IN VARCHAR2,
28 p_attributes_rec IN WSH_INTERFACE.ChangedAttributeRecType,
29 x_changed_detail OUT NOCOPY WSH_USA_CATEGORIES_PVT.ChangedDetailRec,
30 x_update_allowed OUT NOCOPY VARCHAR2,
31 x_return_status OUT NOCOPY VARCHAR2);
32
33
34 --
35 -- Procedure: Change_Quantity
36 -- Parameters:
37 -- p_attributes_rec record of attributes to change
38 -- p_wms_flag indicates if source line is in WMS org (Y-yes, N-no)
39 -- x_update_allowed flag to indicate if the delivery lines can be updated
40 -- 'Y' - update is allowed, 'N' - update is disallowed
41 -- x_return_status return status
42 -- x_update_allowed is set to 'N' if the changes are not allowed.
43 -- The caller is responsible for initializing x_update_allowed = 'Y'.
44 --
45 -- Description:
46 -- Checks for Change in Quantity and do actions as needed.
47
48
49 PROCEDURE Change_Quantity(
50 p_attributes_rec IN WSH_INTERFACE.ChangedAttributeRecType,
51 p_source_code IN VARCHAR2,
52 p_wms_flag IN VARCHAR2,
53 x_update_allowed IN OUT NOCOPY VARCHAR2,
54 x_return_status OUT NOCOPY VARCHAR2);
55
56 --
57 -- Procedure: Change_Schedules
58 -- Parameters:
59 -- p_attributes_rec record of attributes to change
60 -- p_wms_flag indicates if source line is in WMS org (Y-yes, N-no)
61 -- x_update_allowed flag to indicate if the delivery lines can be updated
62 -- 'Y' - update is allowed, 'N' - update is disallowed
63 -- x_return_status return status
64 --
65 -- Description:
66 -- Checks for attribute changes that will trigger lines to change schedules and
67 -- become "Ready to Release."
68 -- x_update_allowed is set to 'N' if the changes are not allowed.
69 -- The caller is responsible for initializing x_update_allowed = 'Y'.
70
71 PROCEDURE Change_Schedule(
72 p_attributes_rec IN WSH_INTERFACE.ChangedAttributeRecType,
73 p_source_code IN VARCHAR2,
74 p_wms_flag IN VARCHAR2,
75 x_update_allowed IN OUT NOCOPY VARCHAR2,
76 x_return_status OUT NOCOPY VARCHAR2);
77
78 --
79 -- Procedure: Change_Scheduled_Date
80 -- Parameters:
81 -- p_attributes_rec record of attributes to change
82 -- p_wms_flag indicates if source line is in WMS org (Y-yes, N-no)
83 -- x_update_allowed flag to indicate if the delivery lines can be updated
84 -- 'Y' - update is allowed, 'N' - update is disallowed
85 -- x_return_status return status
86 --
87 -- Description:
88 -- Checks for attributes that will change the scheduled date and may cause the
89 -- system to Log Exception.
90 -- x_update_allowed is set to 'N' if the changes are not allowed.
91 -- The caller is responsible for initializing x_update_allowed = 'Y'.
92
93 PROCEDURE Change_Scheduled_Date(
94 p_attributes_rec IN WSH_INTERFACE.ChangedAttributeRecType,
95 p_source_code IN VARCHAR2,
96 p_wms_flag IN VARCHAR2,
97 x_update_allowed IN OUT NOCOPY VARCHAR2,
98 x_return_status OUT NOCOPY VARCHAR2);
99
100 --
101 -- Procedure: Change_Sets
102 -- Parameters:
103 -- p_attributes_rec record of attributes to change
104 -- p_wms_flag indicates if source line is in WMS org (Y-yes, N-no)
105 -- x_update_allowed flag to indicate if the delivery lines can be updated
106 -- 'Y' - update is allowed, 'N' - update is disallowed
107 -- x_return_status return status
108 --
109 -- Description:
110 -- Checks Ship Set changes.
111 -- x_update_allowed is set to 'N' if the changes are not allowed.
112 -- The caller is responsible for initializing x_update_allowed = 'Y'.
113
114 PROCEDURE Change_Sets(
115 p_attributes_rec IN WSH_INTERFACE.ChangedAttributeRecType,
116 p_source_code IN VARCHAR2,
117 p_wms_flag IN VARCHAR2,
118 x_update_allowed IN OUT NOCOPY VARCHAR2,
119 x_return_status OUT NOCOPY VARCHAR2);
120
121 --
122 -- Procedure: Change_Delivery_Group
123 -- Parameters:
124 -- p_attributes_rec record of attributes to change
125 -- p_wms_flag indicates if source line is in WMS org (Y-yes, N-no)
126 -- x_update_allowed flag to indicate if the delivery lines can be updated
127 -- 'Y' - update is allowed, 'N' - update is disallowed
128 -- x_return_status return status
129 --
130 -- Description:
131 -- Checks for Delivery Grouping Attributes and do actions as needed.
132 -- x_update_allowed is set to 'N' if the changes are not allowed.
133 -- The caller is responsible for initializing x_update_allowed = 'Y'.
134
135 PROCEDURE Change_Delivery_Group(
136 p_attributes_rec IN WSH_INTERFACE.ChangedAttributeRecType,
137 p_source_code IN VARCHAR2,
138 p_wms_flag IN VARCHAR2,
139 x_update_allowed IN OUT NOCOPY VARCHAR2,
140 x_return_status OUT NOCOPY VARCHAR2);
141
142 -- anxsharm
143 -- Bug 2181132
144 --
145 -- Procedure: Change_Ship_Tolerance
146 -- Parameters:
147 -- p_attributes_rec record of attributes to change
148 -- p_wms_flag indicates if source line is in WMS org (Y-yes, N-no)
149 -- x_update_allowed flag to indicate if the delivery lines can be updated
150 -- 'Y' - update is allowed, 'N' - update is disallowed
151 -- x_return_status return status
152 --
153 -- Description:
154 -- Checks if Tolerance is being modified for any delivery line
155 -- in a line set. If any of the delivery line within the line
156 -- set is staged or shipped, then reject tolerance changes.
157 -- x_update_allowed is set to 'N' if the changes are not allowed.
158 -- The caller is responsible for initializing x_update_allowed = 'Y'.
159
160 PROCEDURE Change_Ship_Tolerance(
161 p_attributes_rec IN WSH_INTERFACE.ChangedAttributeRecType,
162 p_source_code IN VARCHAR2,
163 p_wms_flag IN VARCHAR2,
164 x_update_allowed IN OUT NOCOPY VARCHAR2,
165 x_return_status OUT NOCOPY VARCHAR2);
166
167
168 -- anxsharm
169 -- Procedure: Change_TP_Dates
170 -- Parameters:
171 -- p_attributes_rec record of attributes to change
172 -- x_update_allowed flag to indicate if the delivery lines can be updated
173 -- 'Y' - update is allowed, 'N' - update is disallowed
174 -- x_return_status return status
175 --
176 -- Description:
177 -- Calculates the TPdates for the delivery detail. If the detail dates are changed
178 -- The deliveries and container of the detail line is updated with new Tpdates.
179 PROCEDURE Change_TP_Dates(
180 p_attributes_rec IN WSH_INTERFACE.ChangedAttributeRecType,
181 p_source_code IN VARCHAR2,
182 x_changed_detail OUT NOCOPY WSH_USA_CATEGORIES_PVT.ChangedDetailRec,
183 x_update_allowed IN OUT NOCOPY VARCHAR2,
184 x_return_status OUT NOCOPY VARCHAR2);
185
186
187 END WSH_USA_CATEGORIES_PVT;