[Home] [Help]
251: IS
252: SELECT DISTINCT tal.dnz_khr_id khr_id
253: ,kle_id kle_id
254: FROM okl_trx_assets tas
255: ,okl_txl_assets_b tal
256: WHERE tal.tas_id = tas.id
257: AND tas.id = p_source_id;
258:
259: -- Cursor to fetch the Contract Id from the OKL_TXL_ASSETS table.
256: WHERE tal.tas_id = tas.id
257: AND tas.id = p_source_id;
258:
259: -- Cursor to fetch the Contract Id from the OKL_TXL_ASSETS table.
260: CURSOR c_tal_khr_id_csr( p_source_id okl_txl_assets_b.id%TYPE )
261: IS
262: SELECT tal.dnz_khr_id khr_id
263: ,tal.kle_id kle_id
264: FROM okl_txl_assets_b tal
260: CURSOR c_tal_khr_id_csr( p_source_id okl_txl_assets_b.id%TYPE )
261: IS
262: SELECT tal.dnz_khr_id khr_id
263: ,tal.kle_id kle_id
264: FROM okl_txl_assets_b tal
265: WHERE tal.id = p_source_id;
266:
267: -- Cursor to fetch the Contract Line Information
268: CURSOR c_k_lines_csr (p_kle_id NUMBER)
472: FROM fa_locations_kfv loc
473: WHERE loc.location_id = p_fdh_location_id;
474:
475: -- Cursor to fetch the transaction number
476: -- source table : okl_txl_assets_b
477: CURSOR c_txl_trans_number_csr (p_source_id NUMBER)
478: IS
479: SELECT tas.trans_number trans_number
480: ,txl.id txl_id
479: SELECT tas.trans_number trans_number
480: ,txl.id txl_id
481: ,tas.id tas_id
482: FROM okl_trx_assets tas
483: ,okl_txl_assets_b txl
484: WHERE tas.id = txl.tas_id and
485: txl.id = p_source_id;
486:
487: -- Cursor to fetch the transaction number
491: SELECT tas.trans_number trans_number
492: ,txl.id txl_id
493: ,tas.id tas_id
494: FROM okl_trx_assets tas
495: ,okl_txl_assets_b txl
496: ,okl_txd_assets_b txd
497: WHERE tas.id = txl.tas_id and
498: txl.id = txd.tal_id and
499: txd.id = p_source_id;
691: AND EXISTS
692: (
693: SELECT 1
694: FROM okl_trx_assets tas
695: ,okl_txl_assets_b tal
696: ,okc_k_lines_b cleb
697: WHERE cleb.id = tql.kle_id
698: AND cleb.cle_id = tal.kle_id
699: AND tal.tas_id = tas.id
4248: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4249: END IF;
4250: put_in_log(l_debug_enabled,is_debug_procedure_on,is_debug_statement_on,l_module, 'S',
4251: 'Validation 1 Successfull !');
4252: -- Validation 2: Source Table should be OKL_TXL_ASSETS_B/OKL_TXD_ASSETS_B only
4253: IF p_fxhv_rec.source_table <> G_TRX_ASSETS
4254: THEN
4255: -- Raise an Exception
4256: OKL_API.set_message(
4262: RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
4263: END IF;
4264: put_in_log(l_debug_enabled,is_debug_procedure_on,is_debug_statement_on,l_module, 'S',
4265: 'Validation 2 Successfull !');
4266: -- Validation 3: Source Table should be OKL_TXL_ASSETS_B/OKL_TXD_ASSETS_B only
4267: IF p_fxlv_rec.source_table NOT IN ( G_TXL_ASSETS, G_TXD_ASSETS )
4268: THEN
4269: -- Raise an Exception
4270: OKL_API.set_message(
4439: END IF;
4440:
4441: -- Start populating the FXLV Record Structure
4442: -- Fetch transaction number
4443: IF p_fxlv_rec.source_table = 'OKL_TXL_ASSETS_B'
4444: THEN
4445: -- if source table is OKL_TXL_ASSETS_B
4446: put_in_log(l_debug_enabled,is_debug_procedure_on,is_debug_statement_on,l_module, 'S',
4447: 'Executing the Cursor c_txl_trans_number_csr. p_source_id=' || p_fxlv_rec.source_id);
4441: -- Start populating the FXLV Record Structure
4442: -- Fetch transaction number
4443: IF p_fxlv_rec.source_table = 'OKL_TXL_ASSETS_B'
4444: THEN
4445: -- if source table is OKL_TXL_ASSETS_B
4446: put_in_log(l_debug_enabled,is_debug_procedure_on,is_debug_statement_on,l_module, 'S',
4447: 'Executing the Cursor c_txl_trans_number_csr. p_source_id=' || p_fxlv_rec.source_id);
4448: FOR t_rec IN c_txl_trans_number_csr(
4449: p_source_id => p_fxlv_rec.source_id )