50: AND ( C1.CALENDAR_DATE >= F.FORECAST_DATE
51: --Added format mask while using to_date function to comply with
52: --GSCC File.Date.5 standard. Bug:4410902
53: -- Bug# 6819570, replaced the to_date function used earlier with
54: -- FND_DATE.canonical_to_date which does not require format mask,
55: -- hence avoiding ORA-01861 'literal does not match format string' error.
56: AND C1.CALENDAR_DATE >= FND_DATE.canonical_to_date(x_start_date)
57: AND C1.CALENDAR_DATE <= FND_DATE.canonical_to_date(x_cutoff_date)
58: AND C1.CALENDAR_DATE = C1.NEXT_DATE
52: --GSCC File.Date.5 standard. Bug:4410902
53: -- Bug# 6819570, replaced the to_date function used earlier with
54: -- FND_DATE.canonical_to_date which does not require format mask,
55: -- hence avoiding ORA-01861 'literal does not match format string' error.
56: AND C1.CALENDAR_DATE >= FND_DATE.canonical_to_date(x_start_date)
57: AND C1.CALENDAR_DATE <= FND_DATE.canonical_to_date(x_cutoff_date)
58: AND C1.CALENDAR_DATE = C1.NEXT_DATE
59: AND C1.CALENDAR_DATE <= NVL(F.RATE_END_DATE, F.FORECAST_DATE ))
60: group by F.INVENTORY_ITEM_ID
53: -- Bug# 6819570, replaced the to_date function used earlier with
54: -- FND_DATE.canonical_to_date which does not require format mask,
55: -- hence avoiding ORA-01861 'literal does not match format string' error.
56: AND C1.CALENDAR_DATE >= FND_DATE.canonical_to_date(x_start_date)
57: AND C1.CALENDAR_DATE <= FND_DATE.canonical_to_date(x_cutoff_date)
58: AND C1.CALENDAR_DATE = C1.NEXT_DATE
59: AND C1.CALENDAR_DATE <= NVL(F.RATE_END_DATE, F.FORECAST_DATE ))
60: group by F.INVENTORY_ITEM_ID
61: UNION ALL
89: AND W1.WEEK_START_DATE <= NVL(F.RATE_END_DATE, F.FORECAST_DATE))
90: --Added format mask while using to_date function to comply with
91: --GSCC File.Date.5 standard. Bug:4410902
92: -- Bug# 6819570, replaced the to_date function used earlier with
93: -- FND_DATE.canonical_to_date which does not require format mask,
94: -- hence avoiding ORA-01861 'literal does not match format string' error.
95: AND W1.NEXT_DATE > FND_DATE.canonical_to_date(x_start_date)
96: AND C1.CALENDAR_CODE = x_cal_code
97: AND C2.CALENDAR_CODE = x_cal_code
91: --GSCC File.Date.5 standard. Bug:4410902
92: -- Bug# 6819570, replaced the to_date function used earlier with
93: -- FND_DATE.canonical_to_date which does not require format mask,
94: -- hence avoiding ORA-01861 'literal does not match format string' error.
95: AND W1.NEXT_DATE > FND_DATE.canonical_to_date(x_start_date)
96: AND C1.CALENDAR_CODE = x_cal_code
97: AND C2.CALENDAR_CODE = x_cal_code
98: AND C3.CALENDAR_CODE = x_cal_code
99: AND C1.EXCEPTION_SET_ID = x_except_id
104: AND (C1.CALENDAR_DATE >= C3.CALENDAR_DATE
105: --Added format mask while using to_date function to comply with
106: --GSCC File.Date.5 standard. Bug:4410902
107: -- Bug# 6819570, replaced the to_date function used earlier with
108: -- FND_DATE.canonical_to_date which does not require format mask,
109: -- hence avoiding ORA-01861 'literal does not match format string' error.
110: AND C1.CALENDAR_DATE >= FND_DATE.canonical_to_date(x_start_date)
111: AND C1.CALENDAR_DATE <= FND_DATE.canonical_to_date(x_cutoff_date)
112: AND C1.CALENDAR_DATE = C1.NEXT_DATE
106: --GSCC File.Date.5 standard. Bug:4410902
107: -- Bug# 6819570, replaced the to_date function used earlier with
108: -- FND_DATE.canonical_to_date which does not require format mask,
109: -- hence avoiding ORA-01861 'literal does not match format string' error.
110: AND C1.CALENDAR_DATE >= FND_DATE.canonical_to_date(x_start_date)
111: AND C1.CALENDAR_DATE <= FND_DATE.canonical_to_date(x_cutoff_date)
112: AND C1.CALENDAR_DATE = C1.NEXT_DATE
113: AND C1.CALENDAR_DATE < C2.CALENDAR_DATE)
114: group by F.INVENTORY_ITEM_ID
107: -- Bug# 6819570, replaced the to_date function used earlier with
108: -- FND_DATE.canonical_to_date which does not require format mask,
109: -- hence avoiding ORA-01861 'literal does not match format string' error.
110: AND C1.CALENDAR_DATE >= FND_DATE.canonical_to_date(x_start_date)
111: AND C1.CALENDAR_DATE <= FND_DATE.canonical_to_date(x_cutoff_date)
112: AND C1.CALENDAR_DATE = C1.NEXT_DATE
113: AND C1.CALENDAR_DATE < C2.CALENDAR_DATE)
114: group by F.INVENTORY_ITEM_ID
115: UNION ALL
145: AND W1.PERIOD_START_DATE <= NVL(F.RATE_END_DATE, F.FORECAST_DATE))
146: --Added format mask while using to_date function to comply with
147: --GSCC File.Date.5 standard. Bug:4410902
148: -- Bug# 6819570, replaced the to_date function used earlier with
149: -- FND_DATE.canonical_to_date which does not require format mask,
150: -- hence avoiding ORA-01861 'literal does not match format string' error.
151: AND W1.NEXT_DATE > FND_DATE.canonical_to_date(x_start_date)
152: AND C1.CALENDAR_CODE = x_cal_code
153: AND C2.CALENDAR_CODE = x_cal_code
147: --GSCC File.Date.5 standard. Bug:4410902
148: -- Bug# 6819570, replaced the to_date function used earlier with
149: -- FND_DATE.canonical_to_date which does not require format mask,
150: -- hence avoiding ORA-01861 'literal does not match format string' error.
151: AND W1.NEXT_DATE > FND_DATE.canonical_to_date(x_start_date)
152: AND C1.CALENDAR_CODE = x_cal_code
153: AND C2.CALENDAR_CODE = x_cal_code
154: AND C3.CALENDAR_CODE = x_cal_code
155: AND C1.EXCEPTION_SET_ID = x_except_id
160: AND (C1.CALENDAR_DATE >= C3.CALENDAR_DATE
161: --Added format mask while using to_date function to comply with
162: --GSCC File.Date.5 standard. Bug:4410902
163: -- Bug# 6819570, replaced the to_date function used earlier with
164: -- FND_DATE.canonical_to_date which does not require format mask,
165: -- hence avoiding ORA-01861 'literal does not match format string' error.
166: AND C1.CALENDAR_DATE >= FND_DATE.canonical_to_date(x_start_date)
167: AND C1.CALENDAR_DATE = C1.NEXT_DATE
168: --Added format mask while using to_date function to comply with
162: --GSCC File.Date.5 standard. Bug:4410902
163: -- Bug# 6819570, replaced the to_date function used earlier with
164: -- FND_DATE.canonical_to_date which does not require format mask,
165: -- hence avoiding ORA-01861 'literal does not match format string' error.
166: AND C1.CALENDAR_DATE >= FND_DATE.canonical_to_date(x_start_date)
167: AND C1.CALENDAR_DATE = C1.NEXT_DATE
168: --Added format mask while using to_date function to comply with
169: --GSCC File.Date.5 standard. Bug:4410902
170: -- Bug# 6819570, replaced the to_date function used earlier with
167: AND C1.CALENDAR_DATE = C1.NEXT_DATE
168: --Added format mask while using to_date function to comply with
169: --GSCC File.Date.5 standard. Bug:4410902
170: -- Bug# 6819570, replaced the to_date function used earlier with
171: -- FND_DATE.canonical_to_date which does not require format mask,
172: -- hence avoiding ORA-01861 'literal does not match format string' error.
173: AND C1.CALENDAR_DATE <= FND_DATE.canonical_to_date(x_cutoff_date)
174: AND C1.CALENDAR_DATE < C2.CALENDAR_DATE)
175: group by F.INVENTORY_ITEM_ID;
169: --GSCC File.Date.5 standard. Bug:4410902
170: -- Bug# 6819570, replaced the to_date function used earlier with
171: -- FND_DATE.canonical_to_date which does not require format mask,
172: -- hence avoiding ORA-01861 'literal does not match format string' error.
173: AND C1.CALENDAR_DATE <= FND_DATE.canonical_to_date(x_cutoff_date)
174: AND C1.CALENDAR_DATE < C2.CALENDAR_DATE)
175: group by F.INVENTORY_ITEM_ID;
176:
177: FORALL i IN l_item_id.FIRST .. l_item_id.LAST