Search from 700 + Posts

Jan 18, 2016

Query to Extract GL ledger and Period details


SELECT
ledger_id,
period_set_name,
accounted_period_type,
future_enterable_periods_limit,
latest_opened_period_name,
number_per_fiscal_year
FROM
gl_ledgers, gl_period_types
WHERE
name = 'Vision Operations (USA)'
and accounted_period_type = period_type


SELECT
period_name,
period_num,
quarter_num,
period_year,
period_type,
adjustment_period_flag,
to_char(start_date,'DD-MON-YYYY') start_dt,
to_char(end_date,'DD-MON-YYYY') end_dt,
to_char(quarter_start_date,'DD-MON-YYYY') qrt_sd,
to_char(year_start_date,'DD-MON-YYYY') yr_sd
FROM
gl_periods
WHERE
period_year ='2016'
and period_set_name = '&Enter_Period_Set_name'
ORDER BY
period_type,
period_year,
period_num



SELECT
application_id,
period_name,
period_num,
quarter_num,
period_year,
closing_status,
period_type,
adjustment_period_flag,
to_char(start_date,'DD-MON-YYYY') start_dt,
to_char(end_date,'DD-MON-YYYY') end_dt,
to_char( quarter_start_date,'DD-MON-YYYY') qrt_sd,
to_char(year_start_date,'DD-MON-YYYY') yr_sd,
effective_period_num
FROM
gl_period_statuses
WHERE
period_year = '2016'
and set_of_books_id = &ledger_id
and period_year = 2016
ORDER BY
application_id,
period_type,
period_year,
period_num

No comments:

Post a Comment