Roles Query from :
SELECT CFT.ENTERPRISE_ID,
CFT.TREE_STRUCTURE_CODE,
CFT.TREE_CODE,
CFT.TREE_VERSION_ID,
CFT.CF_TREE_NODE_ID,
CFT.DEP0_PK1_VALUE,
CFT.DEP0_PK2_VALUE,
CFT.DEP0_TREE_NODE_ID,
CFT.DEP1_TREE_NODE_ID,
CFT.DEP2_TREE_NODE_ID,
CFT.DEP3_TREE_NODE_ID,
CFT.DEP4_TREE_NODE_ID,
CFT.DEP5_TREE_NODE_ID,
CFT.DEP6_TREE_NODE_ID,
CFT.DEP7_TREE_NODE_ID,
CFT.DEP8_TREE_NODE_ID,
CFT.DEP9_TREE_NODE_ID,
CFT.DEP10_TREE_NODE_ID,
CFT.DEP11_TREE_NODE_ID,
CFT.DEP12_TREE_NODE_ID,
CFT.DEP13_TREE_NODE_ID,
CFT.DEP14_TREE_NODE_ID,
CFT.DEP15_TREE_NODE_ID,
CFT.DEP16_TREE_NODE_ID,
CFT.DEP17_TREE_NODE_ID,
CFT.DEP18_TREE_NODE_ID,
CFT.DEP19_TREE_NODE_ID,
CFT.DEP20_TREE_NODE_ID,
CFT.DEP21_TREE_NODE_ID,
CFT.DEP22_TREE_NODE_ID,
CFT.DEP23_TREE_NODE_ID,
CFT.DEP24_TREE_NODE_ID,
CFT.DEP25_TREE_NODE_ID,
CFT.DEP26_TREE_NODE_ID,
CFT.DEP27_TREE_NODE_ID,
CFT.DEP28_TREE_NODE_ID,
CFT.DEP29_TREE_NODE_ID,
CFT.DEP30_TREE_NODE_ID,
CFT.DEP31_TREE_NODE_ID,
DSDEP0_1.VALUE_ID AS DEP0_VALUE_ID,
DSDEP0_1.VALUE AS DEP0_VALUE FROM GL_SEG_VAL_HIER_CF CFT,
FND_VS_TYPED_VALUES_VL DSDEP0_1
WHERE (CFT.DEP0_PK1_VALUE = DSDEP0_1.VALUE(+)
AND CFT.DEP0_PK2_VALUE = DSDEP0_1.VALUE_SET_CODE(+))
AND ( ( (( ( CFT.TREE_CODE='Company Country Biz'
AND (1=2) ) ) OR (CFT.TREE_CODE NOT IN ('Company Curr Country',
) ) ))
AND (CFT.TREE_CODE in (select A.tree_code from fnd_tree_data_source_params A,
fnd_ts_data_source_params B where A.tree_structure_code = 'GL_ACCT_FLEX'
and B.tree_structure_code = 'GL_ACCT_FLEX' and A.parameter_id = B.parameter_id
and B.parameter_name = 'Bind_ValueSetCode' and A.parameter_value in ('COMPANY_CODES'))) )
SELECT CFT.ENTERPRISE_ID,
CFT.TREE_STRUCTURE_CODE,
CFT.TREE_CODE,
CFT.TREE_VERSION_ID,
CFT.CF_TREE_NODE_ID,
CFT.DEP0_PK1_VALUE,
CFT.DEP0_PK2_VALUE,
CFT.DEP0_TREE_NODE_ID,
CFT.DEP1_TREE_NODE_ID,
CFT.DEP2_TREE_NODE_ID,
CFT.DEP3_TREE_NODE_ID,
CFT.DEP4_TREE_NODE_ID,
CFT.DEP5_TREE_NODE_ID,
CFT.DEP6_TREE_NODE_ID,
CFT.DEP7_TREE_NODE_ID,
CFT.DEP8_TREE_NODE_ID,
CFT.DEP9_TREE_NODE_ID,
CFT.DEP10_TREE_NODE_ID,
CFT.DEP11_TREE_NODE_ID,
CFT.DEP12_TREE_NODE_ID,
CFT.DEP13_TREE_NODE_ID,
CFT.DEP14_TREE_NODE_ID,
CFT.DEP15_TREE_NODE_ID,
CFT.DEP16_TREE_NODE_ID,
CFT.DEP17_TREE_NODE_ID,
CFT.DEP18_TREE_NODE_ID,
CFT.DEP19_TREE_NODE_ID,
CFT.DEP20_TREE_NODE_ID,
CFT.DEP21_TREE_NODE_ID,
CFT.DEP22_TREE_NODE_ID,
CFT.DEP23_TREE_NODE_ID,
CFT.DEP24_TREE_NODE_ID,
CFT.DEP25_TREE_NODE_ID,
CFT.DEP26_TREE_NODE_ID,
CFT.DEP27_TREE_NODE_ID,
CFT.DEP28_TREE_NODE_ID,
CFT.DEP29_TREE_NODE_ID,
CFT.DEP30_TREE_NODE_ID,
CFT.DEP31_TREE_NODE_ID,
DSDEP0_1.VALUE_ID AS DEP0_VALUE_ID,
DSDEP0_1.VALUE AS DEP0_VALUE FROM GL_SEG_VAL_HIER_CF CFT,
FND_VS_TYPED_VALUES_VL DSDEP0_1
WHERE (CFT.DEP0_PK1_VALUE = DSDEP0_1.VALUE(+)
AND CFT.DEP0_PK2_VALUE = DSDEP0_1.VALUE_SET_CODE(+))
AND ( ( (( ( CFT.TREE_CODE='Company Country Biz'
AND (1=2) ) ) OR (CFT.TREE_CODE NOT IN ('Company Curr Country',
) ) ))
AND (CFT.TREE_CODE in (select A.tree_code from fnd_tree_data_source_params A,
fnd_ts_data_source_params B where A.tree_structure_code = 'GL_ACCT_FLEX'
and B.tree_structure_code = 'GL_ACCT_FLEX' and A.parameter_id = B.parameter_id
and B.parameter_name = 'Bind_ValueSetCode' and A.parameter_value in ('COMPANY_CODES'))) )
No comments:
Post a Comment