建立并发请求参数年/月的值集
业务背景:
并发请求参数实现可输入某年1月起到当前的所有年月(不可输入未来时间)
1:创建包含年的值集:获取2000-sysdate的年
Select Year
FROM (select rownum + 1999 year
from mtl_material_transactions
Where rownum <= to_number(to_char(sysdate,'yyyy'))-1999
)
2:仅包含月的值集数据来源(独立的月份)
select lookup_code,meaning
from hr_lookups
where lookup_type = 'CN_CALENDAR'
and enabled_flag = 'Y'
3:实现年月关联,确保不能选择未来时间
对月的值集条件进行修改
select lookup_code ,meaning
from hr_lookups
where lookup_type = 'CN_CALENDAR'
and enabled_flag = 'Y'
and :$FLEX$.XXOM_CURRENT_YEAR||lookup_code <= to_char(sysdate, 'yyyymm')
=====================================================
$FLEX$.ABC的使用;
ABC为定义的值集
$FLEX$.ABC传出的值为定义时的ID项,ID为空时则为Value项。