197: ) = (SELECT GL_PS.period_name,
198: GL_PS.period_year,
199: GL_PS.period_num,
200: GL_PS.quarter_num
201: FROM GL_PERIOD_STATUSES GL_PS,
202: GL_PERIOD_STATUSES PO_PS,
203: GL_SETS_OF_BOOKS SOB
204: WHERE SOB.set_of_books_id = l_set_of_books_id
205: AND GL_PS.application_id = 101
198: GL_PS.period_year,
199: GL_PS.period_num,
200: GL_PS.quarter_num
201: FROM GL_PERIOD_STATUSES GL_PS,
202: GL_PERIOD_STATUSES PO_PS,
203: GL_SETS_OF_BOOKS SOB
204: WHERE SOB.set_of_books_id = l_set_of_books_id
205: AND GL_PS.application_id = 101
206: AND PO_PS.application_id = 201
477: -- 1st Check: Find out whether passed GL date (distribution level) belongs
478: -- to Open Period or not.
479: SELECT GL_PS.period_name
480: into x_gl_period
481: FROM GL_PERIOD_STATUSES GL_PS,
482: GL_PERIOD_STATUSES PO_PS,
483: GL_SETS_OF_BOOKS SOB
484: WHERE SOB.set_of_books_id = l_sob_id
485: AND GL_PS.application_id = 101
478: -- to Open Period or not.
479: SELECT GL_PS.period_name
480: into x_gl_period
481: FROM GL_PERIOD_STATUSES GL_PS,
482: GL_PERIOD_STATUSES PO_PS,
483: GL_SETS_OF_BOOKS SOB
484: WHERE SOB.set_of_books_id = l_sob_id
485: AND GL_PS.application_id = 101
486: AND PO_PS.application_id = 201
503: BEGIN
504: -- 2nd Check: Find out whether System date belongs to Open Period or not.
505: SELECT GL_PS.period_name
506: into x_gl_period
507: FROM GL_PERIOD_STATUSES GL_PS,
508: GL_PERIOD_STATUSES PO_PS,
509: GL_SETS_OF_BOOKS SOB
510: WHERE SOB.set_of_books_id = l_sob_id
511: AND GL_PS.application_id = 101
504: -- 2nd Check: Find out whether System date belongs to Open Period or not.
505: SELECT GL_PS.period_name
506: into x_gl_period
507: FROM GL_PERIOD_STATUSES GL_PS,
508: GL_PERIOD_STATUSES PO_PS,
509: GL_SETS_OF_BOOKS SOB
510: WHERE SOB.set_of_books_id = l_sob_id
511: AND GL_PS.application_id = 101
512: AND PO_PS.application_id = 201
543: GL_PS.period_num,
544: GL_PS.quarter_num,
545: gl_ps.period_name latest_period_name,
546: TRUNC(GL_PS.start_date) latest_open_date
547: FROM GL_PERIOD_STATUSES GL_PS,
548: GL_PERIOD_STATUSES PO_PS,
549: GL_SETS_OF_BOOKS SOB
550: WHERE SOB.set_of_books_id = l_sob_id
551: AND GL_PS.application_id = 101
544: GL_PS.quarter_num,
545: gl_ps.period_name latest_period_name,
546: TRUNC(GL_PS.start_date) latest_open_date
547: FROM GL_PERIOD_STATUSES GL_PS,
548: GL_PERIOD_STATUSES PO_PS,
549: GL_SETS_OF_BOOKS SOB
550: WHERE SOB.set_of_books_id = l_sob_id
551: AND GL_PS.application_id = 101
552: AND PO_PS.application_id = 201
590: GL_PS.period_num,
591: GL_PS.quarter_num,
592: gl_ps.period_name latest_period_name,
593: TRUNC(GL_PS.start_date) latest_open_date
594: FROM GL_PERIOD_STATUSES GL_PS,
595: GL_PERIOD_STATUSES PO_PS,
596: GL_SETS_OF_BOOKS SOB
597: WHERE SOB.set_of_books_id = l_sob_id
598: AND GL_PS.application_id = 101
591: GL_PS.quarter_num,
592: gl_ps.period_name latest_period_name,
593: TRUNC(GL_PS.start_date) latest_open_date
594: FROM GL_PERIOD_STATUSES GL_PS,
595: GL_PERIOD_STATUSES PO_PS,
596: GL_SETS_OF_BOOKS SOB
597: WHERE SOB.set_of_books_id = l_sob_id
598: AND GL_PS.application_id = 101
599: AND PO_PS.application_id = 201