[Home] [Help]
1294:
1295: PROCEDURE Generate_PO_trx
1296: (p_journal_rec IN journals%ROWTYPE ) IS
1297:
1298: /*BUG 9078068 : Cursor added to accomodate Cost Mgmt Trxs of type CST_WRITE_OFFS and
1299: RCV_RECEIVING_SUB_LEDGER*/
1300: CURSOR po_detail_lines IS
1301: SELECT jlcgn.nit_id,
1302: REPLACE(povapf.num_1099,'-'),
1345: p_journal_rec.je_line_num
1346: FROM jl_co_gl_nits jlcgn,
1347: po_headers_all poha,
1348: PO_DISTRIBUTIONS_ALL podis,
1349: cst_write_offs cwo,
1350: xla_ae_lines AEL, gl_import_references gir,
1351: xla_distribution_links LNK,(SELECT nvl(papf.national_identifier,nvl(aps.individual_1099,aps.num_1099)) num_1099, aps.vendor_name,
1352: aps.global_attribute10, aps.global_attribute12, aps.segment1, aps.vendor_id
1353: FROM ap_suppliers aps,(select distinct person_id , national_identifier
1362: AND AEL.application_id = 707
1363: AND AEL.ae_header_id = LNK.ae_header_id
1364: AND AEL.ae_line_num = LNK.ae_line_num
1365: AND LNK.application_id = 707
1366: AND LNK.SOURCE_DISTRIBUTION_TYPE = 'CST_WRITE_OFFS'
1367: AND LNK.SOURCE_DISTRIBUTION_ID_NUM_1 = cwo.write_off_id
1368: AND cwo.po_distribution_id = podis.PO_DISTRIBUTION_ID
1369: AND podis.po_header_id = poha.po_header_id;
1370: