DBA Data[Home] [Help]

APPS.OE_VERSIONING_UTIL dependencies on OE_ORDER_UTIL

Line 29: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element

25: END IF;
26:
27: -- Get created records
28:
29: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
30: WHILE i IS NOT NULL LOOP
31: if oe_order_util.g_old_line_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
32: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_tbl(i).line_id;
33: end if;

Line 31: if oe_order_util.g_old_line_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then

27: -- Get created records
28:
29: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
30: WHILE i IS NOT NULL LOOP
31: if oe_order_util.g_old_line_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
32: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_tbl(i).line_id;
33: end if;
34: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element
35: END LOOP;

Line 32: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_tbl(i).line_id;

28:
29: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
30: WHILE i IS NOT NULL LOOP
31: if oe_order_util.g_old_line_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
32: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_tbl(i).line_id;
33: end if;
34: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element
35: END LOOP;
36:

Line 34: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element

30: WHILE i IS NOT NULL LOOP
31: if oe_order_util.g_old_line_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
32: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_tbl(i).line_id;
33: end if;
34: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element
35: END LOOP;
36:
37: if l_temp_table.count > 0 then
38: FORALL i in 1..l_temp_table.COUNT

Line 44: i := oe_order_util.g_old_header_adj_tbl.FIRST;

40: WHERE line_id = l_temp_table(i);
41: l_temp_table.DELETE;
42: end if;
43:
44: i := oe_order_util.g_old_header_adj_tbl.FIRST;
45: WHILE i IS NOT NULL LOOP
46: if oe_order_util.g_old_header_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
47: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id;
48: end if;

Line 46: if oe_order_util.g_old_header_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then

42: end if;
43:
44: i := oe_order_util.g_old_header_adj_tbl.FIRST;
45: WHILE i IS NOT NULL LOOP
46: if oe_order_util.g_old_header_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
47: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id;
48: end if;
49: i := oe_order_util.g_old_header_adj_tbl.NEXT(i);
50: END LOOP;

Line 47: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id;

43:
44: i := oe_order_util.g_old_header_adj_tbl.FIRST;
45: WHILE i IS NOT NULL LOOP
46: if oe_order_util.g_old_header_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
47: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id;
48: end if;
49: i := oe_order_util.g_old_header_adj_tbl.NEXT(i);
50: END LOOP;
51:

Line 49: i := oe_order_util.g_old_header_adj_tbl.NEXT(i);

45: WHILE i IS NOT NULL LOOP
46: if oe_order_util.g_old_header_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
47: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id;
48: end if;
49: i := oe_order_util.g_old_header_adj_tbl.NEXT(i);
50: END LOOP;
51:
52: i := oe_order_util.g_old_line_adj_tbl.FIRST;
53: WHILE i IS NOT NULL LOOP

Line 52: i := oe_order_util.g_old_line_adj_tbl.FIRST;

48: end if;
49: i := oe_order_util.g_old_header_adj_tbl.NEXT(i);
50: END LOOP;
51:
52: i := oe_order_util.g_old_line_adj_tbl.FIRST;
53: WHILE i IS NOT NULL LOOP
54: if oe_order_util.g_old_line_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
55: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id;
56: end if;

Line 54: if oe_order_util.g_old_line_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then

50: END LOOP;
51:
52: i := oe_order_util.g_old_line_adj_tbl.FIRST;
53: WHILE i IS NOT NULL LOOP
54: if oe_order_util.g_old_line_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
55: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id;
56: end if;
57: i := oe_order_util.g_old_line_adj_tbl.NEXT(i);
58: END LOOP;

Line 55: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id;

51:
52: i := oe_order_util.g_old_line_adj_tbl.FIRST;
53: WHILE i IS NOT NULL LOOP
54: if oe_order_util.g_old_line_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
55: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id;
56: end if;
57: i := oe_order_util.g_old_line_adj_tbl.NEXT(i);
58: END LOOP;
59:

Line 57: i := oe_order_util.g_old_line_adj_tbl.NEXT(i);

53: WHILE i IS NOT NULL LOOP
54: if oe_order_util.g_old_line_adj_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
55: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id;
56: end if;
57: i := oe_order_util.g_old_line_adj_tbl.NEXT(i);
58: END LOOP;
59:
60: if l_temp_table.count > 0 then
61: FORALL i in 1..l_temp_table.COUNT

Line 67: i := oe_order_util.g_old_header_scredit_tbl.FIRST;

63: WHERE price_adjustment_id = l_temp_table(i);
64: l_temp_table.DELETE;
65: end if;
66:
67: i := oe_order_util.g_old_header_scredit_tbl.FIRST;
68: WHILE i IS NOT NULL LOOP
69: if oe_order_util.g_old_header_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
70: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id;
71: end if;

Line 69: if oe_order_util.g_old_header_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then

65: end if;
66:
67: i := oe_order_util.g_old_header_scredit_tbl.FIRST;
68: WHILE i IS NOT NULL LOOP
69: if oe_order_util.g_old_header_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
70: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id;
71: end if;
72: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i);
73: END LOOP;

Line 70: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id;

66:
67: i := oe_order_util.g_old_header_scredit_tbl.FIRST;
68: WHILE i IS NOT NULL LOOP
69: if oe_order_util.g_old_header_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
70: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id;
71: end if;
72: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i);
73: END LOOP;
74:

Line 72: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i);

68: WHILE i IS NOT NULL LOOP
69: if oe_order_util.g_old_header_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
70: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id;
71: end if;
72: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i);
73: END LOOP;
74:
75: i := oe_order_util.g_old_line_scredit_tbl.FIRST;
76: WHILE i IS NOT NULL LOOP

Line 75: i := oe_order_util.g_old_line_scredit_tbl.FIRST;

71: end if;
72: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i);
73: END LOOP;
74:
75: i := oe_order_util.g_old_line_scredit_tbl.FIRST;
76: WHILE i IS NOT NULL LOOP
77: if oe_order_util.g_old_line_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
78: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id;
79: end if;

Line 77: if oe_order_util.g_old_line_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then

73: END LOOP;
74:
75: i := oe_order_util.g_old_line_scredit_tbl.FIRST;
76: WHILE i IS NOT NULL LOOP
77: if oe_order_util.g_old_line_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
78: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id;
79: end if;
80: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i);
81: END LOOP;

Line 78: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id;

74:
75: i := oe_order_util.g_old_line_scredit_tbl.FIRST;
76: WHILE i IS NOT NULL LOOP
77: if oe_order_util.g_old_line_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
78: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id;
79: end if;
80: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i);
81: END LOOP;
82:

Line 80: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i);

76: WHILE i IS NOT NULL LOOP
77: if oe_order_util.g_old_line_scredit_tbl(i).operation = OE_GLOBALS.G_OPR_CREATE then
78: l_temp_table(l_temp_table.count + 1) := oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id;
79: end if;
80: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i);
81: END LOOP;
82:
83: if l_temp_table.count > 0 then
84: FORALL i in 1..l_temp_table.COUNT

Line 145: -- p_version_number => OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER ,

141: OE_Contracts_Util.Version_Articles(
142: p_api_version => 1,
143: p_doc_type => OE_Contracts_Util.G_SO_DOC_TYPE,
144: p_doc_id => p_header_id,
145: -- p_version_number => OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER ,
146: p_version_number => G_VERSION_NUMBER,
147: x_return_status => l_return_status,
148: x_msg_data => x_msg_data,
149: x_msg_count => x_msg_count);

Line 208: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL

204: IF (OE_GLOBALS.G_ROLL_VERSION = 'PV') THEN
205: l_version_flag := 'Y';
206: l_phase_change_flag := 'Y';
207: IF (p_document_type <> 'BLANKETS') THEN
208: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL
209: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN
210: select version_number into l_version_number from oe_order_headers_all where header_id = p_header_id;
211: ELSE
212: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;

Line 209: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN

205: l_version_flag := 'Y';
206: l_phase_change_flag := 'Y';
207: IF (p_document_type <> 'BLANKETS') THEN
208: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL
209: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN
210: select version_number into l_version_number from oe_order_headers_all where header_id = p_header_id;
211: ELSE
212: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;
213: END IF;

Line 212: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;

208: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL
209: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN
210: select version_number into l_version_number from oe_order_headers_all where header_id = p_header_id;
211: ELSE
212: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;
213: END IF;
214: END IF;
215: ELSIF (OE_GLOBALS.G_ROLL_VERSION = 'P') THEN
216: l_version_flag := 'N';

Line 222: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL

218: ELSE
219: l_phase_change_flag := 'N';
220: l_version_flag := 'Y';
221: IF (p_document_type <> 'BLANKETS') THEN
222: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL
223: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN
224: select version_number into l_version_number from oe_order_headers_all where header_id = p_header_id;
225: ELSE
226: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;

Line 223: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN

219: l_phase_change_flag := 'N';
220: l_version_flag := 'Y';
221: IF (p_document_type <> 'BLANKETS') THEN
222: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL
223: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN
224: select version_number into l_version_number from oe_order_headers_all where header_id = p_header_id;
225: ELSE
226: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;
227: END IF;

Line 226: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;

222: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL
223: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN
224: select version_number into l_version_number from oe_order_headers_all where header_id = p_header_id;
225: ELSE
226: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;
227: END IF;
228: END IF;
229: END IF;
230:

Line 304: IF OE_Order_Util.g_header_rec.operation = OE_GLOBALS.G_OPR_CREATE OR

300:
301:
302: -- Return if header is created in same operation
303: -- add g_header_created check to fix bug 3700341
304: IF OE_Order_Util.g_header_rec.operation = OE_GLOBALS.G_OPR_CREATE OR
305: OE_GLOBALS.G_HEADER_CREATED THEN
306: IF l_debug_level > 0 THEN
307: oe_debug_pub.add('Not versioning because header was also created',1);
308: END IF;

Line 427: IF OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER

423: INTO l_lock_control
424: FROM OE_ORDER_HEADERS_ALL
425: WHERE HEADER_ID = p_header_id;
426:
427: IF OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER
428: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER IS NULL
429: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM
430: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER IS NULL
431: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM THEN

Line 428: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER IS NULL

424: FROM OE_ORDER_HEADERS_ALL
425: WHERE HEADER_ID = p_header_id;
426:
427: IF OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER
428: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER IS NULL
429: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM
430: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER IS NULL
431: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM THEN
432: UPDATE OE_ORDER_HEADERS_ALL

Line 429: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM

425: WHERE HEADER_ID = p_header_id;
426:
427: IF OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER
428: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER IS NULL
429: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM
430: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER IS NULL
431: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM THEN
432: UPDATE OE_ORDER_HEADERS_ALL
433: SET VERSION_NUMBER = l_version_number + 1,

Line 430: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER IS NULL

426:
427: IF OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER
428: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER IS NULL
429: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM
430: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER IS NULL
431: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM THEN
432: UPDATE OE_ORDER_HEADERS_ALL
433: SET VERSION_NUMBER = l_version_number + 1,
434: LOCK_CONTROL = l_lock_control + 1

Line 431: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM THEN

427: IF OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER
428: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER IS NULL
429: OR OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM
430: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER IS NULL
431: OR OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER = FND_API.G_MISS_NUM THEN
432: UPDATE OE_ORDER_HEADERS_ALL
433: SET VERSION_NUMBER = l_version_number + 1,
434: LOCK_CONTROL = l_lock_control + 1
435: WHERE HEADER_ID = p_header_id;

Line 446: ELSIF OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER < OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER THEN

442: OE_ORDER_CACHE.g_header_rec.version_number := l_version_number + 1;
443: OE_ORDER_CACHE.g_header_rec.lock_control := l_lock_control + 1;
444:
445: OE_GLOBALS.G_CASCADING_REQUEST_LOGGED := TRUE;
446: ELSIF OE_ORDER_UTIL.G_HEADER_REC.VERSION_NUMBER < OE_ORDER_UTIL.G_OLD_HEADER_REC.VERSION_NUMBER THEN
447: FND_MESSAGE.SET_NAME('ONT','OE_BLKT_INVALID_REVISION_NUM');
448: OE_MSG_PUB.ADD;
449:
450: RAISE FND_API.G_EXC_ERROR;

Line 457: G_VERSION_NUMBER := OE_ORDER_UTIL.g_old_header_rec.version_number;

453:
454: G_VERSION_NUMBER := l_version_number;
455: --added for bug5216912 start
456: if G_VERSION_NUMBER is null then
457: G_VERSION_NUMBER := OE_ORDER_UTIL.g_old_header_rec.version_number;
458: end if;
459: --added for bug5216912 end
460: -- added for 3679627
461: x_return_status := l_return_status;

Line 504: if oe_order_util.g_header_id <> FND_API.G_MISS_NUM then

500: BEGIN
501:
502: -- Get current header_id
503:
504: if oe_order_util.g_header_id <> FND_API.G_MISS_NUM then
505: RETURN oe_order_util.g_header_id;
506: elsif
507: oe_order_util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM then
508: RETURN oe_order_util.g_old_header_rec.header_id;

Line 505: RETURN oe_order_util.g_header_id;

501:
502: -- Get current header_id
503:
504: if oe_order_util.g_header_id <> FND_API.G_MISS_NUM then
505: RETURN oe_order_util.g_header_id;
506: elsif
507: oe_order_util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM then
508: RETURN oe_order_util.g_old_header_rec.header_id;
509: elsif

Line 507: oe_order_util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM then

503:
504: if oe_order_util.g_header_id <> FND_API.G_MISS_NUM then
505: RETURN oe_order_util.g_header_id;
506: elsif
507: oe_order_util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM then
508: RETURN oe_order_util.g_old_header_rec.header_id;
509: elsif
510: oe_order_util.g_header_rec.header_id <> FND_API.G_MISS_NUM then
511: RETURN oe_order_util.g_header_rec.header_id;

Line 508: RETURN oe_order_util.g_old_header_rec.header_id;

504: if oe_order_util.g_header_id <> FND_API.G_MISS_NUM then
505: RETURN oe_order_util.g_header_id;
506: elsif
507: oe_order_util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM then
508: RETURN oe_order_util.g_old_header_rec.header_id;
509: elsif
510: oe_order_util.g_header_rec.header_id <> FND_API.G_MISS_NUM then
511: RETURN oe_order_util.g_header_rec.header_id;
512: else

Line 510: oe_order_util.g_header_rec.header_id <> FND_API.G_MISS_NUM then

506: elsif
507: oe_order_util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM then
508: RETURN oe_order_util.g_old_header_rec.header_id;
509: elsif
510: oe_order_util.g_header_rec.header_id <> FND_API.G_MISS_NUM then
511: RETURN oe_order_util.g_header_rec.header_id;
512: else
513: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
514: WHILE i IS NOT NULL LOOP

Line 511: RETURN oe_order_util.g_header_rec.header_id;

507: oe_order_util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM then
508: RETURN oe_order_util.g_old_header_rec.header_id;
509: elsif
510: oe_order_util.g_header_rec.header_id <> FND_API.G_MISS_NUM then
511: RETURN oe_order_util.g_header_rec.header_id;
512: else
513: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
514: WHILE i IS NOT NULL LOOP
515: if oe_order_util.g_old_line_tbl(i).header_id <> FND_API.G_MISS_NUM then

Line 513: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element

509: elsif
510: oe_order_util.g_header_rec.header_id <> FND_API.G_MISS_NUM then
511: RETURN oe_order_util.g_header_rec.header_id;
512: else
513: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
514: WHILE i IS NOT NULL LOOP
515: if oe_order_util.g_old_line_tbl(i).header_id <> FND_API.G_MISS_NUM then
516: RETURN oe_order_util.g_old_line_tbl(i).header_id;
517: end if;

Line 515: if oe_order_util.g_old_line_tbl(i).header_id <> FND_API.G_MISS_NUM then

511: RETURN oe_order_util.g_header_rec.header_id;
512: else
513: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
514: WHILE i IS NOT NULL LOOP
515: if oe_order_util.g_old_line_tbl(i).header_id <> FND_API.G_MISS_NUM then
516: RETURN oe_order_util.g_old_line_tbl(i).header_id;
517: end if;
518: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element
519: END LOOP;

Line 516: RETURN oe_order_util.g_old_line_tbl(i).header_id;

512: else
513: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
514: WHILE i IS NOT NULL LOOP
515: if oe_order_util.g_old_line_tbl(i).header_id <> FND_API.G_MISS_NUM then
516: RETURN oe_order_util.g_old_line_tbl(i).header_id;
517: end if;
518: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element
519: END LOOP;
520:

Line 518: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element

514: WHILE i IS NOT NULL LOOP
515: if oe_order_util.g_old_line_tbl(i).header_id <> FND_API.G_MISS_NUM then
516: RETURN oe_order_util.g_old_line_tbl(i).header_id;
517: end if;
518: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element
519: END LOOP;
520:
521: i := oe_order_util.g_line_tbl.FIRST; -- get subscript of first element
522: WHILE i IS NOT NULL LOOP

Line 521: i := oe_order_util.g_line_tbl.FIRST; -- get subscript of first element

517: end if;
518: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element
519: END LOOP;
520:
521: i := oe_order_util.g_line_tbl.FIRST; -- get subscript of first element
522: WHILE i IS NOT NULL LOOP
523: if oe_order_util.g_line_tbl(i).header_id <> FND_API.G_MISS_NUM then
524: RETURN oe_order_util.g_line_tbl(i).header_id;
525: end if;

Line 523: if oe_order_util.g_line_tbl(i).header_id <> FND_API.G_MISS_NUM then

519: END LOOP;
520:
521: i := oe_order_util.g_line_tbl.FIRST; -- get subscript of first element
522: WHILE i IS NOT NULL LOOP
523: if oe_order_util.g_line_tbl(i).header_id <> FND_API.G_MISS_NUM then
524: RETURN oe_order_util.g_line_tbl(i).header_id;
525: end if;
526: i := oe_order_util.g_line_tbl.NEXT(i); -- get subscript of next element
527: END LOOP;

Line 524: RETURN oe_order_util.g_line_tbl(i).header_id;

520:
521: i := oe_order_util.g_line_tbl.FIRST; -- get subscript of first element
522: WHILE i IS NOT NULL LOOP
523: if oe_order_util.g_line_tbl(i).header_id <> FND_API.G_MISS_NUM then
524: RETURN oe_order_util.g_line_tbl(i).header_id;
525: end if;
526: i := oe_order_util.g_line_tbl.NEXT(i); -- get subscript of next element
527: END LOOP;
528:

Line 526: i := oe_order_util.g_line_tbl.NEXT(i); -- get subscript of next element

522: WHILE i IS NOT NULL LOOP
523: if oe_order_util.g_line_tbl(i).header_id <> FND_API.G_MISS_NUM then
524: RETURN oe_order_util.g_line_tbl(i).header_id;
525: end if;
526: i := oe_order_util.g_line_tbl.NEXT(i); -- get subscript of next element
527: END LOOP;
528:
529: i := oe_order_util.g_old_header_adj_tbl.FIRST; -- get subscript of first element
530: WHILE i IS NOT NULL LOOP

Line 529: i := oe_order_util.g_old_header_adj_tbl.FIRST; -- get subscript of first element

525: end if;
526: i := oe_order_util.g_line_tbl.NEXT(i); -- get subscript of next element
527: END LOOP;
528:
529: i := oe_order_util.g_old_header_adj_tbl.FIRST; -- get subscript of first element
530: WHILE i IS NOT NULL LOOP
531: if oe_order_util.g_old_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
532: RETURN oe_order_util.g_old_header_adj_tbl(i).header_id;
533: end if;

Line 531: if oe_order_util.g_old_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then

527: END LOOP;
528:
529: i := oe_order_util.g_old_header_adj_tbl.FIRST; -- get subscript of first element
530: WHILE i IS NOT NULL LOOP
531: if oe_order_util.g_old_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
532: RETURN oe_order_util.g_old_header_adj_tbl(i).header_id;
533: end if;
534: i := oe_order_util.g_old_header_adj_tbl.NEXT(i); -- get subscript of next element
535: END LOOP;

Line 532: RETURN oe_order_util.g_old_header_adj_tbl(i).header_id;

528:
529: i := oe_order_util.g_old_header_adj_tbl.FIRST; -- get subscript of first element
530: WHILE i IS NOT NULL LOOP
531: if oe_order_util.g_old_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
532: RETURN oe_order_util.g_old_header_adj_tbl(i).header_id;
533: end if;
534: i := oe_order_util.g_old_header_adj_tbl.NEXT(i); -- get subscript of next element
535: END LOOP;
536:

Line 534: i := oe_order_util.g_old_header_adj_tbl.NEXT(i); -- get subscript of next element

530: WHILE i IS NOT NULL LOOP
531: if oe_order_util.g_old_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
532: RETURN oe_order_util.g_old_header_adj_tbl(i).header_id;
533: end if;
534: i := oe_order_util.g_old_header_adj_tbl.NEXT(i); -- get subscript of next element
535: END LOOP;
536:
537: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element
538: WHILE i IS NOT NULL LOOP

Line 537: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element

533: end if;
534: i := oe_order_util.g_old_header_adj_tbl.NEXT(i); -- get subscript of next element
535: END LOOP;
536:
537: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element
538: WHILE i IS NOT NULL LOOP
539: if oe_order_util.g_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
540: RETURN oe_order_util.g_header_adj_tbl(i).header_id;
541: end if;

Line 539: if oe_order_util.g_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then

535: END LOOP;
536:
537: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element
538: WHILE i IS NOT NULL LOOP
539: if oe_order_util.g_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
540: RETURN oe_order_util.g_header_adj_tbl(i).header_id;
541: end if;
542: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element
543: END LOOP;

Line 540: RETURN oe_order_util.g_header_adj_tbl(i).header_id;

536:
537: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element
538: WHILE i IS NOT NULL LOOP
539: if oe_order_util.g_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
540: RETURN oe_order_util.g_header_adj_tbl(i).header_id;
541: end if;
542: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element
543: END LOOP;
544:

Line 542: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element

538: WHILE i IS NOT NULL LOOP
539: if oe_order_util.g_header_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
540: RETURN oe_order_util.g_header_adj_tbl(i).header_id;
541: end if;
542: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element
543: END LOOP;
544:
545: i := oe_order_util.g_old_line_adj_tbl.FIRST; -- get subscript of first element
546: WHILE i IS NOT NULL LOOP

Line 545: i := oe_order_util.g_old_line_adj_tbl.FIRST; -- get subscript of first element

541: end if;
542: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element
543: END LOOP;
544:
545: i := oe_order_util.g_old_line_adj_tbl.FIRST; -- get subscript of first element
546: WHILE i IS NOT NULL LOOP
547: if oe_order_util.g_old_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
548: RETURN oe_order_util.g_old_line_adj_tbl(i).header_id;
549: end if;

Line 547: if oe_order_util.g_old_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then

543: END LOOP;
544:
545: i := oe_order_util.g_old_line_adj_tbl.FIRST; -- get subscript of first element
546: WHILE i IS NOT NULL LOOP
547: if oe_order_util.g_old_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
548: RETURN oe_order_util.g_old_line_adj_tbl(i).header_id;
549: end if;
550: i := oe_order_util.g_old_line_adj_tbl.NEXT(i); -- get subscript of next element
551: END LOOP;

Line 548: RETURN oe_order_util.g_old_line_adj_tbl(i).header_id;

544:
545: i := oe_order_util.g_old_line_adj_tbl.FIRST; -- get subscript of first element
546: WHILE i IS NOT NULL LOOP
547: if oe_order_util.g_old_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
548: RETURN oe_order_util.g_old_line_adj_tbl(i).header_id;
549: end if;
550: i := oe_order_util.g_old_line_adj_tbl.NEXT(i); -- get subscript of next element
551: END LOOP;
552:

Line 550: i := oe_order_util.g_old_line_adj_tbl.NEXT(i); -- get subscript of next element

546: WHILE i IS NOT NULL LOOP
547: if oe_order_util.g_old_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
548: RETURN oe_order_util.g_old_line_adj_tbl(i).header_id;
549: end if;
550: i := oe_order_util.g_old_line_adj_tbl.NEXT(i); -- get subscript of next element
551: END LOOP;
552:
553: i := oe_order_util.g_line_adj_tbl.FIRST; -- get subscript of first element
554: WHILE i IS NOT NULL LOOP

Line 553: i := oe_order_util.g_line_adj_tbl.FIRST; -- get subscript of first element

549: end if;
550: i := oe_order_util.g_old_line_adj_tbl.NEXT(i); -- get subscript of next element
551: END LOOP;
552:
553: i := oe_order_util.g_line_adj_tbl.FIRST; -- get subscript of first element
554: WHILE i IS NOT NULL LOOP
555: if oe_order_util.g_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
556: RETURN oe_order_util.g_line_adj_tbl(i).header_id;
557: end if;

Line 555: if oe_order_util.g_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then

551: END LOOP;
552:
553: i := oe_order_util.g_line_adj_tbl.FIRST; -- get subscript of first element
554: WHILE i IS NOT NULL LOOP
555: if oe_order_util.g_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
556: RETURN oe_order_util.g_line_adj_tbl(i).header_id;
557: end if;
558: i := oe_order_util.g_line_adj_tbl.NEXT(i); -- get subscript of next element
559: END LOOP;

Line 556: RETURN oe_order_util.g_line_adj_tbl(i).header_id;

552:
553: i := oe_order_util.g_line_adj_tbl.FIRST; -- get subscript of first element
554: WHILE i IS NOT NULL LOOP
555: if oe_order_util.g_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
556: RETURN oe_order_util.g_line_adj_tbl(i).header_id;
557: end if;
558: i := oe_order_util.g_line_adj_tbl.NEXT(i); -- get subscript of next element
559: END LOOP;
560:

Line 558: i := oe_order_util.g_line_adj_tbl.NEXT(i); -- get subscript of next element

554: WHILE i IS NOT NULL LOOP
555: if oe_order_util.g_line_adj_tbl(i).header_id <> FND_API.G_MISS_NUM then
556: RETURN oe_order_util.g_line_adj_tbl(i).header_id;
557: end if;
558: i := oe_order_util.g_line_adj_tbl.NEXT(i); -- get subscript of next element
559: END LOOP;
560:
561: i := oe_order_util.g_old_header_scredit_tbl.FIRST; -- get subscript of first element
562: WHILE i IS NOT NULL LOOP

Line 561: i := oe_order_util.g_old_header_scredit_tbl.FIRST; -- get subscript of first element

557: end if;
558: i := oe_order_util.g_line_adj_tbl.NEXT(i); -- get subscript of next element
559: END LOOP;
560:
561: i := oe_order_util.g_old_header_scredit_tbl.FIRST; -- get subscript of first element
562: WHILE i IS NOT NULL LOOP
563: if oe_order_util.g_old_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
564: RETURN oe_order_util.g_old_header_scredit_tbl(i).header_id;
565: end if;

Line 563: if oe_order_util.g_old_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then

559: END LOOP;
560:
561: i := oe_order_util.g_old_header_scredit_tbl.FIRST; -- get subscript of first element
562: WHILE i IS NOT NULL LOOP
563: if oe_order_util.g_old_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
564: RETURN oe_order_util.g_old_header_scredit_tbl(i).header_id;
565: end if;
566: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i); -- get subscript of next element
567: END LOOP;

Line 564: RETURN oe_order_util.g_old_header_scredit_tbl(i).header_id;

560:
561: i := oe_order_util.g_old_header_scredit_tbl.FIRST; -- get subscript of first element
562: WHILE i IS NOT NULL LOOP
563: if oe_order_util.g_old_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
564: RETURN oe_order_util.g_old_header_scredit_tbl(i).header_id;
565: end if;
566: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i); -- get subscript of next element
567: END LOOP;
568:

Line 566: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i); -- get subscript of next element

562: WHILE i IS NOT NULL LOOP
563: if oe_order_util.g_old_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
564: RETURN oe_order_util.g_old_header_scredit_tbl(i).header_id;
565: end if;
566: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i); -- get subscript of next element
567: END LOOP;
568:
569: i := oe_order_util.g_header_scredit_tbl.FIRST; -- get subscript of first element
570: WHILE i IS NOT NULL LOOP

Line 569: i := oe_order_util.g_header_scredit_tbl.FIRST; -- get subscript of first element

565: end if;
566: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i); -- get subscript of next element
567: END LOOP;
568:
569: i := oe_order_util.g_header_scredit_tbl.FIRST; -- get subscript of first element
570: WHILE i IS NOT NULL LOOP
571: if oe_order_util.g_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
572: RETURN oe_order_util.g_header_scredit_tbl(i).header_id;
573: end if;

Line 571: if oe_order_util.g_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then

567: END LOOP;
568:
569: i := oe_order_util.g_header_scredit_tbl.FIRST; -- get subscript of first element
570: WHILE i IS NOT NULL LOOP
571: if oe_order_util.g_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
572: RETURN oe_order_util.g_header_scredit_tbl(i).header_id;
573: end if;
574: i := oe_order_util.g_header_scredit_tbl.NEXT(i); -- get subscript of next element
575: END LOOP;

Line 572: RETURN oe_order_util.g_header_scredit_tbl(i).header_id;

568:
569: i := oe_order_util.g_header_scredit_tbl.FIRST; -- get subscript of first element
570: WHILE i IS NOT NULL LOOP
571: if oe_order_util.g_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
572: RETURN oe_order_util.g_header_scredit_tbl(i).header_id;
573: end if;
574: i := oe_order_util.g_header_scredit_tbl.NEXT(i); -- get subscript of next element
575: END LOOP;
576:

Line 574: i := oe_order_util.g_header_scredit_tbl.NEXT(i); -- get subscript of next element

570: WHILE i IS NOT NULL LOOP
571: if oe_order_util.g_header_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
572: RETURN oe_order_util.g_header_scredit_tbl(i).header_id;
573: end if;
574: i := oe_order_util.g_header_scredit_tbl.NEXT(i); -- get subscript of next element
575: END LOOP;
576:
577: i := oe_order_util.g_old_line_scredit_tbl.FIRST; -- get subscript of first element
578: WHILE i IS NOT NULL LOOP

Line 577: i := oe_order_util.g_old_line_scredit_tbl.FIRST; -- get subscript of first element

573: end if;
574: i := oe_order_util.g_header_scredit_tbl.NEXT(i); -- get subscript of next element
575: END LOOP;
576:
577: i := oe_order_util.g_old_line_scredit_tbl.FIRST; -- get subscript of first element
578: WHILE i IS NOT NULL LOOP
579: if oe_order_util.g_old_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
580: RETURN oe_order_util.g_old_line_scredit_tbl(i).header_id;
581: end if;

Line 579: if oe_order_util.g_old_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then

575: END LOOP;
576:
577: i := oe_order_util.g_old_line_scredit_tbl.FIRST; -- get subscript of first element
578: WHILE i IS NOT NULL LOOP
579: if oe_order_util.g_old_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
580: RETURN oe_order_util.g_old_line_scredit_tbl(i).header_id;
581: end if;
582: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i); -- get subscript of next element
583: END LOOP;

Line 580: RETURN oe_order_util.g_old_line_scredit_tbl(i).header_id;

576:
577: i := oe_order_util.g_old_line_scredit_tbl.FIRST; -- get subscript of first element
578: WHILE i IS NOT NULL LOOP
579: if oe_order_util.g_old_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
580: RETURN oe_order_util.g_old_line_scredit_tbl(i).header_id;
581: end if;
582: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i); -- get subscript of next element
583: END LOOP;
584:

Line 582: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i); -- get subscript of next element

578: WHILE i IS NOT NULL LOOP
579: if oe_order_util.g_old_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
580: RETURN oe_order_util.g_old_line_scredit_tbl(i).header_id;
581: end if;
582: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i); -- get subscript of next element
583: END LOOP;
584:
585: i := oe_order_util.g_line_scredit_tbl.FIRST; -- get subscript of first element
586: WHILE i IS NOT NULL LOOP

Line 585: i := oe_order_util.g_line_scredit_tbl.FIRST; -- get subscript of first element

581: end if;
582: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i); -- get subscript of next element
583: END LOOP;
584:
585: i := oe_order_util.g_line_scredit_tbl.FIRST; -- get subscript of first element
586: WHILE i IS NOT NULL LOOP
587: if oe_order_util.g_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
588: RETURN oe_order_util.g_line_scredit_tbl(i).header_id;
589: end if;

Line 587: if oe_order_util.g_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then

583: END LOOP;
584:
585: i := oe_order_util.g_line_scredit_tbl.FIRST; -- get subscript of first element
586: WHILE i IS NOT NULL LOOP
587: if oe_order_util.g_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
588: RETURN oe_order_util.g_line_scredit_tbl(i).header_id;
589: end if;
590: i := oe_order_util.g_line_scredit_tbl.NEXT(i); -- get subscript of next element
591: END LOOP;

Line 588: RETURN oe_order_util.g_line_scredit_tbl(i).header_id;

584:
585: i := oe_order_util.g_line_scredit_tbl.FIRST; -- get subscript of first element
586: WHILE i IS NOT NULL LOOP
587: if oe_order_util.g_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
588: RETURN oe_order_util.g_line_scredit_tbl(i).header_id;
589: end if;
590: i := oe_order_util.g_line_scredit_tbl.NEXT(i); -- get subscript of next element
591: END LOOP;
592:

Line 590: i := oe_order_util.g_line_scredit_tbl.NEXT(i); -- get subscript of next element

586: WHILE i IS NOT NULL LOOP
587: if oe_order_util.g_line_scredit_tbl(i).header_id <> FND_API.G_MISS_NUM then
588: RETURN oe_order_util.g_line_scredit_tbl(i).header_id;
589: end if;
590: i := oe_order_util.g_line_scredit_tbl.NEXT(i); -- get subscript of next element
591: END LOOP;
592:
593: end if;
594:

Line 632: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL

628: IF l_debug_level > 0 THEN
629: oe_debug_pub.add('OE_Versioning_Util header_id: ' || l_header_id,1);
630: END IF;
631:
632: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL
633: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN
634: select version_number into l_version_number from oe_order_headers_all where header_id = l_header_id;
635: ELSE
636: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;

Line 633: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN

629: oe_debug_pub.add('OE_Versioning_Util header_id: ' || l_header_id,1);
630: END IF;
631:
632: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL
633: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN
634: select version_number into l_version_number from oe_order_headers_all where header_id = l_header_id;
635: ELSE
636: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;
637: END IF;

Line 636: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;

632: IF OE_ORDER_UTIL.g_old_header_rec.version_number IS NULL
633: OR OE_ORDER_UTIL.g_old_header_rec.version_number = FND_API.G_MISS_NUM THEN
634: select version_number into l_version_number from oe_order_headers_all where header_id = l_header_id;
635: ELSE
636: l_version_number := OE_ORDER_UTIL.g_old_header_rec.version_number;
637: END IF;
638:
639: IF l_debug_level > 0 THEN
640: oe_debug_pub.add('Before updating history ',1);

Line 644: IF OE_Order_Util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM THEN

640: oe_debug_pub.add('Before updating history ',1);
641: END IF;
642:
643: --Update history with audit flag information gathered in global picture
644: IF OE_Order_Util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM THEN
645: IF NOT OE_GLOBALS.Equal(OE_Order_Util.g_old_header_rec.operation, OE_GLOBALS.G_OPR_CREATE) AND
646: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
647: g_audit_header_hist_code IS NOT NULL) THEN
648:

Line 645: IF NOT OE_GLOBALS.Equal(OE_Order_Util.g_old_header_rec.operation, OE_GLOBALS.G_OPR_CREATE) AND

641: END IF;
642:
643: --Update history with audit flag information gathered in global picture
644: IF OE_Order_Util.g_old_header_rec.header_id <> FND_API.G_MISS_NUM THEN
645: IF NOT OE_GLOBALS.Equal(OE_Order_Util.g_old_header_rec.operation, OE_GLOBALS.G_OPR_CREATE) AND
646: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
647: g_audit_header_hist_code IS NOT NULL) THEN
648:
649: IF g_audit_header_hist_code IS NOT NULL THEN

Line 661: p_entity_id => oe_order_util.g_old_header_rec.header_id,

657: if g_audit_header_reason_required and l_audit_flag = 'Y' then
658: --Apply Reason for audit
659: OE_Reasons_Util.Apply_Reason(
660: p_entity_code => 'HEADER',
661: p_entity_id => oe_order_util.g_old_header_rec.header_id,
662: p_header_id => oe_order_util.g_old_header_rec.header_id,
663: p_version_number => l_version_number,
664: p_reason_type => 'CANCEL_CODE',
665: p_reason_code => OE_ORDER_UTIL.g_header_rec.change_reason,

Line 662: p_header_id => oe_order_util.g_old_header_rec.header_id,

658: --Apply Reason for audit
659: OE_Reasons_Util.Apply_Reason(
660: p_entity_code => 'HEADER',
661: p_entity_id => oe_order_util.g_old_header_rec.header_id,
662: p_header_id => oe_order_util.g_old_header_rec.header_id,
663: p_version_number => l_version_number,
664: p_reason_type => 'CANCEL_CODE',
665: p_reason_code => OE_ORDER_UTIL.g_header_rec.change_reason,
666: p_reason_comments => OE_ORDER_UTIL.g_header_rec.change_comments,

Line 665: p_reason_code => OE_ORDER_UTIL.g_header_rec.change_reason,

661: p_entity_id => oe_order_util.g_old_header_rec.header_id,
662: p_header_id => oe_order_util.g_old_header_rec.header_id,
663: p_version_number => l_version_number,
664: p_reason_type => 'CANCEL_CODE',
665: p_reason_code => OE_ORDER_UTIL.g_header_rec.change_reason,
666: p_reason_comments => OE_ORDER_UTIL.g_header_rec.change_comments,
667: x_reason_id => l_reason_id,
668: x_return_status => l_return_status);
669:

Line 666: p_reason_comments => OE_ORDER_UTIL.g_header_rec.change_comments,

662: p_header_id => oe_order_util.g_old_header_rec.header_id,
663: p_version_number => l_version_number,
664: p_reason_type => 'CANCEL_CODE',
665: p_reason_code => OE_ORDER_UTIL.g_header_rec.change_reason,
666: p_reason_comments => OE_ORDER_UTIL.g_header_rec.change_comments,
667: x_reason_id => l_reason_id,
668: x_return_status => l_return_status);
669:
670: if l_return_status <> FND_API.G_RET_STS_SUCCESS then

Line 685: oe_debug_pub.add('Calling recordheaderhist operation: '|| oe_order_util.g_old_header_rec.operation,1);

681:
682: end if; --end apply reason
683:
684: IF l_debug_level > 0 THEN
685: oe_debug_pub.add('Calling recordheaderhist operation: '|| oe_order_util.g_old_header_rec.operation,1);
686: END IF;
687:
688: OE_CHG_ORDER_PVT.RecordHeaderHist
689: ( p_header_id => oe_order_util.g_old_header_rec.header_id,

Line 689: ( p_header_id => oe_order_util.g_old_header_rec.header_id,

685: oe_debug_pub.add('Calling recordheaderhist operation: '|| oe_order_util.g_old_header_rec.operation,1);
686: END IF;
687:
688: OE_CHG_ORDER_PVT.RecordHeaderHist
689: ( p_header_id => oe_order_util.g_old_header_rec.header_id,
690: p_header_rec => oe_order_util.g_old_header_rec,
691: p_hist_type_code => l_hist_type_code,
692: p_reason_code => NULL,
693: p_comments => NULL,

Line 690: p_header_rec => oe_order_util.g_old_header_rec,

686: END IF;
687:
688: OE_CHG_ORDER_PVT.RecordHeaderHist
689: ( p_header_id => oe_order_util.g_old_header_rec.header_id,
690: p_header_rec => oe_order_util.g_old_header_rec,
691: p_hist_type_code => l_hist_type_code,
692: p_reason_code => NULL,
693: p_comments => NULL,
694: p_audit_flag => l_audit_flag,

Line 725: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element

721: oe_debug_pub.add(' OEXUVERB: before recording lines ',1);
722: END IF;
723:
724: --Update history for lines
725: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
726: WHILE i IS NOT NULL LOOP
727: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_line_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
728: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
729: g_audit_line_id_tbl.exists(i)) THEN

Line 727: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_line_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND

723:
724: --Update history for lines
725: i := oe_order_util.g_old_line_tbl.FIRST; -- get subscript of first element
726: WHILE i IS NOT NULL LOOP
727: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_line_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
728: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
729: g_audit_line_id_tbl.exists(i)) THEN
730: IF g_audit_line_id_tbl.exists(i) THEN
731: l_audit_flag := 'Y';

Line 752: and OE_ORDER_UTIL.g_line_tbl(i).change_reason is not null

748: -- value can be passed even if constraint does not require reason
749: -- but if reason is supplied for these hist types, it should be
750: -- captured.
751: OR (l_hist_type_code IN ('CANCELLATION','QUANTITY UPDATE')
752: and OE_ORDER_UTIL.g_line_tbl(i).change_reason is not null
753: and OE_ORDER_UTIL.g_line_tbl(i).change_reason <> fnd_api.g_miss_char
754: )
755: ) then
756: --Apply Reason for audit

Line 753: and OE_ORDER_UTIL.g_line_tbl(i).change_reason <> fnd_api.g_miss_char

749: -- but if reason is supplied for these hist types, it should be
750: -- captured.
751: OR (l_hist_type_code IN ('CANCELLATION','QUANTITY UPDATE')
752: and OE_ORDER_UTIL.g_line_tbl(i).change_reason is not null
753: and OE_ORDER_UTIL.g_line_tbl(i).change_reason <> fnd_api.g_miss_char
754: )
755: ) then
756: --Apply Reason for audit
757: OE_Reasons_Util.Apply_Reason(

Line 759: p_entity_id => oe_order_util.g_old_line_tbl(i).line_id,

755: ) then
756: --Apply Reason for audit
757: OE_Reasons_Util.Apply_Reason(
758: p_entity_code => 'LINE',
759: p_entity_id => oe_order_util.g_old_line_tbl(i).line_id,
760: p_header_id => oe_order_util.g_old_line_tbl(i).header_id,
761: p_version_number => l_version_number,
762: p_reason_type => 'CANCEL_CODE',
763: p_reason_code => OE_ORDER_UTIL.g_line_tbl(i).change_reason,

Line 760: p_header_id => oe_order_util.g_old_line_tbl(i).header_id,

756: --Apply Reason for audit
757: OE_Reasons_Util.Apply_Reason(
758: p_entity_code => 'LINE',
759: p_entity_id => oe_order_util.g_old_line_tbl(i).line_id,
760: p_header_id => oe_order_util.g_old_line_tbl(i).header_id,
761: p_version_number => l_version_number,
762: p_reason_type => 'CANCEL_CODE',
763: p_reason_code => OE_ORDER_UTIL.g_line_tbl(i).change_reason,
764: p_reason_comments => OE_ORDER_UTIL.g_line_tbl(i).change_comments,

Line 763: p_reason_code => OE_ORDER_UTIL.g_line_tbl(i).change_reason,

759: p_entity_id => oe_order_util.g_old_line_tbl(i).line_id,
760: p_header_id => oe_order_util.g_old_line_tbl(i).header_id,
761: p_version_number => l_version_number,
762: p_reason_type => 'CANCEL_CODE',
763: p_reason_code => OE_ORDER_UTIL.g_line_tbl(i).change_reason,
764: p_reason_comments => OE_ORDER_UTIL.g_line_tbl(i).change_comments,
765: x_reason_id => l_reason_id,
766: x_return_status => l_return_status);
767:

Line 764: p_reason_comments => OE_ORDER_UTIL.g_line_tbl(i).change_comments,

760: p_header_id => oe_order_util.g_old_line_tbl(i).header_id,
761: p_version_number => l_version_number,
762: p_reason_type => 'CANCEL_CODE',
763: p_reason_code => OE_ORDER_UTIL.g_line_tbl(i).change_reason,
764: p_reason_comments => OE_ORDER_UTIL.g_line_tbl(i).change_comments,
765: x_reason_id => l_reason_id,
766: x_return_status => l_return_status);
767:
768: if l_return_status <> FND_API.G_RET_STS_SUCCESS then

Line 783: oe_debug_pub.add('Calling recordlinehist operation: '|| oe_order_util.g_old_line_tbl(i).operation,1);

779:
780: end if; --end apply reason
781:
782: IF l_debug_level > 0 THEN
783: oe_debug_pub.add('Calling recordlinehist operation: '|| oe_order_util.g_old_line_tbl(i).operation,1);
784: END IF;
785:
786: OE_CHG_ORDER_PVT.RecordLineHist
787: (p_line_id => oe_order_util.g_old_line_tbl(i).line_id,

Line 787: (p_line_id => oe_order_util.g_old_line_tbl(i).line_id,

783: oe_debug_pub.add('Calling recordlinehist operation: '|| oe_order_util.g_old_line_tbl(i).operation,1);
784: END IF;
785:
786: OE_CHG_ORDER_PVT.RecordLineHist
787: (p_line_id => oe_order_util.g_old_line_tbl(i).line_id,
788: p_line_rec => oe_order_util.g_old_line_tbl(i),
789: p_hist_type_code => l_hist_type_code,
790: p_reason_code => NULL,
791: p_comments => NULL,

Line 788: p_line_rec => oe_order_util.g_old_line_tbl(i),

784: END IF;
785:
786: OE_CHG_ORDER_PVT.RecordLineHist
787: (p_line_id => oe_order_util.g_old_line_tbl(i).line_id,
788: p_line_rec => oe_order_util.g_old_line_tbl(i),
789: p_hist_type_code => l_hist_type_code,
790: p_reason_code => NULL,
791: p_comments => NULL,
792: p_audit_flag => l_audit_flag,

Line 816: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element

812: END IF;
813: END IF;
814:
815: END IF;
816: i := oe_order_util.g_old_line_tbl.NEXT(i); -- get subscript of next element
817: END LOOP;
818:
819: IF l_debug_level > 0 THEN
820: oe_debug_pub.add(' OEXUVERB: before recording header adjs ',1);

Line 824: i := oe_order_util.g_old_header_adj_tbl.FIRST; -- get subscript of first element

820: oe_debug_pub.add(' OEXUVERB: before recording header adjs ',1);
821: END IF;
822:
823: --Update history for header adj
824: i := oe_order_util.g_old_header_adj_tbl.FIRST; -- get subscript of first element
825: WHILE i IS NOT NULL LOOP
826: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_header_adj_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
827: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
828: g_audit_header_adj_id_tbl.exists(i)) THEN

Line 826: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_header_adj_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND

822:
823: --Update history for header adj
824: i := oe_order_util.g_old_header_adj_tbl.FIRST; -- get subscript of first element
825: WHILE i IS NOT NULL LOOP
826: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_header_adj_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
827: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
828: g_audit_header_adj_id_tbl.exists(i)) THEN
829: IF g_audit_header_adj_id_tbl.exists(i) THEN
830: l_audit_flag := 'Y';

Line 842: p_entity_id => oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id,

838: g_audit_header_adj_id_tbl(i).reason_required then
839: --Apply Reason for audit
840: OE_Reasons_Util.Apply_Reason(
841: p_entity_code => 'HEADER_ADJ',
842: p_entity_id => oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id,
843: p_header_id => oe_order_util.g_old_header_adj_tbl(i).header_id,
844: p_version_number => l_version_number,
845: p_reason_type => 'CHANGE_CODE',
846: p_reason_code => OE_ORDER_UTIL.g_header_adj_tbl(i).change_reason_code,

Line 843: p_header_id => oe_order_util.g_old_header_adj_tbl(i).header_id,

839: --Apply Reason for audit
840: OE_Reasons_Util.Apply_Reason(
841: p_entity_code => 'HEADER_ADJ',
842: p_entity_id => oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id,
843: p_header_id => oe_order_util.g_old_header_adj_tbl(i).header_id,
844: p_version_number => l_version_number,
845: p_reason_type => 'CHANGE_CODE',
846: p_reason_code => OE_ORDER_UTIL.g_header_adj_tbl(i).change_reason_code,
847: p_reason_comments => OE_ORDER_UTIL.g_header_adj_tbl(i).change_reason_text,

Line 846: p_reason_code => OE_ORDER_UTIL.g_header_adj_tbl(i).change_reason_code,

842: p_entity_id => oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id,
843: p_header_id => oe_order_util.g_old_header_adj_tbl(i).header_id,
844: p_version_number => l_version_number,
845: p_reason_type => 'CHANGE_CODE',
846: p_reason_code => OE_ORDER_UTIL.g_header_adj_tbl(i).change_reason_code,
847: p_reason_comments => OE_ORDER_UTIL.g_header_adj_tbl(i).change_reason_text,
848: x_reason_id => l_reason_id,
849: x_return_status => l_return_status);
850:

Line 847: p_reason_comments => OE_ORDER_UTIL.g_header_adj_tbl(i).change_reason_text,

843: p_header_id => oe_order_util.g_old_header_adj_tbl(i).header_id,
844: p_version_number => l_version_number,
845: p_reason_type => 'CHANGE_CODE',
846: p_reason_code => OE_ORDER_UTIL.g_header_adj_tbl(i).change_reason_code,
847: p_reason_comments => OE_ORDER_UTIL.g_header_adj_tbl(i).change_reason_text,
848: x_reason_id => l_reason_id,
849: x_return_status => l_return_status);
850:
851: if l_return_status <> FND_API.G_RET_STS_SUCCESS then

Line 866: oe_debug_pub.add('Calling recordHPAdjhist operation: '|| oe_order_util.g_old_header_adj_tbl(i).operation,1);

862:
863: end if; --end apply reason
864:
865: IF l_debug_level > 0 THEN
866: oe_debug_pub.add('Calling recordHPAdjhist operation: '|| oe_order_util.g_old_header_adj_tbl(i).operation,1);
867: END IF;
868:
869: OE_CHG_ORDER_PVT.RecordHPAdjHist
870: (p_header_adj_id => oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id,

Line 870: (p_header_adj_id => oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id,

866: oe_debug_pub.add('Calling recordHPAdjhist operation: '|| oe_order_util.g_old_header_adj_tbl(i).operation,1);
867: END IF;
868:
869: OE_CHG_ORDER_PVT.RecordHPAdjHist
870: (p_header_adj_id => oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id,
871: p_header_adj_rec => oe_order_util.g_old_header_adj_tbl(i),
872: p_hist_type_code => l_hist_type_code,
873: p_reason_code => oe_globals.g_reason_code,
874: p_comments => oe_globals.g_reason_comments,

Line 871: p_header_adj_rec => oe_order_util.g_old_header_adj_tbl(i),

867: END IF;
868:
869: OE_CHG_ORDER_PVT.RecordHPAdjHist
870: (p_header_adj_id => oe_order_util.g_old_header_adj_tbl(i).price_adjustment_id,
871: p_header_adj_rec => oe_order_util.g_old_header_adj_tbl(i),
872: p_hist_type_code => l_hist_type_code,
873: p_reason_code => oe_globals.g_reason_code,
874: p_comments => oe_globals.g_reason_comments,
875: p_audit_flag => l_audit_flag,

Line 900: i := oe_order_util.g_old_header_adj_tbl.NEXT(i); -- get subscript of next element

896: END IF;
897: END IF;
898:
899: END IF;
900: i := oe_order_util.g_old_header_adj_tbl.NEXT(i); -- get subscript of next element
901: END LOOP;
902:
903:
904: IF l_debug_level > 0 THEN

Line 909: i := oe_order_util.g_old_header_scredit_tbl.FIRST; -- get subscript of first element

905: oe_debug_pub.add(' OEXUVERB: before recording header scredits ',1);
906: END IF;
907:
908: --Update history for header scredit
909: i := oe_order_util.g_old_header_scredit_tbl.FIRST; -- get subscript of first element
910: WHILE i IS NOT NULL LOOP
911: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_header_scredit_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
912: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
913: g_audit_header_scredit_id_tbl.exists(i)) THEN

Line 911: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_header_scredit_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND

907:
908: --Update history for header scredit
909: i := oe_order_util.g_old_header_scredit_tbl.FIRST; -- get subscript of first element
910: WHILE i IS NOT NULL LOOP
911: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_header_scredit_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
912: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
913: g_audit_header_scredit_id_tbl.exists(i)) THEN
914: IF g_audit_header_scredit_id_tbl.exists(i) THEN
915: l_audit_flag := 'Y';

Line 927: p_entity_id => oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id,

923: g_audit_header_scredit_id_tbl(i).reason_required then
924: --Apply Reason for audit
925: OE_Reasons_Util.Apply_Reason(
926: p_entity_code => 'HEADER_SCREDIT',
927: p_entity_id => oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id,
928: p_header_id => oe_order_util.g_old_header_scredit_tbl(i).header_id,
929: p_version_number => l_version_number,
930: p_reason_type => 'CANCEL_CODE',
931: p_reason_code => OE_ORDER_UTIL.g_header_scredit_tbl(i).change_reason,

Line 928: p_header_id => oe_order_util.g_old_header_scredit_tbl(i).header_id,

924: --Apply Reason for audit
925: OE_Reasons_Util.Apply_Reason(
926: p_entity_code => 'HEADER_SCREDIT',
927: p_entity_id => oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id,
928: p_header_id => oe_order_util.g_old_header_scredit_tbl(i).header_id,
929: p_version_number => l_version_number,
930: p_reason_type => 'CANCEL_CODE',
931: p_reason_code => OE_ORDER_UTIL.g_header_scredit_tbl(i).change_reason,
932: p_reason_comments => OE_ORDER_UTIL.g_header_scredit_tbl(i).change_comments,

Line 931: p_reason_code => OE_ORDER_UTIL.g_header_scredit_tbl(i).change_reason,

927: p_entity_id => oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id,
928: p_header_id => oe_order_util.g_old_header_scredit_tbl(i).header_id,
929: p_version_number => l_version_number,
930: p_reason_type => 'CANCEL_CODE',
931: p_reason_code => OE_ORDER_UTIL.g_header_scredit_tbl(i).change_reason,
932: p_reason_comments => OE_ORDER_UTIL.g_header_scredit_tbl(i).change_comments,
933: x_reason_id => l_reason_id,
934: x_return_status => l_return_status);
935:

Line 932: p_reason_comments => OE_ORDER_UTIL.g_header_scredit_tbl(i).change_comments,

928: p_header_id => oe_order_util.g_old_header_scredit_tbl(i).header_id,
929: p_version_number => l_version_number,
930: p_reason_type => 'CANCEL_CODE',
931: p_reason_code => OE_ORDER_UTIL.g_header_scredit_tbl(i).change_reason,
932: p_reason_comments => OE_ORDER_UTIL.g_header_scredit_tbl(i).change_comments,
933: x_reason_id => l_reason_id,
934: x_return_status => l_return_status);
935:
936: if l_return_status <> FND_API.G_RET_STS_SUCCESS then

Line 951: oe_debug_pub.add('Calling recordHSCredithist operation: '|| oe_order_util.g_old_header_scredit_tbl(i).operation,1);

947:
948: end if; --end apply reason
949:
950: IF l_debug_level > 0 THEN
951: oe_debug_pub.add('Calling recordHSCredithist operation: '|| oe_order_util.g_old_header_scredit_tbl(i).operation,1);
952: END IF;
953:
954: OE_CHG_ORDER_PVT.RecordHSCreditHist
955: (p_header_scredit_id => oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id,

Line 955: (p_header_scredit_id => oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id,

951: oe_debug_pub.add('Calling recordHSCredithist operation: '|| oe_order_util.g_old_header_scredit_tbl(i).operation,1);
952: END IF;
953:
954: OE_CHG_ORDER_PVT.RecordHSCreditHist
955: (p_header_scredit_id => oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id,
956: p_header_scredit_rec => oe_order_util.g_old_header_scredit_tbl(i),
957: p_hist_type_code => l_hist_type_code,
958: p_reason_code => oe_globals.g_reason_code,
959: p_comments => oe_globals.g_reason_comments,

Line 956: p_header_scredit_rec => oe_order_util.g_old_header_scredit_tbl(i),

952: END IF;
953:
954: OE_CHG_ORDER_PVT.RecordHSCreditHist
955: (p_header_scredit_id => oe_order_util.g_old_header_scredit_tbl(i).sales_credit_id,
956: p_header_scredit_rec => oe_order_util.g_old_header_scredit_tbl(i),
957: p_hist_type_code => l_hist_type_code,
958: p_reason_code => oe_globals.g_reason_code,
959: p_comments => oe_globals.g_reason_comments,
960: p_audit_flag => l_audit_flag,

Line 984: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i); -- get subscript of next element

980: END IF;
981: END IF;
982:
983: END IF;
984: i := oe_order_util.g_old_header_scredit_tbl.NEXT(i); -- get subscript of next element
985: END LOOP;
986:
987: IF l_debug_level > 0 THEN
988: oe_debug_pub.add(' OEXUVERB: before recording line adjs ',1);

Line 991: i := oe_order_util.g_old_line_adj_tbl.FIRST; -- get subscript of first element

987: IF l_debug_level > 0 THEN
988: oe_debug_pub.add(' OEXUVERB: before recording line adjs ',1);
989: END IF;
990: --Update history for line adj
991: i := oe_order_util.g_old_line_adj_tbl.FIRST; -- get subscript of first element
992: WHILE i IS NOT NULL LOOP
993: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_line_adj_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
994: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
995: g_audit_line_adj_id_tbl.exists(i)) THEN

Line 993: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_line_adj_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND

989: END IF;
990: --Update history for line adj
991: i := oe_order_util.g_old_line_adj_tbl.FIRST; -- get subscript of first element
992: WHILE i IS NOT NULL LOOP
993: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_line_adj_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
994: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
995: g_audit_line_adj_id_tbl.exists(i)) THEN
996: IF g_audit_line_adj_id_tbl.exists(i) THEN
997: l_audit_flag := 'Y';

Line 1009: p_entity_id => oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id,

1005: g_audit_line_adj_id_tbl(i).reason_required then
1006: --Apply Reason for audit
1007: OE_Reasons_Util.Apply_Reason(
1008: p_entity_code => 'LINE_ADJ',
1009: p_entity_id => oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id,
1010: p_header_id => oe_order_util.g_old_line_adj_tbl(i).header_id,
1011: p_version_number => l_version_number,
1012: p_reason_type => 'CHANGE_CODE',
1013: p_reason_code => OE_ORDER_UTIL.g_line_adj_tbl(i).change_reason_code,

Line 1010: p_header_id => oe_order_util.g_old_line_adj_tbl(i).header_id,

1006: --Apply Reason for audit
1007: OE_Reasons_Util.Apply_Reason(
1008: p_entity_code => 'LINE_ADJ',
1009: p_entity_id => oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id,
1010: p_header_id => oe_order_util.g_old_line_adj_tbl(i).header_id,
1011: p_version_number => l_version_number,
1012: p_reason_type => 'CHANGE_CODE',
1013: p_reason_code => OE_ORDER_UTIL.g_line_adj_tbl(i).change_reason_code,
1014: p_reason_comments => OE_ORDER_UTIL.g_line_adj_tbl(i).change_reason_text,

Line 1013: p_reason_code => OE_ORDER_UTIL.g_line_adj_tbl(i).change_reason_code,

1009: p_entity_id => oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id,
1010: p_header_id => oe_order_util.g_old_line_adj_tbl(i).header_id,
1011: p_version_number => l_version_number,
1012: p_reason_type => 'CHANGE_CODE',
1013: p_reason_code => OE_ORDER_UTIL.g_line_adj_tbl(i).change_reason_code,
1014: p_reason_comments => OE_ORDER_UTIL.g_line_adj_tbl(i).change_reason_text,
1015: x_reason_id => l_reason_id,
1016: x_return_status => l_return_status);
1017:

Line 1014: p_reason_comments => OE_ORDER_UTIL.g_line_adj_tbl(i).change_reason_text,

1010: p_header_id => oe_order_util.g_old_line_adj_tbl(i).header_id,
1011: p_version_number => l_version_number,
1012: p_reason_type => 'CHANGE_CODE',
1013: p_reason_code => OE_ORDER_UTIL.g_line_adj_tbl(i).change_reason_code,
1014: p_reason_comments => OE_ORDER_UTIL.g_line_adj_tbl(i).change_reason_text,
1015: x_reason_id => l_reason_id,
1016: x_return_status => l_return_status);
1017:
1018: if l_return_status <> FND_API.G_RET_STS_SUCCESS then

Line 1033: oe_debug_pub.add('Calling recordLPAdjhist operation: '|| oe_order_util.g_old_line_adj_tbl(i).operation,1);

1029:
1030: end if; --end apply reason
1031:
1032: IF l_debug_level > 0 THEN
1033: oe_debug_pub.add('Calling recordLPAdjhist operation: '|| oe_order_util.g_old_line_adj_tbl(i).operation,1);
1034: END IF;
1035:
1036: OE_CHG_ORDER_PVT.RecordLPAdjHist
1037: (p_line_adj_id => oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id,

Line 1037: (p_line_adj_id => oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id,

1033: oe_debug_pub.add('Calling recordLPAdjhist operation: '|| oe_order_util.g_old_line_adj_tbl(i).operation,1);
1034: END IF;
1035:
1036: OE_CHG_ORDER_PVT.RecordLPAdjHist
1037: (p_line_adj_id => oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id,
1038: p_line_adj_rec => oe_order_util.g_old_line_adj_tbl(i),
1039: p_hist_type_code => l_hist_type_code,
1040: p_reason_code => oe_globals.g_reason_code,
1041: p_comments => oe_globals.g_reason_comments,

Line 1038: p_line_adj_rec => oe_order_util.g_old_line_adj_tbl(i),

1034: END IF;
1035:
1036: OE_CHG_ORDER_PVT.RecordLPAdjHist
1037: (p_line_adj_id => oe_order_util.g_old_line_adj_tbl(i).price_adjustment_id,
1038: p_line_adj_rec => oe_order_util.g_old_line_adj_tbl(i),
1039: p_hist_type_code => l_hist_type_code,
1040: p_reason_code => oe_globals.g_reason_code,
1041: p_comments => oe_globals.g_reason_comments,
1042: p_audit_flag => l_audit_flag,

Line 1067: i := oe_order_util.g_old_line_adj_tbl.NEXT(i); -- get subscript of next element

1063: END IF;
1064: END IF;
1065:
1066: END IF;
1067: i := oe_order_util.g_old_line_adj_tbl.NEXT(i); -- get subscript of next element
1068: END LOOP;
1069:
1070: IF l_debug_level > 0 THEN
1071: oe_debug_pub.add(' OEXUVERB: before recording line scredits ',1);

Line 1074: i := oe_order_util.g_old_line_scredit_tbl.FIRST; -- get subscript of first element

1070: IF l_debug_level > 0 THEN
1071: oe_debug_pub.add(' OEXUVERB: before recording line scredits ',1);
1072: END IF;
1073: --Update history for line scredit
1074: i := oe_order_util.g_old_line_scredit_tbl.FIRST; -- get subscript of first element
1075: WHILE i IS NOT NULL LOOP
1076: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_line_scredit_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
1077: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
1078: g_audit_line_scredit_id_tbl.exists(i)) THEN

Line 1076: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_line_scredit_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND

1072: END IF;
1073: --Update history for line scredit
1074: i := oe_order_util.g_old_line_scredit_tbl.FIRST; -- get subscript of first element
1075: WHILE i IS NOT NULL LOOP
1076: IF NOT OE_GLOBALS.Equal(oe_order_util.g_old_line_scredit_tbl(i).operation, OE_GLOBALS.G_OPR_CREATE) AND
1077: (p_version_flag = 'Y' OR p_phase_change_flag = 'Y' or
1078: g_audit_line_scredit_id_tbl.exists(i)) THEN
1079: IF g_audit_line_scredit_id_tbl.exists(i) THEN
1080: l_audit_flag := 'Y';

Line 1092: p_entity_id => oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id,

1088: g_audit_line_scredit_id_tbl(i).reason_required then
1089: --Apply Reason for audit
1090: OE_Reasons_Util.Apply_Reason(
1091: p_entity_code => 'LINE_SCREDIT',
1092: p_entity_id => oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id,
1093: p_header_id => oe_order_util.g_old_line_scredit_tbl(i).header_id,
1094: p_version_number => l_version_number,
1095: p_reason_type => 'CANCEL_CODE',
1096: p_reason_code => OE_ORDER_UTIL.g_line_scredit_tbl(i).change_reason,

Line 1093: p_header_id => oe_order_util.g_old_line_scredit_tbl(i).header_id,

1089: --Apply Reason for audit
1090: OE_Reasons_Util.Apply_Reason(
1091: p_entity_code => 'LINE_SCREDIT',
1092: p_entity_id => oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id,
1093: p_header_id => oe_order_util.g_old_line_scredit_tbl(i).header_id,
1094: p_version_number => l_version_number,
1095: p_reason_type => 'CANCEL_CODE',
1096: p_reason_code => OE_ORDER_UTIL.g_line_scredit_tbl(i).change_reason,
1097: p_reason_comments => OE_ORDER_UTIL.g_line_scredit_tbl(i).change_comments,

Line 1096: p_reason_code => OE_ORDER_UTIL.g_line_scredit_tbl(i).change_reason,

1092: p_entity_id => oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id,
1093: p_header_id => oe_order_util.g_old_line_scredit_tbl(i).header_id,
1094: p_version_number => l_version_number,
1095: p_reason_type => 'CANCEL_CODE',
1096: p_reason_code => OE_ORDER_UTIL.g_line_scredit_tbl(i).change_reason,
1097: p_reason_comments => OE_ORDER_UTIL.g_line_scredit_tbl(i).change_comments,
1098: x_reason_id => l_reason_id,
1099: x_return_status => l_return_status);
1100:

Line 1097: p_reason_comments => OE_ORDER_UTIL.g_line_scredit_tbl(i).change_comments,

1093: p_header_id => oe_order_util.g_old_line_scredit_tbl(i).header_id,
1094: p_version_number => l_version_number,
1095: p_reason_type => 'CANCEL_CODE',
1096: p_reason_code => OE_ORDER_UTIL.g_line_scredit_tbl(i).change_reason,
1097: p_reason_comments => OE_ORDER_UTIL.g_line_scredit_tbl(i).change_comments,
1098: x_reason_id => l_reason_id,
1099: x_return_status => l_return_status);
1100:
1101: if l_return_status <> FND_API.G_RET_STS_SUCCESS then

Line 1116: oe_debug_pub.add('Calling recordLSCredithist operation: '|| oe_order_util.g_old_line_scredit_tbl(i).operation,1);

1112:
1113: end if; --end apply reason
1114:
1115: IF l_debug_level > 0 THEN
1116: oe_debug_pub.add('Calling recordLSCredithist operation: '|| oe_order_util.g_old_line_scredit_tbl(i).operation,1);
1117: END IF;
1118:
1119: OE_CHG_ORDER_PVT.RecordLSCreditHist
1120: (p_line_scredit_id => oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id,

Line 1120: (p_line_scredit_id => oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id,

1116: oe_debug_pub.add('Calling recordLSCredithist operation: '|| oe_order_util.g_old_line_scredit_tbl(i).operation,1);
1117: END IF;
1118:
1119: OE_CHG_ORDER_PVT.RecordLSCreditHist
1120: (p_line_scredit_id => oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id,
1121: p_line_scredit_rec => oe_order_util.g_old_line_scredit_tbl(i),
1122: p_hist_type_code => l_hist_type_code,
1123: p_reason_code => oe_globals.g_reason_code,
1124: p_comments => oe_globals.g_reason_comments,

Line 1121: p_line_scredit_rec => oe_order_util.g_old_line_scredit_tbl(i),

1117: END IF;
1118:
1119: OE_CHG_ORDER_PVT.RecordLSCreditHist
1120: (p_line_scredit_id => oe_order_util.g_old_line_scredit_tbl(i).sales_credit_id,
1121: p_line_scredit_rec => oe_order_util.g_old_line_scredit_tbl(i),
1122: p_hist_type_code => l_hist_type_code,
1123: p_reason_code => oe_globals.g_reason_code,
1124: p_comments => oe_globals.g_reason_comments,
1125: p_audit_flag => l_audit_flag,

Line 1149: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i); -- get subscript of next element

1145: END IF;
1146: END IF;
1147:
1148: END IF;
1149: i := oe_order_util.g_old_line_scredit_tbl.NEXT(i); -- get subscript of next element
1150: END LOOP;
1151:
1152: -- added for bug 4321689
1153: x_return_status := l_return_status;

Line 1218: if OE_Order_Util.g_header_rec.operation = OE_GLOBALS.G_OPR_CREATE OR

1214: END IF;
1215:
1216: -- added for bug 3518059
1217: -- add g_header_created check to fix bug 3700341
1218: if OE_Order_Util.g_header_rec.operation = OE_GLOBALS.G_OPR_CREATE OR
1219: OE_GLOBALS.G_HEADER_CREATED OR
1220: OE_Blanket_Util.g_header_rec.operation = OE_GLOBALS.G_OPR_CREATE then
1221: IF l_debug_level > 0 THEN
1222: oe_debug_pub.add(' OEXUVERB: header is created, do nothing',1);

Line 1293: IF OE_Order_Util.g_header_rec.change_reason <> FND_API.G_MISS_CHAR THEN

1289:
1290: G_UI_CALLED := TRUE;
1291:
1292: IF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER THEN
1293: IF OE_Order_Util.g_header_rec.change_reason <> FND_API.G_MISS_CHAR THEN
1294: g_temp_reason_code := OE_Order_Util.g_header_rec.change_reason;
1295: g_temp_reason_comments := OE_Order_Util.g_header_rec.change_comments;
1296: RETURN TRUE;
1297: END IF;

Line 1294: g_temp_reason_code := OE_Order_Util.g_header_rec.change_reason;

1290: G_UI_CALLED := TRUE;
1291:
1292: IF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER THEN
1293: IF OE_Order_Util.g_header_rec.change_reason <> FND_API.G_MISS_CHAR THEN
1294: g_temp_reason_code := OE_Order_Util.g_header_rec.change_reason;
1295: g_temp_reason_comments := OE_Order_Util.g_header_rec.change_comments;
1296: RETURN TRUE;
1297: END IF;
1298: ELSE

Line 1295: g_temp_reason_comments := OE_Order_Util.g_header_rec.change_comments;

1291:
1292: IF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER THEN
1293: IF OE_Order_Util.g_header_rec.change_reason <> FND_API.G_MISS_CHAR THEN
1294: g_temp_reason_code := OE_Order_Util.g_header_rec.change_reason;
1295: g_temp_reason_comments := OE_Order_Util.g_header_rec.change_comments;
1296: RETURN TRUE;
1297: END IF;
1298: ELSE
1299:

Line 1300: OE_Order_Util.Return_Glb_Ent_Index(

1296: RETURN TRUE;
1297: END IF;
1298: ELSE
1299:
1300: OE_Order_Util.Return_Glb_Ent_Index(
1301: p_entity_code,
1302: p_entity_id,
1303: l_ind,
1304: l_result,

Line 1309: IF OE_Order_Util.g_line_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN

1305: l_return_stat);
1306:
1307: IF l_result = FND_API.G_TRUE THEN
1308: IF p_entity_code = OE_GLOBALS.G_ENTITY_LINE THEN
1309: IF OE_Order_Util.g_line_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN
1310: g_temp_reason_code := OE_Order_Util.g_line_tbl(l_ind).change_reason;
1311: g_temp_reason_comments := OE_Order_Util.g_line_tbl(l_ind).change_comments;
1312: RETURN TRUE;
1313: END IF;

Line 1310: g_temp_reason_code := OE_Order_Util.g_line_tbl(l_ind).change_reason;

1306:
1307: IF l_result = FND_API.G_TRUE THEN
1308: IF p_entity_code = OE_GLOBALS.G_ENTITY_LINE THEN
1309: IF OE_Order_Util.g_line_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN
1310: g_temp_reason_code := OE_Order_Util.g_line_tbl(l_ind).change_reason;
1311: g_temp_reason_comments := OE_Order_Util.g_line_tbl(l_ind).change_comments;
1312: RETURN TRUE;
1313: END IF;
1314: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_ADJ THEN

Line 1311: g_temp_reason_comments := OE_Order_Util.g_line_tbl(l_ind).change_comments;

1307: IF l_result = FND_API.G_TRUE THEN
1308: IF p_entity_code = OE_GLOBALS.G_ENTITY_LINE THEN
1309: IF OE_Order_Util.g_line_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN
1310: g_temp_reason_code := OE_Order_Util.g_line_tbl(l_ind).change_reason;
1311: g_temp_reason_comments := OE_Order_Util.g_line_tbl(l_ind).change_comments;
1312: RETURN TRUE;
1313: END IF;
1314: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_ADJ THEN
1315: IF OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN

Line 1315: IF OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN

1311: g_temp_reason_comments := OE_Order_Util.g_line_tbl(l_ind).change_comments;
1312: RETURN TRUE;
1313: END IF;
1314: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_ADJ THEN
1315: IF OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN
1316: g_temp_reason_code := OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_code;
1317: g_temp_reason_comments := OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_text;
1318: RETURN TRUE;
1319: END IF;

Line 1316: g_temp_reason_code := OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_code;

1312: RETURN TRUE;
1313: END IF;
1314: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_ADJ THEN
1315: IF OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN
1316: g_temp_reason_code := OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_code;
1317: g_temp_reason_comments := OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_text;
1318: RETURN TRUE;
1319: END IF;
1320: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_SCREDIT THEN

Line 1317: g_temp_reason_comments := OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_text;

1313: END IF;
1314: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_ADJ THEN
1315: IF OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN
1316: g_temp_reason_code := OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_code;
1317: g_temp_reason_comments := OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_text;
1318: RETURN TRUE;
1319: END IF;
1320: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_SCREDIT THEN
1321: IF OE_Order_Util.g_header_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN

Line 1321: IF OE_Order_Util.g_header_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN

1317: g_temp_reason_comments := OE_Order_Util.g_header_adj_tbl(l_ind).change_reason_text;
1318: RETURN TRUE;
1319: END IF;
1320: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_SCREDIT THEN
1321: IF OE_Order_Util.g_header_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN
1322: g_temp_reason_code := OE_Order_Util.g_header_scredit_tbl(l_ind).change_reason;
1323: g_temp_reason_comments := OE_Order_Util.g_header_scredit_tbl(l_ind).change_comments;
1324: RETURN TRUE;
1325: END IF;

Line 1322: g_temp_reason_code := OE_Order_Util.g_header_scredit_tbl(l_ind).change_reason;

1318: RETURN TRUE;
1319: END IF;
1320: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_SCREDIT THEN
1321: IF OE_Order_Util.g_header_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN
1322: g_temp_reason_code := OE_Order_Util.g_header_scredit_tbl(l_ind).change_reason;
1323: g_temp_reason_comments := OE_Order_Util.g_header_scredit_tbl(l_ind).change_comments;
1324: RETURN TRUE;
1325: END IF;
1326: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_ADJ THEN

Line 1323: g_temp_reason_comments := OE_Order_Util.g_header_scredit_tbl(l_ind).change_comments;

1319: END IF;
1320: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_HEADER_SCREDIT THEN
1321: IF OE_Order_Util.g_header_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN
1322: g_temp_reason_code := OE_Order_Util.g_header_scredit_tbl(l_ind).change_reason;
1323: g_temp_reason_comments := OE_Order_Util.g_header_scredit_tbl(l_ind).change_comments;
1324: RETURN TRUE;
1325: END IF;
1326: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_ADJ THEN
1327: IF OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN

Line 1327: IF OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN

1323: g_temp_reason_comments := OE_Order_Util.g_header_scredit_tbl(l_ind).change_comments;
1324: RETURN TRUE;
1325: END IF;
1326: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_ADJ THEN
1327: IF OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN
1328: g_temp_reason_code := OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_code;
1329: g_temp_reason_comments := OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_text;
1330: RETURN TRUE;
1331: END IF;

Line 1328: g_temp_reason_code := OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_code;

1324: RETURN TRUE;
1325: END IF;
1326: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_ADJ THEN
1327: IF OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN
1328: g_temp_reason_code := OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_code;
1329: g_temp_reason_comments := OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_text;
1330: RETURN TRUE;
1331: END IF;
1332: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_SCREDIT THEN

Line 1329: g_temp_reason_comments := OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_text;

1325: END IF;
1326: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_ADJ THEN
1327: IF OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_code <> FND_API.G_MISS_CHAR THEN
1328: g_temp_reason_code := OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_code;
1329: g_temp_reason_comments := OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_text;
1330: RETURN TRUE;
1331: END IF;
1332: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_SCREDIT THEN
1333: IF OE_Order_Util.g_line_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN

Line 1333: IF OE_Order_Util.g_line_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN

1329: g_temp_reason_comments := OE_Order_Util.g_line_adj_tbl(l_ind).change_reason_text;
1330: RETURN TRUE;
1331: END IF;
1332: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_SCREDIT THEN
1333: IF OE_Order_Util.g_line_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN
1334: g_temp_reason_code := OE_Order_Util.g_line_scredit_tbl(l_ind).change_reason;
1335: g_temp_reason_comments := OE_Order_Util.g_line_scredit_tbl(l_ind).change_comments;
1336: RETURN TRUE;
1337: END IF;

Line 1334: g_temp_reason_code := OE_Order_Util.g_line_scredit_tbl(l_ind).change_reason;

1330: RETURN TRUE;
1331: END IF;
1332: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_SCREDIT THEN
1333: IF OE_Order_Util.g_line_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN
1334: g_temp_reason_code := OE_Order_Util.g_line_scredit_tbl(l_ind).change_reason;
1335: g_temp_reason_comments := OE_Order_Util.g_line_scredit_tbl(l_ind).change_comments;
1336: RETURN TRUE;
1337: END IF;
1338: END IF;

Line 1335: g_temp_reason_comments := OE_Order_Util.g_line_scredit_tbl(l_ind).change_comments;

1331: END IF;
1332: ELSIF p_entity_code = OE_GLOBALS.G_ENTITY_LINE_SCREDIT THEN
1333: IF OE_Order_Util.g_line_scredit_tbl(l_ind).change_reason <> FND_API.G_MISS_CHAR THEN
1334: g_temp_reason_code := OE_Order_Util.g_line_scredit_tbl(l_ind).change_reason;
1335: g_temp_reason_comments := OE_Order_Util.g_line_scredit_tbl(l_ind).change_comments;
1336: RETURN TRUE;
1337: END IF;
1338: END IF;
1339: END IF;

Line 1374: OE_Order_Util.Return_Glb_Ent_Index(

1370: oe_debug_pub.add('hist type :'||p_hist_type_code);
1371: end if;
1372:
1373: IF p_entity_code <> OE_GLOBALS.G_ENTITY_HEADER THEN
1374: OE_Order_Util.Return_Glb_Ent_Index(
1375: p_entity_code,
1376: p_entity_id,
1377: l_ind,
1378: l_result,

Line 1465: if oe_order_util.g_header_rec.change_reason <> FND_API.G_MISS_CHAR then

1461: x_reason_code := OE_GLOBALS.G_REASON_CODE;
1462: x_reason_comments := OE_GLOBALS.G_REASON_COMMENTS;
1463: end if;
1464:
1465: if oe_order_util.g_header_rec.change_reason <> FND_API.G_MISS_CHAR then
1466: x_reason_code := oe_order_util.g_header_rec.change_reason;
1467: x_reason_comments := oe_order_util.g_header_rec.change_comments;
1468: RETURN;
1469: else

Line 1466: x_reason_code := oe_order_util.g_header_rec.change_reason;

1462: x_reason_comments := OE_GLOBALS.G_REASON_COMMENTS;
1463: end if;
1464:
1465: if oe_order_util.g_header_rec.change_reason <> FND_API.G_MISS_CHAR then
1466: x_reason_code := oe_order_util.g_header_rec.change_reason;
1467: x_reason_comments := oe_order_util.g_header_rec.change_comments;
1468: RETURN;
1469: else
1470:

Line 1467: x_reason_comments := oe_order_util.g_header_rec.change_comments;

1463: end if;
1464:
1465: if oe_order_util.g_header_rec.change_reason <> FND_API.G_MISS_CHAR then
1466: x_reason_code := oe_order_util.g_header_rec.change_reason;
1467: x_reason_comments := oe_order_util.g_header_rec.change_comments;
1468: RETURN;
1469: else
1470:
1471: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element

Line 1471: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element

1467: x_reason_comments := oe_order_util.g_header_rec.change_comments;
1468: RETURN;
1469: else
1470:
1471: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element
1472: WHILE i IS NOT NULL LOOP
1473: if oe_order_util.g_header_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then
1474: x_reason_code := oe_order_util.g_header_adj_tbl(i).change_reason_code;
1475: x_reason_comments := oe_order_util.g_header_adj_tbl(i).change_reason_text;

Line 1473: if oe_order_util.g_header_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then

1469: else
1470:
1471: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element
1472: WHILE i IS NOT NULL LOOP
1473: if oe_order_util.g_header_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then
1474: x_reason_code := oe_order_util.g_header_adj_tbl(i).change_reason_code;
1475: x_reason_comments := oe_order_util.g_header_adj_tbl(i).change_reason_text;
1476: RETURN;
1477: end if;

Line 1474: x_reason_code := oe_order_util.g_header_adj_tbl(i).change_reason_code;

1470:
1471: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element
1472: WHILE i IS NOT NULL LOOP
1473: if oe_order_util.g_header_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then
1474: x_reason_code := oe_order_util.g_header_adj_tbl(i).change_reason_code;
1475: x_reason_comments := oe_order_util.g_header_adj_tbl(i).change_reason_text;
1476: RETURN;
1477: end if;
1478: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element

Line 1475: x_reason_comments := oe_order_util.g_header_adj_tbl(i).change_reason_text;

1471: i := oe_order_util.g_header_adj_tbl.FIRST; -- get subscript of first element
1472: WHILE i IS NOT NULL LOOP
1473: if oe_order_util.g_header_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then
1474: x_reason_code := oe_order_util.g_header_adj_tbl(i).change_reason_code;
1475: x_reason_comments := oe_order_util.g_header_adj_tbl(i).change_reason_text;
1476: RETURN;
1477: end if;
1478: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element
1479: END LOOP;

Line 1478: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element

1474: x_reason_code := oe_order_util.g_header_adj_tbl(i).change_reason_code;
1475: x_reason_comments := oe_order_util.g_header_adj_tbl(i).change_reason_text;
1476: RETURN;
1477: end if;
1478: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element
1479: END LOOP;
1480:
1481: i := oe_order_util.g_header_scredit_tbl.FIRST;
1482: WHILE i IS NOT NULL LOOP

Line 1481: i := oe_order_util.g_header_scredit_tbl.FIRST;

1477: end if;
1478: i := oe_order_util.g_header_adj_tbl.NEXT(i); -- get subscript of next element
1479: END LOOP;
1480:
1481: i := oe_order_util.g_header_scredit_tbl.FIRST;
1482: WHILE i IS NOT NULL LOOP
1483: if oe_order_util.g_header_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1484: x_reason_code := oe_order_util.g_header_scredit_tbl(i).change_reason;
1485: x_reason_comments := oe_order_util.g_header_scredit_tbl(i).change_comments;

Line 1483: if oe_order_util.g_header_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then

1479: END LOOP;
1480:
1481: i := oe_order_util.g_header_scredit_tbl.FIRST;
1482: WHILE i IS NOT NULL LOOP
1483: if oe_order_util.g_header_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1484: x_reason_code := oe_order_util.g_header_scredit_tbl(i).change_reason;
1485: x_reason_comments := oe_order_util.g_header_scredit_tbl(i).change_comments;
1486: RETURN;
1487: end if;

Line 1484: x_reason_code := oe_order_util.g_header_scredit_tbl(i).change_reason;

1480:
1481: i := oe_order_util.g_header_scredit_tbl.FIRST;
1482: WHILE i IS NOT NULL LOOP
1483: if oe_order_util.g_header_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1484: x_reason_code := oe_order_util.g_header_scredit_tbl(i).change_reason;
1485: x_reason_comments := oe_order_util.g_header_scredit_tbl(i).change_comments;
1486: RETURN;
1487: end if;
1488: i := oe_order_util.g_header_scredit_tbl.NEXT(i);

Line 1485: x_reason_comments := oe_order_util.g_header_scredit_tbl(i).change_comments;

1481: i := oe_order_util.g_header_scredit_tbl.FIRST;
1482: WHILE i IS NOT NULL LOOP
1483: if oe_order_util.g_header_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1484: x_reason_code := oe_order_util.g_header_scredit_tbl(i).change_reason;
1485: x_reason_comments := oe_order_util.g_header_scredit_tbl(i).change_comments;
1486: RETURN;
1487: end if;
1488: i := oe_order_util.g_header_scredit_tbl.NEXT(i);
1489: END LOOP;

Line 1488: i := oe_order_util.g_header_scredit_tbl.NEXT(i);

1484: x_reason_code := oe_order_util.g_header_scredit_tbl(i).change_reason;
1485: x_reason_comments := oe_order_util.g_header_scredit_tbl(i).change_comments;
1486: RETURN;
1487: end if;
1488: i := oe_order_util.g_header_scredit_tbl.NEXT(i);
1489: END LOOP;
1490:
1491: i := oe_order_util.g_line_tbl.FIRST;
1492: WHILE i IS NOT NULL LOOP

Line 1491: i := oe_order_util.g_line_tbl.FIRST;

1487: end if;
1488: i := oe_order_util.g_header_scredit_tbl.NEXT(i);
1489: END LOOP;
1490:
1491: i := oe_order_util.g_line_tbl.FIRST;
1492: WHILE i IS NOT NULL LOOP
1493: if oe_order_util.g_line_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1494: x_reason_code := oe_order_util.g_line_tbl(i).change_reason;
1495: x_reason_comments := oe_order_util.g_line_tbl(i).change_comments;

Line 1493: if oe_order_util.g_line_tbl(i).change_reason <> FND_API.G_MISS_CHAR then

1489: END LOOP;
1490:
1491: i := oe_order_util.g_line_tbl.FIRST;
1492: WHILE i IS NOT NULL LOOP
1493: if oe_order_util.g_line_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1494: x_reason_code := oe_order_util.g_line_tbl(i).change_reason;
1495: x_reason_comments := oe_order_util.g_line_tbl(i).change_comments;
1496: RETURN;
1497: end if;

Line 1494: x_reason_code := oe_order_util.g_line_tbl(i).change_reason;

1490:
1491: i := oe_order_util.g_line_tbl.FIRST;
1492: WHILE i IS NOT NULL LOOP
1493: if oe_order_util.g_line_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1494: x_reason_code := oe_order_util.g_line_tbl(i).change_reason;
1495: x_reason_comments := oe_order_util.g_line_tbl(i).change_comments;
1496: RETURN;
1497: end if;
1498: i := oe_order_util.g_line_tbl.NEXT(i);

Line 1495: x_reason_comments := oe_order_util.g_line_tbl(i).change_comments;

1491: i := oe_order_util.g_line_tbl.FIRST;
1492: WHILE i IS NOT NULL LOOP
1493: if oe_order_util.g_line_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1494: x_reason_code := oe_order_util.g_line_tbl(i).change_reason;
1495: x_reason_comments := oe_order_util.g_line_tbl(i).change_comments;
1496: RETURN;
1497: end if;
1498: i := oe_order_util.g_line_tbl.NEXT(i);
1499: END LOOP;

Line 1498: i := oe_order_util.g_line_tbl.NEXT(i);

1494: x_reason_code := oe_order_util.g_line_tbl(i).change_reason;
1495: x_reason_comments := oe_order_util.g_line_tbl(i).change_comments;
1496: RETURN;
1497: end if;
1498: i := oe_order_util.g_line_tbl.NEXT(i);
1499: END LOOP;
1500:
1501: i := oe_order_util.g_line_adj_tbl.FIRST;
1502: WHILE i IS NOT NULL LOOP

Line 1501: i := oe_order_util.g_line_adj_tbl.FIRST;

1497: end if;
1498: i := oe_order_util.g_line_tbl.NEXT(i);
1499: END LOOP;
1500:
1501: i := oe_order_util.g_line_adj_tbl.FIRST;
1502: WHILE i IS NOT NULL LOOP
1503: if oe_order_util.g_line_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then
1504: x_reason_code := oe_order_util.g_line_adj_tbl(i).change_reason_code;
1505: x_reason_comments := oe_order_util.g_line_adj_tbl(i).change_reason_text;

Line 1503: if oe_order_util.g_line_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then

1499: END LOOP;
1500:
1501: i := oe_order_util.g_line_adj_tbl.FIRST;
1502: WHILE i IS NOT NULL LOOP
1503: if oe_order_util.g_line_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then
1504: x_reason_code := oe_order_util.g_line_adj_tbl(i).change_reason_code;
1505: x_reason_comments := oe_order_util.g_line_adj_tbl(i).change_reason_text;
1506: RETURN;
1507: end if;

Line 1504: x_reason_code := oe_order_util.g_line_adj_tbl(i).change_reason_code;

1500:
1501: i := oe_order_util.g_line_adj_tbl.FIRST;
1502: WHILE i IS NOT NULL LOOP
1503: if oe_order_util.g_line_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then
1504: x_reason_code := oe_order_util.g_line_adj_tbl(i).change_reason_code;
1505: x_reason_comments := oe_order_util.g_line_adj_tbl(i).change_reason_text;
1506: RETURN;
1507: end if;
1508: i := oe_order_util.g_line_adj_tbl.NEXT(i);

Line 1505: x_reason_comments := oe_order_util.g_line_adj_tbl(i).change_reason_text;

1501: i := oe_order_util.g_line_adj_tbl.FIRST;
1502: WHILE i IS NOT NULL LOOP
1503: if oe_order_util.g_line_adj_tbl(i).change_reason_code <> FND_API.G_MISS_CHAR then
1504: x_reason_code := oe_order_util.g_line_adj_tbl(i).change_reason_code;
1505: x_reason_comments := oe_order_util.g_line_adj_tbl(i).change_reason_text;
1506: RETURN;
1507: end if;
1508: i := oe_order_util.g_line_adj_tbl.NEXT(i);
1509: END LOOP;

Line 1508: i := oe_order_util.g_line_adj_tbl.NEXT(i);

1504: x_reason_code := oe_order_util.g_line_adj_tbl(i).change_reason_code;
1505: x_reason_comments := oe_order_util.g_line_adj_tbl(i).change_reason_text;
1506: RETURN;
1507: end if;
1508: i := oe_order_util.g_line_adj_tbl.NEXT(i);
1509: END LOOP;
1510:
1511: i := oe_order_util.g_line_scredit_tbl.FIRST;
1512: WHILE i IS NOT NULL LOOP

Line 1511: i := oe_order_util.g_line_scredit_tbl.FIRST;

1507: end if;
1508: i := oe_order_util.g_line_adj_tbl.NEXT(i);
1509: END LOOP;
1510:
1511: i := oe_order_util.g_line_scredit_tbl.FIRST;
1512: WHILE i IS NOT NULL LOOP
1513: if oe_order_util.g_line_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1514: x_reason_code := oe_order_util.g_line_scredit_tbl(i).change_reason;
1515: x_reason_comments := oe_order_util.g_line_scredit_tbl(i).change_comments;

Line 1513: if oe_order_util.g_line_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then

1509: END LOOP;
1510:
1511: i := oe_order_util.g_line_scredit_tbl.FIRST;
1512: WHILE i IS NOT NULL LOOP
1513: if oe_order_util.g_line_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1514: x_reason_code := oe_order_util.g_line_scredit_tbl(i).change_reason;
1515: x_reason_comments := oe_order_util.g_line_scredit_tbl(i).change_comments;
1516: RETURN;
1517: end if;

Line 1514: x_reason_code := oe_order_util.g_line_scredit_tbl(i).change_reason;

1510:
1511: i := oe_order_util.g_line_scredit_tbl.FIRST;
1512: WHILE i IS NOT NULL LOOP
1513: if oe_order_util.g_line_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1514: x_reason_code := oe_order_util.g_line_scredit_tbl(i).change_reason;
1515: x_reason_comments := oe_order_util.g_line_scredit_tbl(i).change_comments;
1516: RETURN;
1517: end if;
1518: i := oe_order_util.g_line_scredit_tbl.NEXT(i);

Line 1515: x_reason_comments := oe_order_util.g_line_scredit_tbl(i).change_comments;

1511: i := oe_order_util.g_line_scredit_tbl.FIRST;
1512: WHILE i IS NOT NULL LOOP
1513: if oe_order_util.g_line_scredit_tbl(i).change_reason <> FND_API.G_MISS_CHAR then
1514: x_reason_code := oe_order_util.g_line_scredit_tbl(i).change_reason;
1515: x_reason_comments := oe_order_util.g_line_scredit_tbl(i).change_comments;
1516: RETURN;
1517: end if;
1518: i := oe_order_util.g_line_scredit_tbl.NEXT(i);
1519: END LOOP;

Line 1518: i := oe_order_util.g_line_scredit_tbl.NEXT(i);

1514: x_reason_code := oe_order_util.g_line_scredit_tbl(i).change_reason;
1515: x_reason_comments := oe_order_util.g_line_scredit_tbl(i).change_comments;
1516: RETURN;
1517: end if;
1518: i := oe_order_util.g_line_scredit_tbl.NEXT(i);
1519: END LOOP;
1520:
1521: end if;
1522: