22: If OE_CODE_CONTROL.GET_CODE_RELEASE_LEVEL >= '110510' THEN
23: If nvl(FND_PROFILE.VALUE('ONT_XML_ACCEPT_STATE'), 'ENTERED') = 'ENTERED' Then
24: Return '0';
25: Elsif nvl(p_booked_flag, 'N') = 'N' AND p_transaction_type = OE_Acknowledgment_Pub.G_TRANSACTION_POI Then
26: oe_debug_pub.add('return Pending');
27: Return '3'; -- pending
28: Else
29: oe_debug_pub.add('return Accepted - code is 0, post-110510');
30: Return '0';
25: Elsif nvl(p_booked_flag, 'N') = 'N' AND p_transaction_type = OE_Acknowledgment_Pub.G_TRANSACTION_POI Then
26: oe_debug_pub.add('return Pending');
27: Return '3'; -- pending
28: Else
29: oe_debug_pub.add('return Accepted - code is 0, post-110510');
30: Return '0';
31: End If;
32: Else
33: oe_debug_pub.add('return Accepted - code is 0, pre-110510');
29: oe_debug_pub.add('return Accepted - code is 0, post-110510');
30: Return '0';
31: End If;
32: Else
33: oe_debug_pub.add('return Accepted - code is 0, pre-110510');
34: Return '0';
35: End If;
36: Else
37: Return 'IA'; --Changed AT to IA for bug 4137350
37: Return 'IA'; --Changed AT to IA for bug 4137350
38: End If;
39: Elsif p_reject_order = 'Y' Then
40: If p_order_source_id = 20 Then
41: oe_debug_pub.add('return Rejected - code is 2');
42: Return '2';
43: Else
44: Return 'RJ';
45: End If;
56: p_last_ack_code IN VARCHAR2
57: )
58: IS
59: BEGIN
60: oe_debug_pub.add ('Entering Update_Header_Ack_Code with params: header id ' ||
61: p_header_id || ', first_ack_code ' || p_first_ack_code
62: || ', last_ack_code ' || p_last_ack_code || '.');
63: IF p_first_ack_code IS NOT NULL THEN
64: UPDATE oe_header_acks
63: IF p_first_ack_code IS NOT NULL THEN
64: UPDATE oe_header_acks
65: SET first_ack_code = p_first_ack_code
66: WHERE header_id = p_header_id;
67: oe_debug_pub.add ('rows updated: ' || SQL%ROWCOUNT);
68: ELSIF p_last_ack_code IS NOT NULL THEN
69: UPDATE oe_header_acks
70: SET last_ack_code = p_last_ack_code
71: WHERE header_id = p_header_id;
68: ELSIF p_last_ack_code IS NOT NULL THEN
69: UPDATE oe_header_acks
70: SET last_ack_code = p_last_ack_code
71: WHERE header_id = p_header_id;
72: oe_debug_pub.add ('rows updated: ' || SQL%ROWCOUNT);
73: ELSE
74: oe_debug_pub.add ('Bad args passed to update_header_ack_code, no header records updated');
75: END IF;
76: EXCEPTION
70: SET last_ack_code = p_last_ack_code
71: WHERE header_id = p_header_id;
72: oe_debug_pub.add ('rows updated: ' || SQL%ROWCOUNT);
73: ELSE
74: oe_debug_pub.add ('Bad args passed to update_header_ack_code, no header records updated');
75: END IF;
76: EXCEPTION
77: WHEN OTHERS THEN
78: oe_debug_pub.add ('When Others in Update_Header_Ack_Code');
74: oe_debug_pub.add ('Bad args passed to update_header_ack_code, no header records updated');
75: END IF;
76: EXCEPTION
77: WHEN OTHERS THEN
78: oe_debug_pub.add ('When Others in Update_Header_Ack_Code');
79: END Update_Header_Ack_Code;
80:
81:
82: PROCEDURE Insert_Row
156: Else
157: l_line_val_rec := p_line_val_tbl(I);
158:
159: -- Following Check will determine if this is a 855 or 865
160: oe_debug_pub.add('l_line_rec.SCHEDULE_SHIP_DATE :' || l_line_rec.SCHEDULE_SHIP_DATE,1);
161: oe_debug_pub.add('l_line_rec.REQUEST_DATE :' || l_line_rec.REQUEST_DATE, 1);
162:
163: IF (nvl(l_line_rec.FIRST_ACK_CODE, ' ')= ' ' OR
164: l_line_rec.FIRST_ACK_CODE = FND_API.G_MISS_CHAR) THEN -- It is 855
157: l_line_val_rec := p_line_val_tbl(I);
158:
159: -- Following Check will determine if this is a 855 or 865
160: oe_debug_pub.add('l_line_rec.SCHEDULE_SHIP_DATE :' || l_line_rec.SCHEDULE_SHIP_DATE,1);
161: oe_debug_pub.add('l_line_rec.REQUEST_DATE :' || l_line_rec.REQUEST_DATE, 1);
162:
163: IF (nvl(l_line_rec.FIRST_ACK_CODE, ' ')= ' ' OR
164: l_line_rec.FIRST_ACK_CODE = FND_API.G_MISS_CHAR) THEN -- It is 855
165: oe_debug_pub.add('trans is 855 with first_ack_code ' ||nvl(l_line_rec.FIRST_ACK_CODE, 'NULL' ));
161: oe_debug_pub.add('l_line_rec.REQUEST_DATE :' || l_line_rec.REQUEST_DATE, 1);
162:
163: IF (nvl(l_line_rec.FIRST_ACK_CODE, ' ')= ' ' OR
164: l_line_rec.FIRST_ACK_CODE = FND_API.G_MISS_CHAR) THEN -- It is 855
165: oe_debug_pub.add('trans is 855 with first_ack_code ' ||nvl(l_line_rec.FIRST_ACK_CODE, 'NULL' ));
166: IF l_line_rec.SCHEDULE_SHIP_DATE is NULL THEN
167: oe_debug_pub.add('ack code: schedule ship date is null');
168: l_line_rec.FIRST_ACK_CODE := 'SP';
169: END IF;
163: IF (nvl(l_line_rec.FIRST_ACK_CODE, ' ')= ' ' OR
164: l_line_rec.FIRST_ACK_CODE = FND_API.G_MISS_CHAR) THEN -- It is 855
165: oe_debug_pub.add('trans is 855 with first_ack_code ' ||nvl(l_line_rec.FIRST_ACK_CODE, 'NULL' ));
166: IF l_line_rec.SCHEDULE_SHIP_DATE is NULL THEN
167: oe_debug_pub.add('ack code: schedule ship date is null');
168: l_line_rec.FIRST_ACK_CODE := 'SP';
169: END IF;
170: IF l_line_rec.SCHEDULE_SHIP_DATE is NOT NULL
171: AND trunc(l_line_rec.SCHEDULE_SHIP_DATE) <> nvl(trunc(l_line_rec.REQUEST_DATE), FND_API.G_MISS_DATE)
169: END IF;
170: IF l_line_rec.SCHEDULE_SHIP_DATE is NOT NULL
171: AND trunc(l_line_rec.SCHEDULE_SHIP_DATE) <> nvl(trunc(l_line_rec.REQUEST_DATE), FND_API.G_MISS_DATE)
172: THEN
173: oe_debug_pub.add('ack code: date rescheduled');
174: l_line_rec.FIRST_ACK_CODE := 'DR';
175: END IF;
176:
177: --Added for bug 4771523+bug 4454400 start
177: --Added for bug 4771523+bug 4454400 start
178: If nvl(l_line_rec.unit_selling_price, FND_API.G_MISS_NUM) <> nvl(p_old_line_tbl(I).unit_selling_price, FND_API.G_MISS_NUM)
179: THEN
180: l_line_rec.FIRST_ACK_CODE := 'IP';
181: oe_debug_pub.add('new unit selling price: ' || l_line_rec.unit_selling_price);
182: oe_debug_pub.add('old unit selling price: ' || p_old_line_tbl(I).unit_selling_price);
183: oe_debug_pub.add('ack code: price changed');
184: END IF;
185: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
178: If nvl(l_line_rec.unit_selling_price, FND_API.G_MISS_NUM) <> nvl(p_old_line_tbl(I).unit_selling_price, FND_API.G_MISS_NUM)
179: THEN
180: l_line_rec.FIRST_ACK_CODE := 'IP';
181: oe_debug_pub.add('new unit selling price: ' || l_line_rec.unit_selling_price);
182: oe_debug_pub.add('old unit selling price: ' || p_old_line_tbl(I).unit_selling_price);
183: oe_debug_pub.add('ack code: price changed');
184: END IF;
185: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
186: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
179: THEN
180: l_line_rec.FIRST_ACK_CODE := 'IP';
181: oe_debug_pub.add('new unit selling price: ' || l_line_rec.unit_selling_price);
182: oe_debug_pub.add('old unit selling price: ' || p_old_line_tbl(I).unit_selling_price);
183: oe_debug_pub.add('ack code: price changed');
184: END IF;
185: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
186: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
187:
184: END IF;
185: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
186: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
187:
188: oe_debug_pub.add(' unit_selling_price in global : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
189: oe_debug_pub.add(' CUSTOMER_ITEM_NET_PRICE in global : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
190:
191: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
192: l_line_rec.FIRST_ACK_CODE := 'IP';
185: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
186: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
187:
188: oe_debug_pub.add(' unit_selling_price in global : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
189: oe_debug_pub.add(' CUSTOMER_ITEM_NET_PRICE in global : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
190:
191: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
192: l_line_rec.FIRST_ACK_CODE := 'IP';
193: oe_debug_pub.add(' ack code: price changed : '||l_line_rec.FIRST_ACK_CODE,5);
189: oe_debug_pub.add(' CUSTOMER_ITEM_NET_PRICE in global : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
190:
191: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
192: l_line_rec.FIRST_ACK_CODE := 'IP';
193: oe_debug_pub.add(' ack code: price changed : '||l_line_rec.FIRST_ACK_CODE,5);
194: END IF;
195: oe_debug_pub.add(' new unit selling price: ' || l_line_rec.unit_selling_price,5);
196: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(I).unit_selling_price,5);
197: END IF;
191: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
192: l_line_rec.FIRST_ACK_CODE := 'IP';
193: oe_debug_pub.add(' ack code: price changed : '||l_line_rec.FIRST_ACK_CODE,5);
194: END IF;
195: oe_debug_pub.add(' new unit selling price: ' || l_line_rec.unit_selling_price,5);
196: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(I).unit_selling_price,5);
197: END IF;
198: --Added for bug 4771523+bug 4454400 end
199:
192: l_line_rec.FIRST_ACK_CODE := 'IP';
193: oe_debug_pub.add(' ack code: price changed : '||l_line_rec.FIRST_ACK_CODE,5);
194: END IF;
195: oe_debug_pub.add(' new unit selling price: ' || l_line_rec.unit_selling_price,5);
196: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(I).unit_selling_price,5);
197: END IF;
198: --Added for bug 4771523+bug 4454400 end
199:
200:
276: -- Added for bug 4771523 + bug 4454400 start
277: If nvl(l_line_rec.unit_selling_price, FND_API.G_MISS_NUM) <> nvl(p_old_line_tbl(I).unit_selling_price, FND_API.G_MISS_NUM)
278: THEN
279: l_line_rec.LAST_ACK_CODE := 'IP';
280: oe_debug_pub.add('new unit selling price: ' || l_line_rec.unit_selling_price);
281: oe_debug_pub.add('old unit selling price: ' || p_old_line_tbl(I).unit_selling_price);
282: oe_debug_pub.add('ack code: price changed');
283: END IF;
284:
277: If nvl(l_line_rec.unit_selling_price, FND_API.G_MISS_NUM) <> nvl(p_old_line_tbl(I).unit_selling_price, FND_API.G_MISS_NUM)
278: THEN
279: l_line_rec.LAST_ACK_CODE := 'IP';
280: oe_debug_pub.add('new unit selling price: ' || l_line_rec.unit_selling_price);
281: oe_debug_pub.add('old unit selling price: ' || p_old_line_tbl(I).unit_selling_price);
282: oe_debug_pub.add('ack code: price changed');
283: END IF;
284:
285: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
278: THEN
279: l_line_rec.LAST_ACK_CODE := 'IP';
280: oe_debug_pub.add('new unit selling price: ' || l_line_rec.unit_selling_price);
281: oe_debug_pub.add('old unit selling price: ' || p_old_line_tbl(I).unit_selling_price);
282: oe_debug_pub.add('ack code: price changed');
283: END IF;
284:
285: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
286: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
284:
285: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
286: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
287:
288: oe_debug_pub.add(' unit_selling_price in global : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
289: oe_debug_pub.add(' CUSTOMER_ITEM_NET_PRICE in global : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
290:
291: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
292: l_line_rec.LAST_ACK_CODE := 'IP';
285: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
286: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
287:
288: oe_debug_pub.add(' unit_selling_price in global : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
289: oe_debug_pub.add(' CUSTOMER_ITEM_NET_PRICE in global : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
290:
291: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
292: l_line_rec.LAST_ACK_CODE := 'IP';
293: oe_debug_pub.add(' ack code: price changed : '||l_line_rec.FIRST_ACK_CODE,5);
289: oe_debug_pub.add(' CUSTOMER_ITEM_NET_PRICE in global : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
290:
291: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
292: l_line_rec.LAST_ACK_CODE := 'IP';
293: oe_debug_pub.add(' ack code: price changed : '||l_line_rec.FIRST_ACK_CODE,5);
294: END IF;
295: oe_debug_pub.add(' new unit selling price: ' || l_line_rec.unit_selling_price,5);
296: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(I).unit_selling_price,5);
297: END IF;
291: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
292: l_line_rec.LAST_ACK_CODE := 'IP';
293: oe_debug_pub.add(' ack code: price changed : '||l_line_rec.FIRST_ACK_CODE,5);
294: END IF;
295: oe_debug_pub.add(' new unit selling price: ' || l_line_rec.unit_selling_price,5);
296: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(I).unit_selling_price,5);
297: END IF;
298: -- Added for bug 4771523 + bug 4454400 end
299:
292: l_line_rec.LAST_ACK_CODE := 'IP';
293: oe_debug_pub.add(' ack code: price changed : '||l_line_rec.FIRST_ACK_CODE,5);
294: END IF;
295: oe_debug_pub.add(' new unit selling price: ' || l_line_rec.unit_selling_price,5);
296: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(I).unit_selling_price,5);
297: END IF;
298: -- Added for bug 4771523 + bug 4454400 end
299:
300: IF l_line_rec.ORDERED_QUANTITY <> p_old_line_tbl(I).ORDERED_QUANTITY
353:
354: Else
355: IF nvl(l_line_rec.FIRST_ACK_CODE,' ')=' ' THEN -- It is 855
356: l_line_rec.FIRST_ACK_CODE := 'IR';
357: oe_debug_pub.add('855 nulling first_ack_date');
358: l_line_rec.FIRST_ACK_DATE := '';
359: l_line_rec.LAST_ACK_CODE := '';
360: l_line_rec.LAST_ACK_DATE := '';
361: ELSE
416: AND nvl(change_sequence, FND_API.G_MISS_CHAR)
417: = nvl(l_line_rec.change_sequence, FND_API.G_MISS_CHAR);
418: end if;
419: IF l_count > 0 THEN
420: oe_debug_pub.add('l_count > 0, Calling Delete_Row');
421: OE_Line_Ack_Util.Delete_Row (p_line_id => l_line_rec.line_id,
422: p_ack_type => p_ack_type,
423: p_sold_to_org_id => l_line_rec.sold_to_org_id,
424: p_sold_to_org => l_line_val_rec.sold_to_org,
426: p_request_id => l_line_rec.request_id,
427: p_header_id => l_line_rec.header_id);
428:
429: ELSE
430: oe_debug_pub.add('l_count <= 0 for line_id, attempting delete by doc ref, line ref and ship ref');
431: OE_Line_Ack_Util.Delete_Row (p_line_id => NULL,
432: p_ack_type => p_ack_type,
433: p_orig_sys_document_ref => l_line_rec.orig_sys_document_ref,
434: p_orig_sys_line_ref => l_line_rec.orig_sys_line_ref,
461: -- AND nvl(l_line_rec.line_id,0) <> 0)
462:
463: THEN
464:
465: oe_debug_pub.add('inserting line ack record for'||
466: ' source id: ' ||to_char(l_line_rec.order_source_id)||
467: ', order ref: ' ||l_line_rec.orig_sys_document_ref||
468: ', line ref: ' ||l_line_rec.orig_sys_line_ref||
469: ', line id: ' ||to_char(l_line_rec.line_id)||
470: ', line no: ' ||to_char(l_line_rec.line_number)||
471: ', shipment no: '||to_char(l_line_rec.shipment_number)||
472: ', option no: ' ||to_char(l_line_rec.option_number));
473:
474: oe_debug_pub.add('item id = '||l_line_rec.inventory_item_id);
475: oe_debug_pub.add('item nm = '||l_line_val_rec.inventory_item);
476: oe_debug_pub.add('first_ack_date = '||l_line_rec.first_ack_date);
477:
478: IF l_line_rec.split_from_line_id IS NOT NULL
471: ', shipment no: '||to_char(l_line_rec.shipment_number)||
472: ', option no: ' ||to_char(l_line_rec.option_number));
473:
474: oe_debug_pub.add('item id = '||l_line_rec.inventory_item_id);
475: oe_debug_pub.add('item nm = '||l_line_val_rec.inventory_item);
476: oe_debug_pub.add('first_ack_date = '||l_line_rec.first_ack_date);
477:
478: IF l_line_rec.split_from_line_id IS NOT NULL
479: AND l_line_rec.split_from_line_id <> FND_API.G_MISS_NUM
472: ', option no: ' ||to_char(l_line_rec.option_number));
473:
474: oe_debug_pub.add('item id = '||l_line_rec.inventory_item_id);
475: oe_debug_pub.add('item nm = '||l_line_val_rec.inventory_item);
476: oe_debug_pub.add('first_ack_date = '||l_line_rec.first_ack_date);
477:
478: IF l_line_rec.split_from_line_id IS NOT NULL
479: AND l_line_rec.split_from_line_id <> FND_API.G_MISS_NUM
480: THEN
478: IF l_line_rec.split_from_line_id IS NOT NULL
479: AND l_line_rec.split_from_line_id <> FND_API.G_MISS_NUM
480: THEN
481: --bsadri get the split reference
482: oe_debug_pub.add('bsadri get the reference for split id :' ||
483: l_line_rec.split_from_line_id);
484: BEGIN
485: SELECT orig_sys_line_ref, orig_sys_shipment_ref
486: INTO l_line_rec.split_from_line_ref, l_line_rec.split_from_shipment_ref
487: FROM OE_ORDER_LINES
488: WHERE line_id = l_line_rec.split_from_line_id;
489: EXCEPTION
490: WHEN OTHERS THEN
491: oe_debug_pub.add('bsadri failed to get the refernce for split line');
492: END;
493: END IF;
494: --added end customer fields for bug 4034441
495: INSERT INTO OE_LINE_ACKS
1280: ,l_line_val_rec.end_customer_site_postal_code
1281: ,l_line_val_rec.end_customer_site_country
1282: );
1283: ELSE
1284: oe_debug_pub.add('Incomplete data for inserting line ack rec');
1285: END IF;
1286: <
1287: I := p_line_tbl.NEXT(I);
1288: END LOOP;
1290: EXCEPTION
1291:
1292: WHEN OTHERS THEN
1293:
1294: oe_debug_pub.Add('Encountered Others Error Exception in OE_Line_Ack_Util.Insert_Row: '||sqlerrm);
1295:
1296: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1297: THEN
1298: FND_MSG_PUB.Add_Exc_Msg
1310: p_count In Number)
1311:
1312: Is
1313:
1314: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1315:
1316: Begin
1317: oe_debug_pub.add('Entering Extend_Line_Rec');
1318:
1313:
1314: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1315:
1316: Begin
1317: oe_debug_pub.add('Entering Extend_Line_Rec');
1318:
1319: p_line_rec.line_id.extend(p_count);
1320: p_line_rec.header_id.extend(p_count);
1321: p_line_rec.ship_to_org_id.extend(p_count);
1607: p_line_rec.ib_installed_at_location.extend(p_count);
1608: -- Distributer Order related change }
1609: p_line_rec.charge_periodicity_code.extend(p_count);
1610:
1611: oe_debug_pub.add('Exiting Extend_Line_Rec');
1612:
1613: Exception
1614: When Others Then
1615: If l_debug_level > 0 Then
1612:
1613: Exception
1614: When Others Then
1615: If l_debug_level > 0 Then
1616: Oe_Debug_Pub.Add('When Others in Extend_Line_Rec');
1617: Oe_Debug_Pub.Add('Error: '||sqlerrm);
1618: End If;
1619:
1620: End Extend_Line_Rec;
1613: Exception
1614: When Others Then
1615: If l_debug_level > 0 Then
1616: Oe_Debug_Pub.Add('When Others in Extend_Line_Rec');
1617: Oe_Debug_Pub.Add('Error: '||sqlerrm);
1618: End If;
1619:
1620: End Extend_Line_Rec;
1621:
1665: l_line_tbl(i).first_ack_code := 'IP';
1666: End If;
1667: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
1668: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
1669: oe_debug_pub.add(' Global Unit_Selling_Price : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
1670: oe_debug_pub.add(' Global CUSTOMER_ITEM_NET_PRICE : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
1671: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
1672: l_line_tbl(i).FIRST_ACK_CODE := 'IP';
1673: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1666: End If;
1667: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
1668: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
1669: oe_debug_pub.add(' Global Unit_Selling_Price : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
1670: oe_debug_pub.add(' Global CUSTOMER_ITEM_NET_PRICE : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
1671: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
1672: l_line_tbl(i).FIRST_ACK_CODE := 'IP';
1673: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1674: END IF;
1669: oe_debug_pub.add(' Global Unit_Selling_Price : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
1670: oe_debug_pub.add(' Global CUSTOMER_ITEM_NET_PRICE : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
1671: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
1672: l_line_tbl(i).FIRST_ACK_CODE := 'IP';
1673: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1674: END IF;
1675: oe_debug_pub.add(' new unit selling price: ' || l_line_tbl(i).unit_selling_price,5);
1676: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(i).unit_selling_price,5);
1677: END IF;
1671: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
1672: l_line_tbl(i).FIRST_ACK_CODE := 'IP';
1673: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1674: END IF;
1675: oe_debug_pub.add(' new unit selling price: ' || l_line_tbl(i).unit_selling_price,5);
1676: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(i).unit_selling_price,5);
1677: END IF;
1678: -- Added for bug 4771523 end
1679:
1672: l_line_tbl(i).FIRST_ACK_CODE := 'IP';
1673: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1674: END IF;
1675: oe_debug_pub.add(' new unit selling price: ' || l_line_tbl(i).unit_selling_price,5);
1676: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(i).unit_selling_price,5);
1677: END IF;
1678: -- Added for bug 4771523 end
1679:
1680:
1737: l_line_tbl(i).LAST_ACK_CODE := 'IP';
1738: End If;
1739: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
1740: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
1741: oe_debug_pub.add(' Global Unit_Selling_Price : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
1742: oe_debug_pub.add(' Global CUSTOMER_ITEM_NET_PRICE : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
1743: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
1744: l_line_tbl(i).LAST_ACK_CODE := 'IP';
1745: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1738: End If;
1739: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price IS NOT NULL
1740: AND OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> FND_API.G_MISS_NUM THEN
1741: oe_debug_pub.add(' Global Unit_Selling_Price : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
1742: oe_debug_pub.add(' Global CUSTOMER_ITEM_NET_PRICE : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
1743: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
1744: l_line_tbl(i).LAST_ACK_CODE := 'IP';
1745: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1746: END IF;
1741: oe_debug_pub.add(' Global Unit_Selling_Price : '||OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price,5);
1742: oe_debug_pub.add(' Global CUSTOMER_ITEM_NET_PRICE : '||OE_ORDER_UTIL.g_line_tbl(I).CUSTOMER_ITEM_NET_PRICE,5);
1743: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
1744: l_line_tbl(i).LAST_ACK_CODE := 'IP';
1745: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1746: END IF;
1747: oe_debug_pub.add(' new unit selling price: ' || l_line_tbl(i).unit_selling_price,5);
1748: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(i).unit_selling_price,5);
1749: END IF;
1743: IF OE_ORDER_UTIL.g_line_tbl(I).customer_item_net_price <> OE_ORDER_UTIL.g_line_tbl(I).unit_selling_price THEN
1744: l_line_tbl(i).LAST_ACK_CODE := 'IP';
1745: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1746: END IF;
1747: oe_debug_pub.add(' new unit selling price: ' || l_line_tbl(i).unit_selling_price,5);
1748: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(i).unit_selling_price,5);
1749: END IF;
1750: -- Added for bug 4771523
1751:
1744: l_line_tbl(i).LAST_ACK_CODE := 'IP';
1745: oe_debug_pub.add(' ack code: price changed : '||l_line_tbl(i).FIRST_ACK_CODE,5);
1746: END IF;
1747: oe_debug_pub.add(' new unit selling price: ' || l_line_tbl(i).unit_selling_price,5);
1748: oe_debug_pub.add(' old unit selling price: ' || p_old_line_tbl(i).unit_selling_price,5);
1749: END IF;
1750: -- Added for bug 4771523
1751:
1752: If l_line_tbl(i).ORDERED_QUANTITY <> p_old_line_tbl(I).ORDERED_QUANTITY Then
2745: )
2746: IS
2747: BEGIN
2748:
2749: oe_debug_pub.add('Input Header ID: '|| p_header_id);
2750: oe_debug_pub.add('Input Line ID: '|| p_line_id);
2751: oe_debug_pub.add('Input Orig Sys Document Ref: '|| p_orig_sys_document_ref);
2752:
2753: If (p_header_id is not null AND
2746: IS
2747: BEGIN
2748:
2749: oe_debug_pub.add('Input Header ID: '|| p_header_id);
2750: oe_debug_pub.add('Input Line ID: '|| p_line_id);
2751: oe_debug_pub.add('Input Orig Sys Document Ref: '|| p_orig_sys_document_ref);
2752:
2753: If (p_header_id is not null AND
2754: p_line_id is not null) Then
2747: BEGIN
2748:
2749: oe_debug_pub.add('Input Header ID: '|| p_header_id);
2750: oe_debug_pub.add('Input Line ID: '|| p_line_id);
2751: oe_debug_pub.add('Input Orig Sys Document Ref: '|| p_orig_sys_document_ref);
2752:
2753: If (p_header_id is not null AND
2754: p_line_id is not null) Then
2755:
2786: AND nvl(change_sequence, FND_API.G_MISS_CHAR)
2787: = nvl(p_change_sequence, FND_API.G_MISS_CHAR);
2788: end if;
2789: if sql%rowcount > 0 then
2790: oe_debug_pub.add('Row Deleted from the oe_line_Acks table');
2791: end If;
2792: Elsif (p_orig_sys_document_ref is not null) Then
2793: oe_debug_pub.add('before deleting line acknowledgment by orig_sys_document_Ref, line_ref and shipment_ref ',3);
2794:
2789: if sql%rowcount > 0 then
2790: oe_debug_pub.add('Row Deleted from the oe_line_Acks table');
2791: end If;
2792: Elsif (p_orig_sys_document_ref is not null) Then
2793: oe_debug_pub.add('before deleting line acknowledgment by orig_sys_document_Ref, line_ref and shipment_ref ',3);
2794:
2795: if p_ack_type = oe_acknowledgment_pub.G_TRANSACTION_SSO
2796: Or p_ack_type = oe_acknowledgment_pub.G_TRANSACTION_CSO
2797: then
2826:
2827: end if;
2828:
2829: if sql%rowcount > 0 then
2830: oe_debug_pub.add('Row(s) Deleted from the oe_line_acks table');
2831: end If;
2832: Else
2833: oe_debug_pub.add('not deleting any rows from oe_line_acks ',3);
2834:
2829: if sql%rowcount > 0 then
2830: oe_debug_pub.add('Row(s) Deleted from the oe_line_acks table');
2831: end If;
2832: Else
2833: oe_debug_pub.add('not deleting any rows from oe_line_acks ',3);
2834:
2835: End If;
2836:
2837:
2838: EXCEPTION
2839:
2840: WHEN OTHERS THEN
2841:
2842: oe_debug_pub.Add('Encountered Others Error Exception in OE_Line_Ack_Util.Delete_Row: '||sqlerrm);
2843:
2844: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2845: THEN
2846: FND_MSG_PUB.Add_Exc_Msg