DBA Data[Home] [Help]

APPS.AP_PERIOD_CLOSE_PKG dependencies on AP_ORG_ATTRIBUTES_GT

Line 118: insert into ap_org_attributes_gt

114: --
115: for r_org in c_get_all_orgs
116: loop
117:
118: insert into ap_org_attributes_gt
119: (org_name
120: ,org_id
121: ,recon_accounting_flag
122: ,when_to_account_pmt

Line 142: debug ('populate_orgs: total orgs populated in ap_org_attributes_gt= '||ln_org_cnt);

138: p_process_message := 'AP_INVALID_LEDGER';
139: return;
140: end if;
141:
142: debug ('populate_orgs: total orgs populated in ap_org_attributes_gt= '||ln_org_cnt);
143:
144: p_process_flag := 'SS';
145: p_process_message := null;
146:

Line 252: ,ap_org_attributes_gt org_gtt

248: ,G_SRC_TAB_AP_INV_DISTS_ALL
249: from
250: ap_invoices_all ai
251: ,ap_invoice_distributions_all aid
252: ,ap_org_attributes_gt org_gtt
253: where
254: ai.invoice_id = aid.invoice_id
255: and ( aid.accounting_date between g_period_start_date and g_period_end_date)
256: and aid.posted_flag in ('N' , 'S', 'P') -- N=Not Accounted, S=Selected for Accounting, P=Partially Accounted for CASH based accounting

Line 297: ,ap_org_attributes_gt org_gtt

293: ,G_SRC_TYP_UNACCT_DISTS
294: ,G_SRC_TAB_AP_INV_DISTS_ALL
295: from ap_invoices_all ai
296: ,ap_invoice_distributions_all aid
297: ,ap_org_attributes_gt org_gtt
298: where ai.invoice_id = aid.invoice_id
299: and ( aid.accounting_date between g_period_start_date and g_period_end_date)
300: and aid.posted_flag in ('N' , 'S', 'P')
301: and aid.bc_event_id is not null

Line 378: ,ap_org_attributes_gt org_gtt

374: ,G_SRC_TAB_AP_SELF_TAX_DIST_ALL
375: from
376: ap_invoices_all ai
377: ,ap_self_assessed_tax_dist_all astd
378: ,ap_org_attributes_gt org_gtt
379: where
380: ai.invoice_id = astd.invoice_id
381: and (astd.accounting_date between g_period_start_date and g_period_end_date )
382: and astd.posted_flag in ('N' , 'S', 'P') -- N=Not Accounted, S=Selected for Accounting, P=Partially Accounted for CASH based accounting

Line 415: ,ap_org_attributes_gt org_gtt

411: ,G_SRC_TAB_AP_SELF_TAX_DIST_ALL
412: from
413: ap_invoices_all ai
414: ,ap_self_assessed_tax_dist_all astd
415: ,ap_org_attributes_gt org_gtt
416: where
417: ai.invoice_id = astd.invoice_id
418: and (astd.accounting_date between g_period_start_date and g_period_end_date )
419: and astd.posted_flag in ('N' , 'S', 'P')

Line 480: ,ap_org_attributes_gt org_gtt

476: ,G_SRC_TAB_AP_INV_LINES_ALL
477: from
478: ap_invoices_all ai
479: ,ap_invoice_lines_all ail
480: ,ap_org_attributes_gt org_gtt
481: where
482: ai.invoice_id = ail.invoice_id
483: and (ail.accounting_date between g_period_start_date and g_period_end_date)
484: and not exists (select /*+ nl_aj */ 1 --> lines without distributions

Line 556: ,ap_org_attributes_gt org_gtt

552: ,G_SRC_TYP_UNACCT_PREPAY_HIST
553: ,G_SRC_TAB_AP_PREPAY_HIST
554: from ap_invoices_all ai
555: ,ap_prepay_history_all apph
556: ,ap_org_attributes_gt org_gtt
557: where
558: ai.invoice_id = apph.invoice_id
559: and ( apph.accounting_date between g_period_start_date and g_period_end_date)
560: and apph.posted_flag in ('N' , 'S', 'P') -- N=Not Accounted, S=Selected for Accounting, P=Partially Accounted for CASH based accounting

Line 635: ap_org_attributes_gt orgs

631: ,G_SRC_TYP_UNACCT_PMT_HISTORY
632: ,G_SRC_TAB_AP_PMT_HISTORY
633: FROM ap_payment_history_all aph,
634: ap_checks_all ac,
635: ap_org_attributes_gt orgs
636: WHERE aph.posted_flag IN ('N','S')
637: AND ac.check_id = aph.check_id
638: and (aph.accounting_date between g_period_start_date and g_period_end_date)
639: AND aph.org_id = orgs.org_id

Line 705: ap_org_attributes_gt orgs

701: ,G_SRC_TYP_UNACCT_INV_PMTS
702: ,G_SRC_TAB_AP_INV_PAYMENTS
703: FROM ap_invoice_payments_all aip,
704: ap_checks_All ac,
705: ap_org_attributes_gt orgs
706: WHERE aip.posted_flag IN ('N','S')
707: and (aip.accounting_date between g_period_start_date and g_period_end_date)
708: AND aip.org_id = orgs.org_id
709: AND ac.check_id = aip.check_id

Line 886: ,ap_org_attributes_gt org_gtt

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
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

Line 919: ,ap_org_attributes_gt org_gtt

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
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

Line 952: ,ap_org_attributes_gt org_gtt

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
952: ,ap_org_attributes_gt org_gtt
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

Line 1015: ap_org_attributes_gt orgs

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,
1015: ap_org_attributes_gt orgs
1016: WHERE aph.check_id = ac.check_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

Line 1090: from ap_org_attributes_gt orgs) ; /*Bug 14596406 */

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:
1094: end if;

Line 1135: from ap_org_attributes_gt

1131: is
1132: cursor c_org_name
1133: is
1134: select org_name
1135: from ap_org_attributes_gt
1136: where org_id = g_org_id;
1137:
1138: lv_name varchar2(100);
1139:

Line 1173: from ap_org_attributes_gt all_orgs

1169:
1170: cursor c_cnt_org_access
1171: is
1172: select count(1)
1173: from ap_org_attributes_gt all_orgs
1174: where org_id not in (select org_id from ap_system_parameters);
1175:
1176:
1177: begin

Line 1181: -- we have a all valid orgs in ap_org_attributes_gt. If a particular org_id is present in ap_org_attributes_gt

1177: begin
1178: --
1179: -- Validation: SWEEP can be done only if all operating units defifned under the given ledger are accessible.
1180: --
1181: -- we have a all valid orgs in ap_org_attributes_gt. If a particular org_id is present in ap_org_attributes_gt
1182: -- but not in ap_system_paramter it means we don't have access to that org
1183: --
1184:
1185: ln_cnt := 0;

Line 1228: AND asi.org_id in (select org_id org_id from ap_org_attributes_gt org_gtt)

1224: AP_PAYMENT_UTIL_PKG.get_psr_status(IPSR.payment_service_request_id,
1225: IPSR.payment_service_request_status) )
1226: NOT IN ('CONFIRMED','CANCELED','QUICKCHECK', 'CANCELLED NO PAYMENTS', 'TERMINATED')
1227: AND aisc.checkrun_id = asi.checkrun_id
1228: AND asi.org_id in (select org_id org_id from ap_org_attributes_gt org_gtt)
1229: AND rownum = 1;
1230:
1231: -- check if any unmatured future payments exists
1232: cursor c_unmat_fut_pmts_exists

Line 1240: and c.org_id in (select org_id org_id from ap_org_attributes_gt org_gtt)

1236: where c.future_pay_due_date is not null
1237: and c.status_lookup_code = 'ISSUED'
1238: and c.future_pay_due_date between g_period_start_date
1239: and g_period_end_date
1240: and c.org_id in (select org_id org_id from ap_org_attributes_gt org_gtt)
1241: and rownum = 1;
1242:
1243: lv_exists varchar2 (1);
1244: