[Home] [Help]
PACKAGE BODY: APPS.MTL_TRANSACTIONS_INTERFACE_PKG
Source
1 PACKAGE BODY MTL_TRANSACTIONS_INTERFACE_PKG as
2 /* $Header: INVTVPTB.pls 120.2 2006/05/23 13:05:46 pannapra noship $ */
3 /* 31-May-2000 Added three columns Lpn_Id, Transfer_Lpn_Id, Transfer_Cost_Group_Id
4 to take care of inventory enhancements related to WMS changes */
5
6 PROCEDURE Lock_Row(X_Rowid VARCHAR2,
7 X_Source_Code VARCHAR2,
8 X_Source_Line_Id NUMBER,
9 X_Source_Header_Id NUMBER,
10 X_Process_Flag NUMBER,
11 X_Transaction_Mode NUMBER,
12 X_Lock_Flag NUMBER,
13 X_Inventory_Item_Id NUMBER,
14 X_Item_Segment1 VARCHAR2,
15 X_Item_Segment2 VARCHAR2,
16 X_Item_Segment3 VARCHAR2,
17 X_Item_Segment4 VARCHAR2,
18 X_Item_Segment5 VARCHAR2,
19 X_Item_Segment6 VARCHAR2,
20 X_Item_Segment7 VARCHAR2,
21 X_Item_Segment8 VARCHAR2,
22 X_Item_Segment9 VARCHAR2,
23 X_Item_Segment10 VARCHAR2,
24 X_Item_Segment11 VARCHAR2,
25 X_Item_Segment12 VARCHAR2,
26 X_Item_Segment13 VARCHAR2,
27 X_Item_Segment14 VARCHAR2,
28 X_Item_Segment15 VARCHAR2,
29 X_Item_Segment16 VARCHAR2,
30 X_Item_Segment17 VARCHAR2,
31 X_Item_Segment18 VARCHAR2,
32 X_Item_Segment19 VARCHAR2,
33 X_Item_Segment20 VARCHAR2,
34 X_Revision VARCHAR2,
35 X_Organization_Id NUMBER,
36 X_Transaction_Quantity NUMBER,
37 X_Primary_Quantity NUMBER,
38 X_Transaction_Uom VARCHAR2,
39 X_Transaction_Date DATE,
40 X_Subinventory_Code VARCHAR2,
41 X_Locator_Id NUMBER,
42 X_Loc_Segment1 VARCHAR2,
43 X_Loc_Segment2 VARCHAR2,
44 X_Loc_Segment3 VARCHAR2,
45 X_Loc_Segment4 VARCHAR2,
46 X_Loc_Segment5 VARCHAR2,
47 X_Loc_Segment6 VARCHAR2,
48 X_Loc_Segment7 VARCHAR2,
49 X_Loc_Segment8 VARCHAR2,
50 X_Loc_Segment9 VARCHAR2,
51 X_Loc_Segment10 VARCHAR2,
52 X_Loc_Segment11 VARCHAR2,
53 X_Loc_Segment12 VARCHAR2,
54 X_Loc_Segment13 VARCHAR2,
55 X_Loc_Segment14 VARCHAR2,
56 X_Loc_Segment15 VARCHAR2,
57 X_Loc_Segment16 VARCHAR2,
58 X_Loc_Segment17 VARCHAR2,
59 X_Loc_Segment18 VARCHAR2,
60 X_Loc_Segment19 VARCHAR2,
61 X_Loc_Segment20 VARCHAR2,
62 X_Transaction_Source_Id NUMBER,
63 X_Dsp_Segment1 VARCHAR2,
64 X_Dsp_Segment2 VARCHAR2,
65 X_Dsp_Segment3 VARCHAR2,
66 X_Dsp_Segment4 VARCHAR2,
67 X_Dsp_Segment5 VARCHAR2,
68 X_Dsp_Segment6 VARCHAR2,
69 X_Dsp_Segment7 VARCHAR2,
70 X_Dsp_Segment8 VARCHAR2,
71 X_Dsp_Segment9 VARCHAR2,
72 X_Dsp_Segment10 VARCHAR2,
73 X_Dsp_Segment11 VARCHAR2,
74 X_Dsp_Segment12 VARCHAR2,
75 X_Dsp_Segment13 VARCHAR2,
76 X_Dsp_Segment14 VARCHAR2,
77 X_Dsp_Segment15 VARCHAR2,
78 X_Dsp_Segment16 VARCHAR2,
79 X_Dsp_Segment17 VARCHAR2,
80 X_Dsp_Segment18 VARCHAR2,
81 X_Dsp_Segment19 VARCHAR2,
82 X_Dsp_Segment20 VARCHAR2,
83 X_Dsp_Segment21 VARCHAR2,
84 X_Dsp_Segment22 VARCHAR2,
85 X_Dsp_Segment23 VARCHAR2,
86 X_Dsp_Segment24 VARCHAR2,
87 X_Dsp_Segment25 VARCHAR2,
88 X_Dsp_Segment26 VARCHAR2,
89 X_Dsp_Segment27 VARCHAR2,
90 X_Dsp_Segment28 VARCHAR2,
91 X_Dsp_Segment29 VARCHAR2,
92 X_Dsp_Segment30 VARCHAR2,
93 X_Transaction_Source_Name VARCHAR2,
94 X_Transaction_Source_Type_Id NUMBER,
95 X_Transaction_Action_Id NUMBER,
96 X_Transaction_Type_Id NUMBER,
97 X_Reason_Id NUMBER,
98 X_Transaction_Reference VARCHAR2,
99 X_Transaction_Cost NUMBER,
100 X_cost_group_id NUMBER,
101 X_Distribution_Account_Id NUMBER,
102 X_Dst_Segment1 VARCHAR2,
103 X_Dst_Segment2 VARCHAR2,
104 X_Dst_Segment3 VARCHAR2,
105 X_Dst_Segment4 VARCHAR2,
106 X_Dst_Segment5 VARCHAR2,
107 X_Dst_Segment6 VARCHAR2,
108 X_Dst_Segment7 VARCHAR2,
109 X_Dst_Segment8 VARCHAR2,
110 X_Dst_Segment9 VARCHAR2,
111 X_Dst_Segment10 VARCHAR2,
112 X_Dst_Segment11 VARCHAR2,
113 X_Dst_Segment12 VARCHAR2,
114 X_Dst_Segment13 VARCHAR2,
115 X_Dst_Segment14 VARCHAR2,
116 X_Dst_Segment15 VARCHAR2,
117 X_Dst_Segment16 VARCHAR2,
118 X_Dst_Segment17 VARCHAR2,
119 X_Dst_Segment18 VARCHAR2,
120 X_Dst_Segment19 VARCHAR2,
121 X_Dst_Segment20 VARCHAR2,
122 X_Dst_Segment21 VARCHAR2,
123 X_Dst_Segment22 VARCHAR2,
124 X_Dst_Segment23 VARCHAR2,
125 X_Dst_Segment24 VARCHAR2,
126 X_Dst_Segment25 VARCHAR2,
127 X_Dst_Segment26 VARCHAR2,
128 X_Dst_Segment27 VARCHAR2,
129 X_Dst_Segment28 VARCHAR2,
130 X_Dst_Segment29 VARCHAR2,
131 X_Dst_Segment30 VARCHAR2,
132 X_Currency_Code VARCHAR2,
133 X_Currency_Conversion_Type VARCHAR2,
134 X_Currency_Conversion_Rate NUMBER,
135 X_Ussgl_Transaction_Code VARCHAR2,
136 X_Wip_Entity_Type NUMBER,
137 X_Schedule_Id NUMBER,
138 X_Employee_Code VARCHAR2,
139 X_Department_Id NUMBER,
140 X_Schedule_Update_Code NUMBER,
141 X_Setup_Teardown_Code NUMBER,
142 X_Primary_Switch NUMBER,
143 X_Mrp_Code NUMBER,
144 X_Operation_Seq_Num NUMBER,
145 X_Repetitive_Line_Id NUMBER,
146 X_Line_Item_Num NUMBER,
147 X_Ship_To_Location_Id NUMBER,
148 X_Encumbrance_Account NUMBER,
149 X_Encumbrance_Amount NUMBER,
150 X_Transfer_Subinventory VARCHAR2,
151 X_Transfer_Organization NUMBER,
152 X_Transfer_Locator NUMBER,
153 X_Xfer_Loc_Segment1 VARCHAR2,
154 X_Xfer_Loc_Segment2 VARCHAR2,
155 X_Xfer_Loc_Segment3 VARCHAR2,
156 X_Xfer_Loc_Segment4 VARCHAR2,
157 X_Xfer_Loc_Segment5 VARCHAR2,
158 X_Xfer_Loc_Segment6 VARCHAR2,
159 X_Xfer_Loc_Segment7 VARCHAR2,
160 X_Xfer_Loc_Segment8 VARCHAR2,
161 X_Xfer_Loc_Segment9 VARCHAR2,
162 X_Xfer_Loc_Segment10 VARCHAR2,
163 X_Xfer_Loc_Segment11 VARCHAR2,
164 X_Xfer_Loc_Segment12 VARCHAR2,
165 X_Xfer_Loc_Segment13 VARCHAR2,
166 X_Xfer_Loc_Segment14 VARCHAR2,
167 X_Xfer_Loc_Segment15 VARCHAR2,
168 X_Xfer_Loc_Segment16 VARCHAR2,
169 X_Xfer_Loc_Segment17 VARCHAR2,
170 X_Xfer_Loc_Segment18 VARCHAR2,
171 X_Xfer_Loc_Segment19 VARCHAR2,
172 X_Xfer_Loc_Segment20 VARCHAR2,
173 X_Shipment_Number VARCHAR2,
174 X_Transportation_Cost NUMBER,
175 X_Transportation_Account NUMBER,
176 X_Transfer_Cost NUMBER,
177 X_Freight_Code VARCHAR2,
178 X_Containers NUMBER,
179 X_Waybill_Airbill VARCHAR2,
180 X_Expected_Arrival_Date DATE,
181 X_New_Average_Cost NUMBER,
182 X_Value_Change NUMBER,
183 X_Percentage_Change NUMBER,
184 X_Required_Flag VARCHAR2,
185 X_Attribute_Category VARCHAR2,
186 X_Attribute1 VARCHAR2,
187 X_Attribute2 VARCHAR2,
188 X_Attribute3 VARCHAR2,
189 X_Attribute4 VARCHAR2,
190 X_Attribute5 VARCHAR2,
191 X_Attribute6 VARCHAR2,
192 X_Attribute7 VARCHAR2,
193 X_Attribute8 VARCHAR2,
194 X_Attribute9 VARCHAR2,
195 X_Attribute10 VARCHAR2,
196 X_Attribute11 VARCHAR2,
197 X_Attribute12 VARCHAR2,
198 X_Attribute13 VARCHAR2,
199 X_Attribute14 VARCHAR2,
200 X_Attribute15 VARCHAR2,
201 X_Validation_Required NUMBER,
202 X_Negative_Req_Flag NUMBER,
203 X_Shippable_Flag VARCHAR2,
204 X_Currency_Conversion_Date DATE,
205 X_Movement_Id NUMBER,
206 X_Source_Project_Id NUMBER,
207 X_Source_Task_Id NUMBER,
208 X_Project_Id NUMBER,
209 X_Task_Id NUMBER,
210 X_To_Project_Id NUMBER,
211 X_To_Task_Id NUMBER,
212 X_Pa_Expenditure_Org_Id NUMBER,
213 X_Expenditure_Type VARCHAR2,
214 X_Lpn_Id NUMBER,
215 X_Transfer_Lpn_Id NUMBER,
216 X_Transfer_Cost_Group_Id NUMBER,
217 X_content_lpn_id NUMBER,
218 X_demand_source_header_id NUMBER, --2520630
219 X_demand_source_line VARCHAR2, --2520630
220 X_demand_source_delivery VARCHAR2, --2520630
221 x_owning_organization_id NUMBER,
222 x_owning_tp_type NUMBER,
223 x_planning_organization_id NUMBER,
224 x_planning_tp_type NUMBER,
225 ---INVCON kkillams
226 x_secondary_qty NUMBER,
227 x_secondary_uom_code VARCHAR2
228 ---END INVCON kkillams
229 ) IS
230 CURSOR C IS
231 SELECT *
232 FROM MTL_TRANSACTIONS_INTERFACE
233 WHERE rowid = X_Rowid
234 FOR UPDATE of transaction_header_id NOWAIT;
235 Recinfo C%ROWTYPE;
236
237
238 BEGIN
239 OPEN C;
240 FETCH C INTO Recinfo;
241 if (C%NOTFOUND) then
242 CLOSE C;
243 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
244 APP_EXCEPTION.Raise_Exception;
245 end if;
246 CLOSE C;
247
248 if (
249 (Recinfo.source_code = X_Source_Code)
250 AND (Recinfo.source_line_id = X_Source_Line_Id)
251 AND (Recinfo.source_header_id = X_Source_Header_Id)
252 AND (Recinfo.process_flag = X_Process_Flag)
253 AND (Recinfo.transaction_mode = X_Transaction_Mode)
254 AND ( (Recinfo.lock_flag = X_Lock_Flag)
255 OR ( (Recinfo.lock_flag IS NULL)
256 AND (X_Lock_Flag IS NULL)))
257 AND ( (Recinfo.inventory_item_id = X_Inventory_Item_Id)
258 OR ( (Recinfo.inventory_item_id IS NULL)
259 AND (X_Inventory_Item_Id IS NULL)))
260 AND ( (Recinfo.item_segment1 = X_Item_Segment1)
261 OR ( (Recinfo.item_segment1 IS NULL)
262 AND (X_Item_Segment1 IS NULL)))
263 AND ( (Recinfo.item_segment2 = X_Item_Segment2)
264 OR ( (Recinfo.item_segment2 IS NULL)
265 AND (X_Item_Segment2 IS NULL)))
266 AND ( (Recinfo.item_segment3 = X_Item_Segment3)
267 OR ( (Recinfo.item_segment3 IS NULL)
268 AND (X_Item_Segment3 IS NULL)))
269 AND ( (Recinfo.item_segment4 = X_Item_Segment4)
270 OR ( (Recinfo.item_segment4 IS NULL)
271 AND (X_Item_Segment4 IS NULL)))
272 AND ( (Recinfo.item_segment5 = X_Item_Segment5)
273 OR ( (Recinfo.item_segment5 IS NULL)
274 AND (X_Item_Segment5 IS NULL)))
275 AND ( (Recinfo.item_segment6 = X_Item_Segment6)
276 OR ( (Recinfo.item_segment6 IS NULL)
277 AND (X_Item_Segment6 IS NULL)))
278 AND ( (Recinfo.item_segment7 = X_Item_Segment7)
279 OR ( (Recinfo.item_segment7 IS NULL)
280 AND (X_Item_Segment7 IS NULL)))
281 AND ( (Recinfo.item_segment8 = X_Item_Segment8)
282 OR ( (Recinfo.item_segment8 IS NULL)
283 AND (X_Item_Segment8 IS NULL)))
284 AND ( (Recinfo.item_segment9 = X_Item_Segment9)
285 OR ( (Recinfo.item_segment9 IS NULL)
286 AND (X_Item_Segment9 IS NULL)))
287 AND ( (Recinfo.item_segment10 = X_Item_Segment10)
288 OR ( (Recinfo.item_segment10 IS NULL)
289 AND (X_Item_Segment10 IS NULL)))
290 AND ( (Recinfo.item_segment11 = X_Item_Segment11)
291 OR ( (Recinfo.item_segment11 IS NULL)
292 AND (X_Item_Segment11 IS NULL)))
293 AND ( (Recinfo.item_segment12 = X_Item_Segment12)
294 OR ( (Recinfo.item_segment12 IS NULL)
295 AND (X_Item_Segment12 IS NULL)))
296 AND ( (Recinfo.item_segment13 = X_Item_Segment13)
297 OR ( (Recinfo.item_segment13 IS NULL)
298 AND (X_Item_Segment13 IS NULL)))
299 AND ( (Recinfo.item_segment14 = X_Item_Segment14)
300 OR ( (Recinfo.item_segment14 IS NULL)
301 AND (X_Item_Segment14 IS NULL)))
302 AND ( (Recinfo.item_segment15 = X_Item_Segment15)
303 OR ( (Recinfo.item_segment15 IS NULL)
304 AND (X_Item_Segment15 IS NULL)))
305 AND ( (Recinfo.item_segment16 = X_Item_Segment16)
306 OR ( (Recinfo.item_segment16 IS NULL)
307 AND (X_Item_Segment16 IS NULL)))
308 AND ( (Recinfo.item_segment17 = X_Item_Segment17)
309 OR ( (Recinfo.item_segment17 IS NULL)
310 AND (X_Item_Segment17 IS NULL)))
311 AND ( (Recinfo.item_segment18 = X_Item_Segment18)
312 OR ( (Recinfo.item_segment18 IS NULL)
313 AND (X_Item_Segment18 IS NULL)))
314 AND ( (Recinfo.item_segment19 = X_Item_Segment19)
315 OR ( (Recinfo.item_segment19 IS NULL)
316 AND (X_Item_Segment19 IS NULL)))
317 AND ( (Recinfo.item_segment20 = X_Item_Segment20)
318 OR ( (Recinfo.item_segment20 IS NULL)
319 AND (X_Item_Segment20 IS NULL)))
320 AND ( (Recinfo.revision = X_Revision)
321 OR ( (Recinfo.revision IS NULL)
322 AND (X_Revision IS NULL)))
323 AND (Recinfo.organization_id = X_Organization_Id)
324 AND (Recinfo.transaction_quantity = X_Transaction_Quantity)
325 AND ( (Recinfo.primary_quantity = X_Primary_Quantity)
326 OR ( (Recinfo.primary_quantity IS NULL)
327 AND (X_Primary_Quantity IS NULL)))
328 AND (Recinfo.transaction_uom = X_Transaction_Uom)
329 AND (Recinfo.transaction_date = X_Transaction_Date)
330 AND ( (Recinfo.subinventory_code = X_Subinventory_Code)
331 OR ( (Recinfo.subinventory_code IS NULL)
332 AND (X_Subinventory_Code IS NULL)))
333 AND ( (Recinfo.locator_id = X_Locator_Id)
334 OR ( (Recinfo.locator_id IS NULL)
335 AND (X_Locator_Id IS NULL)))
336 AND ( (Recinfo.loc_segment1 = X_Loc_Segment1)
337 OR ( (Recinfo.loc_segment1 IS NULL)
338 AND (X_Loc_Segment1 IS NULL)))
339 AND ( (Recinfo.loc_segment2 = X_Loc_Segment2)
340 OR ( (Recinfo.loc_segment2 IS NULL)
341 AND (X_Loc_Segment2 IS NULL)))
342 AND ( (Recinfo.loc_segment3 = X_Loc_Segment3)
343 OR ( (Recinfo.loc_segment3 IS NULL)
344 AND (X_Loc_Segment3 IS NULL)))
345 AND ( (Recinfo.loc_segment4 = X_Loc_Segment4)
346 OR ( (Recinfo.loc_segment4 IS NULL)
347 AND (X_Loc_Segment4 IS NULL)))
348 AND ( (Recinfo.loc_segment5 = X_Loc_Segment5)
349 OR ( (Recinfo.loc_segment5 IS NULL)
350 AND (X_Loc_Segment5 IS NULL)))
351 AND ( (Recinfo.loc_segment6 = X_Loc_Segment6)
352 OR ( (Recinfo.loc_segment6 IS NULL)
353 AND (X_Loc_Segment6 IS NULL)))
354 AND ( (Recinfo.loc_segment7 = X_Loc_Segment7)
355 OR ( (Recinfo.loc_segment7 IS NULL)
356 AND (X_Loc_Segment7 IS NULL)))
357 AND ( (Recinfo.loc_segment8 = X_Loc_Segment8)
358 OR ( (Recinfo.loc_segment8 IS NULL)
359 AND (X_Loc_Segment8 IS NULL)))
360 AND ( (Recinfo.loc_segment9 = X_Loc_Segment9)
361 OR ( (Recinfo.loc_segment9 IS NULL)
362 AND (X_Loc_Segment9 IS NULL)))
363 AND ( (Recinfo.loc_segment10 = X_Loc_Segment10)
364 OR ( (Recinfo.loc_segment10 IS NULL)
365 AND (X_Loc_Segment10 IS NULL)))
366 AND ( (Recinfo.loc_segment11 = X_Loc_Segment11)
367 OR ( (Recinfo.loc_segment11 IS NULL)
368 AND (X_Loc_Segment11 IS NULL)))
369 AND ( (Recinfo.loc_segment12 = X_Loc_Segment12)
370 OR ( (Recinfo.loc_segment12 IS NULL)
371 AND (X_Loc_Segment12 IS NULL)))
372 AND ( (Recinfo.loc_segment13 = X_Loc_Segment13)
373 OR ( (Recinfo.loc_segment13 IS NULL)
374 AND (X_Loc_Segment13 IS NULL)))
375 AND ( (Recinfo.loc_segment14 = X_Loc_Segment14)
376 OR ( (Recinfo.loc_segment14 IS NULL)
377 AND (X_Loc_Segment14 IS NULL)))
378 AND ( (Recinfo.loc_segment15 = X_Loc_Segment15)
379 OR ( (Recinfo.loc_segment15 IS NULL)
380 AND (X_Loc_Segment15 IS NULL)))
381 AND ( (Recinfo.loc_segment16 = X_Loc_Segment16)
382 OR ( (Recinfo.loc_segment16 IS NULL)
383 AND (X_Loc_Segment16 IS NULL)))
384 AND ( (Recinfo.loc_segment17 = X_Loc_Segment17)
385 OR ( (Recinfo.loc_segment17 IS NULL)
386 AND (X_Loc_Segment17 IS NULL)))
387 AND ( (Recinfo.loc_segment18 = X_Loc_Segment18)
388 OR ( (Recinfo.loc_segment18 IS NULL)
389 AND (X_Loc_Segment18 IS NULL)))
390 AND ( (Recinfo.loc_segment19 = X_Loc_Segment19)
391 OR ( (Recinfo.loc_segment19 IS NULL)
392 AND (X_Loc_Segment19 IS NULL)))
393 AND ( (Recinfo.loc_segment20 = X_Loc_Segment20)
394 OR ( (Recinfo.loc_segment20 IS NULL)
395 AND (X_Loc_Segment20 IS NULL)))
396 AND ( (Recinfo.transaction_source_id = X_Transaction_Source_Id)
397 OR ( (Recinfo.transaction_source_id IS NULL)
398 AND (X_Transaction_Source_Id IS NULL)))
399 ---INVCON kkillams
400 AND ( (Recinfo.secondary_transaction_quantity = x_secondary_qty)
401 OR ( (Recinfo.secondary_transaction_quantity IS NULL)
402 AND (x_secondary_qty IS NULL)))
403 /*INVCON Nsinha
404 AND ( (Recinfo.secondary_uom_code = X_secondary_uom_code)
405 OR ( (Recinfo.secondary_uom_code IS NULL)
406 AND (X_secondary_uom_code IS NULL)))
407 */
408 ---END INVCON kkillams
409 ) THEN
410 if (
411 ( (Recinfo.dsp_segment1 = X_Dsp_Segment1)
412 OR ( (Recinfo.dsp_segment1 IS NULL)
413 AND (X_Dsp_Segment1 IS NULL)))
414 AND ( (Recinfo.dsp_segment2 = X_Dsp_Segment2)
415 OR ( (Recinfo.dsp_segment2 IS NULL)
416 AND (X_Dsp_Segment2 IS NULL)))
417 AND ( (Recinfo.dsp_segment3 = X_Dsp_Segment3)
418 OR ( (Recinfo.dsp_segment3 IS NULL)
419 AND (X_Dsp_Segment3 IS NULL)))
420 AND ( (Recinfo.dsp_segment4 = X_Dsp_Segment4)
421 OR ( (Recinfo.dsp_segment4 IS NULL)
422 AND (X_Dsp_Segment4 IS NULL)))
423 AND ( (Recinfo.dsp_segment5 = X_Dsp_Segment5)
424 OR ( (Recinfo.dsp_segment5 IS NULL)
425 AND (X_Dsp_Segment5 IS NULL)))
426 AND ( (Recinfo.dsp_segment6 = X_Dsp_Segment6)
427 OR ( (Recinfo.dsp_segment6 IS NULL)
428 AND (X_Dsp_Segment6 IS NULL)))
429 AND ( (Recinfo.dsp_segment7 = X_Dsp_Segment7)
430 OR ( (Recinfo.dsp_segment7 IS NULL)
431 AND (X_Dsp_Segment7 IS NULL)))
432 AND ( (Recinfo.dsp_segment8 = X_Dsp_Segment8)
433 OR ( (Recinfo.dsp_segment8 IS NULL)
434 AND (X_Dsp_Segment8 IS NULL)))
435 AND ( (Recinfo.dsp_segment9 = X_Dsp_Segment9)
436 OR ( (Recinfo.dsp_segment9 IS NULL)
437 AND (X_Dsp_Segment9 IS NULL)))
438 AND ( (Recinfo.dsp_segment10 = X_Dsp_Segment10)
439 OR ( (Recinfo.dsp_segment10 IS NULL)
440 AND (X_Dsp_Segment10 IS NULL)))
441 AND ( (Recinfo.dsp_segment11 = X_Dsp_Segment11)
442 OR ( (Recinfo.dsp_segment11 IS NULL)
443 AND (X_Dsp_Segment11 IS NULL)))
444 AND ( (Recinfo.dsp_segment12 = X_Dsp_Segment12)
445 OR ( (Recinfo.dsp_segment12 IS NULL)
446 AND (X_Dsp_Segment12 IS NULL)))
447 AND ( (Recinfo.dsp_segment13 = X_Dsp_Segment13)
448 OR ( (Recinfo.dsp_segment13 IS NULL)
449 AND (X_Dsp_Segment13 IS NULL)))
450 AND ( (Recinfo.dsp_segment14 = X_Dsp_Segment14)
451 OR ( (Recinfo.dsp_segment14 IS NULL)
452 AND (X_Dsp_Segment14 IS NULL)))
453 AND ( (Recinfo.dsp_segment15 = X_Dsp_Segment15)
454 OR ( (Recinfo.dsp_segment15 IS NULL)
455 AND (X_Dsp_Segment15 IS NULL)))
456 AND ( (Recinfo.dsp_segment16 = X_Dsp_Segment16)
457 OR ( (Recinfo.dsp_segment16 IS NULL)
458 AND (X_Dsp_Segment16 IS NULL)))
459 AND ( (Recinfo.dsp_segment17 = X_Dsp_Segment17)
460 OR ( (Recinfo.dsp_segment17 IS NULL)
461 AND (X_Dsp_Segment17 IS NULL)))
462 AND ( (Recinfo.dsp_segment18 = X_Dsp_Segment18)
463 OR ( (Recinfo.dsp_segment18 IS NULL)
464 AND (X_Dsp_Segment18 IS NULL)))
465 AND ( (Recinfo.dsp_segment19 = X_Dsp_Segment19)
466 OR ( (Recinfo.dsp_segment19 IS NULL)
467 AND (X_Dsp_Segment19 IS NULL)))
468 AND ( (Recinfo.dsp_segment20 = X_Dsp_Segment20)
469 OR ( (Recinfo.dsp_segment20 IS NULL)
470 AND (X_Dsp_Segment20 IS NULL)))
471 AND ( (Recinfo.dsp_segment21 = X_Dsp_Segment21)
472 OR ( (Recinfo.dsp_segment21 IS NULL)
473 AND (X_Dsp_Segment21 IS NULL)))
474 AND ( (Recinfo.dsp_segment22 = X_Dsp_Segment22)
475 OR ( (Recinfo.dsp_segment22 IS NULL)
476 AND (X_Dsp_Segment22 IS NULL)))
477 AND ( (Recinfo.dsp_segment23 = X_Dsp_Segment23)
478 OR ( (Recinfo.dsp_segment23 IS NULL)
479 AND (X_Dsp_Segment23 IS NULL)))
480 AND ( (Recinfo.dsp_segment24 = X_Dsp_Segment24)
481 OR ( (Recinfo.dsp_segment24 IS NULL)
482 AND (X_Dsp_Segment24 IS NULL)))
483 AND ( (Recinfo.dsp_segment25 = X_Dsp_Segment25)
484 OR ( (Recinfo.dsp_segment25 IS NULL)
485 AND (X_Dsp_Segment25 IS NULL)))
486 AND ( (Recinfo.dsp_segment26 = X_Dsp_Segment26)
487 OR ( (Recinfo.dsp_segment26 IS NULL)
488 AND (X_Dsp_Segment26 IS NULL)))
489 AND ( (Recinfo.dsp_segment27 = X_Dsp_Segment27)
490 OR ( (Recinfo.dsp_segment27 IS NULL)
491 AND (X_Dsp_Segment27 IS NULL)))
492 AND ( (Recinfo.dsp_segment28 = X_Dsp_Segment28)
493 OR ( (Recinfo.dsp_segment28 IS NULL)
494 AND (X_Dsp_Segment28 IS NULL)))
495 AND ( (Recinfo.dsp_segment29 = X_Dsp_Segment29)
496 OR ( (Recinfo.dsp_segment29 IS NULL)
497 AND (X_Dsp_Segment29 IS NULL)))
498 AND ( (Recinfo.dsp_segment30 = X_Dsp_Segment30)
499 OR ( (Recinfo.dsp_segment30 IS NULL)
500 AND (X_Dsp_Segment30 IS NULL)))
501 AND ( (Recinfo.transaction_source_name = X_Transaction_Source_Name)
502 OR ( (Recinfo.transaction_source_name IS NULL)
503 AND (X_Transaction_Source_Name IS NULL)))
504 AND ( (Recinfo.transaction_source_type_id = X_Transaction_Source_Type_Id)
505 OR ( (Recinfo.transaction_source_type_id IS NULL)
506 AND (X_Transaction_Source_Type_Id IS NULL)))
507 AND ( (Recinfo.transaction_action_id = X_Transaction_Action_Id)
508 OR ( (Recinfo.transaction_action_id IS NULL)
509 AND (X_Transaction_Action_Id IS NULL)))
510 AND (Recinfo.transaction_type_id = X_Transaction_Type_Id)
511 AND ( (Recinfo.reason_id = X_Reason_Id)
512 OR ( (Recinfo.reason_id IS NULL)
513 AND (X_Reason_Id IS NULL)))
514 AND ( (Recinfo.transaction_reference = X_Transaction_Reference)
515 OR ( (Recinfo.transaction_reference IS NULL)
516 AND (X_Transaction_Reference IS NULL)))
517 AND ( (Recinfo.transaction_cost = X_Transaction_Cost)
518 OR ( (Recinfo.transaction_cost IS NULL)
519 AND (X_Transaction_Cost IS NULL)))
520 AND ( (Recinfo.cost_group_id = X_cost_group_id)
521 OR ( (Recinfo.cost_group_id IS NULL)
522 AND (X_cost_group_id IS NULL)))
523 AND ( (Recinfo.distribution_account_id = X_Distribution_Account_Id)
524 OR ( (Recinfo.distribution_account_id IS NULL)
525 AND (X_Distribution_Account_Id IS NULL)))
526 AND ( (Recinfo.dst_segment1 = X_Dst_Segment1)
527 OR ( (Recinfo.dst_segment1 IS NULL)
528 AND (X_Dst_Segment1 IS NULL)))
529 AND ( (Recinfo.dst_segment2 = X_Dst_Segment2)
530 OR ( (Recinfo.dst_segment2 IS NULL)
531 AND (X_Dst_Segment2 IS NULL)))
532 AND ( (Recinfo.dst_segment3 = X_Dst_Segment3)
533 OR ( (Recinfo.dst_segment3 IS NULL)
534 AND (X_Dst_Segment3 IS NULL)))
535 AND ( (Recinfo.dst_segment4 = X_Dst_Segment4)
536 OR ( (Recinfo.dst_segment4 IS NULL)
537 AND (X_Dst_Segment4 IS NULL)))
538 AND ( (Recinfo.dst_segment5 = X_Dst_Segment5)
539 OR ( (Recinfo.dst_segment5 IS NULL)
540 AND (X_Dst_Segment5 IS NULL)))
541 AND ( (Recinfo.dst_segment6 = X_Dst_Segment6)
542 OR ( (Recinfo.dst_segment6 IS NULL)
543 AND (X_Dst_Segment6 IS NULL)))
544 AND ( (Recinfo.dst_segment7 = X_Dst_Segment7)
545 OR ( (Recinfo.dst_segment7 IS NULL)
546 AND (X_Dst_Segment7 IS NULL)))
547 AND ( (Recinfo.dst_segment8 = X_Dst_Segment8)
548 OR ( (Recinfo.dst_segment8 IS NULL)
549 AND (X_Dst_Segment8 IS NULL)))
550 AND ( (Recinfo.dst_segment9 = X_Dst_Segment9)
551 OR ( (Recinfo.dst_segment9 IS NULL)
552 AND (X_Dst_Segment9 IS NULL)))
553 AND ( (Recinfo.dst_segment10 = X_Dst_Segment10)
554 OR ( (Recinfo.dst_segment10 IS NULL)
555 AND (X_Dst_Segment10 IS NULL)))
556 AND ( (Recinfo.dst_segment11 = X_Dst_Segment11)
557 OR ( (Recinfo.dst_segment11 IS NULL)
558 AND (X_Dst_Segment11 IS NULL)))
559 AND ( (Recinfo.dst_segment12 = X_Dst_Segment12)
560 OR ( (Recinfo.dst_segment12 IS NULL)
561 AND (X_Dst_Segment12 IS NULL)))
562 AND ( (Recinfo.dst_segment13 = X_Dst_Segment13)
563 OR ( (Recinfo.dst_segment13 IS NULL)
564 AND (X_Dst_Segment13 IS NULL)))
565 AND ( (Recinfo.lpn_id = X_Lpn_Id)
566 OR ( (Recinfo.Lpn_Id IS NULL)
567 AND (X_Lpn_Id IS NULL)))
568 AND ( (Recinfo.Transfer_lpn_id = X_Transfer_Lpn_Id)
569 OR ( (Recinfo.Transfer_Lpn_Id IS NULL)
570 AND (X_Transfer_Lpn_Id IS NULL)))
571 AND ( (Recinfo.Transfer_Cost_Group_Id = X_Transfer_Cost_Group_Id)
572 OR ( (Recinfo.Transfer_Cost_Group_Id IS NULL)
573 AND (X_Transfer_Cost_Group_Id IS NULL)))
574 AND ( (Recinfo.content_lpn_id = X_content_lpn_id)
575 OR ((Recinfo.content_lpn_id IS NULL)
576 AND (X_content_lpn_id IS NULL)))
577 AND ((recinfo.owning_tp_type =x_owning_tp_type)
578 OR ( (Recinfo.owning_tp_type IS NULL)
579 AND (x_owning_tp_type IS NULL)))
580 AND ((recinfo.planning_tp_type = x_planning_tp_type)
581 OR ( (Recinfo.planning_tp_type IS NULL)
582 AND (x_planning_tp_type IS
583 NULL)))
584 AND ((recinfo.planning_organization_id = x_planning_organization_id)
585 OR ( (Recinfo.planning_organization_id IS NULL)
586 AND (x_planning_organization_id IS NULL)))
587 AND ((recinfo.owning_organization_id = x_owning_organization_id)
588 OR ( (recinfo.owning_organization_id IS NULL)
589 AND (x_owning_organization_id IS NULL)))
590
591 ---INVCON kkillams
592 AND ((recinfo.secondary_transaction_quantity = x_secondary_qty)
593 OR ( (recinfo.secondary_transaction_quantity IS NULL)
594 AND (x_secondary_qty IS NULL)))
595 /*INVCON Nsinha
596 AND ((recinfo.secondary_uom_code = x_secondary_uom_code)
597 OR ( (recinfo.secondary_uom_code IS NULL)
598 AND (x_secondary_uom_code IS NULL)))
599 */
600 ---END INVCON kkillams
601
602 ) then
603 if (
604 ( (Recinfo.dst_segment14 = X_Dst_Segment14)
605 OR ( (Recinfo.dst_segment14 IS NULL)
606 AND (X_Dst_Segment14 IS NULL)))
607 AND ( (Recinfo.dst_segment15 = X_Dst_Segment15)
608 OR ( (Recinfo.dst_segment15 IS NULL)
609 AND (X_Dst_Segment15 IS NULL)))
610 AND ( (Recinfo.dst_segment16 = X_Dst_Segment16)
611 OR ( (Recinfo.dst_segment16 IS NULL)
612 AND (X_Dst_Segment16 IS NULL)))
613 AND ( (Recinfo.dst_segment17 = X_Dst_Segment17)
614 OR ( (Recinfo.dst_segment17 IS NULL)
615 AND (X_Dst_Segment17 IS NULL)))
616 AND ( (Recinfo.dst_segment18 = X_Dst_Segment18)
617 OR ( (Recinfo.dst_segment18 IS NULL)
618 AND (X_Dst_Segment18 IS NULL)))
619 AND ( (Recinfo.dst_segment19 = X_Dst_Segment19)
620 OR ( (Recinfo.dst_segment19 IS NULL)
621 AND (X_Dst_Segment19 IS NULL)))
622 AND ( (Recinfo.dst_segment20 = X_Dst_Segment20)
623 OR ( (Recinfo.dst_segment20 IS NULL)
624 AND (X_Dst_Segment20 IS NULL)))
625 AND ( (Recinfo.dst_segment21 = X_Dst_Segment21)
626 OR ( (Recinfo.dst_segment21 IS NULL)
627 AND (X_Dst_Segment21 IS NULL)))
628 AND ( (Recinfo.dst_segment22 = X_Dst_Segment22)
629 OR ( (Recinfo.dst_segment22 IS NULL)
630 AND (X_Dst_Segment22 IS NULL)))
631 AND ( (Recinfo.dst_segment23 = X_Dst_Segment23)
632 OR ( (Recinfo.dst_segment23 IS NULL)
633 AND (X_Dst_Segment23 IS NULL)))
634 AND ( (Recinfo.dst_segment24 = X_Dst_Segment24)
635 OR ( (Recinfo.dst_segment24 IS NULL)
636 AND (X_Dst_Segment24 IS NULL)))
637 AND ( (Recinfo.dst_segment25 = X_Dst_Segment25)
638 OR ( (Recinfo.dst_segment25 IS NULL)
639 AND (X_Dst_Segment25 IS NULL)))
640 AND ( (Recinfo.dst_segment26 = X_Dst_Segment26)
641 OR ( (Recinfo.dst_segment26 IS NULL)
642 AND (X_Dst_Segment26 IS NULL)))
643 AND ( (Recinfo.dst_segment27 = X_Dst_Segment27)
644 OR ( (Recinfo.dst_segment27 IS NULL)
645 AND (X_Dst_Segment27 IS NULL)))
646 AND ( (Recinfo.dst_segment28 = X_Dst_Segment28)
647 OR ( (Recinfo.dst_segment28 IS NULL)
648 AND (X_Dst_Segment28 IS NULL)))
649 AND ( (Recinfo.dst_segment29 = X_Dst_Segment29)
650 OR ( (Recinfo.dst_segment29 IS NULL)
651 AND (X_Dst_Segment29 IS NULL)))
652 AND ( (Recinfo.dst_segment30 = X_Dst_Segment30)
653 OR ( (Recinfo.dst_segment30 IS NULL)
654 AND (X_Dst_Segment30 IS NULL)))
655 AND ( (Recinfo.currency_code = X_Currency_Code)
656 OR ( (Recinfo.currency_code IS NULL)
657 AND (X_Currency_Code IS NULL)))
658 AND ( (Recinfo.currency_conversion_type = X_Currency_Conversion_Type)
659 OR ( (Recinfo.currency_conversion_type IS NULL)
660 AND (X_Currency_Conversion_Type IS NULL)))
661 AND ( (Recinfo.currency_conversion_rate = X_Currency_Conversion_Rate)
662 OR ( (Recinfo.currency_conversion_rate IS NULL)
663 AND (X_Currency_Conversion_Rate IS NULL)))
664 AND ( (Recinfo.ussgl_transaction_code = X_Ussgl_Transaction_Code)
665 OR ( (Recinfo.ussgl_transaction_code IS NULL)
666 AND (X_Ussgl_Transaction_Code IS NULL)))
667 AND ( (Recinfo.wip_entity_type = X_Wip_Entity_Type)
668 OR ( (Recinfo.wip_entity_type IS NULL)
669 AND (X_Wip_Entity_Type IS NULL)))
670 AND ( (Recinfo.schedule_id = X_Schedule_Id)
671 OR ( (Recinfo.schedule_id IS NULL)
672 AND (X_Schedule_Id IS NULL)))
673 AND ( (Recinfo.employee_code = X_Employee_Code)
674 OR ( (Recinfo.employee_code IS NULL)
675 AND (X_Employee_Code IS NULL)))
676 AND ( (Recinfo.department_id = X_Department_Id)
677 OR ( (Recinfo.department_id IS NULL)
678 AND (X_Department_Id IS NULL)))
679 AND ( (Recinfo.schedule_update_code = X_Schedule_Update_Code)
680 OR ( (Recinfo.schedule_update_code IS NULL)
681 AND (X_Schedule_Update_Code IS NULL)))
682 AND ( (Recinfo.setup_teardown_code = X_Setup_Teardown_Code)
683 OR ( (Recinfo.setup_teardown_code IS NULL)
684 AND (X_Setup_Teardown_Code IS NULL)))
685 AND ( (Recinfo.primary_switch = X_Primary_Switch)
686 OR ( (Recinfo.primary_switch IS NULL)
687 AND (X_Primary_Switch IS NULL)))
688 AND ( (Recinfo.mrp_code = X_Mrp_Code)
689 OR ( (Recinfo.mrp_code IS NULL)
690 AND (X_Mrp_Code IS NULL)))
691 AND ( (Recinfo.operation_seq_num = X_Operation_Seq_Num)
692 OR ( (Recinfo.operation_seq_num IS NULL)
693 AND (X_Operation_Seq_Num IS NULL)))
694 AND ( (Recinfo.repetitive_line_id = X_Repetitive_Line_Id)
695 OR ( (Recinfo.repetitive_line_id IS NULL)
696 AND (X_Repetitive_Line_Id IS NULL)))
697 AND ( (Recinfo.line_item_num = X_Line_Item_Num)
698 OR ( (Recinfo.line_item_num IS NULL)
699 AND (X_Line_Item_Num IS NULL)))
700 AND ( (Recinfo.ship_to_location_id = X_Ship_To_Location_Id)
701 OR ( (Recinfo.ship_to_location_id IS NULL)
702 AND (X_Ship_To_Location_Id IS NULL)))
703 AND ( (Recinfo.encumbrance_account = X_Encumbrance_Account)
704 OR ( (Recinfo.encumbrance_account IS NULL)
705 AND (X_Encumbrance_Account IS NULL)))
706 AND ( (Recinfo.encumbrance_amount = X_Encumbrance_Amount)
707 OR ( (Recinfo.encumbrance_amount IS NULL)
708 AND (X_Encumbrance_Amount IS NULL)))
709 AND ( (Recinfo.transfer_subinventory = X_Transfer_Subinventory)
710 OR ( (Recinfo.transfer_subinventory IS NULL)
711 AND (X_Transfer_Subinventory IS NULL)))
712 AND ( (Recinfo.transfer_organization = X_Transfer_Organization)
713 OR ( (Recinfo.transfer_organization IS NULL)
714 AND (X_Transfer_Organization IS NULL)))
715 AND ( (Recinfo.transfer_locator = X_Transfer_Locator)
716 OR ( (Recinfo.transfer_locator IS NULL)
717 AND (X_Transfer_Locator IS NULL)))
718 AND ( (Recinfo.xfer_loc_segment1 = X_Xfer_Loc_Segment1)
719 OR ( (Recinfo.xfer_loc_segment1 IS NULL)
720 AND (X_Xfer_Loc_Segment1 IS NULL)))
721 AND ( (Recinfo.xfer_loc_segment2 = X_Xfer_Loc_Segment2)
722 OR ( (Recinfo.xfer_loc_segment2 IS NULL)
723 AND (X_Xfer_Loc_Segment2 IS NULL)))
724 AND ( (Recinfo.xfer_loc_segment3 = X_Xfer_Loc_Segment3)
725 OR ( (Recinfo.xfer_loc_segment3 IS NULL)
726 AND (X_Xfer_Loc_Segment3 IS NULL)))
727 AND ( (Recinfo.xfer_loc_segment4 = X_Xfer_Loc_Segment4)
728 OR ( (Recinfo.xfer_loc_segment4 IS NULL)
729 AND (X_Xfer_Loc_Segment4 IS NULL)))
730 AND ( (Recinfo.xfer_loc_segment5 = X_Xfer_Loc_Segment5)
731 OR ( (Recinfo.xfer_loc_segment5 IS NULL)
732 AND (X_Xfer_Loc_Segment5 IS NULL)))
733 AND ( (Recinfo.xfer_loc_segment6 = X_Xfer_Loc_Segment6)
734 OR ( (Recinfo.xfer_loc_segment6 IS NULL)
735 AND (X_Xfer_Loc_Segment6 IS NULL)))
736 AND ( (Recinfo.xfer_loc_segment7 = X_Xfer_Loc_Segment7)
737 OR ( (Recinfo.xfer_loc_segment7 IS NULL)
738 AND (X_Xfer_Loc_Segment7 IS NULL)))
739 AND ( (Recinfo.xfer_loc_segment8 = X_Xfer_Loc_Segment8)
740 OR ( (Recinfo.xfer_loc_segment8 IS NULL)
741 AND (X_Xfer_Loc_Segment8 IS NULL)))
742 AND ( (Recinfo.xfer_loc_segment9 = X_Xfer_Loc_Segment9)
743 OR ( (Recinfo.xfer_loc_segment9 IS NULL)
744 AND (X_Xfer_Loc_Segment9 IS NULL)))
745 ) then
746 if (
747 ( (Recinfo.xfer_loc_segment10 = X_Xfer_Loc_Segment10)
748 OR ( (Recinfo.xfer_loc_segment10 IS NULL)
749 AND (X_Xfer_Loc_Segment10 IS NULL)))
750 AND ( (Recinfo.xfer_loc_segment11 = X_Xfer_Loc_Segment11)
751 OR ( (Recinfo.xfer_loc_segment11 IS NULL)
752 AND (X_Xfer_Loc_Segment11 IS NULL)))
753 AND ( (Recinfo.xfer_loc_segment12 = X_Xfer_Loc_Segment12)
754 OR ( (Recinfo.xfer_loc_segment12 IS NULL)
755 AND (X_Xfer_Loc_Segment12 IS NULL)))
756 AND ( (Recinfo.xfer_loc_segment13 = X_Xfer_Loc_Segment13)
757 OR ( (Recinfo.xfer_loc_segment13 IS NULL)
758 AND (X_Xfer_Loc_Segment13 IS NULL)))
759 AND ( (Recinfo.xfer_loc_segment14 = X_Xfer_Loc_Segment14)
760 OR ( (Recinfo.xfer_loc_segment14 IS NULL)
761 AND (X_Xfer_Loc_Segment14 IS NULL)))
762 AND ( (Recinfo.xfer_loc_segment15 = X_Xfer_Loc_Segment15)
763 OR ( (Recinfo.xfer_loc_segment15 IS NULL)
764 AND (X_Xfer_Loc_Segment15 IS NULL)))
765 AND ( (Recinfo.xfer_loc_segment16 = X_Xfer_Loc_Segment16)
766 OR ( (Recinfo.xfer_loc_segment16 IS NULL)
767 AND (X_Xfer_Loc_Segment16 IS NULL)))
768 AND ( (Recinfo.xfer_loc_segment17 = X_Xfer_Loc_Segment17)
769 OR ( (Recinfo.xfer_loc_segment17 IS NULL)
770 AND (X_Xfer_Loc_Segment17 IS NULL)))
771 AND ( (Recinfo.xfer_loc_segment18 = X_Xfer_Loc_Segment18)
772 OR ( (Recinfo.xfer_loc_segment18 IS NULL)
773 AND (X_Xfer_Loc_Segment18 IS NULL)))
774 AND ( (Recinfo.xfer_loc_segment19 = X_Xfer_Loc_Segment19)
775 OR ( (Recinfo.xfer_loc_segment19 IS NULL)
776 AND (X_Xfer_Loc_Segment19 IS NULL)))
777 AND ( (Recinfo.xfer_loc_segment20 = X_Xfer_Loc_Segment20)
778 OR ( (Recinfo.xfer_loc_segment20 IS NULL)
779 AND (X_Xfer_Loc_Segment20 IS NULL)))
780 AND ( (Recinfo.shipment_number = X_Shipment_Number)
781 OR ( (Recinfo.shipment_number IS NULL)
782 AND (X_Shipment_Number IS NULL)))
783 AND ( (Recinfo.transportation_cost = X_Transportation_Cost)
784 OR ( (Recinfo.transportation_cost IS NULL)
785 AND (X_Transportation_Cost IS NULL)))
786 AND ( (Recinfo.transportation_account = X_Transportation_Account)
787 OR ( (Recinfo.transportation_account IS NULL)
788 AND (X_Transportation_Account IS NULL)))
789 AND ( (Recinfo.transfer_cost = X_Transfer_Cost)
790 OR ( (Recinfo.transfer_cost IS NULL)
791 AND (X_Transfer_Cost IS NULL)))
792 AND ( (Recinfo.freight_code = X_Freight_Code)
793 OR ( (Recinfo.freight_code IS NULL)
794 AND (X_Freight_Code IS NULL)))
795 AND ( (Recinfo.containers = X_Containers)
796 OR ( (Recinfo.containers IS NULL)
797 AND (X_Containers IS NULL)))
798 AND ( (Recinfo.waybill_airbill = X_Waybill_Airbill)
799 OR ( (Recinfo.waybill_airbill IS NULL)
800 AND (X_Waybill_Airbill IS NULL)))
801 AND ( (Recinfo.expected_arrival_date = X_Expected_Arrival_Date)
802 OR ( (Recinfo.expected_arrival_date IS NULL)
803 AND (X_Expected_Arrival_Date IS NULL)))
804 AND ( (Recinfo.new_average_cost = X_New_Average_Cost)
805 OR ( (Recinfo.new_average_cost IS NULL)
806 AND (X_New_Average_Cost IS NULL)))
807 AND ( (Recinfo.value_change = X_Value_Change)
808 OR ( (Recinfo.value_change IS NULL)
809 AND (X_Value_Change IS NULL)))
810 AND ( (Recinfo.percentage_change = X_Percentage_Change)
811 OR ( (Recinfo.percentage_change IS NULL)
812 AND (X_Percentage_Change IS NULL)))
813 AND ( (Recinfo.required_flag = X_Required_Flag)
814 OR ( (Recinfo.required_flag IS NULL)
815 AND (X_Required_Flag IS NULL)))
816 AND ( (Recinfo.attribute_category = X_Attribute_Category)
817 OR ( (Recinfo.attribute_category IS NULL)
818 AND (X_Attribute_Category IS NULL)))
819 AND ( (Recinfo.attribute1 = X_Attribute1)
820 OR ( (Recinfo.attribute1 IS NULL)
821 AND (X_Attribute1 IS NULL)))
822 AND ( (Recinfo.attribute2 = X_Attribute2)
823 OR ( (Recinfo.attribute2 IS NULL)
824 AND (X_Attribute2 IS NULL)))
825 AND ( (Recinfo.attribute3 = X_Attribute3)
826 OR ( (Recinfo.attribute3 IS NULL)
827 AND (X_Attribute3 IS NULL)))
828 AND ( (Recinfo.attribute4 = X_Attribute4)
829 OR ( (Recinfo.attribute4 IS NULL)
830 AND (X_Attribute4 IS NULL)))
831 AND ( (Recinfo.attribute5 = X_Attribute5)
832 OR ( (Recinfo.attribute5 IS NULL)
833 AND (X_Attribute5 IS NULL)))
834 AND ( (Recinfo.attribute6 = X_Attribute6)
835 OR ( (Recinfo.attribute6 IS NULL)
836 AND (X_Attribute6 IS NULL)))
837 AND ( (Recinfo.attribute7 = X_Attribute7)
838 OR ( (Recinfo.attribute7 IS NULL)
839 AND (X_Attribute7 IS NULL)))
840 AND ( (Recinfo.attribute8 = X_Attribute8)
841 OR ( (Recinfo.attribute8 IS NULL)
842 AND (X_Attribute8 IS NULL)))
843 AND ( (Recinfo.attribute9 = X_Attribute9)
844 OR ( (Recinfo.attribute9 IS NULL)
845 AND (X_Attribute9 IS NULL)))
846 AND ( (Recinfo.attribute10 = X_Attribute10)
847 OR ( (Recinfo.attribute10 IS NULL)
848 AND (X_Attribute10 IS NULL)))
849 AND ( (Recinfo.attribute11 = X_Attribute11)
850 OR ( (Recinfo.attribute11 IS NULL)
851 AND (X_Attribute11 IS NULL)))
852 AND ( (Recinfo.attribute12 = X_Attribute12)
853 OR ( (Recinfo.attribute12 IS NULL)
854 AND (X_Attribute12 IS NULL)))
855 AND ( (Recinfo.attribute13 = X_Attribute13)
856 OR ( (Recinfo.attribute13 IS NULL)
857 AND (X_Attribute13 IS NULL)))
858 AND ( (Recinfo.attribute14 = X_Attribute14)
859 OR ( (Recinfo.attribute14 IS NULL)
860 AND (X_Attribute14 IS NULL)))
861 AND ( (Recinfo.attribute15 = X_Attribute15)
862 OR ( (Recinfo.attribute15 IS NULL)
863 AND (X_Attribute15 IS NULL)))
864 AND ( (Recinfo.validation_required = X_Validation_Required)
865 OR ( (Recinfo.validation_required IS NULL)
866 AND (X_Validation_Required IS NULL)))
867 AND ( (Recinfo.negative_req_flag = X_Negative_Req_Flag)
868 OR ( (Recinfo.negative_req_flag IS NULL)
869 AND (X_Negative_Req_Flag IS NULL)))
870 AND ( (Recinfo.shippable_flag = X_Shippable_Flag)
871 OR ( (Recinfo.shippable_flag IS NULL)
872 AND (X_Shippable_Flag IS NULL)))
873 AND ( (Recinfo.currency_conversion_date = X_Currency_Conversion_Date)
874 OR ( (Recinfo.currency_conversion_date IS NULL)
875 AND (X_Currency_Conversion_Date IS NULL)))
876 AND ( (Recinfo.movement_id = X_Movement_Id)
877 OR ( (Recinfo.movement_id IS NULL)
878 AND (X_Movement_Id IS NULL)))
879 AND ( (Recinfo.source_project_id = X_Source_Project_Id)
880 OR ( (Recinfo.source_project_id IS NULL)
881 AND (X_Source_Project_Id IS NULL)))
882 AND ( (Recinfo.source_task_id = X_Source_Task_Id)
883 OR ( (Recinfo.source_task_id IS NULL)
884 AND (X_Source_Task_Id IS NULL)))
885 AND ( (Recinfo.project_id = X_Project_Id)
886 OR ( (Recinfo.project_id IS NULL)
887 AND (X_Project_Id IS NULL)))
888 AND ( (Recinfo.task_id = X_Task_Id)
889 OR ( (Recinfo.task_id IS NULL)
890 AND (X_Task_Id IS NULL)))
891 AND ( (Recinfo.to_project_id = X_To_Project_Id)
892 OR ( (Recinfo.to_project_id IS NULL)
893 AND (X_To_Project_Id IS NULL)))
894 AND ( (Recinfo.to_task_id = X_To_Task_Id)
895 OR ( (Recinfo.to_task_id IS NULL)
896 AND (X_To_Task_Id IS NULL)))
897 AND ( (Recinfo.pa_expenditure_org_id = X_Pa_Expenditure_Org_Id)
898 OR ( (Recinfo.pa_expenditure_org_id IS NULL)
899 AND (X_Pa_Expenditure_Org_Id IS NULL)))
900 AND ( (Recinfo.expenditure_type = X_Expenditure_Type)
901 OR ( (Recinfo.expenditure_type IS NULL)
902 AND (X_Expenditure_Type IS NULL)))
903 --2520630
904 AND ( (Recinfo.demand_source_header_id = X_demand_source_header_id)
905 OR ( (Recinfo.demand_source_header_id IS NULL)
906 AND (X_demand_source_header_id IS NULL)))
907 AND ( (Recinfo.demand_source_line = X_demand_source_line)
908 OR ( (Recinfo.demand_source_line IS NULL)
909 AND (X_demand_source_line IS NULL)))
910 AND ( (Recinfo.demand_source_delivery = X_demand_source_delivery)
911 OR ( (Recinfo.demand_source_delivery IS NULL)
912 AND (X_demand_source_delivery IS NULL)))
913 --2520630
914
915
916 ) then
917 return;
918 else
919 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
920 APP_EXCEPTION.Raise_Exception;
921 end if;
922 else
923 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
924 APP_EXCEPTION.Raise_Exception;
925 end if;
926 else
927 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
928 APP_EXCEPTION.Raise_Exception;
929 end if;
930 else
931 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
932 APP_EXCEPTION.Raise_Exception;
933 end if;
934
935 END Lock_Row;
936
937
938
939 PROCEDURE Update_Row(X_Rowid VARCHAR2,
940
941 X_Source_Code VARCHAR2,
942 X_Source_Line_Id NUMBER,
943 X_Source_Header_Id NUMBER,
944 X_Process_Flag NUMBER,
945 X_Transaction_Mode NUMBER,
946 X_Lock_Flag NUMBER,
947 X_Last_Update_Date DATE,
948 X_Last_Updated_By NUMBER,
949 X_Last_Update_Login NUMBER,
950 X_Inventory_Item_Id NUMBER,
951 X_Item_Segment1 VARCHAR2,
952 X_Item_Segment2 VARCHAR2,
953 X_Item_Segment3 VARCHAR2,
954 X_Item_Segment4 VARCHAR2,
955 X_Item_Segment5 VARCHAR2,
956 X_Item_Segment6 VARCHAR2,
957 X_Item_Segment7 VARCHAR2,
958 X_Item_Segment8 VARCHAR2,
959 X_Item_Segment9 VARCHAR2,
960 X_Item_Segment10 VARCHAR2,
961 X_Item_Segment11 VARCHAR2,
962 X_Item_Segment12 VARCHAR2,
963 X_Item_Segment13 VARCHAR2,
964 X_Item_Segment14 VARCHAR2,
965 X_Item_Segment15 VARCHAR2,
966 X_Item_Segment16 VARCHAR2,
967 X_Item_Segment17 VARCHAR2,
968 X_Item_Segment18 VARCHAR2,
969 X_Item_Segment19 VARCHAR2,
970 X_Item_Segment20 VARCHAR2,
971 X_Revision VARCHAR2,
972 X_Organization_Id NUMBER,
973 X_Transaction_Quantity NUMBER,
974 X_Primary_Quantity NUMBER,
975 X_Transaction_Uom VARCHAR2,
976 X_Transaction_Date DATE,
977 X_Subinventory_Code VARCHAR2,
978 X_Locator_Id NUMBER,
979 X_Loc_Segment1 VARCHAR2,
980 X_Loc_Segment2 VARCHAR2,
981 X_Loc_Segment3 VARCHAR2,
982 X_Loc_Segment4 VARCHAR2,
983 X_Loc_Segment5 VARCHAR2,
984 X_Loc_Segment6 VARCHAR2,
985 X_Loc_Segment7 VARCHAR2,
986 X_Loc_Segment8 VARCHAR2,
987 X_Loc_Segment9 VARCHAR2,
988 X_Loc_Segment10 VARCHAR2,
989 X_Loc_Segment11 VARCHAR2,
990 X_Loc_Segment12 VARCHAR2,
991 X_Loc_Segment13 VARCHAR2,
992 X_Loc_Segment14 VARCHAR2,
993 X_Loc_Segment15 VARCHAR2,
994 X_Loc_Segment16 VARCHAR2,
995 X_Loc_Segment17 VARCHAR2,
996 X_Loc_Segment18 VARCHAR2,
997 X_Loc_Segment19 VARCHAR2,
998 X_Loc_Segment20 VARCHAR2,
999 X_Transaction_Source_Id NUMBER,
1000 X_Dsp_Segment1 VARCHAR2,
1001 X_Dsp_Segment2 VARCHAR2,
1002 X_Dsp_Segment3 VARCHAR2,
1003 X_Dsp_Segment4 VARCHAR2,
1004 X_Dsp_Segment5 VARCHAR2,
1005 X_Dsp_Segment6 VARCHAR2,
1006 X_Dsp_Segment7 VARCHAR2,
1007 X_Dsp_Segment8 VARCHAR2,
1008 X_Dsp_Segment9 VARCHAR2,
1009 X_Dsp_Segment10 VARCHAR2,
1010 X_Dsp_Segment11 VARCHAR2,
1011 X_Dsp_Segment12 VARCHAR2,
1012 X_Dsp_Segment13 VARCHAR2,
1013 X_Dsp_Segment14 VARCHAR2,
1014 X_Dsp_Segment15 VARCHAR2,
1015 X_Dsp_Segment16 VARCHAR2,
1016 X_Dsp_Segment17 VARCHAR2,
1017 X_Dsp_Segment18 VARCHAR2,
1018 X_Dsp_Segment19 VARCHAR2,
1019 X_Dsp_Segment20 VARCHAR2,
1020 X_Dsp_Segment21 VARCHAR2,
1021 X_Dsp_Segment22 VARCHAR2,
1022 X_Dsp_Segment23 VARCHAR2,
1023 X_Dsp_Segment24 VARCHAR2,
1024 X_Dsp_Segment25 VARCHAR2,
1025 X_Dsp_Segment26 VARCHAR2,
1026 X_Dsp_Segment27 VARCHAR2,
1027 X_Dsp_Segment28 VARCHAR2,
1028 X_Dsp_Segment29 VARCHAR2,
1029 X_Dsp_Segment30 VARCHAR2,
1030 X_Transaction_Source_Name VARCHAR2,
1031 X_Transaction_Source_Type_Id NUMBER,
1032 X_Transaction_Action_Id NUMBER,
1033 X_Transaction_Type_Id NUMBER,
1034 X_Reason_Id NUMBER,
1035 X_Transaction_Reference VARCHAR2,
1036 X_Transaction_Cost NUMBER,
1037 X_cost_group_id NUMBER,
1038 X_Distribution_Account_Id NUMBER,
1039 X_Dst_Segment1 VARCHAR2,
1040 X_Dst_Segment2 VARCHAR2,
1041 X_Dst_Segment3 VARCHAR2,
1042 X_Dst_Segment4 VARCHAR2,
1043 X_Dst_Segment5 VARCHAR2,
1044 X_Dst_Segment6 VARCHAR2,
1045 X_Dst_Segment7 VARCHAR2,
1046 X_Dst_Segment8 VARCHAR2,
1047 X_Dst_Segment9 VARCHAR2,
1048 X_Dst_Segment10 VARCHAR2,
1049 X_Dst_Segment11 VARCHAR2,
1050 X_Dst_Segment12 VARCHAR2,
1051 X_Dst_Segment13 VARCHAR2,
1052 X_Dst_Segment14 VARCHAR2,
1053 X_Dst_Segment15 VARCHAR2,
1054 X_Dst_Segment16 VARCHAR2,
1055 X_Dst_Segment17 VARCHAR2,
1056 X_Dst_Segment18 VARCHAR2,
1057 X_Dst_Segment19 VARCHAR2,
1058 X_Dst_Segment20 VARCHAR2,
1059 X_Dst_Segment21 VARCHAR2,
1060 X_Dst_Segment22 VARCHAR2,
1061 X_Dst_Segment23 VARCHAR2,
1062 X_Dst_Segment24 VARCHAR2,
1063 X_Dst_Segment25 VARCHAR2,
1064 X_Dst_Segment26 VARCHAR2,
1065 X_Dst_Segment27 VARCHAR2,
1066 X_Dst_Segment28 VARCHAR2,
1067 X_Dst_Segment29 VARCHAR2,
1068 X_Dst_Segment30 VARCHAR2,
1069 X_Currency_Code VARCHAR2,
1070 X_Currency_Conversion_Type VARCHAR2,
1071 X_Currency_Conversion_Rate NUMBER,
1072 X_Ussgl_Transaction_Code VARCHAR2,
1073 X_Wip_Entity_Type NUMBER,
1074 X_Schedule_Id NUMBER,
1075 X_Employee_Code VARCHAR2,
1076 X_Department_Id NUMBER,
1077 X_Schedule_Update_Code NUMBER,
1078 X_Setup_Teardown_Code NUMBER,
1079 X_Primary_Switch NUMBER,
1080 X_Mrp_Code NUMBER,
1081 X_Operation_Seq_Num NUMBER,
1082 X_Repetitive_Line_Id NUMBER,
1083 X_Line_Item_Num NUMBER,
1084 X_Ship_To_Location_Id NUMBER,
1085 X_Encumbrance_Account NUMBER,
1086 X_Encumbrance_Amount NUMBER,
1087 X_Transfer_Subinventory VARCHAR2,
1088 X_Transfer_Organization NUMBER,
1089 X_Transfer_Locator NUMBER,
1090 X_Xfer_Loc_Segment1 VARCHAR2,
1091 X_Xfer_Loc_Segment2 VARCHAR2,
1092 X_Xfer_Loc_Segment3 VARCHAR2,
1093 X_Xfer_Loc_Segment4 VARCHAR2,
1094 X_Xfer_Loc_Segment5 VARCHAR2,
1095 X_Xfer_Loc_Segment6 VARCHAR2,
1096 X_Xfer_Loc_Segment7 VARCHAR2,
1097 X_Xfer_Loc_Segment8 VARCHAR2,
1098 X_Xfer_Loc_Segment9 VARCHAR2,
1099 X_Xfer_Loc_Segment10 VARCHAR2,
1100 X_Xfer_Loc_Segment11 VARCHAR2,
1101 X_Xfer_Loc_Segment12 VARCHAR2,
1102 X_Xfer_Loc_Segment13 VARCHAR2,
1103 X_Xfer_Loc_Segment14 VARCHAR2,
1104 X_Xfer_Loc_Segment15 VARCHAR2,
1105 X_Xfer_Loc_Segment16 VARCHAR2,
1106 X_Xfer_Loc_Segment17 VARCHAR2,
1107 X_Xfer_Loc_Segment18 VARCHAR2,
1108 X_Xfer_Loc_Segment19 VARCHAR2,
1109 X_Xfer_Loc_Segment20 VARCHAR2,
1110 X_Shipment_Number VARCHAR2,
1111 X_Transportation_Cost NUMBER,
1112 X_Transportation_Account NUMBER,
1113 X_Transfer_Cost NUMBER,
1114 X_Freight_Code VARCHAR2,
1115 X_Containers NUMBER,
1116 X_Waybill_Airbill VARCHAR2,
1117 X_Expected_Arrival_Date DATE,
1118 X_New_Average_Cost NUMBER,
1119 X_Value_Change NUMBER,
1120 X_Percentage_Change NUMBER,
1121 X_Required_Flag VARCHAR2,
1122 X_Attribute_Category VARCHAR2,
1123 X_Attribute1 VARCHAR2,
1124 X_Attribute2 VARCHAR2,
1125 X_Attribute3 VARCHAR2,
1126 X_Attribute4 VARCHAR2,
1127 X_Attribute5 VARCHAR2,
1128 X_Attribute6 VARCHAR2,
1129 X_Attribute7 VARCHAR2,
1130 X_Attribute8 VARCHAR2,
1131 X_Attribute9 VARCHAR2,
1132 X_Attribute10 VARCHAR2,
1133 X_Attribute11 VARCHAR2,
1134 X_Attribute12 VARCHAR2,
1135 X_Attribute13 VARCHAR2,
1136 X_Attribute14 VARCHAR2,
1137 X_Attribute15 VARCHAR2,
1138 X_Validation_Required NUMBER,
1139 X_Negative_Req_Flag NUMBER,
1140 X_Shippable_Flag VARCHAR2,
1141 X_Currency_Conversion_Date DATE,
1142 X_Movement_Id NUMBER,
1143 X_Source_Project_Id NUMBER,
1144 X_Source_Task_Id NUMBER,
1145 X_Project_Id NUMBER,
1146 X_Task_Id NUMBER,
1147 X_To_Project_Id NUMBER,
1148 X_To_Task_Id NUMBER,
1149 X_Pa_Expenditure_Org_Id NUMBER,
1150 X_Expenditure_Type VARCHAR2,
1151 X_Lpn_Id NUMBER,
1152 X_Transfer_Lpn_Id NUMBER,
1153 X_Transfer_Cost_Group_Id NUMBER,
1154 X_content_lpn_id NUMBER,
1155 X_demand_source_header_id NUMBER, --2520630
1156 X_demand_source_line VARCHAR2, --2520630
1157 X_demand_source_delivery VARCHAR2, --2520630
1158 x_owning_organization_id NUMBER,
1159 x_owning_tp_type NUMBER,
1160 x_planning_organization_id NUMBER,
1161 x_planning_tp_type NUMBER,
1162 x_material_account NUMBER, --Bug#5208421
1163 --- INVCON kkillams
1164 x_secondary_qty NUMBER,
1165 x_secondary_uom_code VARCHAR2
1166 ---END INVCON kkillams
1167
1168
1169
1170 ) IS
1171
1172 number_of_components NUMBER := 0;
1173 l_transaction_batch_id NUMBER;
1174 l_transaction_header_id NUMBER;
1175 BEGIN
1176 UPDATE MTL_TRANSACTIONS_INTERFACE
1177 SET
1178 source_code = X_Source_Code,
1179 source_line_id = X_Source_Line_Id,
1180 source_header_id = X_Source_Header_Id,
1181 process_flag = X_Process_Flag,
1182 transaction_mode = X_Transaction_Mode,
1183 lock_flag = X_Lock_Flag,
1184 last_update_date = X_Last_Update_Date,
1185 last_updated_by = X_Last_Updated_By,
1186 last_update_login = X_Last_Update_Login,
1187 inventory_item_id = X_Inventory_Item_Id,
1188 item_segment1 = X_Item_Segment1,
1189 item_segment2 = X_Item_Segment2,
1190 item_segment3 = X_Item_Segment3,
1191 item_segment4 = X_Item_Segment4,
1192 item_segment5 = X_Item_Segment5,
1193 item_segment6 = X_Item_Segment6,
1194 item_segment7 = X_Item_Segment7,
1195 item_segment8 = X_Item_Segment8,
1196 item_segment9 = X_Item_Segment9,
1197 item_segment10 = X_Item_Segment10,
1198 item_segment11 = X_Item_Segment11,
1199 item_segment12 = X_Item_Segment12,
1200 item_segment13 = X_Item_Segment13,
1201 item_segment14 = X_Item_Segment14,
1202 item_segment15 = X_Item_Segment15,
1203 item_segment16 = X_Item_Segment16,
1204 item_segment17 = X_Item_Segment17,
1205 item_segment18 = X_Item_Segment18,
1206 item_segment19 = X_Item_Segment19,
1207 item_segment20 = X_Item_Segment20,
1208 revision = X_Revision,
1209 organization_id = X_Organization_Id,
1210 transaction_quantity = X_Transaction_Quantity,
1211 primary_quantity = X_Primary_Quantity,
1212 transaction_uom = X_Transaction_Uom,
1213 transaction_date = X_Transaction_Date,
1214 subinventory_code = X_Subinventory_Code,
1215 locator_id = X_Locator_Id,
1216 loc_segment1 = X_Loc_Segment1,
1217 loc_segment2 = X_Loc_Segment2,
1218 loc_segment3 = X_Loc_Segment3,
1219 loc_segment4 = X_Loc_Segment4,
1220 loc_segment5 = X_Loc_Segment5,
1221 loc_segment6 = X_Loc_Segment6,
1222 loc_segment7 = X_Loc_Segment7,
1223 loc_segment8 = X_Loc_Segment8,
1224 loc_segment9 = X_Loc_Segment9,
1225 loc_segment10 = X_Loc_Segment10,
1226 loc_segment11 = X_Loc_Segment11,
1227 loc_segment12 = X_Loc_Segment12,
1228 loc_segment13 = X_Loc_Segment13,
1229 loc_segment14 = X_Loc_Segment14,
1230 loc_segment15 = X_Loc_Segment15,
1231 loc_segment16 = X_Loc_Segment16,
1232 loc_segment17 = X_Loc_Segment17,
1233 loc_segment18 = X_Loc_Segment18,
1234 loc_segment19 = X_Loc_Segment19,
1235 loc_segment20 = X_Loc_Segment20,
1236 transaction_source_id = X_Transaction_Source_Id,
1237 dsp_segment1 = X_Dsp_Segment1,
1238 dsp_segment2 = X_Dsp_Segment2,
1239 dsp_segment3 = X_Dsp_Segment3,
1240 dsp_segment4 = X_Dsp_Segment4,
1241 dsp_segment5 = X_Dsp_Segment5,
1242 dsp_segment6 = X_Dsp_Segment6,
1243 dsp_segment7 = X_Dsp_Segment7,
1244 dsp_segment8 = X_Dsp_Segment8,
1245 dsp_segment9 = X_Dsp_Segment9,
1246 dsp_segment10 = X_Dsp_Segment10,
1247 dsp_segment11 = X_Dsp_Segment11,
1248 dsp_segment12 = X_Dsp_Segment12,
1249 dsp_segment13 = X_Dsp_Segment13,
1250 dsp_segment14 = X_Dsp_Segment14,
1251 dsp_segment15 = X_Dsp_Segment15,
1252 dsp_segment16 = X_Dsp_Segment16,
1253 dsp_segment17 = X_Dsp_Segment17,
1254 dsp_segment18 = X_Dsp_Segment18,
1255 dsp_segment19 = X_Dsp_Segment19,
1256 dsp_segment20 = X_Dsp_Segment20,
1257 dsp_segment21 = X_Dsp_Segment21,
1258 dsp_segment22 = X_Dsp_Segment22,
1259 dsp_segment23 = X_Dsp_Segment23,
1260 dsp_segment24 = X_Dsp_Segment24,
1261 dsp_segment25 = X_Dsp_Segment25,
1262 dsp_segment26 = X_Dsp_Segment26,
1263 dsp_segment27 = X_Dsp_Segment27,
1264 dsp_segment28 = X_Dsp_Segment28,
1265 dsp_segment29 = X_Dsp_Segment29,
1266 dsp_segment30 = X_Dsp_Segment30,
1267 transaction_source_name = X_Transaction_Source_Name,
1268 transaction_source_type_id = X_Transaction_Source_Type_Id,
1269 transaction_action_id = X_Transaction_Action_Id,
1270 transaction_type_id = X_Transaction_Type_Id,
1271 reason_id = X_Reason_Id,
1272 transaction_reference = X_Transaction_Reference,
1273 transaction_cost = X_Transaction_Cost,
1274 cost_group_id = X_cost_group_id,
1275 distribution_account_id = X_Distribution_Account_Id,
1276 dst_segment1 = X_Dst_Segment1,
1277 dst_segment2 = X_Dst_Segment2,
1278 dst_segment3 = X_Dst_Segment3,
1279 dst_segment4 = X_Dst_Segment4,
1280 dst_segment5 = X_Dst_Segment5,
1281 dst_segment6 = X_Dst_Segment6,
1282 dst_segment7 = X_Dst_Segment7,
1283 dst_segment8 = X_Dst_Segment8,
1284 dst_segment9 = X_Dst_Segment9,
1285 dst_segment10 = X_Dst_Segment10,
1286 dst_segment11 = X_Dst_Segment11,
1287 dst_segment12 = X_Dst_Segment12,
1288 dst_segment13 = X_Dst_Segment13,
1289 dst_segment14 = X_Dst_Segment14,
1290 dst_segment15 = X_Dst_Segment15,
1291 dst_segment16 = X_Dst_Segment16,
1292 dst_segment17 = X_Dst_Segment17,
1293 dst_segment18 = X_Dst_Segment18,
1294 dst_segment19 = X_Dst_Segment19,
1295 dst_segment20 = X_Dst_Segment20,
1296 dst_segment21 = X_Dst_Segment21,
1297 dst_segment22 = X_Dst_Segment22,
1298 dst_segment23 = X_Dst_Segment23,
1299 dst_segment24 = X_Dst_Segment24,
1300 dst_segment25 = X_Dst_Segment25,
1301 dst_segment26 = X_Dst_Segment26,
1302 dst_segment27 = X_Dst_Segment27,
1303 dst_segment28 = X_Dst_Segment28,
1304 dst_segment29 = X_Dst_Segment29,
1305 dst_segment30 = X_Dst_Segment30,
1306 currency_code = X_Currency_Code,
1307 currency_conversion_type = X_Currency_Conversion_Type,
1308 currency_conversion_rate = X_Currency_Conversion_Rate,
1309 ussgl_transaction_code = X_Ussgl_Transaction_Code,
1310 wip_entity_type = X_Wip_Entity_Type,
1311 schedule_id = X_Schedule_Id,
1312 employee_code = X_Employee_Code,
1313 department_id = X_Department_Id,
1314 schedule_update_code = X_Schedule_Update_Code,
1315 setup_teardown_code = X_Setup_Teardown_Code,
1316 primary_switch = X_Primary_Switch,
1317 mrp_code = X_Mrp_Code,
1318 operation_seq_num = X_Operation_Seq_Num,
1319 repetitive_line_id = X_Repetitive_Line_Id,
1320 line_item_num = X_Line_Item_Num,
1321 ship_to_location_id = X_Ship_To_Location_Id,
1322 encumbrance_account = X_Encumbrance_Account,
1323 encumbrance_amount = X_Encumbrance_Amount,
1324 transfer_subinventory = X_Transfer_Subinventory,
1325 transfer_organization = X_Transfer_Organization,
1326 transfer_locator = X_Transfer_Locator,
1327 xfer_loc_segment1 = X_Xfer_Loc_Segment1,
1328 xfer_loc_segment2 = X_Xfer_Loc_Segment2,
1329 xfer_loc_segment3 = X_Xfer_Loc_Segment3,
1330 xfer_loc_segment4 = X_Xfer_Loc_Segment4,
1331 xfer_loc_segment5 = X_Xfer_Loc_Segment5,
1332 xfer_loc_segment6 = X_Xfer_Loc_Segment6,
1333 xfer_loc_segment7 = X_Xfer_Loc_Segment7,
1334 xfer_loc_segment8 = X_Xfer_Loc_Segment8,
1335 xfer_loc_segment9 = X_Xfer_Loc_Segment9,
1336 xfer_loc_segment10 = X_Xfer_Loc_Segment10,
1337 xfer_loc_segment11 = X_Xfer_Loc_Segment11,
1338 xfer_loc_segment12 = X_Xfer_Loc_Segment12,
1339 xfer_loc_segment13 = X_Xfer_Loc_Segment13,
1340 xfer_loc_segment14 = X_Xfer_Loc_Segment14,
1341 xfer_loc_segment15 = X_Xfer_Loc_Segment15,
1342 xfer_loc_segment16 = X_Xfer_Loc_Segment16,
1343 xfer_loc_segment17 = X_Xfer_Loc_Segment17,
1344 xfer_loc_segment18 = X_Xfer_Loc_Segment18,
1345 xfer_loc_segment19 = X_Xfer_Loc_Segment19,
1346 xfer_loc_segment20 = X_Xfer_Loc_Segment20,
1347 shipment_number = X_Shipment_Number,
1348 transportation_cost = X_Transportation_Cost,
1349 transportation_account = X_Transportation_Account,
1350 transfer_cost = X_Transfer_Cost,
1351 freight_code = X_Freight_Code,
1352 containers = X_Containers,
1353 waybill_airbill = X_Waybill_Airbill,
1354 expected_arrival_date = X_Expected_Arrival_Date,
1355 new_average_cost = X_New_Average_Cost,
1356 value_change = X_Value_Change,
1357 percentage_change = X_Percentage_Change,
1358 required_flag = X_Required_Flag,
1359 attribute_category = X_Attribute_Category,
1360 attribute1 = X_Attribute1,
1361 attribute2 = X_Attribute2,
1362 attribute3 = X_Attribute3,
1363 attribute4 = X_Attribute4,
1364 attribute5 = X_Attribute5,
1365 attribute6 = X_Attribute6,
1366 attribute7 = X_Attribute7,
1367 attribute8 = X_Attribute8,
1368 attribute9 = X_Attribute9,
1369 attribute10 = X_Attribute10,
1370 attribute11 = X_Attribute11,
1371 attribute12 = X_Attribute12,
1372 attribute13 = X_Attribute13,
1373 attribute14 = X_Attribute14,
1374 attribute15 = X_Attribute15,
1375 validation_required = X_Validation_Required,
1376 negative_req_flag = X_Negative_Req_Flag,
1377 shippable_flag = X_Shippable_Flag,
1378 currency_conversion_date = X_Currency_Conversion_Date,
1379 movement_id = X_Movement_Id,
1380 source_project_id = X_Source_Project_Id,
1381 source_task_id = X_Source_Task_Id,
1382 project_id = X_Project_Id,
1383 task_id = X_Task_Id,
1384 to_project_id = X_To_Project_Id,
1385 to_task_id = X_To_Task_Id,
1386 pa_expenditure_org_id = X_Pa_Expenditure_Org_Id,
1387 expenditure_type = X_Expenditure_Type,
1388 lpn_id = X_Lpn_Id,
1389 transfer_lpn_id = X_Transfer_lpn_id,
1390 transfer_cost_group_id = X_Transfer_Cost_Group_Id,
1391 content_lpn_id = x_content_lpn_id,
1392 owning_tp_type = x_owning_tp_type,
1393 owning_organization_id = x_owning_organization_id,
1394 planning_organization_id = x_planning_organization_id,
1395 planning_tp_type = x_planning_tp_type,
1396 demand_source_header_id = X_demand_source_header_id, --2520630
1397 demand_source_line = X_demand_source_line, --2520630
1398 demand_source_delivery = X_demand_source_delivery, --2520630
1399 material_account = x_material_account, --Bug#5208421
1400 --INVCON kkillams
1401 secondary_transaction_quantity = x_secondary_qty,
1402 secondary_uom_code = x_secondary_uom_code
1403 --END INVCON kkillams
1404
1405 WHERE rowid = X_Rowid;
1406
1407 --resubmit dependent records
1408 -- Bug Fix:4209056
1409
1410 select transaction_batch_id,transaction_header_id
1411 into l_transaction_batch_id,l_transaction_header_id
1412 from mtl_transactions_interface
1413 where rowid = X_Rowid;
1414
1415 IF (l_transaction_batch_id IS NOT NULL) THEN
1416
1417 UPDATE mtl_transactions_interface
1418 SET process_flag = 1
1419 , transaction_mode = 3
1420 , lock_flag = 2
1421 WHERE transaction_header_id = l_transaction_header_id
1422 AND transaction_batch_id=l_transaction_batch_id
1423 AND Nvl(lock_flag,2) <> 1;
1424 ELSE
1425 UPDATE mtl_transactions_interface
1426 SET process_flag = 1
1427 , transaction_mode = 3
1428 , lock_flag = 2
1429 where rowid = X_Rowid;
1430 END IF;
1431
1432 --end of resubmit dependent records (Bug Fix:4209056)
1433
1434
1435 /* Removing this code for the Bug Fix-4209056
1436 -- Begin for the bug 2203608
1437 if (X_Process_Flag = 1 and X_Transaction_Type_Id in (44,90,91,17)) then
1438
1439 SELECT COUNT(*)
1440 INTO NUMBER_OF_COMPONENTS
1441 FROM MTL_TRANSACTIONS_INTERFACE
1442 WHERE PARENT_ID = (SELECT nvl(TRANSACTION_INTERFACE_ID,-9999)
1443 FROM MTL_TRANSACTIONS_INTERFACE
1444 WHERE ROWID = X_Rowid)
1445 AND FLOW_SCHEDULE = 'Y';
1446
1447 if nvl(NUMBER_OF_COMPONENTS,0) > 0 then
1448 UPDATE MTL_TRANSACTIONS_INTERFACE
1449 SET PROCESS_FLAG = 2,
1450 TRANSACTION_MODE = 3,
1451 LOCK_FLAG = 2,
1452 ERROR_CODE = NULL ,
1453 ERROR_EXPLANATION = NULL
1454 WHERE PARENT_ID = (SELECT nvl(TRANSACTION_INTERFACE_ID,-9999)
1455 FROM MTL_TRANSACTIONS_INTERFACE
1456 WHERE ROWID = X_Rowid)
1457 AND FLOW_SCHEDULE = 'Y';
1458 end if;
1459 end if;
1460 --End for the bug 2203608
1461 End of removing code for Bug Fix-4209056*/
1462
1463 if (SQL%NOTFOUND) then
1464 Raise NO_DATA_FOUND;
1465 end if;
1466 END Update_Row;
1467
1468 PROCEDURE Delete_Row(X_Rowid VARCHAR2) IS
1469
1470 x_tran_type_id NUMBER ;
1471 number_of_components NUMBER:= 0 ;
1472
1473 BEGIN
1474
1475 -- Begin for the bug 2203608
1476 select transaction_Type_id into x_tran_type_id from mtl_Transactions_interface
1477 WHERE rowid = X_Rowid;
1478
1479 if (x_tran_type_id in (44,90,91,17)) then
1480
1481 SELECT COUNT(*)
1482 INTO NUMBER_OF_COMPONENTS
1483 FROM MTL_TRANSACTIONS_INTERFACE
1484 WHERE PARENT_ID = (SELECT nvl(TRANSACTION_INTERFACE_ID,-9999)
1485 FROM MTL_TRANSACTIONS_INTERFACE
1486 WHERE ROWID = X_Rowid)
1487 AND FLOW_SCHEDULE = 'Y';
1488
1489 if nvl(NUMBER_OF_COMPONENTS,0) > 0 then
1490 DELETE FROM MTL_TRANSACTIONS_INTERFACE
1491 WHERE PARENT_ID = (SELECT nvl(TRANSACTION_INTERFACE_ID,-9999)
1492 FROM MTL_TRANSACTIONS_INTERFACE
1493 WHERE ROWID = X_Rowid)
1494 AND FLOW_SCHEDULE = 'Y';
1495 end if;
1496 end if;
1497 --End for the bug 2203608
1498
1499
1500 DELETE FROM MTL_TRANSACTIONS_INTERFACE
1501 WHERE rowid = X_Rowid;
1502
1503 if (SQL%NOTFOUND) then
1504 Raise NO_DATA_FOUND;
1505 end if;
1506 END Delete_Row;
1507
1508
1509 END MTL_TRANSACTIONS_INTERFACE_PKG;