CREATE OR REPLACE VIEW CUX_GL_ACCESS_LEDGER_V AS
SELECT L.LEDGER_ID,L.NAME,L.LEDGER_CATEGORY_CODE
FROM GL_ACCESS_SET_LEDGERS AC, GL_LEDGERS L
WHERE AC.ACCESS_SET_ID=fnd_profile.value('GL_ACCESS_SET_ID')
AND L.LEDGER_ID = AC.LEDGER_ID
ORDER BY L.NAME
CREATE OR REPLACE VIEW CUX_GL_LEDGER_COMPANY_V AS
SELECT t.ledger_id
,t.segment_value company_code
,ffv.description
FROM gl_ledger_norm_seg_vals t
,fnd_flex_values_vl ffv
,fnd_flex_value_sets ffvs
WHERE t.segment_value = ffv.flex_value
AND ffv.flex_value_set_id = ffvs.flex_value_set_id
AND ffvs.flex_value_set_name = 'INV_COA_COMPANY'
-- AND t.ledger_id = :$FLEX$.P_LEDGER_ID
标签:flex,账套,ffv,LEDGER,value,EBS,GL,ID
From: https://www.cnblogs.com/su1999/p/18025681