DBA Data[Home] [Help]

APPS.AP_PERIOD_CLOSE_PKG dependencies on XLA_EVENTS

Line 172: xla_events_unacct xla_period_close_evt_tab := xla_period_close_evt_tab();

168: type xla_period_close_header_tab is table of XLA_PERIOD_CLOSE_EXP_PKG.period_close_hdr_date_cur%rowtype;
169: xla_headers_untransfered xla_period_close_header_tab := xla_period_close_header_tab();
170:
171: type xla_period_close_evt_tab is table of XLA_PERIOD_CLOSE_EXP_PKG.period_close_evt_date_cur%rowtype;
172: xla_events_unacct xla_period_close_evt_tab := xla_period_close_evt_tab();
173:
174: l_rowcount NUMBER := NULL; -- bug 9509700
175:
176: begin

Line 739: xla_events_unacct.EXTEND();

735: RETURN 'Y';
736: END IF;
737:
738: OPEN xla_period_close_exp_pkg.period_close_evt_date_cur(200,g_ledger_id,g_period_start_date,g_period_end_date);
739: xla_events_unacct.EXTEND();
740: FETCH xla_period_close_exp_pkg.period_close_evt_date_cur INTO xla_events_unacct(1);
741: CLOSE xla_period_close_exp_pkg.period_close_evt_date_cur;
742: IF xla_events_unacct(1).event_id IS NOT NULL THEN
743: RETURN 'Y';

Line 740: FETCH xla_period_close_exp_pkg.period_close_evt_date_cur INTO xla_events_unacct(1);

736: END IF;
737:
738: OPEN xla_period_close_exp_pkg.period_close_evt_date_cur(200,g_ledger_id,g_period_start_date,g_period_end_date);
739: xla_events_unacct.EXTEND();
740: FETCH xla_period_close_exp_pkg.period_close_evt_date_cur INTO xla_events_unacct(1);
741: CLOSE xla_period_close_exp_pkg.period_close_evt_date_cur;
742: IF xla_events_unacct(1).event_id IS NOT NULL THEN
743: RETURN 'Y';
744: END IF;

Line 742: IF xla_events_unacct(1).event_id IS NOT NULL THEN

738: OPEN xla_period_close_exp_pkg.period_close_evt_date_cur(200,g_ledger_id,g_period_start_date,g_period_end_date);
739: xla_events_unacct.EXTEND();
740: FETCH xla_period_close_exp_pkg.period_close_evt_date_cur INTO xla_events_unacct(1);
741: CLOSE xla_period_close_exp_pkg.period_close_evt_date_cur;
742: IF xla_events_unacct(1).event_id IS NOT NULL THEN
743: RETURN 'Y';
744: END IF;
745:
746: ELSE

Line 822: BULK COLLECT INTO xla_events_unacct;

818: END IF;
819:
820: OPEN xla_period_close_exp_pkg.period_close_evt_date_cur(200,g_ledger_id,g_period_start_date,g_period_end_date);
821: FETCH xla_period_close_exp_pkg.period_close_evt_date_cur
822: BULK COLLECT INTO xla_events_unacct;
823: CLOSE xla_period_close_exp_pkg.period_close_evt_date_cur;
824:
825: IF xla_events_unacct.COUNT> 0 THEN
826: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST

Line 825: IF xla_events_unacct.COUNT> 0 THEN

821: FETCH xla_period_close_exp_pkg.period_close_evt_date_cur
822: BULK COLLECT INTO xla_events_unacct;
823: CLOSE xla_period_close_exp_pkg.period_close_evt_date_cur;
824:
825: IF xla_events_unacct.COUNT> 0 THEN
826: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST
827: LOOP
828: INSERT WHEN NOT EXISTS (SELECT accounting_event_id
829: FROM ap_period_close_excps_gt

Line 826: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST

822: BULK COLLECT INTO xla_events_unacct;
823: CLOSE xla_period_close_exp_pkg.period_close_evt_date_cur;
824:
825: IF xla_events_unacct.COUNT> 0 THEN
826: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST
827: LOOP
828: INSERT WHEN NOT EXISTS (SELECT accounting_event_id
829: FROM ap_period_close_excps_gt
830: WHERE accounting_event_id = xla_events_unacct(i).event_id)

Line 830: WHERE accounting_event_id = xla_events_unacct(i).event_id)

826: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST
827: LOOP
828: INSERT WHEN NOT EXISTS (SELECT accounting_event_id
829: FROM ap_period_close_excps_gt
830: WHERE accounting_event_id = xla_events_unacct(i).event_id)
831: AND xla_events_unacct(i).entity_code='AP_INVOICES' THEN
832: INTO ap_period_close_excps_gt
833: ( invoice_id
834: ,invoice_distribution_id

Line 831: AND xla_events_unacct(i).entity_code='AP_INVOICES' THEN

827: LOOP
828: INSERT WHEN NOT EXISTS (SELECT accounting_event_id
829: FROM ap_period_close_excps_gt
830: WHERE accounting_event_id = xla_events_unacct(i).event_id)
831: AND xla_events_unacct(i).entity_code='AP_INVOICES' THEN
832: INTO ap_period_close_excps_gt
833: ( invoice_id
834: ,invoice_distribution_id
835: ,invoice_payment_id -- 7318763

Line 859: SELECT xla_events_unacct(i).source_id_int_1

855: ,entity_code
856: ,source_type
857: ,source_table_name
858: )
859: SELECT xla_events_unacct(i).source_id_int_1
860: ,aid.invoice_distribution_id
861: ,aid.awt_invoice_payment_id -- 7318763
862: ,aid.accounting_event_id
863: ,aid.accounting_date

Line 865: ,xla_events_unacct(i).transaction_number

861: ,aid.awt_invoice_payment_id -- 7318763
862: ,aid.accounting_event_id
863: ,aid.accounting_date
864: ,aid.org_id
865: ,xla_events_unacct(i).transaction_number
866: ,ai.invoice_currency_code
867: ,ai.party_id
868: ,ai.vendor_id
869: ,ai.doc_sequence_value

Line 871: ,xla_events_unacct(i).transaction_date

867: ,ai.party_id
868: ,ai.vendor_id
869: ,ai.doc_sequence_value
870: ,ai.voucher_num
871: ,xla_events_unacct(i).transaction_date
872: ,ai.invoice_amount
873: ,ai.cancelled_date
874: ,aid.match_status_flag
875: ,xla_events_unacct(i).legal_entity_id

Line 875: ,xla_events_unacct(i).legal_entity_id

871: ,xla_events_unacct(i).transaction_date
872: ,ai.invoice_amount
873: ,ai.cancelled_date
874: ,aid.match_status_flag
875: ,xla_events_unacct(i).legal_entity_id
876: ,aid.po_distribution_id
877: ,aid.amount
878: ,aid.detail_tax_dist_id
879: ,aid.invoice_line_number

Line 880: ,xla_events_unacct(i).event_type_code

876: ,aid.po_distribution_id
877: ,aid.amount
878: ,aid.detail_tax_dist_id
879: ,aid.invoice_line_number
880: ,xla_events_unacct(i).event_type_code
881: ,xla_events_unacct(i).entity_code
882: ,G_SRC_TYP_OTHER_EXCPS
883: ,G_SRC_TAB_AP_INV_DISTS_ALL
884: FROM ap_invoices_all ai

Line 881: ,xla_events_unacct(i).entity_code

877: ,aid.amount
878: ,aid.detail_tax_dist_id
879: ,aid.invoice_line_number
880: ,xla_events_unacct(i).event_type_code
881: ,xla_events_unacct(i).entity_code
882: ,G_SRC_TYP_OTHER_EXCPS
883: ,G_SRC_TAB_AP_INV_DISTS_ALL
884: FROM ap_invoices_all ai
885: ,ap_invoice_distributions_all aid

Line 890: AND aid.accounting_event_id = xla_events_unacct(i).event_id

886: ,ap_org_attributes_gt org_gtt
887: WHERE aid.invoice_id = ai.invoice_id(+)
888: AND aid.set_of_books_id = g_ledger_id
889: AND aid.org_id = org_gtt.org_id
890: AND aid.accounting_event_id = xla_events_unacct(i).event_id
891: UNION ALL
892: SELECT xla_events_unacct(i).source_id_int_1
893: ,astd.invoice_distribution_id
894: ,NULL invoice_payment_id

Line 892: SELECT xla_events_unacct(i).source_id_int_1

888: AND aid.set_of_books_id = g_ledger_id
889: AND aid.org_id = org_gtt.org_id
890: AND aid.accounting_event_id = xla_events_unacct(i).event_id
891: UNION ALL
892: SELECT xla_events_unacct(i).source_id_int_1
893: ,astd.invoice_distribution_id
894: ,NULL invoice_payment_id
895: ,astd.accounting_event_id
896: ,astd.accounting_date

Line 898: ,xla_events_unacct(i).transaction_number

894: ,NULL invoice_payment_id
895: ,astd.accounting_event_id
896: ,astd.accounting_date
897: ,astd.org_id
898: ,xla_events_unacct(i).transaction_number
899: ,ai.invoice_currency_code
900: ,ai.party_id
901: ,ai.vendor_id
902: ,ai.doc_sequence_value

Line 904: ,xla_events_unacct(i).transaction_date

900: ,ai.party_id
901: ,ai.vendor_id
902: ,ai.doc_sequence_value
903: ,ai.voucher_num
904: ,xla_events_unacct(i).transaction_date
905: ,ai.invoice_amount
906: ,ai.cancelled_date
907: ,astd.match_status_flag
908: ,xla_events_unacct(i).legal_entity_id

Line 908: ,xla_events_unacct(i).legal_entity_id

904: ,xla_events_unacct(i).transaction_date
905: ,ai.invoice_amount
906: ,ai.cancelled_date
907: ,astd.match_status_flag
908: ,xla_events_unacct(i).legal_entity_id
909: ,astd.po_distribution_id
910: ,astd.amount
911: ,astd.detail_tax_dist_id
912: ,NULL invoice_line_number

Line 913: ,xla_events_unacct(i).event_type_code

909: ,astd.po_distribution_id
910: ,astd.amount
911: ,astd.detail_tax_dist_id
912: ,NULL invoice_line_number
913: ,xla_events_unacct(i).event_type_code
914: ,xla_events_unacct(i).entity_code
915: ,G_SRC_TYP_OTHER_EXCPS
916: ,G_SRC_TAB_AP_SELF_TAX_DIST_ALL
917: FROM ap_invoices_all ai

Line 914: ,xla_events_unacct(i).entity_code

910: ,astd.amount
911: ,astd.detail_tax_dist_id
912: ,NULL invoice_line_number
913: ,xla_events_unacct(i).event_type_code
914: ,xla_events_unacct(i).entity_code
915: ,G_SRC_TYP_OTHER_EXCPS
916: ,G_SRC_TAB_AP_SELF_TAX_DIST_ALL
917: FROM ap_invoices_all ai
918: ,ap_self_assessed_tax_dist_all astd

Line 923: AND astd.accounting_event_id = xla_events_unacct(i).event_id

919: ,ap_org_attributes_gt org_gtt
920: WHERE astd.invoice_id = ai.invoice_id(+)
921: AND astd.set_of_books_id = g_ledger_id
922: AND astd.org_id = org_gtt.org_id
923: AND astd.accounting_event_id = xla_events_unacct(i).event_id
924: UNION ALL
925: SELECT xla_events_unacct(i).source_id_int_1
926: ,NULL invoice_distribution_id
927: ,NULL invoice_payment_id

Line 925: SELECT xla_events_unacct(i).source_id_int_1

921: AND astd.set_of_books_id = g_ledger_id
922: AND astd.org_id = org_gtt.org_id
923: AND astd.accounting_event_id = xla_events_unacct(i).event_id
924: UNION ALL
925: SELECT xla_events_unacct(i).source_id_int_1
926: ,NULL invoice_distribution_id
927: ,NULL invoice_payment_id
928: ,apph.accounting_event_id
929: ,apph.accounting_date

Line 931: ,xla_events_unacct(i).transaction_number

927: ,NULL invoice_payment_id
928: ,apph.accounting_event_id
929: ,apph.accounting_date
930: ,ai.org_id
931: ,xla_events_unacct(i).transaction_number
932: ,ai.invoice_currency_code
933: ,ai.party_id
934: ,ai.vendor_id
935: ,ai.doc_sequence_value

Line 937: ,xla_events_unacct(i).transaction_date

933: ,ai.party_id
934: ,ai.vendor_id
935: ,ai.doc_sequence_value
936: ,ai.voucher_num
937: ,xla_events_unacct(i).transaction_date
938: ,ai.invoice_amount
939: ,ai.cancelled_date
940: ,NULL match_status_flag
941: ,NULL po_distribution_id

Line 945: ,xla_events_unacct(i).legal_entity_id

941: ,NULL po_distribution_id
942: ,NULL amount
943: ,NULL detail_tax_dist_id
944: ,NULL invoice_line_number
945: ,xla_events_unacct(i).legal_entity_id
946: ,xla_events_unacct(i).event_type_code
947: ,xla_events_unacct(i).entity_code
948: ,G_SRC_TYP_OTHER_EXCPS
949: ,G_SRC_TAB_AP_PREPAY_HIST

Line 946: ,xla_events_unacct(i).event_type_code

942: ,NULL amount
943: ,NULL detail_tax_dist_id
944: ,NULL invoice_line_number
945: ,xla_events_unacct(i).legal_entity_id
946: ,xla_events_unacct(i).event_type_code
947: ,xla_events_unacct(i).entity_code
948: ,G_SRC_TYP_OTHER_EXCPS
949: ,G_SRC_TAB_AP_PREPAY_HIST
950: FROM ap_invoices_all ai

Line 947: ,xla_events_unacct(i).entity_code

943: ,NULL detail_tax_dist_id
944: ,NULL invoice_line_number
945: ,xla_events_unacct(i).legal_entity_id
946: ,xla_events_unacct(i).event_type_code
947: ,xla_events_unacct(i).entity_code
948: ,G_SRC_TYP_OTHER_EXCPS
949: ,G_SRC_TAB_AP_PREPAY_HIST
950: FROM ap_invoices_all ai
951: ,ap_prepay_history_all apph

Line 957: AND apph.accounting_event_id = xla_events_unacct(i).event_id;

953: WHERE apph.invoice_id = ai.invoice_id(+)
954: AND apph.accounting_event_id IS NOT NULL
955: AND ai.set_of_books_id = g_ledger_id
956: AND apph.org_id = org_gtt.org_id
957: AND apph.accounting_event_id = xla_events_unacct(i).event_id;
958: END LOOP;
959:
960: -- bug 12629621
961: --changed ai.org_id = org_gtt.org_id to apph.org_id = org_gtt.org_id in above

Line 963: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST

959:
960: -- bug 12629621
961: --changed ai.org_id = org_gtt.org_id to apph.org_id = org_gtt.org_id in above
962:
963: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST
964: LOOP
965: INSERT WHEN NOT EXISTS (SELECT accounting_event_id
966: FROM ap_period_close_excps_gt
967: WHERE accounting_event_id = xla_events_unacct(i).event_id)

Line 967: WHERE accounting_event_id = xla_events_unacct(i).event_id)

963: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST
964: LOOP
965: INSERT WHEN NOT EXISTS (SELECT accounting_event_id
966: FROM ap_period_close_excps_gt
967: WHERE accounting_event_id = xla_events_unacct(i).event_id)
968: AND xla_events_unacct(i).entity_code='AP_PAYMENTS' then
969: INTO AP_PERIOD_CLOSE_EXCPS_GT
970: (payment_history_id
971: ,accounting_event_id

Line 968: AND xla_events_unacct(i).entity_code='AP_PAYMENTS' then

964: LOOP
965: INSERT WHEN NOT EXISTS (SELECT accounting_event_id
966: FROM ap_period_close_excps_gt
967: WHERE accounting_event_id = xla_events_unacct(i).event_id)
968: AND xla_events_unacct(i).entity_code='AP_PAYMENTS' then
969: INTO AP_PERIOD_CLOSE_EXCPS_GT
970: (payment_history_id
971: ,accounting_event_id
972: ,accounting_date

Line 995: xla_events_unacct(i).source_id_int_1,

991: )
992: SELECT aph.payment_history_id,
993: aph.accounting_event_id,
994: aph.accounting_date,
995: xla_events_unacct(i).source_id_int_1,
996: aph.transaction_type,
997: aph.org_id,
998: orgs.recon_accounting_flag,
999: xla_events_unacct(i).transaction_number,

Line 999: xla_events_unacct(i).transaction_number,

995: xla_events_unacct(i).source_id_int_1,
996: aph.transaction_type,
997: aph.org_id,
998: orgs.recon_accounting_flag,
999: xla_events_unacct(i).transaction_number,
1000: ac.exchange_rate,
1001: xla_events_unacct(i).transaction_date,
1002: xla_events_unacct(i).legal_entity_id,
1003: ac.vendor_name,

Line 1001: xla_events_unacct(i).transaction_date,

997: aph.org_id,
998: orgs.recon_accounting_flag,
999: xla_events_unacct(i).transaction_number,
1000: ac.exchange_rate,
1001: xla_events_unacct(i).transaction_date,
1002: xla_events_unacct(i).legal_entity_id,
1003: ac.vendor_name,
1004: ac.bank_account_name,
1005: ac.amount,

Line 1002: xla_events_unacct(i).legal_entity_id,

998: orgs.recon_accounting_flag,
999: xla_events_unacct(i).transaction_number,
1000: ac.exchange_rate,
1001: xla_events_unacct(i).transaction_date,
1002: xla_events_unacct(i).legal_entity_id,
1003: ac.vendor_name,
1004: ac.bank_account_name,
1005: ac.amount,
1006: ac.currency_code,

Line 1009: ,xla_events_unacct(i).event_type_code

1005: ac.amount,
1006: ac.currency_code,
1007: ac.party_id,
1008: ac.vendor_id
1009: ,xla_events_unacct(i).event_type_code
1010: ,xla_events_unacct(i).entity_code
1011: ,G_SRC_TYP_OTHER_EXCPS
1012: ,G_SRC_TAB_AP_PMT_HISTORY
1013: FROM ap_payment_history_all aph,

Line 1010: ,xla_events_unacct(i).entity_code

1006: ac.currency_code,
1007: ac.party_id,
1008: ac.vendor_id
1009: ,xla_events_unacct(i).event_type_code
1010: ,xla_events_unacct(i).entity_code
1011: ,G_SRC_TYP_OTHER_EXCPS
1012: ,G_SRC_TAB_AP_PMT_HISTORY
1013: FROM ap_payment_history_all aph,
1014: ap_checks_all ac,

Line 1021: AND aph.accounting_event_id = xla_events_unacct(i).event_id;

1017: AND aph.org_id = orgs.org_id
1018: AND ( NVL(orgs.when_to_account_pmt, 'ALWAYS') = 'ALWAYS' or
1019: (NVL(orgs.when_to_account_pmt, 'ALWAYS') = 'CLEARING ONLY' and
1020: aph.transaction_type in ('PAYMENT CLEARING', 'PAYMENT UNCLEARING')))
1021: AND aph.accounting_event_id = xla_events_unacct(i).event_id;
1022:
1023: END LOOP;
1024:
1025:

Line 1026: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST

1022:
1023: END LOOP;
1024:
1025:
1026: FOR i IN xla_events_unacct.FIRST..xla_events_unacct.LAST
1027: LOOP
1028:
1029: -- Bug 8887052: Modified decode on invoices to consider
1030: -- unaccounted MANUAL events as well

Line 1034: WHERE accounting_event_id = xla_events_unacct(i).event_id)

1030: -- unaccounted MANUAL events as well
1031:
1032: INSERT WHEN NOT EXISTS (SELECT accounting_event_id
1033: FROM ap_period_close_excps_gt
1034: WHERE accounting_event_id = xla_events_unacct(i).event_id)
1035: THEN
1036: INTO ap_period_close_excps_gt
1037: (accounting_event_id
1038: ,accounting_date

Line 1054: SELECT xla_events_unacct(i).event_id

1050: ,source_table_name
1051: ,party_id /*Bug 9721897*/
1052: ,vendor_id /*Bug 9721897*/
1053: )
1054: SELECT xla_events_unacct(i).event_id
1055: ,xla_events_unacct(i).event_date
1056: ,xla_events_unacct(i).security_id_int_1
1057: ,xla_events_unacct(i).legal_entity_id
1058: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')

Line 1055: ,xla_events_unacct(i).event_date

1051: ,party_id /*Bug 9721897*/
1052: ,vendor_id /*Bug 9721897*/
1053: )
1054: SELECT xla_events_unacct(i).event_id
1055: ,xla_events_unacct(i).event_date
1056: ,xla_events_unacct(i).security_id_int_1
1057: ,xla_events_unacct(i).legal_entity_id
1058: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1059: THEN xla_events_unacct(i).transaction_number

Line 1056: ,xla_events_unacct(i).security_id_int_1

1052: ,vendor_id /*Bug 9721897*/
1053: )
1054: SELECT xla_events_unacct(i).event_id
1055: ,xla_events_unacct(i).event_date
1056: ,xla_events_unacct(i).security_id_int_1
1057: ,xla_events_unacct(i).legal_entity_id
1058: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1059: THEN xla_events_unacct(i).transaction_number
1060: ELSE NULL END

Line 1057: ,xla_events_unacct(i).legal_entity_id

1053: )
1054: SELECT xla_events_unacct(i).event_id
1055: ,xla_events_unacct(i).event_date
1056: ,xla_events_unacct(i).security_id_int_1
1057: ,xla_events_unacct(i).legal_entity_id
1058: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1059: THEN xla_events_unacct(i).transaction_number
1060: ELSE NULL END
1061: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')

Line 1058: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')

1054: SELECT xla_events_unacct(i).event_id
1055: ,xla_events_unacct(i).event_date
1056: ,xla_events_unacct(i).security_id_int_1
1057: ,xla_events_unacct(i).legal_entity_id
1058: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1059: THEN xla_events_unacct(i).transaction_number
1060: ELSE NULL END
1061: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1062: THEN xla_events_unacct(i).source_id_int_1

Line 1059: THEN xla_events_unacct(i).transaction_number

1055: ,xla_events_unacct(i).event_date
1056: ,xla_events_unacct(i).security_id_int_1
1057: ,xla_events_unacct(i).legal_entity_id
1058: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1059: THEN xla_events_unacct(i).transaction_number
1060: ELSE NULL END
1061: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1062: THEN xla_events_unacct(i).source_id_int_1
1063: ELSE NULL END

Line 1061: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')

1057: ,xla_events_unacct(i).legal_entity_id
1058: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1059: THEN xla_events_unacct(i).transaction_number
1060: ELSE NULL END
1061: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1062: THEN xla_events_unacct(i).source_id_int_1
1063: ELSE NULL END
1064: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1065: THEN xla_events_unacct(i).transaction_date

Line 1062: THEN xla_events_unacct(i).source_id_int_1

1058: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1059: THEN xla_events_unacct(i).transaction_number
1060: ELSE NULL END
1061: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1062: THEN xla_events_unacct(i).source_id_int_1
1063: ELSE NULL END
1064: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1065: THEN xla_events_unacct(i).transaction_date
1066: ELSE NULL END

Line 1064: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')

1060: ELSE NULL END
1061: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1062: THEN xla_events_unacct(i).source_id_int_1
1063: ELSE NULL END
1064: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1065: THEN xla_events_unacct(i).transaction_date
1066: ELSE NULL END
1067: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_number,NULL)
1068: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).source_id_int_1,NULL)

Line 1065: THEN xla_events_unacct(i).transaction_date

1061: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1062: THEN xla_events_unacct(i).source_id_int_1
1063: ELSE NULL END
1064: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1065: THEN xla_events_unacct(i).transaction_date
1066: ELSE NULL END
1067: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_number,NULL)
1068: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).source_id_int_1,NULL)
1069: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_date,NULL)

Line 1067: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_number,NULL)

1063: ELSE NULL END
1064: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1065: THEN xla_events_unacct(i).transaction_date
1066: ELSE NULL END
1067: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_number,NULL)
1068: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).source_id_int_1,NULL)
1069: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_date,NULL)
1070: ,xla_events_unacct(i).event_type_code
1071: ,xla_events_unacct(i).entity_code

Line 1068: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).source_id_int_1,NULL)

1064: ,CASE WHEN xla_events_unacct(i).entity_code IN ('AP_INVOICES','MANUAL')
1065: THEN xla_events_unacct(i).transaction_date
1066: ELSE NULL END
1067: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_number,NULL)
1068: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).source_id_int_1,NULL)
1069: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_date,NULL)
1070: ,xla_events_unacct(i).event_type_code
1071: ,xla_events_unacct(i).entity_code
1072: ,G_SRC_TYP_OTHER_EXCPS

Line 1069: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_date,NULL)

1065: THEN xla_events_unacct(i).transaction_date
1066: ELSE NULL END
1067: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_number,NULL)
1068: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).source_id_int_1,NULL)
1069: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_date,NULL)
1070: ,xla_events_unacct(i).event_type_code
1071: ,xla_events_unacct(i).entity_code
1072: ,G_SRC_TYP_OTHER_EXCPS
1073: ,'ORPHAN_EVENTS'

Line 1070: ,xla_events_unacct(i).event_type_code

1066: ELSE NULL END
1067: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_number,NULL)
1068: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).source_id_int_1,NULL)
1069: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_date,NULL)
1070: ,xla_events_unacct(i).event_type_code
1071: ,xla_events_unacct(i).entity_code
1072: ,G_SRC_TYP_OTHER_EXCPS
1073: ,'ORPHAN_EVENTS'
1074: ,(select party_id from ap_invoices_all

Line 1071: ,xla_events_unacct(i).entity_code

1067: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_number,NULL)
1068: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).source_id_int_1,NULL)
1069: ,decode(xla_events_unacct(i).entity_code,'AP_PAYMENTS',xla_events_unacct(i).transaction_date,NULL)
1070: ,xla_events_unacct(i).event_type_code
1071: ,xla_events_unacct(i).entity_code
1072: ,G_SRC_TYP_OTHER_EXCPS
1073: ,'ORPHAN_EVENTS'
1074: ,(select party_id from ap_invoices_all
1075: where invoice_id = xla_events_unacct(i).source_id_int_1

Line 1075: where invoice_id = xla_events_unacct(i).source_id_int_1

1071: ,xla_events_unacct(i).entity_code
1072: ,G_SRC_TYP_OTHER_EXCPS
1073: ,'ORPHAN_EVENTS'
1074: ,(select party_id from ap_invoices_all
1075: where invoice_id = xla_events_unacct(i).source_id_int_1
1076: and 'AP_INVOICES' = xla_events_unacct(i).entity_code
1077: union
1078: select party_id from ap_checks_all
1079: where check_id = xla_events_unacct(i).source_id_int_1

Line 1076: and 'AP_INVOICES' = xla_events_unacct(i).entity_code

1072: ,G_SRC_TYP_OTHER_EXCPS
1073: ,'ORPHAN_EVENTS'
1074: ,(select party_id from ap_invoices_all
1075: where invoice_id = xla_events_unacct(i).source_id_int_1
1076: and 'AP_INVOICES' = xla_events_unacct(i).entity_code
1077: union
1078: select party_id from ap_checks_all
1079: where check_id = xla_events_unacct(i).source_id_int_1
1080: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) party_id /*Bug 9721897*/

Line 1079: where check_id = xla_events_unacct(i).source_id_int_1

1075: where invoice_id = xla_events_unacct(i).source_id_int_1
1076: and 'AP_INVOICES' = xla_events_unacct(i).entity_code
1077: union
1078: select party_id from ap_checks_all
1079: where check_id = xla_events_unacct(i).source_id_int_1
1080: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) party_id /*Bug 9721897*/
1081: ,(select vendor_id from ap_invoices_all
1082: where invoice_id = xla_events_unacct(i).source_id_int_1
1083: and 'AP_INVOICES' = xla_events_unacct(i).entity_code

Line 1080: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) party_id /*Bug 9721897*/

1076: and 'AP_INVOICES' = xla_events_unacct(i).entity_code
1077: union
1078: select party_id from ap_checks_all
1079: where check_id = xla_events_unacct(i).source_id_int_1
1080: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) party_id /*Bug 9721897*/
1081: ,(select vendor_id from ap_invoices_all
1082: where invoice_id = xla_events_unacct(i).source_id_int_1
1083: and 'AP_INVOICES' = xla_events_unacct(i).entity_code
1084: union

Line 1082: where invoice_id = xla_events_unacct(i).source_id_int_1

1078: select party_id from ap_checks_all
1079: where check_id = xla_events_unacct(i).source_id_int_1
1080: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) party_id /*Bug 9721897*/
1081: ,(select vendor_id from ap_invoices_all
1082: where invoice_id = xla_events_unacct(i).source_id_int_1
1083: and 'AP_INVOICES' = xla_events_unacct(i).entity_code
1084: union
1085: select vendor_id from ap_checks_all
1086: where check_id = xla_events_unacct(i).source_id_int_1

Line 1083: and 'AP_INVOICES' = xla_events_unacct(i).entity_code

1079: where check_id = xla_events_unacct(i).source_id_int_1
1080: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) party_id /*Bug 9721897*/
1081: ,(select vendor_id from ap_invoices_all
1082: where invoice_id = xla_events_unacct(i).source_id_int_1
1083: and 'AP_INVOICES' = xla_events_unacct(i).entity_code
1084: union
1085: select vendor_id from ap_checks_all
1086: where check_id = xla_events_unacct(i).source_id_int_1
1087: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) vendor_id /*Bug 9721897*/

Line 1086: where check_id = xla_events_unacct(i).source_id_int_1

1082: where invoice_id = xla_events_unacct(i).source_id_int_1
1083: and 'AP_INVOICES' = xla_events_unacct(i).entity_code
1084: union
1085: select vendor_id from ap_checks_all
1086: where check_id = xla_events_unacct(i).source_id_int_1
1087: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) vendor_id /*Bug 9721897*/
1088: FROM DUAL
1089: where xla_events_unacct(i).security_id_int_1 in (Select org_id
1090: from ap_org_attributes_gt orgs) ; /*Bug 14596406 */

Line 1087: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) vendor_id /*Bug 9721897*/

1083: and 'AP_INVOICES' = xla_events_unacct(i).entity_code
1084: union
1085: select vendor_id from ap_checks_all
1086: where check_id = xla_events_unacct(i).source_id_int_1
1087: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) vendor_id /*Bug 9721897*/
1088: FROM DUAL
1089: where xla_events_unacct(i).security_id_int_1 in (Select org_id
1090: from ap_org_attributes_gt orgs) ; /*Bug 14596406 */
1091:

Line 1089: where xla_events_unacct(i).security_id_int_1 in (Select org_id

1085: select vendor_id from ap_checks_all
1086: where check_id = xla_events_unacct(i).source_id_int_1
1087: and 'AP_PAYMENTS' = xla_events_unacct(i).entity_code) vendor_id /*Bug 9721897*/
1088: FROM DUAL
1089: where xla_events_unacct(i).security_id_int_1 in (Select org_id
1090: from ap_org_attributes_gt orgs) ; /*Bug 14596406 */
1091:
1092: END LOOP;
1093:

Line 1285: /*xla_events_pub_pkg.period_close(P_API_VERSION => 1

1281:
1282: -- check transfer to GL
1283: -- Bug#7649020: Commented call to xla package to make codepath
1284: -- for period close and PCER as close as possible
1285: /*xla_events_pub_pkg.period_close(P_API_VERSION => 1
1286: , X_RETURN_STATUS => p_validation_flag
1287: , P_APPLICATION_ID => G_AP_APPLICATION_ID
1288: , P_LEDGER_ID => g_ledger_id
1289: , P_PERIOD_NAME => g_period_name);

Line 1291: debug ('xla_events_pub_pkg.period_close: p_validation_flag='||p_validation_flag);

1287: , P_APPLICATION_ID => G_AP_APPLICATION_ID
1288: , P_LEDGER_ID => g_ledger_id
1289: , P_PERIOD_NAME => g_period_name);
1290:
1291: debug ('xla_events_pub_pkg.period_close: p_validation_flag='||p_validation_flag);
1292:
1293: if (p_validation_flag <> 'S') then
1294: set_expected_error ('AP_UNTRNF_EVENTS_IN_XLA ' ||' - Untransferred XLA events');
1295: return;

Line 1294: set_expected_error ('AP_UNTRNF_EVENTS_IN_XLA ' ||' - Untransferred XLA events');

1290:
1291: debug ('xla_events_pub_pkg.period_close: p_validation_flag='||p_validation_flag);
1292:
1293: if (p_validation_flag <> 'S') then
1294: set_expected_error ('AP_UNTRNF_EVENTS_IN_XLA ' ||' - Untransferred XLA events');
1295: return;
1296: end if;*/
1297:
1298: -- check if unposted invoices or unposted payment exists

Line 1558: | RETURN: XLA_EVENTS_PUB_PKG.T_SECURITY

1554: | PRAMETERS:
1555: | p_org_id: Organization ID
1556: | p_calling_sequence: Debug information
1557: |
1558: | RETURN: XLA_EVENTS_PUB_PKG.T_SECURITY
1559: |
1560: | KNOWN ISSUES:
1561: |
1562: | NOTES:

Line 1571: RETURN XLA_EVENTS_PUB_PKG.T_SECURITY

1567: *===========================================================================*/
1568: FUNCTION get_event_security_context(
1569: p_org_id IN NUMBER,
1570: p_calling_sequence IN VARCHAR2)
1571: RETURN XLA_EVENTS_PUB_PKG.T_SECURITY
1572: IS
1573:
1574: l_event_security_context XLA_EVENTS_PUB_PKG.T_SECURITY;
1575:

Line 1574: l_event_security_context XLA_EVENTS_PUB_PKG.T_SECURITY;

1570: p_calling_sequence IN VARCHAR2)
1571: RETURN XLA_EVENTS_PUB_PKG.T_SECURITY
1572: IS
1573:
1574: l_event_security_context XLA_EVENTS_PUB_PKG.T_SECURITY;
1575:
1576: BEGIN
1577:
1578: l_event_security_context.security_id_int_1 := p_org_id;

Line 1597: | RETURN: XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO

1593: | p_ledger_id: Ledger ID
1594: | p_trans_id: Invoice ID / Check ID
1595: | p_calling_sequence: Debug information
1596: |
1597: | RETURN: XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO
1598: |
1599: | KNOWN ISSUES:
1600: |
1601: | NOTES:

Line 1616: RETURN XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO

1612: p_inv_payment_id IN NUMBER, -- 7318763
1613: p_trans_num IN VARCHAR2,
1614: p_context IN VARCHAR2,
1615: p_calling_sequence IN VARCHAR2)
1616: RETURN XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO
1617: IS
1618: /* Modified the procedure for bug 7137359, related to AWT event creation */
1619: l_invoice_num VARCHAR2(50);
1620: l_event_source_info XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO;

Line 1620: l_event_source_info XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO;

1616: RETURN XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO
1617: IS
1618: /* Modified the procedure for bug 7137359, related to AWT event creation */
1619: l_invoice_num VARCHAR2(50);
1620: l_event_source_info XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO;
1621: l_count NUMBER(15);
1622: l_check_id AP_CHECKS_ALL.Check_Id%TYPE;
1623: l_check_number AP_CHECKS_ALL.Check_Number%TYPE;
1624:

Line 1820: | PROCEDURE - UPDATE_XLA_EVENTS

1816: END;
1817:
1818:
1819: /*============================================================================
1820: | PROCEDURE - UPDATE_XLA_EVENTS
1821: |
1822: | DESCRIPTION
1823: | This procedure is used to sweep accounting events from one accounting period
1824: | to another.

Line 1841: PROCEDURE update_xla_events (

1837: | Date Author Description of Change
1838: | 14-MAR-08 PRANPAUL New
1839: *===========================================================================*/
1840:
1841: PROCEDURE update_xla_events (
1842: p_calling_sequence IN VARCHAR2,
1843: p_success OUT NOCOPY BOOLEAN)
1844: IS
1845:

Line 1864: l_event_security_context XLA_EVENTS_PUB_PKG.T_SECURITY;

1860: l_org_ids t_org_ids;
1861: l_legal_entity_ids t_legal_entity_ids;
1862: --l_ledger_ids t_ledger_ids;
1863: l_sources t_source;
1864: l_event_security_context XLA_EVENTS_PUB_PKG.T_SECURITY;
1865: l_event_source_info XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO;
1866: l_curr_calling_sequence VARCHAR2(200);
1867:
1868: -- Bug 7137359

Line 1865: l_event_source_info XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO;

1861: l_legal_entity_ids t_legal_entity_ids;
1862: --l_ledger_ids t_ledger_ids;
1863: l_sources t_source;
1864: l_event_security_context XLA_EVENTS_PUB_PKG.T_SECURITY;
1865: l_event_source_info XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO;
1866: l_curr_calling_sequence VARCHAR2(200);
1867:
1868: -- Bug 7137359
1869: l_xla_event XLA_EVENTS.EVENT_ID%TYPE;

Line 1869: l_xla_event XLA_EVENTS.EVENT_ID%TYPE;

1865: l_event_source_info XLA_EVENTS_PUB_PKG.T_EVENT_SOURCE_INFO;
1866: l_curr_calling_sequence VARCHAR2(200);
1867:
1868: -- Bug 7137359
1869: l_xla_event XLA_EVENTS.EVENT_ID%TYPE;
1870: l_xla_event_status XLA_EVENTS.EVENT_STATUS_CODE%TYPE;
1871: l_call_xla_api VARCHAR2(1);
1872:
1873: --Bug#8240910 Reverted back changes done on cursor to handle other exceptions

Line 1870: l_xla_event_status XLA_EVENTS.EVENT_STATUS_CODE%TYPE;

1866: l_curr_calling_sequence VARCHAR2(200);
1867:
1868: -- Bug 7137359
1869: l_xla_event XLA_EVENTS.EVENT_ID%TYPE;
1870: l_xla_event_status XLA_EVENTS.EVENT_STATUS_CODE%TYPE;
1871: l_call_xla_api VARCHAR2(1);
1872:
1873: --Bug#8240910 Reverted back changes done on cursor to handle other exceptions
1874: -- reported by SLA as they are not swept now.

Line 1922: debug ('begin update_xla_events: Bulk fetch cursor c_events');

1918:
1919: begin
1920:
1921: l_curr_calling_sequence := p_calling_sequence;
1922: debug ('begin update_xla_events: Bulk fetch cursor c_events');
1923:
1924: OPEN c_events;
1925: LOOP
1926: FETCH c_events

Line 1937: debug ('update_xla_events: l_event_ids.count='||l_event_ids.count );

1933: l_sources,
1934: l_inv_payment_ids -- 7318763
1935: LIMIT g_fetch_limit;
1936:
1937: debug ('update_xla_events: l_event_ids.count='||l_event_ids.count );
1938:
1939: EXIT WHEN
1940: l_event_ids.count = 0;
1941:

Line 1949: FROM xla_events

1945: BEGIN
1946:
1947: SELECT event_id, event_status_code
1948: INTO l_xla_event, l_xla_event_status
1949: FROM xla_events
1950: WHERE event_id = l_event_ids(i)
1951: AND application_id = 200;
1952:
1953: IF l_xla_event_status = 'P' THEN

Line 1987: AP_XLA_EVENTS_PKG.UPDATE_EVENT

1983: p_context => l_sources(i),
1984: p_calling_sequence => l_curr_calling_sequence
1985: );
1986:
1987: AP_XLA_EVENTS_PKG.UPDATE_EVENT
1988: ( p_event_source_info => l_event_source_info,
1989: p_event_id => l_event_ids(i),
1990: p_event_type_code => NULL,
1991: p_event_date => g_sweep_to_date,

Line 2029: debug ('end update_xla_events');

2025:
2026: END LOOP;
2027: CLOSE c_events;
2028:
2029: debug ('end update_xla_events');
2030:
2031: p_success := TRUE;
2032:
2033: EXCEPTION

Line 2039: debug ('EXCEPTION: update_xla_events: '|| sqlerrm);

2035:
2036: IF (c_events%ISOPEN) THEN
2037: CLOSE c_events;
2038: END IF;
2039: debug ('EXCEPTION: update_xla_events: '|| sqlerrm);
2040: p_success := FALSE;
2041:
2042: END update_xla_events;
2043:

Line 2042: END update_xla_events;

2038: END IF;
2039: debug ('EXCEPTION: update_xla_events: '|| sqlerrm);
2040: p_success := FALSE;
2041:
2042: END update_xla_events;
2043:
2044: /*============================================================================
2045: | FUNCTION - UPDATE_AP_ACCT_DATE
2046: |

Line 2308: update_xla_events('AP_PERIOD_CLOSE_EXCP_PKG.DO_SWEEP',

2304: return FALSE;
2305: end if;
2306:
2307:
2308: update_xla_events('AP_PERIOD_CLOSE_EXCP_PKG.DO_SWEEP',
2309: l_success);
2310:
2311: if (l_success <> TRUE) then
2312: print ('Failure in update_xla_events while updating XLA unaccounted events');

Line 2312: print ('Failure in update_xla_events while updating XLA unaccounted events');

2308: update_xla_events('AP_PERIOD_CLOSE_EXCP_PKG.DO_SWEEP',
2309: l_success);
2310:
2311: if (l_success <> TRUE) then
2312: print ('Failure in update_xla_events while updating XLA unaccounted events');
2313: return FALSE;
2314: end if;
2315:
2316: l_success := update_ebtax_dists;