SELECT
distinct b.application_id,
b.application_short_name,
c.application_name,
a.set_of_books_id,
e.name set_of_books_name,
e.short_name,
a.period_name,
a.start_date,
a.end_date,
a.closing_status ||' - '||d.meaning period_status,
a.year_start_date,
a.quarter_num,
a.quarter_start_date,
a.period_year,
a.period_num
FROM
apps.gl_period_statuses a ,
apps.fnd_application b,
apps.fnd_application_tl c,
apps.fnd_lookups d,
apps.gl_sets_of_books e
WHERE
a.application_id=b.application_id and
a.application_id=c.application_id and
a.closing_status=d.lookup_code and
d.lookup_type='OKL_PERIOD_STATUS' and
e.set_of_books_id=a.set_of_books_id and
a.closing_status='O' and
c.application_name like 'Payables'; -- Change the name of application
distinct b.application_id,
b.application_short_name,
c.application_name,
a.set_of_books_id,
e.name set_of_books_name,
e.short_name,
a.period_name,
a.start_date,
a.end_date,
a.closing_status ||' - '||d.meaning period_status,
a.year_start_date,
a.quarter_num,
a.quarter_start_date,
a.period_year,
a.period_num
FROM
apps.gl_period_statuses a ,
apps.fnd_application b,
apps.fnd_application_tl c,
apps.fnd_lookups d,
apps.gl_sets_of_books e
WHERE
a.application_id=b.application_id and
a.application_id=c.application_id and
a.closing_status=d.lookup_code and
d.lookup_type='OKL_PERIOD_STATUS' and
e.set_of_books_id=a.set_of_books_id and
a.closing_status='O' and
c.application_name like 'Payables'; -- Change the name of application