628: glba.alc_initializing_rate_type,
629: glba.alc_initializing_rate_date,
630: glps.effective_period_num
631: FROM
632: gl_period_statuses glps,
633: gl_ledger_relationships glba
634: WHERE
635: glba.target_ledger_id = p_rsob_id AND
636: glba.source_ledger_id = p_psob_id AND
646: ps.period_name,
647: ps.period_type,
648: ps.PERIOD_YEAR
649: FROM
650: gl_period_statuses ps
651: WHERE
652: ps.application_id = 101 AND
653: ps.set_of_books_id = p_psob_id AND
654: ps.effective_period_num = (
652: ps.application_id = 101 AND
653: ps.set_of_books_id = p_psob_id AND
654: ps.effective_period_num = (
655: SELECT min(ps2.effective_period_num)
656: FROM gl_period_statuses ps2
657: WHERE
658: ps2.application_id =
659: ps.application_id AND
660: ps2.set_of_books_id =
662: ps2. closing_status in
663: ('F', 'N') AND
664: ps2.effective_period_num > (
665: SELECT ps3.effective_period_num
666: FROM gl_period_statuses ps3,
667: gl_sets_of_books sb
668: WHERE ps3.application_id =
669: ps.application_id
670: AND ps3.set_of_books_id =
675: ps.set_of_books_id));
676:
677: CURSOR get_prev_period IS
678: SELECT ps.period_name, ps.end_date
679: FROM gl_period_statuses ps
680: WHERE ps.application_id = 101 AND
681: ps.set_of_books_id = p_psob_id AND
682: ps.effective_period_num = (
683: SELECT max(ps2.effective_period_num)
680: WHERE ps.application_id = 101 AND
681: ps.set_of_books_id = p_psob_id AND
682: ps.effective_period_num = (
683: SELECT max(ps2.effective_period_num)
684: FROM gl_period_statuses ps2
685: WHERE ps2.application_id =
686: ps.application_id AND
687: ps2.set_of_books_id =
688: ps.set_of_books_id AND
755: and bc.deprn_calendar = ct.CALENDAR_TYPE;
756:
757: select count(*)
758: into l_gl_period_count
759: from gl_period_statuses ps
760: where ps.application_id = 101
761: AND ps.set_of_books_id = p_psob_id
762: AND ps.period_year = l_period_year
763: AND ps.adjustment_period_flag <> 'Y';