SELECT ffvs.flex_value_set_name
,ffvs.description
,ffvv.flex_value
,ffvv.description
,ffvv.start_date_active
,ffvv.end_date_active
,decode(ffvv.enabled_flag
,'N'
,'否'
,'Y'
,'是'
,'') enabled_flag
,decode(ffvv.summary_flag
,'N'
,'否'
,'Y'
,'是'
,'') summary_flag
,ffh.hierarchy_code
,decode(substr(to_char(ffvv.compiled_value_attributes)
,1
,1)
,'N'
,'否'
,'Y'
,'是'
,'') budget
,decode(substr(to_char(ffvv.compiled_value_attributes)
,3
,1)
,'N'
,'否'
,'Y'
,'是'
,'') post
,decode(substr(to_char(ffvv.compiled_value_attributes)
,5
,1)
,'A'
,'资产'
,'E'
,'费用'
,'L'
,'负债'
,'R'
,'收入'
,'O'
,'所有权/股东的权益'
,'') TYPE
,decode(substr(to_char(ffvv.compiled_value_attributes)
,7
,1)
,'N'
,'否'
,'Y'
,'是'
,'') cntl
,decode(substr(to_char(ffvv.compiled_value_attributes)
,9
,1)
,'N'
,'否'
,'Y'
,'是'
,'') recon
FROM fnd_flex_value_sets ffvs
,fnd_flex_values_vl ffvv
,fnd_flex_hierarchies_vl ffh
WHERE 1 = 1
AND ffvv.enabled_flag = 'Y'
AND trunc(SYSDATE) BETWEEN nvl(ffvv.start_date_active
,trunc(SYSDATE - 1)) AND
nvl(ffvv.end_date_active
,trunc(SYSDATE + 1))
AND ffvv.flex_value_set_id = ffvs.flex_value_set_id
AND ffvv.flex_value_set_id = ffh.flex_value_set_id(+)
AND ffvv.structured_hierarchy_level = ffh.hierarchy_id(+)
AND flex_value_set_name LIKE 'XXX%'--这个地方是值集名称,不同项目的值集名称不同
ORDER BY ffvv.flex_value
值集结构,层次结构
最新推荐文章于 2023-04-01 11:20:51 发布