Wednesday, April 10, 2013

Parent Child relationship for Accounting Flexfield

 SELECT gcc.code_combination_id
      ,ffvc.parent_flex_value
      ,gcc.segment1 Balancing_Segment
      ,gcc.segment,ffvc.description
  FROM gl_code_combinations gcc,
       fnd_flex_value_children_v ffvc,
       fnd_id_flex_segments fifs
 WHERE 1=1
   AND fifs.flex_value_set_id = ffvc.flex_value_set_id
   AND fifs.id_flex_code='GL#'
   AND ffvc.parent_flex_value = NVL(:P_Parent_Flex_value, ffvc.parent_flex_value)
   AND ffvc.flex_value = gcc.segment
   AND fifs.application_column_name = 'SEGMENT'||:P_Segment_Num;


some more imp tables are gl_balances, gl_code_combinations and fnd_flex_norm hierarchy  fnd_flex_values, fnd_flex_value_sets to report on flex values

No comments:

Post a Comment