DBA Data[Home] [Help]

APPS.OKL_STREAMS_RECON_PVT dependencies on OKC_K_HEADERS_B

Line 30: p_contract_number IN okc_k_headers_b.contract_number%TYPE DEFAULT NULL,

26: -- End of Commnets
27: --------------------------------------------------------------------------------
28: PROCEDURE recon_qry (p_errbuf OUT NOCOPY VARCHAR2,
29: p_retcode OUT NOCOPY NUMBER,
30: p_contract_number IN okc_k_headers_b.contract_number%TYPE DEFAULT NULL,
31: p_end_date IN VARCHAR2 DEFAULT NULL)
32: IS
33: l_api_name CONSTANT VARCHAR2(40):= 'OKL_STREAMS_RECON_REPORT';
34: l_api_version CONSTANT NUMBER := 1.0;

Line 42: ln_org_id okc_k_headers_b.authoring_org_id%TYPE := 0;

38: l_msg_data VARCHAR2(2000);
39: x_return_status VARCHAR2(3) := OKL_API.G_RET_STS_SUCCESS;
40: lp_end_date VARCHAR2(200);
41: lp_contract_number VARCHAR2(200);
42: ln_org_id okc_k_headers_b.authoring_org_id%TYPE := 0;
43: lv_org_name mtl_organizations.organization_name%TYPE := NULL;
44: lv_sum_curr_code VARCHAR2(2000);
45: lv_curr_code VARCHAR2(20) := 'XXX';
46: lv_clb_display VARCHAR2(3) := 'N';

Line 111: curr_code okc_k_headers_b.currency_code%TYPE := NULL);

107: amount NUMBER := 0);
108: TYPE value_rec_type IS RECORD (
109: clb_amt NUMBER := 0,
110: dif_amt NUMBER := 0,
111: curr_code okc_k_headers_b.currency_code%TYPE := NULL);
112: TYPE diff_rec_type IS RECORD (
113: contract_number okc_k_headers_b.contract_number%TYPE := NULL,
114: currency_code okc_k_headers_b.currency_code%TYPE := NULL,
115: total_billable_streams VARCHAR2(2000) := NULL,

Line 113: contract_number okc_k_headers_b.contract_number%TYPE := NULL,

109: clb_amt NUMBER := 0,
110: dif_amt NUMBER := 0,
111: curr_code okc_k_headers_b.currency_code%TYPE := NULL);
112: TYPE diff_rec_type IS RECORD (
113: contract_number okc_k_headers_b.contract_number%TYPE := NULL,
114: currency_code okc_k_headers_b.currency_code%TYPE := NULL,
115: total_billable_streams VARCHAR2(2000) := NULL,
116: billed_streams VARCHAR2(2000) := NULL,
117: cancelled_streams VARCHAR2(2000) := NULL,

Line 114: currency_code okc_k_headers_b.currency_code%TYPE := NULL,

110: dif_amt NUMBER := 0,
111: curr_code okc_k_headers_b.currency_code%TYPE := NULL);
112: TYPE diff_rec_type IS RECORD (
113: contract_number okc_k_headers_b.contract_number%TYPE := NULL,
114: currency_code okc_k_headers_b.currency_code%TYPE := NULL,
115: total_billable_streams VARCHAR2(2000) := NULL,
116: billed_streams VARCHAR2(2000) := NULL,
117: cancelled_streams VARCHAR2(2000) := NULL,
118: unbilled_streams VARCHAR2(2000) := NULL,

Line 125: TYPE curr_tbl_type IS TABLE OF okc_k_headers_b.currency_code%TYPE

121: TYPE unbill_tbl_type IS TABLE OF unbill_rec_type
122: INDEX BY BINARY_INTEGER;
123: TYPE value_tbl_type IS TABLE of value_rec_type
124: INDEX BY BINARY_INTEGER;
125: TYPE curr_tbl_type IS TABLE OF okc_k_headers_b.currency_code%TYPE
126: INDEX BY BINARY_INTEGER;
127: TYPE book_tbl_type IS TABLE OF VARCHAR2(2000)
128: INDEX BY BINARY_INTEGER;
129: TYPE diff_tbl_type IS TABLE OF diff_rec_type

Line 148: CURSOR get_currency_code(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

144: FROM hr_operating_units
145: WHERE ORGANIZATION_ID=MO_GLOBAL.GET_CURRENT_ORG_ID; --MOAC- Concurrent request
146:
147: -- To get different currency code in the system
148: CURSOR get_currency_code(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
149: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
150: p_end_date IN okc_k_headers_b.end_date%TYPE)
151: IS
152: SELECT DISTINCT chrb.currency_code

Line 149: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

145: WHERE ORGANIZATION_ID=MO_GLOBAL.GET_CURRENT_ORG_ID; --MOAC- Concurrent request
146:
147: -- To get different currency code in the system
148: CURSOR get_currency_code(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
149: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
150: p_end_date IN okc_k_headers_b.end_date%TYPE)
151: IS
152: SELECT DISTINCT chrb.currency_code
153: FROM okl_strm_elements ele,

Line 150: p_end_date IN okc_k_headers_b.end_date%TYPE)

146:
147: -- To get different currency code in the system
148: CURSOR get_currency_code(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
149: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
150: p_end_date IN okc_k_headers_b.end_date%TYPE)
151: IS
152: SELECT DISTINCT chrb.currency_code
153: FROM okl_strm_elements ele,
154: okl_streams stm,

Line 157: okc_k_headers_b chrb,

153: FROM okl_strm_elements ele,
154: okl_streams stm,
155: okl_strm_type_b sty,
156: okl_k_headers khr,
157: okc_k_headers_b chrb,
158: okc_k_lines_b kle,
159: okc_statuses_b khs,
160: okc_statuses_b kls
161: WHERE chrb.contract_number = NVL(p_contract_number,chrb.contract_number)

Line 180: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

176: AND stm.say_code <> 'WORK'
177: AND stm.purpose_code IS NULL
178: ORDER BY chrb.currency_code DESC;
179: -- To get total streams total
180: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
181: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
182: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
183: p_end_date IN okc_k_headers_b.end_date%TYPE)
184: IS

Line 181: p_curr_code IN okc_k_headers_b.currency_code%TYPE,

177: AND stm.purpose_code IS NULL
178: ORDER BY chrb.currency_code DESC;
179: -- To get total streams total
180: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
181: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
182: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
183: p_end_date IN okc_k_headers_b.end_date%TYPE)
184: IS
185: SELECT SUM(ele.amount) amount

Line 182: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

178: ORDER BY chrb.currency_code DESC;
179: -- To get total streams total
180: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
181: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
182: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
183: p_end_date IN okc_k_headers_b.end_date%TYPE)
184: IS
185: SELECT SUM(ele.amount) amount
186: FROM okl_strm_elements ele,

Line 183: p_end_date IN okc_k_headers_b.end_date%TYPE)

179: -- To get total streams total
180: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
181: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
182: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
183: p_end_date IN okc_k_headers_b.end_date%TYPE)
184: IS
185: SELECT SUM(ele.amount) amount
186: FROM okl_strm_elements ele,
187: okl_streams stm,

Line 190: okc_k_headers_b chrb,

186: FROM okl_strm_elements ele,
187: okl_streams stm,
188: okl_strm_type_b sty,
189: okl_k_headers khr,
190: okc_k_headers_b chrb,
191: okc_k_lines_b kle,
192: okc_statuses_b khs,
193: okc_statuses_b kls
194: WHERE chrb.contract_number = NVL(p_contract_number,chrb.contract_number)

Line 213: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

209: AND sty.billable_yn = 'Y'
210: AND stm.say_code <> 'WORK'
211: AND stm.purpose_code IS NULL;
212: -- To get billed streams total
213: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
216: p_end_date IN okc_k_headers_b.end_date%TYPE)
217: IS

Line 214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,

210: AND stm.say_code <> 'WORK'
211: AND stm.purpose_code IS NULL;
212: -- To get billed streams total
213: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
216: p_end_date IN okc_k_headers_b.end_date%TYPE)
217: IS
218: SELECT SUM(ste.amount) amount

Line 215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

211: AND stm.purpose_code IS NULL;
212: -- To get billed streams total
213: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
216: p_end_date IN okc_k_headers_b.end_date%TYPE)
217: IS
218: SELECT SUM(ste.amount) amount
219: FROM okl_strm_type_v sty,

Line 216: p_end_date IN okc_k_headers_b.end_date%TYPE)

212: -- To get billed streams total
213: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
216: p_end_date IN okc_k_headers_b.end_date%TYPE)
217: IS
218: SELECT SUM(ste.amount) amount
219: FROM okl_strm_type_v sty,
220: okl_strm_elements ste,

Line 226: okc_k_headers_b khr

222: okc_statuses_b khs,
223: okc_statuses_b kls,
224: okl_k_headers khl,
225: okc_k_lines_b kle,
226: okc_k_headers_b khr
227: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
228: AND khr.end_date <= NVL(p_end_date,khr.end_date)
229: AND khr.authoring_org_id = p_org_id
230: AND khr.currency_code = p_curr_code

Line 247: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

243: AND stm.say_code IN ('CURR','HIST')
244: AND sty.id = stm.sty_id
245: AND sty.billable_yn = 'Y';
246: -- To get cancelled streams total
247: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
248: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
249:
250: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
251: p_end_date IN okc_k_headers_b.end_date%TYPE)

Line 248: p_curr_code IN okc_k_headers_b.currency_code%TYPE,

244: AND sty.id = stm.sty_id
245: AND sty.billable_yn = 'Y';
246: -- To get cancelled streams total
247: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
248: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
249:
250: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
251: p_end_date IN okc_k_headers_b.end_date%TYPE)
252: IS

Line 250: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

246: -- To get cancelled streams total
247: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
248: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
249:
250: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
251: p_end_date IN okc_k_headers_b.end_date%TYPE)
252: IS
253: SELECT SUM(ste.amount) amount
254: FROM okl_strm_type_v sty,

Line 251: p_end_date IN okc_k_headers_b.end_date%TYPE)

247: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
248: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
249:
250: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
251: p_end_date IN okc_k_headers_b.end_date%TYPE)
252: IS
253: SELECT SUM(ste.amount) amount
254: FROM okl_strm_type_v sty,
255: okl_strm_elements ste,

Line 261: okc_k_headers_b khr

257: okc_statuses_b khs,
258: okc_statuses_b kls,
259: okl_k_headers khl,
260: okc_k_lines_b kle,
261: okc_k_headers_b khr
262: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
263: AND khr.end_date <= NVL(p_end_date,khr.end_date)
264: AND khr.authoring_org_id = p_org_id
265: AND khr.currency_code = p_curr_code

Line 284: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

280: AND stm.purpose_code IS NULL
281: AND sty.id = stm.sty_id
282: AND sty.billable_yn = 'Y';
283: -- To get Closing balance streams total
284: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
285: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
286: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
287: p_end_date IN okc_k_headers_b.end_date%TYPE)
288: IS

Line 285: p_curr_code IN okc_k_headers_b.currency_code%TYPE,

281: AND sty.id = stm.sty_id
282: AND sty.billable_yn = 'Y';
283: -- To get Closing balance streams total
284: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
285: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
286: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
287: p_end_date IN okc_k_headers_b.end_date%TYPE)
288: IS
289: SELECT SUM(ste.amount) amount

Line 286: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

282: AND sty.billable_yn = 'Y';
283: -- To get Closing balance streams total
284: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
285: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
286: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
287: p_end_date IN okc_k_headers_b.end_date%TYPE)
288: IS
289: SELECT SUM(ste.amount) amount
290: FROM okl_strm_type_v sty,

Line 287: p_end_date IN okc_k_headers_b.end_date%TYPE)

283: -- To get Closing balance streams total
284: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
285: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
286: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
287: p_end_date IN okc_k_headers_b.end_date%TYPE)
288: IS
289: SELECT SUM(ste.amount) amount
290: FROM okl_strm_type_v sty,
291: okl_strm_elements ste,

Line 297: okc_k_headers_b khr

293: okc_statuses_b khs,
294: okc_statuses_b kls,
295: okl_k_headers khl,
296: okc_k_lines_b kle,
297: okc_k_headers_b khr
298: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
299: AND khr.end_date <= NVL(p_end_date,khr.end_date)
300: AND khr.authoring_org_id = p_org_id
301: AND khr.currency_code = p_curr_code

Line 322: CURSOR get_dlts_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

318: AND sty.id = stm.sty_id
319: AND sty.billable_yn = 'Y';
320: -- To get details of Closing balance based on the deal type and
321: -- Product associated to the same
322: CURSOR get_dlts_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
323: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
324: p_end_date IN okc_k_headers_b.end_date%TYPE)
325: IS
326: SELECT khr.currency_code currency_code,

Line 323: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

319: AND sty.billable_yn = 'Y';
320: -- To get details of Closing balance based on the deal type and
321: -- Product associated to the same
322: CURSOR get_dlts_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
323: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
324: p_end_date IN okc_k_headers_b.end_date%TYPE)
325: IS
326: SELECT khr.currency_code currency_code,
327: fnd.meaning book_class,

Line 324: p_end_date IN okc_k_headers_b.end_date%TYPE)

320: -- To get details of Closing balance based on the deal type and
321: -- Product associated to the same
322: CURSOR get_dlts_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
323: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
324: p_end_date IN okc_k_headers_b.end_date%TYPE)
325: IS
326: SELECT khr.currency_code currency_code,
327: fnd.meaning book_class,
328: pdt.name product_name,

Line 339: okc_k_headers_b khr

335: okl_products pdt,
336: fnd_lookup_values fnd,
337: okl_k_headers khl,
338: okc_k_lines_b kle,
339: okc_k_headers_b khr
340: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
341: AND khr.end_date <= NVL(p_end_date,khr.end_date)
342: AND khr.authoring_org_id = p_org_id
343: AND khr.id = stm.khr_id

Line 370: CURSOR get_diff_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

366: fnd.meaning,
367: pdt.name
368: ORDER BY 1 DESC ;
369: -- To get Difference contracts streams
370: CURSOR get_diff_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
371: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
372: p_end_date IN okc_k_headers_b.end_date%TYPE)
373: IS
374: SELECT chrb.currency_code currency_code,

Line 371: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

367: pdt.name
368: ORDER BY 1 DESC ;
369: -- To get Difference contracts streams
370: CURSOR get_diff_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
371: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
372: p_end_date IN okc_k_headers_b.end_date%TYPE)
373: IS
374: SELECT chrb.currency_code currency_code,
375: chrb.contract_number contract_number,

Line 372: p_end_date IN okc_k_headers_b.end_date%TYPE)

368: ORDER BY 1 DESC ;
369: -- To get Difference contracts streams
370: CURSOR get_diff_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
371: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
372: p_end_date IN okc_k_headers_b.end_date%TYPE)
373: IS
374: SELECT chrb.currency_code currency_code,
375: chrb.contract_number contract_number,
376: 'Y' total_billable_streams,

Line 385: okc_k_headers_b chrb,

381: FROM okl_strm_elements ele,
382: okl_streams stm,
383: okl_strm_type_b sty,
384: okl_k_headers khr,
385: okc_k_headers_b chrb,
386: okc_k_lines_b kle,
387: okc_statuses_b khs,
388: okc_statuses_b kls
389: WHERE chrb.contract_number = NVL(p_contract_number,chrb.contract_number)

Line 423: okc_k_headers_b khr

419: okc_statuses_b khs,
420: okc_statuses_b kls,
421: okl_k_headers khl,
422: okc_k_lines_b kle,
423: okc_k_headers_b khr
424: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
425: AND khr.end_date <= NVL(p_end_date,khr.end_date)
426: AND khr.authoring_org_id = p_org_id
427: AND khr.id = stm.khr_id

Line 459: okc_k_headers_b khr

455: okc_statuses_b khs,
456: okc_statuses_b kls,
457: okl_k_headers khl,
458: okc_k_lines_b kle,
459: okc_k_headers_b khr
460: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
461: AND khr.end_date <= NVL(p_end_date,khr.end_date)
462: AND khr.authoring_org_id = p_org_id
463: AND khr.id = stm.khr_id

Line 497: okc_k_headers_b khr

493: okc_statuses_b khs,
494: okc_statuses_b kls,
495: okl_k_headers khl,
496: okc_k_lines_b kle,
497: okc_k_headers_b khr
498: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
499: AND khr.end_date <= NVL(p_end_date,khr.end_date)
500: AND khr.authoring_org_id = p_org_id
501: AND khr.id = stm.khr_id

Line 1040: ln_org_id okc_k_headers_b.authoring_org_id%TYPE := 0;

1036: l_msg_data VARCHAR2(2000);
1037: x_return_status VARCHAR2(3) := OKL_API.G_RET_STS_SUCCESS;
1038: lp_end_date VARCHAR2(200);
1039: lp_contract_number VARCHAR2(200);
1040: ln_org_id okc_k_headers_b.authoring_org_id%TYPE := 0;
1041: lv_org_name mtl_organizations.organization_name%TYPE := NULL;
1042: lv_sum_curr_code VARCHAR2(2000);
1043: lv_curr_code VARCHAR2(20) := 'XXX';
1044: lv_clb_display VARCHAR2(3) := 'N';

Line 1112: curr_code okc_k_headers_b.currency_code%TYPE := NULL);

1108: amount NUMBER := 0);
1109: TYPE value_rec_type IS RECORD (
1110: clb_amt NUMBER := 0,
1111: dif_amt NUMBER := 0,
1112: curr_code okc_k_headers_b.currency_code%TYPE := NULL);
1113: TYPE diff_rec_type IS RECORD (
1114: contract_number okc_k_headers_b.contract_number%TYPE := NULL,
1115: currency_code okc_k_headers_b.currency_code%TYPE := NULL,
1116: total_billable_streams VARCHAR2(2000) := NULL,

Line 1114: contract_number okc_k_headers_b.contract_number%TYPE := NULL,

1110: clb_amt NUMBER := 0,
1111: dif_amt NUMBER := 0,
1112: curr_code okc_k_headers_b.currency_code%TYPE := NULL);
1113: TYPE diff_rec_type IS RECORD (
1114: contract_number okc_k_headers_b.contract_number%TYPE := NULL,
1115: currency_code okc_k_headers_b.currency_code%TYPE := NULL,
1116: total_billable_streams VARCHAR2(2000) := NULL,
1117: billed_streams VARCHAR2(2000) := NULL,
1118: cancelled_streams VARCHAR2(2000) := NULL,

Line 1115: currency_code okc_k_headers_b.currency_code%TYPE := NULL,

1111: dif_amt NUMBER := 0,
1112: curr_code okc_k_headers_b.currency_code%TYPE := NULL);
1113: TYPE diff_rec_type IS RECORD (
1114: contract_number okc_k_headers_b.contract_number%TYPE := NULL,
1115: currency_code okc_k_headers_b.currency_code%TYPE := NULL,
1116: total_billable_streams VARCHAR2(2000) := NULL,
1117: billed_streams VARCHAR2(2000) := NULL,
1118: cancelled_streams VARCHAR2(2000) := NULL,
1119: unbilled_streams VARCHAR2(2000) := NULL,

Line 1128: contract_number okc_k_headers_b.contract_number%TYPE := NULL,

1124: currency_code VARCHAR2(2000) := NULL,
1125: product_name VARCHAR2(2000) := NULL,
1126: amount NUMBER := 0);
1127: TYPE gt_diff_rec_type IS RECORD (
1128: contract_number okc_k_headers_b.contract_number%TYPE := NULL,
1129: currency_code okc_k_headers_b.currency_code%TYPE := NULL,
1130: total_billable_streams NUMBER := 0,
1131: billed_streams NUMBER := 0,
1132: cancelled_streams NUMBER := 0,

Line 1129: currency_code okc_k_headers_b.currency_code%TYPE := NULL,

1125: product_name VARCHAR2(2000) := NULL,
1126: amount NUMBER := 0);
1127: TYPE gt_diff_rec_type IS RECORD (
1128: contract_number okc_k_headers_b.contract_number%TYPE := NULL,
1129: currency_code okc_k_headers_b.currency_code%TYPE := NULL,
1130: total_billable_streams NUMBER := 0,
1131: billed_streams NUMBER := 0,
1132: cancelled_streams NUMBER := 0,
1133: unbilled_streams NUMBER := 0,

Line 1148: TYPE curr_tbl_type IS TABLE OF okc_k_headers_b.currency_code%TYPE

1144: TYPE unbill_tbl_type IS TABLE OF unbill_rec_type
1145: INDEX BY BINARY_INTEGER;
1146: TYPE value_tbl_type IS TABLE of value_rec_type
1147: INDEX BY BINARY_INTEGER;
1148: TYPE curr_tbl_type IS TABLE OF okc_k_headers_b.currency_code%TYPE
1149: INDEX BY BINARY_INTEGER;
1150: TYPE book_tbl_type IS TABLE OF VARCHAR2(2000)
1151: INDEX BY BINARY_INTEGER;
1152: TYPE diff_tbl_type IS TABLE OF diff_rec_type

Line 1181: CURSOR get_currency_code(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

1177: FROM hr_operating_units
1178: WHERE ORGANIZATION_ID=MO_GLOBAL.GET_CURRENT_ORG_ID; --MOAC- Concurrent request
1179:
1180: -- To get different currency code in the system
1181: CURSOR get_currency_code(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1182: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1183: p_end_date IN okc_k_headers_b.end_date%TYPE)
1184: IS
1185: SELECT DISTINCT chrb.currency_code

Line 1182: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

1178: WHERE ORGANIZATION_ID=MO_GLOBAL.GET_CURRENT_ORG_ID; --MOAC- Concurrent request
1179:
1180: -- To get different currency code in the system
1181: CURSOR get_currency_code(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1182: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1183: p_end_date IN okc_k_headers_b.end_date%TYPE)
1184: IS
1185: SELECT DISTINCT chrb.currency_code
1186: FROM okl_strm_elements ele,

Line 1183: p_end_date IN okc_k_headers_b.end_date%TYPE)

1179:
1180: -- To get different currency code in the system
1181: CURSOR get_currency_code(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1182: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1183: p_end_date IN okc_k_headers_b.end_date%TYPE)
1184: IS
1185: SELECT DISTINCT chrb.currency_code
1186: FROM okl_strm_elements ele,
1187: okl_streams stm,

Line 1190: okc_k_headers_b chrb,

1186: FROM okl_strm_elements ele,
1187: okl_streams stm,
1188: okl_strm_type_b sty,
1189: okl_k_headers khr,
1190: okc_k_headers_b chrb,
1191: okc_k_lines_b kle,
1192: okc_statuses_b khs,
1193: okc_statuses_b kls
1194: WHERE chrb.contract_number = NVL(p_contract_number,chrb.contract_number)

Line 1213: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

1209: AND stm.say_code <> 'WORK'
1210: AND stm.purpose_code IS NULL
1211: ORDER BY chrb.currency_code DESC;
1212: -- To get total streams total
1213: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1216: p_end_date IN okc_k_headers_b.end_date%TYPE)
1217: IS

Line 1214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,

1210: AND stm.purpose_code IS NULL
1211: ORDER BY chrb.currency_code DESC;
1212: -- To get total streams total
1213: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1216: p_end_date IN okc_k_headers_b.end_date%TYPE)
1217: IS
1218: SELECT SUM(ele.amount) amount

Line 1215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

1211: ORDER BY chrb.currency_code DESC;
1212: -- To get total streams total
1213: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1216: p_end_date IN okc_k_headers_b.end_date%TYPE)
1217: IS
1218: SELECT SUM(ele.amount) amount
1219: FROM okl_strm_elements ele,

Line 1216: p_end_date IN okc_k_headers_b.end_date%TYPE)

1212: -- To get total streams total
1213: CURSOR get_total_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1214: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1215: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1216: p_end_date IN okc_k_headers_b.end_date%TYPE)
1217: IS
1218: SELECT SUM(ele.amount) amount
1219: FROM okl_strm_elements ele,
1220: okl_streams stm,

Line 1223: okc_k_headers_b chrb,

1219: FROM okl_strm_elements ele,
1220: okl_streams stm,
1221: okl_strm_type_b sty,
1222: okl_k_headers khr,
1223: okc_k_headers_b chrb,
1224: okc_k_lines_b kle,
1225: okc_statuses_b khs,
1226: okc_statuses_b kls
1227: WHERE chrb.contract_number = NVL(p_contract_number,chrb.contract_number)

Line 1246: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

1242: AND sty.billable_yn = 'Y'
1243: AND stm.say_code <> 'WORK'
1244: AND stm.purpose_code IS NULL;
1245: -- To get billed streams total
1246: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1247: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1248: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1249: p_end_date IN okc_k_headers_b.end_date%TYPE)
1250: IS

Line 1247: p_curr_code IN okc_k_headers_b.currency_code%TYPE,

1243: AND stm.say_code <> 'WORK'
1244: AND stm.purpose_code IS NULL;
1245: -- To get billed streams total
1246: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1247: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1248: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1249: p_end_date IN okc_k_headers_b.end_date%TYPE)
1250: IS
1251: SELECT SUM(ste.amount) amount

Line 1248: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

1244: AND stm.purpose_code IS NULL;
1245: -- To get billed streams total
1246: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1247: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1248: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1249: p_end_date IN okc_k_headers_b.end_date%TYPE)
1250: IS
1251: SELECT SUM(ste.amount) amount
1252: FROM okl_strm_type_v sty,

Line 1249: p_end_date IN okc_k_headers_b.end_date%TYPE)

1245: -- To get billed streams total
1246: CURSOR get_billed_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1247: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1248: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1249: p_end_date IN okc_k_headers_b.end_date%TYPE)
1250: IS
1251: SELECT SUM(ste.amount) amount
1252: FROM okl_strm_type_v sty,
1253: okl_strm_elements ste,

Line 1259: okc_k_headers_b khr

1255: okc_statuses_b khs,
1256: okc_statuses_b kls,
1257: okl_k_headers khl,
1258: okc_k_lines_b kle,
1259: okc_k_headers_b khr
1260: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
1261: AND khr.end_date <= NVL(p_end_date,khr.end_date)
1262: AND khr.authoring_org_id = p_org_id
1263: AND khr.currency_code = p_curr_code

Line 1280: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

1276: AND stm.say_code IN ('CURR','HIST')
1277: AND sty.id = stm.sty_id
1278: AND sty.billable_yn = 'Y';
1279: -- To get cancelled streams total
1280: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1281: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1282:
1283: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1284: p_end_date IN okc_k_headers_b.end_date%TYPE)

Line 1281: p_curr_code IN okc_k_headers_b.currency_code%TYPE,

1277: AND sty.id = stm.sty_id
1278: AND sty.billable_yn = 'Y';
1279: -- To get cancelled streams total
1280: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1281: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1282:
1283: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1284: p_end_date IN okc_k_headers_b.end_date%TYPE)
1285: IS

Line 1283: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

1279: -- To get cancelled streams total
1280: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1281: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1282:
1283: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1284: p_end_date IN okc_k_headers_b.end_date%TYPE)
1285: IS
1286: SELECT SUM(ste.amount) amount
1287: FROM okl_strm_type_v sty,

Line 1284: p_end_date IN okc_k_headers_b.end_date%TYPE)

1280: CURSOR get_cancel_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1281: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1282:
1283: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1284: p_end_date IN okc_k_headers_b.end_date%TYPE)
1285: IS
1286: SELECT SUM(ste.amount) amount
1287: FROM okl_strm_type_v sty,
1288: okl_strm_elements ste,

Line 1294: okc_k_headers_b khr

1290: okc_statuses_b khs,
1291: okc_statuses_b kls,
1292: okl_k_headers khl,
1293: okc_k_lines_b kle,
1294: okc_k_headers_b khr
1295: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
1296: AND khr.end_date <= NVL(p_end_date,khr.end_date)
1297: AND khr.authoring_org_id = p_org_id
1298: AND khr.currency_code = p_curr_code

Line 1317: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

1313: AND stm.purpose_code IS NULL
1314: AND sty.id = stm.sty_id
1315: AND sty.billable_yn = 'Y';
1316: -- To get Closing balance streams total
1317: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1318: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1319: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1320: p_end_date IN okc_k_headers_b.end_date%TYPE)
1321: IS

Line 1318: p_curr_code IN okc_k_headers_b.currency_code%TYPE,

1314: AND sty.id = stm.sty_id
1315: AND sty.billable_yn = 'Y';
1316: -- To get Closing balance streams total
1317: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1318: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1319: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1320: p_end_date IN okc_k_headers_b.end_date%TYPE)
1321: IS
1322: SELECT SUM(ste.amount) amount

Line 1319: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

1315: AND sty.billable_yn = 'Y';
1316: -- To get Closing balance streams total
1317: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1318: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1319: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1320: p_end_date IN okc_k_headers_b.end_date%TYPE)
1321: IS
1322: SELECT SUM(ste.amount) amount
1323: FROM okl_strm_type_v sty,

Line 1320: p_end_date IN okc_k_headers_b.end_date%TYPE)

1316: -- To get Closing balance streams total
1317: CURSOR get_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1318: p_curr_code IN okc_k_headers_b.currency_code%TYPE,
1319: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1320: p_end_date IN okc_k_headers_b.end_date%TYPE)
1321: IS
1322: SELECT SUM(ste.amount) amount
1323: FROM okl_strm_type_v sty,
1324: okl_strm_elements ste,

Line 1330: okc_k_headers_b khr

1326: okc_statuses_b khs,
1327: okc_statuses_b kls,
1328: okl_k_headers khl,
1329: okc_k_lines_b kle,
1330: okc_k_headers_b khr
1331: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
1332: AND khr.end_date <= NVL(p_end_date,khr.end_date)
1333: AND khr.authoring_org_id = p_org_id
1334: AND khr.currency_code = p_curr_code

Line 1355: CURSOR get_dlts_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

1351: AND sty.id = stm.sty_id
1352: AND sty.billable_yn = 'Y';
1353: -- To get details of Closing balance based on the deal type and
1354: -- Product associated to the same
1355: CURSOR get_dlts_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1356: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1357: p_end_date IN okc_k_headers_b.end_date%TYPE)
1358: IS
1359: SELECT khr.currency_code currency_code,

Line 1356: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

1352: AND sty.billable_yn = 'Y';
1353: -- To get details of Closing balance based on the deal type and
1354: -- Product associated to the same
1355: CURSOR get_dlts_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1356: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1357: p_end_date IN okc_k_headers_b.end_date%TYPE)
1358: IS
1359: SELECT khr.currency_code currency_code,
1360: fnd.meaning book_class,

Line 1357: p_end_date IN okc_k_headers_b.end_date%TYPE)

1353: -- To get details of Closing balance based on the deal type and
1354: -- Product associated to the same
1355: CURSOR get_dlts_clobal_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1356: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1357: p_end_date IN okc_k_headers_b.end_date%TYPE)
1358: IS
1359: SELECT khr.currency_code currency_code,
1360: fnd.meaning book_class,
1361: pdt.name product_name,

Line 1372: okc_k_headers_b khr

1368: okl_products pdt,
1369: fnd_lookup_values fnd,
1370: okl_k_headers khl,
1371: okc_k_lines_b kle,
1372: okc_k_headers_b khr
1373: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
1374: AND khr.end_date <= NVL(p_end_date,khr.end_date)
1375: AND khr.authoring_org_id = p_org_id
1376: AND khr.id = stm.khr_id

Line 1403: CURSOR get_diff_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,

1399: fnd.meaning,
1400: pdt.name
1401: ORDER BY 1 DESC ;
1402: -- To get Difference contracts streams
1403: CURSOR get_diff_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1404: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1405: p_end_date IN okc_k_headers_b.end_date%TYPE)
1406: IS
1407: SELECT chrb.currency_code currency_code,

Line 1404: p_contract_number IN okc_k_headers_b.contract_number%TYPE,

1400: pdt.name
1401: ORDER BY 1 DESC ;
1402: -- To get Difference contracts streams
1403: CURSOR get_diff_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1404: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1405: p_end_date IN okc_k_headers_b.end_date%TYPE)
1406: IS
1407: SELECT chrb.currency_code currency_code,
1408: chrb.contract_number contract_number,

Line 1405: p_end_date IN okc_k_headers_b.end_date%TYPE)

1401: ORDER BY 1 DESC ;
1402: -- To get Difference contracts streams
1403: CURSOR get_diff_csr(p_org_id IN okc_k_headers_b.authoring_org_id%TYPE,
1404: p_contract_number IN okc_k_headers_b.contract_number%TYPE,
1405: p_end_date IN okc_k_headers_b.end_date%TYPE)
1406: IS
1407: SELECT chrb.currency_code currency_code,
1408: chrb.contract_number contract_number,
1409: 'Y' total_billable_streams,

Line 1418: okc_k_headers_b chrb,

1414: FROM okl_strm_elements ele,
1415: okl_streams stm,
1416: okl_strm_type_b sty,
1417: okl_k_headers khr,
1418: okc_k_headers_b chrb,
1419: okc_k_lines_b kle,
1420: okc_statuses_b khs,
1421: okc_statuses_b kls
1422: WHERE chrb.contract_number = NVL(p_contract_number,chrb.contract_number)

Line 1456: okc_k_headers_b khr

1452: okc_statuses_b khs,
1453: okc_statuses_b kls,
1454: okl_k_headers khl,
1455: okc_k_lines_b kle,
1456: okc_k_headers_b khr
1457: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
1458: AND khr.end_date <= NVL(p_end_date,khr.end_date)
1459: AND khr.authoring_org_id = p_org_id
1460: AND khr.id = stm.khr_id

Line 1492: okc_k_headers_b khr

1488: okc_statuses_b khs,
1489: okc_statuses_b kls,
1490: okl_k_headers khl,
1491: okc_k_lines_b kle,
1492: okc_k_headers_b khr
1493: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
1494: AND khr.end_date <= NVL(p_end_date,khr.end_date)
1495: AND khr.authoring_org_id = p_org_id
1496: AND khr.id = stm.khr_id

Line 1530: okc_k_headers_b khr

1526: okc_statuses_b khs,
1527: okc_statuses_b kls,
1528: okl_k_headers khl,
1529: okc_k_lines_b kle,
1530: okc_k_headers_b khr
1531: WHERE khr.contract_number = NVL(p_contract_number,khr.contract_number)
1532: AND khr.end_date <= NVL(p_end_date,khr.end_date)
1533: AND khr.authoring_org_id = p_org_id
1534: AND khr.id = stm.khr_id