select appl.product_code 应用,
appl.application_short_name 应用简称,
gld.name 帐套,
gps.period_name 期间,
gps.closing_status 期间状态 --期间状态:'N' => 从未打开,'F' => 将来可输入,'O' => 打开,'C' => 关闭,'P' => 永久关闭
from apps.fnd_application appl,
gl.gl_ledgers gld,
gl.gl_period_statuses gps
where appl.application_id = gps.application_id
and gld.ledger_id = gps.ledger_id
and appl.product_code = 'AP' --'AP', 'AR', 'INV', 'PO'
and gps.period_name = '2021-04'
order by appl.product_code, gps.period_name, gps.closing_status