月结各模块关闭情况查询SQL
-----库存模块
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;
本文来自博客园,作者:Iven_lin,转载请注明原文链接:https://www.cnblogs.com/ivenlin/p/18081988
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了