DBA Data[Home] [Help]

APPS.OKC_CONTRACT_PVT dependencies on OKC_K_LINES_B

Line 693: UPDATE okc_k_lines_b

689: -- Update Currency change
690: If (x_return_status = OKC_API.G_RET_STS_SUCCESS) Then
691: -- If currency code changed, update all lines
692: If (x_chrv_rec.currency_code <> l_currency_code) Then
693: UPDATE okc_k_lines_b
694: SET currency_code = x_chrv_rec.currency_code
695: WHERE dnz_chr_id = x_chrv_rec.id;
696: End If;
697: /*commented and written above for bug6688656

Line 886: UPDATE okc_k_lines_b

882: -- Update Currency change
883: If (x_return_status = OKC_API.G_RET_STS_SUCCESS) Then
884: -- If currency code changed, update all lines
885: If (x_chrv_rec.currency_code <> l_currency_code) Then
886: UPDATE okc_k_lines_b
887: SET currency_code = x_chrv_rec.currency_code
888: WHERE dnz_chr_id = x_chrv_rec.id;
889: End If;
890: /*commented and written above for the bug6688656

Line 927: from OKC_K_LINES_B

923: l_major_version FND_ATTACHED_DOCUMENTS.PK2_VALUE%TYPE;
924:
925: Cursor l_clev_csr Is
926: select count(*)
927: from OKC_K_LINES_B
928: where chr_id = p_chrv_rec.id;
929:
930: Cursor l_crjv_csr Is
931: SELECT id, object_version_number

Line 1316: FROM OKC_K_LINES_B

1312: x_chr_id OUT NOCOPY NUMBER,
1313: x_return_status OUT NOCOPY VARCHAR2) Is
1314: Cursor l_clev_csr Is
1315: SELECT dnz_chr_id
1316: FROM OKC_K_LINES_B
1317: WHERE id = p_clev_rec.id;
1318: BEGIN
1319: -- initialize return status
1320: x_return_status := OKC_API.G_RET_STS_SUCCESS;

Line 1705: from OKC_K_LINES_B

1701: l_major_version FND_ATTACHED_DOCUMENTS.PK2_VALUE%TYPE;
1702:
1703: Cursor l_clev_csr Is
1704: select count(*)
1705: from OKC_K_LINES_B
1706: where cle_id = p_clev_rec.id;
1707:
1708: Cursor l_cimv_csr Is
1709: select count(*)

Line 1944: l_entity_name => 'OKC_K_LINES_B',

1940:
1941: -- Delete any attachments assiciated with this line
1942: If (x_return_status = OKC_API.G_RET_STS_SUCCESS) Then
1943: If (fnd_attachment_util_pkg.get_atchmt_exists (
1944: l_entity_name => 'OKC_K_LINES_B',
1945: l_pkey1 => p_clev_rec.id,
1946: l_pkey2 => l_major_version) = 'Y')
1947:
1948: -- The following line to be added to the code once

Line 1955: x_entity_name => 'OKC_K_LINES_B',

1951: -- also below remove the comments
1952: -- in fnd_attached_documents2_pkg.delete_attachments call
1953: Then
1954: fnd_attached_documents2_pkg.delete_attachments(
1955: x_entity_name => 'OKC_K_LINES_B',
1956: x_pk1_value => p_clev_rec.id,
1957: x_pk2_value => l_major_version
1958: );
1959: End If;

Line 2025: FROM okc_k_lines_b

2021: v_Index Binary_Integer;
2022:
2023: CURSOR DNZ_Cur(p_id NUMBER) IS
2024: SELECT dnz_chr_id
2025: FROM okc_k_lines_b
2026: WHERE id = p_id;
2027: CURSOR Child_Cur1(P_Parent_Id IN NUMBER)
2028: IS SELECT ID
2029: FROM Okc_K_Lines_b

Line 2029: FROM Okc_K_Lines_b

2025: FROM okc_k_lines_b
2026: WHERE id = p_id;
2027: CURSOR Child_Cur1(P_Parent_Id IN NUMBER)
2028: IS SELECT ID
2029: FROM Okc_K_Lines_b
2030: WHERE cle_Id=P_Parent_Id;
2031: CURSOR Child_Cur2(P_Parent_Id IN NUMBER)
2032: IS SELECT ID
2033: FROM Okc_K_Lines_b

Line 2033: FROM Okc_K_Lines_b

2029: FROM Okc_K_Lines_b
2030: WHERE cle_Id=P_Parent_Id;
2031: CURSOR Child_Cur2(P_Parent_Id IN NUMBER)
2032: IS SELECT ID
2033: FROM Okc_K_Lines_b
2034: WHERE cle_Id=P_Parent_Id;
2035: CURSOR Child_Cur3(P_Parent_Id IN NUMBER)
2036: IS SELECT ID
2037: FROM Okc_K_Lines_b

Line 2037: FROM Okc_K_Lines_b

2033: FROM Okc_K_Lines_b
2034: WHERE cle_Id=P_Parent_Id;
2035: CURSOR Child_Cur3(P_Parent_Id IN NUMBER)
2036: IS SELECT ID
2037: FROM Okc_K_Lines_b
2038: WHERE cle_Id=P_Parent_Id;
2039: CURSOR Child_Cur4(P_Parent_Id IN NUMBER)
2040: IS SELECT ID
2041: FROM Okc_K_Lines_b

Line 2041: FROM Okc_K_Lines_b

2037: FROM Okc_K_Lines_b
2038: WHERE cle_Id=P_Parent_Id;
2039: CURSOR Child_Cur4(P_Parent_Id IN NUMBER)
2040: IS SELECT ID
2041: FROM Okc_K_Lines_b
2042: WHERE cle_Id=P_Parent_Id;
2043: CURSOR Child_Cur5(P_Parent_Id IN NUMBER)
2044: IS SELECT ID
2045: FROM Okc_K_Lines_b

Line 2045: FROM Okc_K_Lines_b

2041: FROM Okc_K_Lines_b
2042: WHERE cle_Id=P_Parent_Id;
2043: CURSOR Child_Cur5(P_Parent_Id IN NUMBER)
2044: IS SELECT ID
2045: FROM Okc_K_Lines_b
2046: WHERE cle_Id=P_Parent_Id;
2047:
2048: CURSOR Item_Cur(P_Line_Id IN NUMBER)
2049: IS SELECT ID

Line 2126: SELECT COUNT(*) FROM OKC_K_LINES_B

2122: x_return_status OUT NOCOPY VARCHAR2) IS
2123: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2124: l_Count NUMBER;
2125: CURSOR Cur_Line(P_Line_Id IN NUMBER) IS
2126: SELECT COUNT(*) FROM OKC_K_LINES_B
2127: WHERE id=P_Line_Id;
2128: BEGIN
2129: IF P_Line_id = OKC_API.G_MISS_NUM OR
2130: P_Line_Id IS NULL

Line 2480: FROM okc_k_lines_b

2476: v_Index Binary_Integer;
2477:
2478: CURSOR DNZ_Cur(p_id NUMBER) IS
2479: SELECT dnz_chr_id
2480: FROM okc_k_lines_b
2481: WHERE id = p_id;
2482: CURSOR Child_Cur1(P_Parent_Id IN NUMBER)
2483: IS SELECT ID
2484: FROM Okc_K_Lines_b

Line 2484: FROM Okc_K_Lines_b

2480: FROM okc_k_lines_b
2481: WHERE id = p_id;
2482: CURSOR Child_Cur1(P_Parent_Id IN NUMBER)
2483: IS SELECT ID
2484: FROM Okc_K_Lines_b
2485: WHERE cle_Id=P_Parent_Id;
2486: CURSOR Child_Cur2(P_Parent_Id IN NUMBER)
2487: IS SELECT ID
2488: FROM Okc_K_Lines_b

Line 2488: FROM Okc_K_Lines_b

2484: FROM Okc_K_Lines_b
2485: WHERE cle_Id=P_Parent_Id;
2486: CURSOR Child_Cur2(P_Parent_Id IN NUMBER)
2487: IS SELECT ID
2488: FROM Okc_K_Lines_b
2489: WHERE cle_Id=P_Parent_Id;
2490: CURSOR Child_Cur3(P_Parent_Id IN NUMBER)
2491: IS SELECT ID
2492: FROM Okc_K_Lines_b

Line 2492: FROM Okc_K_Lines_b

2488: FROM Okc_K_Lines_b
2489: WHERE cle_Id=P_Parent_Id;
2490: CURSOR Child_Cur3(P_Parent_Id IN NUMBER)
2491: IS SELECT ID
2492: FROM Okc_K_Lines_b
2493: WHERE cle_Id=P_Parent_Id;
2494: CURSOR Child_Cur4(P_Parent_Id IN NUMBER)
2495: IS SELECT ID
2496: FROM Okc_K_Lines_b

Line 2496: FROM Okc_K_Lines_b

2492: FROM Okc_K_Lines_b
2493: WHERE cle_Id=P_Parent_Id;
2494: CURSOR Child_Cur4(P_Parent_Id IN NUMBER)
2495: IS SELECT ID
2496: FROM Okc_K_Lines_b
2497: WHERE cle_Id=P_Parent_Id;
2498: CURSOR Child_Cur5(P_Parent_Id IN NUMBER)
2499: IS SELECT ID
2500: FROM Okc_K_Lines_b

Line 2500: FROM Okc_K_Lines_b

2496: FROM Okc_K_Lines_b
2497: WHERE cle_Id=P_Parent_Id;
2498: CURSOR Child_Cur5(P_Parent_Id IN NUMBER)
2499: IS SELECT ID
2500: FROM Okc_K_Lines_b
2501: WHERE cle_Id=P_Parent_Id;
2502:
2503: CURSOR Item_Cur(P_Line_Id IN NUMBER)
2504: IS SELECT ID

Line 2577: SELECT COUNT(*) FROM OKC_K_LINES_B

2573: x_return_status OUT NOCOPY VARCHAR2) IS
2574: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2575: l_Count NUMBER;
2576: CURSOR Cur_Line(P_Line_Id IN NUMBER) IS
2577: SELECT COUNT(*) FROM OKC_K_LINES_B
2578: WHERE id=P_Line_Id;
2579: BEGIN
2580:
2581: IF (l_debug = 'Y') THEN

Line 4287: FROM okc_k_lines_b

4283: AND SUBJECT_CLE_ID is not null;
4284:
4285: Cursor cle_csr(p_subject_chr_id NUMBER, p_object_chr_id NUMBER) Is
4286: SELECT count(*)
4287: FROM okc_k_lines_b
4288: WHERE id IN (SELECT OBJECT_CLE_ID
4289: FROM okc_operation_lines
4290: WHERE SUBJECT_CHR_ID = p_subject_chr_id
4291: AND OBJECT_CHR_ID = p_object_chr_id)

Line 4381: UPDATE OKC_K_LINES_B

4377: --
4378: -- clear date_renewed in source contact(s) lines
4379: -- only for those lines in target contract
4380: --
4381: UPDATE OKC_K_LINES_B
4382: SET date_renewed = decode(l_active_yn,'Y',sysdate,null),
4383: object_version_number = object_version_number + 1,
4384: last_updated_by = FND_GLOBAL.USER_ID,
4385: last_update_date = sysdate,

Line 4509: OKC_K_LINES_B

4505: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4506:
4507: CURSOR l_line_csr IS
4508: SELECT display_sequence from
4509: OKC_K_LINES_B
4510: connect by prior cle_id = id
4511: start with id = p_cle_id;
4512:
4513: CURSOR l_k_code_csr IS

Line 4516: (select dnz_chr_id from okc_k_lines_b where id =p_cle_id));

4512:
4513: CURSOR l_k_code_csr IS
4514: SELECT cls_code from
4515: OKC_SUBCLASSES_B WHERE code=(SELECT scs_code from OKC_K_HEADERS_B where id in
4516: (select dnz_chr_id from okc_k_lines_b where id =p_cle_id));
4517:
4518: CURSOR l_chk_cle_csr IS
4519: SELECT clev.cle_id,RTRIM(clev.line_number) line_number,clev.lse_id
4520: FROM OKC_K_LINES_V clev

Line 4525: FROM OKC_K_LINES_B

4521: WHERE clev.id = p_cle_id;
4522:
4523: CURSOR l_get_top_line_number_csr (p_line_id NUMBER) IS
4524: SELECT line_number
4525: FROM OKC_K_LINES_B
4526: WHERE id = p_line_id;
4527:
4528: CURSOR l_line_name_csr IS
4529: SELECT line_number "LINE_NAME"

Line 4662: from okc_k_lines_b

4658: --Cursor to get topline id for a particular subline; For a topline this will return NULL
4659:
4660: Cursor get_line_lvl_csr is
4661: Select cle_id
4662: from okc_k_lines_b
4663: where id = p_cle_id
4664: and dnz_chr_id = p_id;
4665:
4666: --Cursor to fetch amount for a particular subline

Line 4670: from okc_k_lines_b cle

4666: --Cursor to fetch amount for a particular subline
4667:
4668: Cursor get_subline_amt_csr (p_cle_id NUMBER) IS
4669: Select cle.price_negotiated
4670: from okc_k_lines_b cle
4671: where cle.id = p_cle_id
4672: and cle.dnz_chr_id = p_id;
4673:
4674: --Cursor to add price_negotiated and cancelled_amount of all the toplines

Line 4678: from okc_k_lines_b cle

4674: --Cursor to add price_negotiated and cancelled_amount of all the toplines
4675:
4676: Cursor get_hdr_amts_csr IS
4677: select nvl(sum(nvl(price_negotiated,0)),0), nvl(sum(nvl(cancelled_amount,0)),0)
4678: from okc_k_lines_b cle
4679: where cle.dnz_chr_id = p_id
4680: and cle.lse_id in (1, 12, 14, 19, 46)
4681: and cle.cle_id is null;
4682:

Line 4687: from okc_k_lines_b

4683: --Cursor to fectch lse_id of topline
4684:
4685: Cursor get_lse_id_csr (p_cle_id NUMBER) IS
4686: select lse_id
4687: from okc_k_lines_b
4688: where id=p_cle_id;
4689:
4690:
4691: --Cursor to add price_negotiated for all the sublines of a topline which are not in cancelled status

Line 4695: from okc_k_lines_b

4691: --Cursor to add price_negotiated for all the sublines of a topline which are not in cancelled status
4692:
4693: Cursor get_uncancelled_amt_csr(p_cle_id number, p_id number) IS
4694: select nvl(sum(nvl(price_negotiated,0)),0)
4695: from okc_k_lines_b
4696: where cle_id = p_cle_id
4697: and dnz_chr_id = p_id
4698: and date_cancelled is null;
4699:

Line 4708: FROM okc_k_lines_b

4704: -- i.e. term_cancel_source is not ('IBTRANSFER', 'IBRETURN', 'IBTERMINATE', 'IBREPLACE')
4705:
4706: CURSOR get_topline_id_csr IS
4707: SELECT id
4708: FROM okc_k_lines_b
4709: WHERE dnz_chr_id = p_id
4710: and cle_id is null
4711: and term_cancel_source is null;
4712:

Line 4762: Update okc_k_lines_b

4758: IF (l_debug = 'Y') THEN
4759: okc_debug.log('2320: ENTERED -> CANCELLED; Updating price_negotiated and cancelled_amount for the topline of the subline');
4760: END IF;
4761:
4762: Update okc_k_lines_b
4763: set price_negotiated = nvl(price_negotiated,0) - nvl(l_sub_line_amt,0),
4764: cancelled_amount = nvl(cancelled_amount,0) + nvl(l_sub_line_amt,0)
4765: Where id = l_cle_id -- top line id
4766: and dnz_chr_id = p_id;

Line 4774: Update okc_k_lines_b

4770: IF (l_debug = 'Y') THEN
4771: okc_debug.log('2330: CANCELLED -> ENTERED; Updating price_negotiated and cancelled_amount for the topline of the subline');
4772: END IF;
4773:
4774: Update okc_k_lines_b
4775: set price_negotiated = nvl(price_negotiated,0) + nvl(l_sub_line_amt,0),
4776: cancelled_amount = nvl(cancelled_amount,0) - nvl(l_sub_line_amt,0)
4777: Where id = l_cle_id -- top line id
4778: And dnz_chr_id = p_id;

Line 4795: Update okc_k_lines_b

4791: IF (l_debug = 'Y') THEN
4792: okc_debug.log ('2410: ENTERED -> CANCELLED; Updating price_negotiated and cancelled_amount for topline');
4793: END IF;
4794:
4795: Update okc_k_lines_b
4796: set cancelled_amount = nvl(cancelled_amount, 0) + nvl(price_negotiated, 0),
4797: price_negotiated = 0
4798: Where id = p_cle_id
4799: and dnz_chr_id = p_id;

Line 4818: Update okc_k_lines_b

4814: END IF;
4815:
4816: --updating the topline price_negotiated and cancelled_amount for SUBSCRIPTION line type
4817:
4818: Update okc_k_lines_b
4819: set price_negotiated = nvl(cancelled_amount,0),
4820: cancelled_amount = 0
4821: Where id = p_cle_id
4822: and dnz_chr_id = p_id;

Line 4837: Update okc_k_lines_b

4833: Close get_uncancelled_amt_csr;
4834:
4835: -- updating price_negotiated and cancelled_amount for top line which are not of type SUBSCRIPTION
4836:
4837: Update okc_k_lines_b
4838: set price_negotiated = nvl(price_negotiated, 0) + nvl(l_uncancelled_amt,0),
4839: cancelled_amount = nvl(cancelled_amount,0) - nvl(l_uncancelled_amt,0)
4840: Where id = p_cle_id
4841: and dnz_chr_id = p_id;

Line 4865: update okc_k_lines_b

4861: END IF;
4862:
4863: -- updating price_negotiated and cancelled_amount for all the top lines of the contract
4864:
4865: update okc_k_lines_b
4866: set cancelled_amount = nvl(cancelled_amount, 0) + nvl(price_negotiated, 0),
4867: price_negotiated = 0
4868: where dnz_chr_id = p_id
4869: and cle_id is NULL

Line 4889: Update okc_k_lines_b

4885: Close get_uncancelled_amt_csr;
4886:
4887: -- updating price_negotiated and cancelled_amount for selected top line
4888:
4889: Update okc_k_lines_b
4890: set price_negotiated = nvl(price_negotiated, 0) + nvl(l_uncancelled_amt,0),
4891: cancelled_amount = nvl(cancelled_amount,0) - nvl(l_uncancelled_amt,0)
4892: Where id = topline.id
4893: and dnz_chr_id = p_id;

Line 4901: update okc_k_lines_b

4897:
4898: /**
4899: -- updating price_negotiated and cancelled_amount for all the top lines of the contract
4900:
4901: update okc_k_lines_b
4902: set price_negotiated = nvl(price_negotiated, 0) + nvl(cancelled_amount, 0),
4903: cancelled_amount = 0
4904: where dnz_chr_id = p_id
4905: and cle_id is NULL

Line 5012: FROM okc_k_lines_b

5008:
5009:
5010: Cursor get_top_line_cancelled_amt IS
5011: SELECT nvl(cancelled_amount, 0)
5012: FROM okc_k_lines_b
5013: WHERE id = p_cle_id
5014: and dnz_chr_id = p_id;
5015:
5016: Cursor get_sub_line_cancelled_amt IS

Line 5018: FROM okc_k_lines_b

5014: and dnz_chr_id = p_id;
5015:
5016: Cursor get_sub_line_cancelled_amt IS
5017: SELECT nvl(price_negotiated, 0)
5018: FROM okc_k_lines_b
5019: WHERE id = p_cle_id
5020: and dnz_chr_id = p_id
5021: and date_cancelled is not null;
5022:

Line 5025: FROM okc_k_lines_b

5021: and date_cancelled is not null;
5022:
5023: Cursor get_line_lvl_csr IS
5024: SELECT cle_id
5025: FROM okc_k_lines_b
5026: WHERE id = p_cle_id
5027: and dnz_chr_id = p_id;
5028:
5029:

Line 5083: from okc_k_lines_b olb, okc_operation_lines opl

5079: --Fix Bug#4927824 18-JAN-2006 maanand
5080:
5081: cursor trn_source_code (p_target_line_id NUMBER) IS
5082: Select term_cancel_source, object_cle_id
5083: from okc_k_lines_b olb, okc_operation_lines opl
5084: where olb.id= p_target_line_id
5085: and ( ( opl.object_cle_id = olb.id )
5086:
5087: OR

Line 5123: from okc_k_lines_b kle1

5119: last_update_date = sysdate,
5120: last_update_login = FND_GLOBAL.LOGIN_ID
5121:
5122: where subject_cle_id in ( select id
5123: from okc_k_lines_b kle1
5124: start with kle1.id = p_target_line_id
5125: connect by prior kle1.id = kle1.cle_id
5126: and kle1.dnz_chr_id = p_target_chr_id)
5127:

Line 5133: UPDATE OKC_K_LINES_B

5129:
5130:
5131: -- clear date_renewed only for those lines in target top lines
5132:
5133: UPDATE OKC_K_LINES_B
5134: SET date_renewed = decode(l_active_yn,'Y',sysdate,null),
5135: object_version_number = object_version_number + 1,
5136: last_updated_by = FND_GLOBAL.USER_ID,
5137: last_update_date = sysdate,

Line 5147: UPDATE OKC_K_LINES_B

5143:
5144:
5145: -- clear date_renewed only for those lines in target sub lines
5146:
5147: UPDATE OKC_K_LINES_B
5148: SET date_renewed = decode(l_active_yn,'Y',sysdate,null),
5149: object_version_number = object_version_number + 1,
5150: last_updated_by = FND_GLOBAL.USER_ID,
5151: last_update_date = sysdate,