1276: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
1277: RAISE Okl_Api.G_EXCEPTION_ERROR;
1278: END IF;
1279:
1280: OKL_STREAMS_SEC_PVT.RESET_REPO_STREAMS; -- MGAAP 7263041
1281: OKL_CONTRACT_REBOOK_PVT.calc_accrual_adjustment(
1282: p_api_version => p_api_version,
1283: p_init_msg_list => p_init_msg_list,
1284: x_return_status => x_return_status,
1315: END IF;
1316: END IF;
1317:
1318: -- MGAAP start 7263041
1319: OKL_STREAMS_SEC_PVT.SET_REPO_STREAMS; -- MGAAP 7263041
1320: OKL_CONTRACT_REBOOK_PVT.calc_accrual_adjustment(
1321: p_api_version => p_api_version,
1322: p_init_msg_list => p_init_msg_list,
1323: x_return_status => x_return_status,
1331: x_stream_tbl => l_stream_tbl,
1332: p_trx_tbl_code => 'TAS',
1333: p_trx_type => 'ALI');
1334:
1335: OKL_STREAMS_SEC_PVT.RESET_REPO_STREAMS; -- MGAAP 7263041
1336: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
1337: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
1338: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
1339: RAISE Okl_Api.G_EXCEPTION_ERROR;
1483: END IF;
1484:
1485: -- MGAAP start 7263041
1486: IF (l_multi_gaap_yn = 'Y') THEN
1487: OKL_STREAMS_SEC_PVT.SET_REPO_STREAMS;
1488: OKL_CONTRACT_REBOOK_PVT.calc_inv_acc_adjustment(
1489: p_api_version => p_api_version,
1490: p_init_msg_list => p_init_msg_list,
1491: x_return_status => x_return_status,
1499: p_trx_tbl_code => 'TAS',
1500: p_trx_type => 'ALI',
1501: p_product_id => l_reporting_pdt_id); -- MGAAP 7263041
1502:
1503: OKL_STREAMS_SEC_PVT.RESET_REPO_STREAMS;
1504: IF (x_return_status = Okl_Api.G_RET_STS_UNEXP_ERROR) THEN
1505: RAISE Okl_Api.G_EXCEPTION_UNEXPECTED_ERROR;
1506: ELSIF (x_return_status = Okl_Api.G_RET_STS_ERROR) THEN
1507: RAISE Okl_Api.G_EXCEPTION_ERROR;
7742: l_api_version CONSTANT NUMBER := 1.0;
7743: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
7744:
7745:
7746: l_stmv_rec Okl_Streams_pub.stmv_rec_type;
7747: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7748: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7749: x_selv_tbl Okl_Streams_pub.selv_tbl_type;
7750:
7743: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
7744:
7745:
7746: l_stmv_rec Okl_Streams_pub.stmv_rec_type;
7747: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7748: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7749: x_selv_tbl Okl_Streams_pub.selv_tbl_type;
7750:
7751: --Cursor to fetch split child records (for split asset as well as split asset into components)
7744:
7745:
7746: l_stmv_rec Okl_Streams_pub.stmv_rec_type;
7747: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7748: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7749: x_selv_tbl Okl_Streams_pub.selv_tbl_type;
7750:
7751: --Cursor to fetch split child records (for split asset as well as split asset into components)
7752: CURSOR l_split_trx_csr1(p_trxline_id IN NUMBER) IS
7745:
7746: l_stmv_rec Okl_Streams_pub.stmv_rec_type;
7747: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7748: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7749: x_selv_tbl Okl_Streams_pub.selv_tbl_type;
7750:
7751: --Cursor to fetch split child records (for split asset as well as split asset into components)
7752: CURSOR l_split_trx_csr1(p_trxline_id IN NUMBER) IS
7753: SELECT txd.split_percent,
7890: p_txl_id IN NUMBER,
7891: --Bug# 6344223
7892: p_highest_split_comp_amt IN VARCHAR2 DEFAULT 'N') IS
7893:
7894: l_stmv_rec Okl_Streams_pub.stmv_rec_type;
7895: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7896: l_stmv_rec_hist Okl_Streams_pub.stmv_rec_type;
7897: l_selv_tbl_hist Okl_Streams_pub.selv_tbl_type;
7898: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7891: --Bug# 6344223
7892: p_highest_split_comp_amt IN VARCHAR2 DEFAULT 'N') IS
7893:
7894: l_stmv_rec Okl_Streams_pub.stmv_rec_type;
7895: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7896: l_stmv_rec_hist Okl_Streams_pub.stmv_rec_type;
7897: l_selv_tbl_hist Okl_Streams_pub.selv_tbl_type;
7898: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7899: x_selv_tbl Okl_Streams_pub.selv_tbl_type;
7892: p_highest_split_comp_amt IN VARCHAR2 DEFAULT 'N') IS
7893:
7894: l_stmv_rec Okl_Streams_pub.stmv_rec_type;
7895: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7896: l_stmv_rec_hist Okl_Streams_pub.stmv_rec_type;
7897: l_selv_tbl_hist Okl_Streams_pub.selv_tbl_type;
7898: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7899: x_selv_tbl Okl_Streams_pub.selv_tbl_type;
7900:
7893:
7894: l_stmv_rec Okl_Streams_pub.stmv_rec_type;
7895: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7896: l_stmv_rec_hist Okl_Streams_pub.stmv_rec_type;
7897: l_selv_tbl_hist Okl_Streams_pub.selv_tbl_type;
7898: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7899: x_selv_tbl Okl_Streams_pub.selv_tbl_type;
7900:
7901:
7894: l_stmv_rec Okl_Streams_pub.stmv_rec_type;
7895: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7896: l_stmv_rec_hist Okl_Streams_pub.stmv_rec_type;
7897: l_selv_tbl_hist Okl_Streams_pub.selv_tbl_type;
7898: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7899: x_selv_tbl Okl_Streams_pub.selv_tbl_type;
7900:
7901:
7902: CURSOR l_strm_csr ( kleId NUMBER, status VARCHAR2) IS
7895: l_selv_tbl Okl_Streams_pub.selv_tbl_type;
7896: l_stmv_rec_hist Okl_Streams_pub.stmv_rec_type;
7897: l_selv_tbl_hist Okl_Streams_pub.selv_tbl_type;
7898: x_stmv_rec Okl_Streams_pub.stmv_rec_type;
7899: x_selv_tbl Okl_Streams_pub.selv_tbl_type;
7900:
7901:
7902: CURSOR l_strm_csr ( kleId NUMBER, status VARCHAR2) IS
7903: SELECT str.Id,
7915: -- Bug# 4775555
7916: sty.stream_type_purpose,
7917: --Bug# 6344223
7918: str.link_hist_stream_id
7919: FROM okl_streams str,
7920: okl_strm_type_b sty
7921: WHERE
7922: str.kle_id = kleId
7923: AND str.say_code = status
7936: str.sgn_code SGN_CODE,
7937: ele.stm_id STM_ID,
7938: ele.se_line_number SE_LINE_NUMBER
7939: FROM okl_strm_elements ele,
7940: okl_streams str
7941: WHERE ele.stm_id = str.id
7942: AND str.id = strId
7943: AND str.kle_id = kleId
7944: AND str.sty_id = styId
7964: WHERE id = p_kle_id;
7965:
7966: l_currency_code OKC_K_LINES_B.currency_code%type;
7967:
7968: l_active_yn OKL_STREAMS.ACTIVE_YN%TYPE;
7969:
7970: --Bug# 4775555
7971: l_stmv_rec_temp Okl_Streams_pub.stmv_rec_type;
7972:
7967:
7968: l_active_yn OKL_STREAMS.ACTIVE_YN%TYPE;
7969:
7970: --Bug# 4775555
7971: l_stmv_rec_temp Okl_Streams_pub.stmv_rec_type;
7972:
7973: --Bug# 6344223
7974: CURSOR l_txd_csr(p_trxline_id IN NUMBER) IS
7975: SELECT txd.id,
8032: l_stmv_rec_hist.active_yn := 'N';
8033: l_stmv_rec_hist.date_history := SYSDATE;
8034: --Bug# 6344223
8035: l_stmv_rec_hist.link_hist_stream_id := l_strms_rec.link_hist_stream_id;
8036: Okl_Streams_Pub.update_streams(
8037: p_api_version => l_api_version
8038: ,p_init_msg_list => p_init_msg_list
8039: ,x_return_status => x_return_status
8040: ,x_msg_count => x_msg_count
8195: l_stmv_rec_hist.active_yn := 'N';
8196: l_stmv_rec_hist.date_history := SYSDATE;
8197: --Bug# 6344223
8198: l_stmv_rec_hist.link_hist_stream_id := l_strms_rec.link_hist_stream_id;
8199: Okl_Streams_Pub.update_streams(
8200: p_api_version => l_api_version
8201: ,p_init_msg_list => p_init_msg_list
8202: ,x_return_status => x_return_status
8203: ,x_msg_count => x_msg_count
8220: CLOSE l_sifseq_csr;
8221: --Bug# 3502142
8222: l_stmv_rec.date_current := SYSDATE;
8223:
8224: Okl_Streams_Pub.create_streams(
8225: p_api_version => l_api_version
8226: ,p_init_msg_list => p_init_msg_list
8227: ,x_return_status => x_return_status
8228: ,x_msg_count => x_msg_count
8248: CLOSE l_sifseq_csr;
8249: --Bug# 3502142
8250: l_stmv_rec.date_current := SYSDATE;
8251:
8252: Okl_Streams_Pub.create_streams(
8253: p_api_version => l_api_version
8254: ,p_init_msg_list => p_init_msg_list
8255: ,x_return_status => x_return_status
8256: ,x_msg_count => x_msg_count