-----库存模块
select oap.status 关闭状态,
oap.period_name 所属期间,
oap.organization_id 组织id,
(select name
from hr_organization_units x
where x.organization_id = oap.organization_id) 组织名称,
oap.last_update_date 执行关闭日期,
(select hre.full_name
from hr_employees_all_v hre, fnd_user fu
where hre.employee_id = fu.employee_id
and fu.user_id = oap.last_updated_by) 执行关闭人,
oap.created_by,
oap.period_number
from org_acct_periods_v oap
where oap.period_number = 6 --月份
and oap.period_year = 2022 -- 年份
and oap.organization_id <> 0
order by oap.organization_id, oap.period_name desc, oap.status desc
-----------------------------------------------------------------其他模块------------------------------------------------------------
select gps.period_name 所属期间,
(select faa.application_name
from fnd_application_all_view faa
where faa.application_id = gps.application_id) 模块名称,
gps.ledger_id 分类账套,
gps.show_status 期间状态,
(select hre.full_name
from hr_employees_all_v hre, fnd_user fu
where hre.employee_id = fu.employee_id
and fu.user_id = gps.last_updated_by) 执行关闭人,
gps.last_update_date 最后次操作时间
from gl_period_statuses_v gps
where --gps.application_id = 101
--and
gps.ledger_id = 2021
and gps.closing_status != 'N'
and (gps.ledger_id = 2021)
order by gps.application_id, gps.period_name desc;
标签:name,月结,SQL,period,模块,oap,id,select,gps From: https://www.cnblogs.com/ivenlin/p/18081988