1 PACKAGE BODY PO_LINE_LOCATIONS_PKG_S1 as
2 /* $Header: POXP2PSB.pls 120.2 2005/06/27 04:44:37 sjadhav noship $ */
3
4 PROCEDURE Lock_Row(X_Rowid VARCHAR2,
5 X_Line_Location_Id NUMBER,
6 X_Po_Header_Id NUMBER,
7 X_Po_Line_Id NUMBER,
8 X_Quantity NUMBER,
9 X_Quantity_Received NUMBER,
10 X_Quantity_Accepted NUMBER,
11 X_Quantity_Rejected NUMBER,
12 X_Quantity_Billed NUMBER,
13 X_Quantity_Cancelled NUMBER,
14 X_Unit_Meas_Lookup_Code VARCHAR2,
15 X_Po_Release_Id NUMBER,
16 X_Ship_To_Location_Id NUMBER,
17 X_Ship_Via_Lookup_Code VARCHAR2,
18 X_Need_By_Date DATE,
19 X_Promised_Date DATE,
20 X_Last_Accept_Date DATE,
21 X_Price_Override NUMBER,
22 X_Encumbered_Flag VARCHAR2,
23 X_Encumbered_Date DATE,
24 X_Fob_Lookup_Code VARCHAR2,
25 X_Freight_Terms_Lookup_Code VARCHAR2,
26 X_Tax_Code_Id NUMBER,
27 X_Tax_User_Override_Flag VARCHAR2,
28 X_From_Header_Id NUMBER,
29 X_From_Line_Id NUMBER,
30 X_From_Line_Location_Id NUMBER,
31 X_Start_Date DATE,
32 X_End_Date DATE,
33 X_Lead_Time NUMBER,
34 X_Lead_Time_Unit VARCHAR2,
35 X_Price_Discount NUMBER,
36 X_Terms_Id NUMBER,
37 X_Approved_Flag VARCHAR2,
38 X_Approved_Date DATE,
39 X_Closed_Flag VARCHAR2,
40 X_Cancel_Flag VARCHAR2,
41 X_Cancelled_By NUMBER,
42 X_Cancel_Date DATE,
43 X_Cancel_Reason VARCHAR2,
44 X_Firm_Status_Lookup_Code VARCHAR2,
45 X_Attribute_Category VARCHAR2,
46 X_Attribute1 VARCHAR2,
47 X_Attribute2 VARCHAR2,
48 X_Attribute3 VARCHAR2,
49 X_Attribute4 VARCHAR2,
50 X_Attribute5 VARCHAR2,
51 X_Attribute6 VARCHAR2,
52 X_Attribute7 VARCHAR2,
53 X_Attribute8 VARCHAR2,
54 X_Attribute9 VARCHAR2,
55 X_Attribute10 VARCHAR2,
56 X_Attribute11 VARCHAR2,
57 X_Attribute12 VARCHAR2,
58 X_Attribute13 VARCHAR2,
59 X_Attribute14 VARCHAR2,
60 X_Attribute15 VARCHAR2,
61 X_Inspection_Required_Flag VARCHAR2,
62 X_Receipt_Required_Flag VARCHAR2,
63 X_Qty_Rcv_Tolerance NUMBER,
64 X_Qty_Rcv_Exception_Code VARCHAR2,
65 X_Enforce_Ship_To_Location VARCHAR2,
66 X_Allow_Substitute_Receipts VARCHAR2,
67 X_Days_Early_Receipt_Allowed NUMBER,
68 X_Days_Late_Receipt_Allowed NUMBER,
69 X_Receipt_Days_Exception_Code VARCHAR2,
70 X_Invoice_Close_Tolerance NUMBER,
71 X_Receive_Close_Tolerance NUMBER,
72 X_Ship_To_Organization_Id NUMBER,
73 X_Shipment_Num NUMBER,
74 X_Source_Shipment_Id NUMBER,
75 X_Shipment_Type VARCHAR2,
76 X_Closed_Code VARCHAR2,
77 X_Ussgl_Transaction_Code VARCHAR2,
78 X_Government_Context VARCHAR2,
79 X_Receiving_Routing_Id NUMBER,
80 X_Accrue_On_Receipt_Flag VARCHAR2,
81 X_Closed_Reason VARCHAR2,
82 X_Closed_Date DATE,
83 X_Closed_By NUMBER,
84 X_Global_Attribute_Category VARCHAR2,
85 X_Global_Attribute1 VARCHAR2,
86 X_Global_Attribute2 VARCHAR2,
87 X_Global_Attribute3 VARCHAR2,
88 X_Global_Attribute4 VARCHAR2,
89 X_Global_Attribute5 VARCHAR2,
90 X_Global_Attribute6 VARCHAR2,
91 X_Global_Attribute7 VARCHAR2,
92 X_Global_Attribute8 VARCHAR2,
93 X_Global_Attribute9 VARCHAR2,
94 X_Global_Attribute10 VARCHAR2,
95 X_Global_Attribute11 VARCHAR2,
96 X_Global_Attribute12 VARCHAR2,
97 X_Global_Attribute13 VARCHAR2,
98 X_Global_Attribute14 VARCHAR2,
99 X_Global_Attribute15 VARCHAR2,
100 X_Global_Attribute16 VARCHAR2,
101 X_Global_Attribute17 VARCHAR2,
102 X_Global_Attribute18 VARCHAR2,
103 X_Global_Attribute19 VARCHAR2,
104 X_Global_Attribute20 VARCHAR2,
105 X_Country_of_Origin_Code VARCHAR2,
106 X_Invoice_Match_Option VARCHAR2, --bgu, Dec. 7, 98
107 -- Mahesh Chandak(GML) Add process related fields secondary_quantity, preferred
108 --grade and received,rejected,accepted and cancelled sec. qnty.Secondary_unit_of
109 --measure is not required since this is not populated in release form in po_line_locations_all but is referenced from the view. Bug# 1548597
110 X_Secondary_Quantity NUMBER default null,
111 X_Preferred_Grade VARCHAR2 default null,
112 X_Secondary_Quantity_Received NUMBER default null,
113 X_Secondary_Quantity_Accepted NUMBER default null,
114 X_Secondary_Quantity_Rejected NUMBER default null,
115 X_Secondary_Quantity_Cancelled NUMBER default null,
116 X_amount NUMBER default null -- <SERVICES FPJ>
117 ) IS
118 CURSOR C IS
119 SELECT *
120 FROM PO_LINE_LOCATIONS
121 WHERE rowid = X_Rowid
122 FOR UPDATE of Line_Location_Id NOWAIT;
123 Recinfo C%ROWTYPE;
124
125 l_purchase_basis po_lines_all.purchase_basis%TYPE;
126
127 BEGIN
128 OPEN C;
129 FETCH C INTO Recinfo;
130 if (C%NOTFOUND) then
131 CLOSE C;
132 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
133 APP_EXCEPTION.Raise_Exception;
134 end if;
135 CLOSE C;
136
137 -- SERVICES FPJ Bug 3262883
138 Begin
139 -- SQL What : gets the purchase basis from the PO line
140 -- SQL Why : To use in the lock row to not compare amounts for temp
141 -- labor lines
142 SELECT purchase_basis
143 INTO l_purchase_basis
144 FROM po_lines_all
145 WHERE po_line_id = Recinfo.po_line_id;
146 Exception
147 when others then
148 APP_EXCEPTION.RAISE_EXCEPTION;
149 end;
150
151 if (
152
153 (Recinfo.line_location_id = X_Line_Location_Id)
154 AND (Recinfo.po_header_id = X_Po_Header_Id)
155 AND (Recinfo.po_line_id = X_Po_Line_Id)
156 AND ( (Recinfo.quantity = X_Quantity)
157 OR ( (Recinfo.quantity IS NULL)
158 AND (X_Quantity IS NULL)))
159 AND ( (Recinfo.quantity_received = X_Quantity_Received)
160 OR ( (Recinfo.quantity_received IS NULL)
161 AND (X_Quantity_Received IS NULL)))
162 AND ( (Recinfo.quantity_accepted = X_Quantity_Accepted)
163 OR ( (Recinfo.quantity_accepted IS NULL)
164 AND (X_Quantity_Accepted IS NULL)))
165 AND ( (Recinfo.quantity_rejected = X_Quantity_Rejected)
166 OR ( (Recinfo.quantity_rejected IS NULL)
167 AND (X_Quantity_Rejected IS NULL)))
168 AND ( (Recinfo.quantity_billed = X_Quantity_Billed)
169 OR ( (Recinfo.quantity_billed IS NULL)
170 AND (X_Quantity_Billed IS NULL)))
171 AND ( (Recinfo.quantity_cancelled = X_Quantity_Cancelled)
172 OR ( (Recinfo.quantity_cancelled IS NULL)
173 AND (X_Quantity_Cancelled IS NULL)))
174 -- bug# 2249466.Do check for OPM related fields only if Common Receiving is
175 -- installed.
176 -- Mahesh Chandak(GML) Bug# 1548597 Include check for secondary_quantity and preferred grade also
177 --Start of 1548597
178 -- 2249466.add a call for CR installed or not.
179
180 /* BUG 3285605 : Issue resolved. Added the condition so that secondary values are not compared
181 for RFQs and QUOTATIONS. This has been done since RFQs and QUOTEs were kept out of scope while
182 building the integration of OPM and PURCHASING. Hence secondary values are not present on the
183 RFQ and QUOTE forms, but while autocreating OPM imported requisitions to RFQs these values are
184 populated to the PO_HEADERS table.*/
185
186 AND ( NOT GML_PO_FOR_PROCESS.check_po_for_proc
187 OR (
188
189 (X_shipment_type in ('RFQ','QUOTATION')) --BUG 3285605 added this condition so that
190 --secondary quantity is not compared for RFQ and Quotation
191 OR ((Recinfo.secondary_quantity = X_Secondary_Quantity)
192 OR ( (Recinfo.secondary_quantity IS NULL)
193 AND (X_Secondary_Quantity IS NULL)))
194 AND ( (Recinfo.preferred_grade = X_Preferred_Grade)
195 OR ( (Recinfo.preferred_grade IS NULL)
196 AND (X_preferred_grade IS NULL)))
197 AND ( (Recinfo.secondary_quantity_received = X_secondary_Quantity_Received)
198 OR ( (Recinfo.secondary_quantity_received IS NULL)
199 AND (X_Secondary_Quantity_Received IS NULL)))
200 AND ( (Recinfo.secondary_quantity_accepted = X_Secondary_Quantity_Accepted)
201 OR ( (Recinfo.secondary_quantity_accepted IS NULL)
202 AND (X_Secondary_Quantity_Accepted IS NULL)))
203 AND ( (Recinfo.secondary_quantity_rejected = X_Secondary_Quantity_Rejected)
204 OR ( (Recinfo.secondary_quantity_rejected IS NULL)
205 AND (X_Secondary_Quantity_Rejected IS NULL)))
206 AND ( (Recinfo.secondary_quantity_cancelled = X_Secondary_Quantity_Cancelled)
207 OR ( (Recinfo.secondary_quantity_cancelled IS NULL)
208 AND (X_Secondary_Quantity_Cancelled IS NULL)))
209 ))
210 --end of 1548597
211 /* Do not need unit_meas_lookup_code as it is NOT from PO_LINE_LOCATIONS
212 ** in the form.Also, it is just a display field
213 AND ( (Recinfo.unit_meas_lookup_code = X_Unit_Meas_Lookup_Code)
214 -- OR ( (Recinfo.unit_meas_lookup_code IS NULL)
215 -- AND (X_Unit_Meas_Lookup_Code IS NULL))) */
216 AND ( (Recinfo.po_release_id = X_Po_Release_Id)
217 OR ( (Recinfo.po_release_id IS NULL)
218 AND (X_Po_Release_Id IS NULL)))
219 AND ( (Recinfo.ship_to_location_id = X_Ship_To_Location_Id)
220 OR ( (Recinfo.ship_to_location_id IS NULL)
221 AND (X_Ship_To_Location_Id IS NULL)))
222 AND ( (Recinfo.ship_via_lookup_code = X_Ship_Via_Lookup_Code)
223 OR ( (Recinfo.ship_via_lookup_code IS NULL)
224 AND (X_Ship_Via_Lookup_Code IS NULL)))
225 AND ( (trunc(Recinfo.need_by_date) = trunc(X_Need_By_Date))
226 OR ( (Recinfo.need_by_date IS NULL)
227 AND (X_Need_By_Date IS NULL)))
228 AND ( (trunc(Recinfo.promised_date) = trunc(X_Promised_Date))
229 OR ( (Recinfo.promised_date IS NULL)
230 AND (X_Promised_Date IS NULL)))
231 AND ( (trunc(Recinfo.last_accept_date) = trunc(X_Last_Accept_Date))
232 OR ( (Recinfo.last_accept_date IS NULL)
233 AND (X_Last_Accept_Date IS NULL)))
234 AND ( (Recinfo.price_override = X_Price_Override)
235 OR ( (Recinfo.price_override IS NULL)
236 AND (X_Price_Override IS NULL)))
237 AND ( (nvl(Recinfo.encumbered_flag,'N') = X_Encumbered_Flag)
238 OR ( (Recinfo.encumbered_flag IS NULL)
239 AND (X_Encumbered_Flag IS NULL)))
240 AND ( (trunc(Recinfo.encumbered_date) = trunc(X_Encumbered_Date))
241 OR ( (Recinfo.encumbered_date IS NULL)
242 AND (X_Encumbered_Date IS NULL)))
243 AND ( (Recinfo.fob_lookup_code = X_Fob_Lookup_Code)
244 OR ( (Recinfo.fob_lookup_code IS NULL)
245 AND (X_Fob_Lookup_Code IS NULL)))
246 AND ( (Recinfo.freight_terms_lookup_code = X_Freight_Terms_Lookup_Code)
247 OR ( (Recinfo.freight_terms_lookup_code IS NULL)
248 AND (X_Freight_Terms_Lookup_Code IS NULL)))
249 AND ( (Recinfo.from_header_id = X_From_Header_Id)
250 OR ( (Recinfo.from_header_id IS NULL)
251 AND (X_From_Header_Id IS NULL)))
252 AND ( (Recinfo.from_line_id = X_From_Line_Id)
253 OR ( (Recinfo.from_line_id IS NULL)
254 AND (X_From_Line_Id IS NULL)))
255 AND ( (Recinfo.from_line_location_id = X_From_Line_Location_Id)
256 OR ( (Recinfo.from_line_location_id IS NULL)
257 AND (X_From_Line_Location_Id IS NULL)))
258 AND ( (trunc(Recinfo.start_date) = trunc(X_Start_Date))
259 OR ( (Recinfo.start_date IS NULL)
260 AND (X_Start_Date IS NULL)))
261 AND ( (trunc(Recinfo.end_date) = trunc(X_End_Date))
262 OR ( (Recinfo.end_date IS NULL)
263 AND (X_End_Date IS NULL)))
264 AND ( (Recinfo.lead_time = X_Lead_Time)
265 OR ( (Recinfo.lead_time IS NULL)
266 AND (X_Lead_Time IS NULL)))
267 AND ( (Recinfo.lead_time_unit = X_Lead_Time_Unit)
268 OR ( (Recinfo.lead_time_unit IS NULL)
269 AND (X_Lead_Time_Unit IS NULL)))
270 AND ( (Recinfo.price_discount = X_Price_Discount)
271 OR ( (Recinfo.price_discount IS NULL)
272 AND (X_Price_Discount IS NULL)))
273 AND ( (Recinfo.terms_id = X_Terms_Id)
274 OR ( (Recinfo.terms_id IS NULL)
275 AND (X_Terms_Id IS NULL)))
276 AND ( (Recinfo.approved_flag = X_Approved_Flag)
277 OR ( (Recinfo.approved_flag IS NULL)
278 AND (X_Approved_Flag IS NULL)))
279 AND ( (trunc(Recinfo.approved_date) = trunc(X_Approved_Date))
280 OR ( (Recinfo.approved_date IS NULL)
281 AND (X_Approved_Date IS NULL)))
282 AND ( (Recinfo.closed_flag = X_Closed_Flag)
283 OR ( (Recinfo.closed_flag IS NULL)
284 AND (X_Closed_Flag IS NULL)))
285 AND ( (Recinfo.cancel_flag = X_Cancel_Flag)
286 OR ( (Recinfo.cancel_flag IS NULL)
287 AND (X_Cancel_Flag IS NULL)))
288 AND ( (Recinfo.cancelled_by = X_Cancelled_By)
289 OR ( (Recinfo.cancelled_by IS NULL)
290 AND (X_Cancelled_By IS NULL)))
291 AND ( (trunc(Recinfo.cancel_date) = trunc(X_Cancel_Date))
292 OR ( (Recinfo.cancel_date IS NULL)
293 AND (X_Cancel_Date IS NULL)))
294 AND ( (Recinfo.cancel_reason = X_Cancel_Reason)
295 OR ( (Recinfo.cancel_reason IS NULL)
296 AND (X_Cancel_Reason IS NULL)))
297 AND ( (Recinfo.firm_status_lookup_code = X_Firm_Status_Lookup_Code)
298 OR ( (Recinfo.firm_status_lookup_code IS NULL)
299 AND (X_Firm_Status_Lookup_Code IS NULL)))
300 AND ( (Recinfo.attribute_category = X_Attribute_Category)
301 OR ( (Recinfo.attribute_category IS NULL)
302 AND (X_Attribute_Category IS NULL)))
303 AND ( (Recinfo.attribute1 = X_Attribute1)
304 OR ( (Recinfo.attribute1 IS NULL)
305 AND (X_Attribute1 IS NULL)))
306 AND ( (Recinfo.attribute2 = X_Attribute2)
307 OR ( (Recinfo.attribute2 IS NULL)
308 AND (X_Attribute2 IS NULL)))
309 AND ( (Recinfo.attribute3 = X_Attribute3)
310 OR ( (Recinfo.attribute3 IS NULL)
311 AND (X_Attribute3 IS NULL)))
312 AND ( (Recinfo.attribute4 = X_Attribute4)
313 OR ( (Recinfo.attribute4 IS NULL)
314 AND (X_Attribute4 IS NULL)))
315 AND ( (Recinfo.attribute5 = X_Attribute5)
316 OR ( (Recinfo.attribute5 IS NULL)
317 AND (X_Attribute5 IS NULL)))
318 AND ( (Recinfo.attribute6 = X_Attribute6)
319 OR ( (Recinfo.attribute6 IS NULL)
320 AND (X_Attribute6 IS NULL)))
321 AND ( (Recinfo.attribute7 = X_Attribute7)
322 OR ( (Recinfo.attribute7 IS NULL)
323 AND (X_Attribute7 IS NULL)))
324 AND ( (Recinfo.attribute8 = X_Attribute8)
325 OR ( (Recinfo.attribute8 IS NULL)
326 AND (X_Attribute8 IS NULL)))
327 AND ( (Recinfo.attribute9 = X_Attribute9)
328 OR ( (Recinfo.attribute9 IS NULL)
329 AND (X_Attribute9 IS NULL)))
330 AND ( (Recinfo.attribute10 = X_Attribute10)
331 OR ( (Recinfo.attribute10 IS NULL)
332 AND (X_Attribute10 IS NULL)))
333 AND ( (Recinfo.attribute11 = X_Attribute11)
334 OR ( (Recinfo.attribute11 IS NULL)
335 AND (X_Attribute11 IS NULL)))
336 AND ( (Recinfo.attribute12 = X_Attribute12)
337 OR ( (Recinfo.attribute12 IS NULL)
338 AND (X_Attribute12 IS NULL)))
339 AND ( (Recinfo.attribute13 = X_Attribute13)
340 OR ( (Recinfo.attribute13 IS NULL)
341 AND (X_Attribute13 IS NULL)))
342 AND ( (Recinfo.attribute14 = X_Attribute14)
343 OR ( (Recinfo.attribute14 IS NULL)
344 AND (X_Attribute14 IS NULL)))
345 AND ( (Recinfo.attribute15 = X_Attribute15)
346 OR ( (Recinfo.attribute15 IS NULL)
347 AND (X_Attribute15 IS NULL)))
348 -- <SERVICES FPJ START>
349 AND (l_purchase_basis = 'TEMP LABOR' OR
350 ( (Recinfo.amount = X_amount)
351 OR ( (Recinfo.amount IS NULL)
352 AND (X_amount IS NULL))))
353 -- <SERVICES FPJ END>
354 ) then
355 if (
356
357 ( (Recinfo.inspection_required_flag = X_Inspection_Required_Flag)
358 OR ( (Recinfo.inspection_required_flag IS NULL)
359 AND (X_Inspection_Required_Flag IS NULL)))
360 AND ( (Recinfo.receipt_required_flag = X_Receipt_Required_Flag)
361 OR ( (Recinfo.receipt_required_flag IS NULL)
362 AND (X_Receipt_Required_Flag IS NULL)))
363 AND ( (Recinfo.qty_rcv_tolerance = X_Qty_Rcv_Tolerance)
364 OR ( (Recinfo.qty_rcv_tolerance IS NULL)
365 AND (X_Qty_Rcv_Tolerance IS NULL)))
366 AND ( (Recinfo.qty_rcv_exception_code = X_Qty_Rcv_Exception_Code)
367 OR ( (Recinfo.qty_rcv_exception_code IS NULL)
368 AND (X_Qty_Rcv_Exception_Code IS NULL)))
369 AND ( (Recinfo.enforce_ship_to_location_code = X_Enforce_Ship_To_Location)
370 OR ( (Recinfo.enforce_ship_to_location_code IS NULL)
371 AND (X_Enforce_Ship_To_Location IS NULL)))
372 AND ( (Recinfo.allow_substitute_receipts_flag = X_Allow_Substitute_Receipts)
373 OR ( (Recinfo.allow_substitute_receipts_flag IS NULL)
374 AND (X_Allow_Substitute_Receipts IS NULL)))
375 AND ( (Recinfo.days_early_receipt_allowed = X_Days_Early_Receipt_Allowed)
376 OR ( (Recinfo.days_early_receipt_allowed IS NULL)
377 AND (X_Days_Early_Receipt_Allowed IS NULL)))
378 AND ( (Recinfo.days_late_receipt_allowed = X_Days_Late_Receipt_Allowed)
379 OR ( (Recinfo.days_late_receipt_allowed IS NULL)
380 AND (X_Days_Late_Receipt_Allowed IS NULL)))
381 AND ( (Recinfo.receipt_days_exception_code = X_Receipt_Days_Exception_Code)
382 OR ( (Recinfo.receipt_days_exception_code IS NULL)
383 AND (X_Receipt_Days_Exception_Code IS NULL)))
384 AND ( (Recinfo.invoice_close_tolerance = X_Invoice_Close_Tolerance)
385 OR ( (Recinfo.invoice_close_tolerance IS NULL)
386 AND (X_Invoice_Close_Tolerance IS NULL)))
387 AND ( (Recinfo.receive_close_tolerance = X_Receive_Close_Tolerance)
388 OR ( (Recinfo.receive_close_tolerance IS NULL)
389 AND (X_Receive_Close_Tolerance IS NULL)))
390 AND ( (NVL(Recinfo.match_option,'P') = NVL(X_Invoice_Match_Option,'P'))) --bgu, Dec. 7, 98
391 AND ( (Recinfo.ship_to_organization_id = X_Ship_To_Organization_Id)
392 OR ( (Recinfo.ship_to_organization_id IS NULL)
393 AND (X_Ship_To_Organization_Id IS NULL)))
394 AND ( (Recinfo.shipment_num = X_Shipment_Num)
395 OR ( (Recinfo.shipment_num IS NULL)
396 AND (X_Shipment_Num IS NULL)))
397 AND ( (Recinfo.source_shipment_id = X_Source_Shipment_Id)
398 OR ( (Recinfo.source_shipment_id IS NULL)
399 AND (X_Source_Shipment_Id IS NULL)))
400 AND (Recinfo.shipment_type = X_Shipment_Type)
401 AND ( (Recinfo.closed_code = X_Closed_Code)
402 OR ( (Recinfo.closed_code IS NULL)
403 AND (X_Closed_Code IS NULL)))
404 AND ( (Recinfo.government_context = X_Government_Context)
405 OR ( (Recinfo.government_context IS NULL)
406 AND (X_Government_Context IS NULL)))
407 AND ( (Recinfo.receiving_routing_id = X_Receiving_Routing_Id)
408 OR ( (Recinfo.receiving_routing_id IS NULL)
409 AND (X_Receiving_Routing_Id IS NULL)))
410 AND ( (Recinfo.accrue_on_receipt_flag = X_Accrue_On_Receipt_Flag)
411 OR ( (Recinfo.accrue_on_receipt_flag IS NULL)
412 AND (X_Accrue_On_Receipt_Flag IS NULL)))
413 AND ( (Recinfo.closed_reason = X_Closed_Reason)
414 OR ( (Recinfo.closed_reason IS NULL)
415 AND (X_Closed_Reason IS NULL)))
416 AND ( (trunc(Recinfo.closed_date) = trunc(X_Closed_Date))
417 OR ( (Recinfo.closed_date IS NULL)
418 AND (X_Closed_Date IS NULL)))
419 AND ( (Recinfo.closed_by = X_Closed_By)
420 OR ( (Recinfo.closed_by IS NULL)
421 AND (X_Closed_By IS NULL)))
422 AND ( (Recinfo.global_attribute_category = X_Global_Attribute_Category)
423 OR ( (Recinfo.global_attribute_category IS NULL)
424 AND (X_Global_Attribute_Category IS NULL)))
425 AND ( (Recinfo.global_attribute1 = X_Global_Attribute1)
426 OR ( (Recinfo.global_attribute1 IS NULL)
427 AND (X_Global_Attribute1 IS NULL)))
428 AND ( (Recinfo.global_attribute2 = X_Global_Attribute2)
429 OR ( (Recinfo.global_attribute2 IS NULL)
430 AND (X_Global_Attribute2 IS NULL)))
431 AND ( (Recinfo.global_attribute3 = X_Global_Attribute3)
432 OR ( (Recinfo.global_attribute3 IS NULL)
433 AND (X_Global_Attribute3 IS NULL)))
434 AND ( (Recinfo.global_attribute4 = X_Global_Attribute4)
435 OR ( (Recinfo.global_attribute4 IS NULL)
436 AND (X_Global_Attribute4 IS NULL)))
437 AND ( (Recinfo.global_attribute5 = X_Global_Attribute5)
438 OR ( (Recinfo.global_attribute5 IS NULL)
439 AND (X_Global_Attribute5 IS NULL)))
440 AND ( (Recinfo.global_attribute6 = X_Global_Attribute6)
441 OR ( (Recinfo.global_attribute6 IS NULL)
442 AND (X_Global_Attribute6 IS NULL)))
443 AND ( (Recinfo.global_attribute7 = X_Global_Attribute7)
444 OR ( (Recinfo.global_attribute7 IS NULL)
445 AND (X_Global_Attribute7 IS NULL)))
446 AND ( (Recinfo.global_attribute8 = X_Global_Attribute8)
447 OR ( (Recinfo.global_attribute8 IS NULL)
448 AND (X_Global_Attribute8 IS NULL)))
449 AND ( (Recinfo.global_attribute9 = X_Global_Attribute9)
450 OR ( (Recinfo.global_attribute9 IS NULL)
451 AND (X_Global_Attribute9 IS NULL)))
452 AND ( (Recinfo.global_attribute10 = X_Global_Attribute10)
453 OR ( (Recinfo.global_attribute10 IS NULL)
454 AND (X_Global_Attribute10 IS NULL)))
455 AND ( (Recinfo.global_attribute11 = X_Global_Attribute11)
456 OR ( (Recinfo.global_attribute11 IS NULL)
457 AND (X_Global_Attribute11 IS NULL)))
458 AND ( (Recinfo.global_attribute12 = X_Global_Attribute12)
459 OR ( (Recinfo.global_attribute12 IS NULL)
460 AND (X_Global_Attribute12 IS NULL)))
461 AND ( (Recinfo.global_attribute13 = X_Global_Attribute13)
462 OR ( (Recinfo.global_attribute13 IS NULL)
463 AND (X_Global_Attribute13 IS NULL)))
464 AND ( (Recinfo.global_attribute14 = X_Global_Attribute14)
465 OR ( (Recinfo.global_attribute14 IS NULL)
466 AND (X_Global_Attribute14 IS NULL)))
467 AND ( (Recinfo.global_attribute15 = X_Global_Attribute15)
468 OR ( (Recinfo.global_attribute15 IS NULL)
469 AND (X_Global_Attribute15 IS NULL)))
470 AND ( (Recinfo.global_attribute16 = X_Global_Attribute16)
471 OR ( (Recinfo.global_attribute16 IS NULL)
472 AND (X_Global_Attribute16 IS NULL)))
473 AND ( (Recinfo.global_attribute17 = X_Global_Attribute17)
474 OR ( (Recinfo.global_attribute17 IS NULL)
475 AND (X_Global_Attribute17 IS NULL)))
476 AND ( (Recinfo.global_attribute18 = X_Global_Attribute18)
477 OR ( (Recinfo.global_attribute18 IS NULL)
478 AND (X_Global_Attribute18 IS NULL)))
479 AND ( (Recinfo.global_attribute19 = X_Global_Attribute19)
480 OR ( (Recinfo.global_attribute19 IS NULL)
481 AND (X_Global_Attribute19 IS NULL)))
482 AND ( (Recinfo.global_attribute20 = X_Global_Attribute20)
483 OR ( (Recinfo.global_attribute20 IS NULL)
484 AND (X_Global_Attribute20 IS NULL)))
485 AND ( (Recinfo.country_of_origin_code = X_Country_Of_Origin_Code)
486 OR ( (Recinfo.country_of_origin_code IS NULL)
487 AND (X_Country_Of_Origin_Code IS NULL)))
488 ) then
489 return;
490 else
491 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
492 APP_EXCEPTION.RAISE_EXCEPTION;
493 end if;
494 else
495 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
496 APP_EXCEPTION.RAISE_EXCEPTION;
497
498 end if;
499
500 END Lock_Row;
501 END PO_LINE_LOCATIONS_PKG_S1;