动态创建科目组合
New_Ccid := Fnd_Flex_Ext.Get_Ccid(Application_Short_Name => 'SQLGL'
,Key_Flex_Code => 'GL#'
,Structure_Number => Coa_Id
,Validation_Date => NULL
,Concatenated_Segments => Seg1 || '.' || Seg2 || '.' || Seg3 || '.' || Seg4 || '.' || Seg5 || '.' || Seg6 || '.' || Seg7 || '.' || Seg8 || '.' || Seg9 || '.' || Seg10);
select T.CHART_OF_ACCOUNTS_ID from GL_ACCESS_SETS T where T.ACCESS_SET_ID =(
select T.PROFILE_OPTION_VALUE
from fnd_profile_option_values t
where t.level_id = 10003
and T.PROFILE_OPTION_ID = 9930
AND T.LEVEL_VALUE =
(select tt.RESPONSIBILITY_ID
from FND_RESPONSIBILITY_VL TT
where TT.RESPONSIBILITY_NAME =
'10));