94: FUNCTION description(p_seg_value IN VARCHAR2,p_seg_type IN VARCHAR2)
95: RETURN VARCHAR2
96: IS
97: v_value_desc VARCHAR2(240); -- Bug 8814452 , Increasing the size to
98: -- sync. with fnd_flex_values_vl.description
99: BEGIN
100: BEGIN
101: IF p_seg_type LIKE '%SEGMENT%' THEN
102: SELECT DISTINCT ffv.description
104: FROM
105: -- gl_code_combinations gcc, .. B 8973431/8935239 .... remove table from join
106: fnd_id_flex_structures ffs
107: ,fnd_id_flex_segments fseg
108: ,fnd_flex_values_vl ffv
109: --WHERE gcc.chart_of_accounts_id = ffs.id_flex_num .. B 8973431/8935239
110: --AND ffs.id_flex_num = fseg.id_flex_num .. B 8973431/8935239
111: WHERE ffs.id_flex_num = fseg.id_flex_num -- B 8973431/8935239
112: AND ffs.id_flex_code = fseg.id_flex_code
121: ELSE
122: SELECT ffv.description
123: INTO v_value_desc
124: FROM fnd_descr_flex_col_usage_vl fdfcu
125: ,fnd_flex_values_vl ffv
126: WHERE fdfcu.flex_value_set_id = ffv.flex_value_set_id
127: AND fdfcu.application_id = 200
128: AND fdfcu.descriptive_flexfield_name = 'AP_INVOICES'
129: AND fdfcu.descriptive_flex_context_code ='Global Data Elements'