Tuesday 20 June 2017

Oracle Apps: Query to get the details of a Descriptive Flexfield

The below gives the details of Descriptive Flex Field defined in Oracle eBusiness Suite. This query can be used to find out all the DFF Segments defined for a specific table.

 select dffv.application_table_name          table_name  
       ,dffv.title  
       ,dcont.descriptive_flex_context_code context_code  
       ,dfusg.application_column_name       segment_column  
       ,dfusg.form_left_prompt              segment_window_prompt  
       ,dffv.concatenated_segs_view_name    view_name  
       ,(select x.application_name  
         from fnd_application_vl x  
         where x.application_id = dffv.application_id) application  
       ,dffv.description  
       ,dffv.descriptive_flexfield_name    name  
       ,dffv.context_column_name           structure_column  
       ,dffv.form_context_prompt           prompt  
       ,dffv.default_context_value         default_value  
       ,dffv.default_context_field_name    reference_field  
       ,dffv.context_required_flag         required  
       ,dffv.context_user_override_flag    displayed  
       ,dffv.context_synchronization_flag  synchronize_with_reference  
       ,dcont.descriptive_flex_context_code context_code  
       ,dcont.descriptive_flex_context_name context_name  
       ,dcont.description  
       ,dcont.enabled_flag  
       ,dfusg.column_seq_num           sequence_number  
       ,dfusg.end_user_column_name     segment_name  
       ,dfusg.form_left_prompt         segment_window_prompt  
       ,dfusg.application_column_name  segment_column  
       ,dfusg.enabled_flag  
       ,dfusg.display_flag  
       ,vset.flex_value_set_name      value_set  
       ,vset.*  
 from  apps.fnd_descriptive_flexs_vl     dffv  
      ,apps.fnd_descr_flex_contexts_vl   dcont  
      ,apps.fnd_descr_flex_col_usage_vl  dfusg  
      ,apps.fnd_flex_value_sets          vset  
 where dffv.descriptive_flexfield_name     = dcont.descriptive_flexfield_name  
 and   dcont.descriptive_flexfield_name    = dfusg.descriptive_flexfield_name(+)  
 and   dfusg.flex_value_set_id             = vset.flex_value_set_id(+)  
 and   dcont.descriptive_flex_context_code = dfusg.descriptive_flex_context_code(+)  
 --and  dffv.title LIKE 'Common Lookups'                -- Uncomment and add your DFF Title  
 --and  dffv.application_table_name LIKE 'GL_TAX_CODES' -- Uncomment and add your Table Name  
 order by dffv.application_id  
         ,dffv.title  
         ,dcont.descriptive_flex_context_code  
         ,decode(dfusg.enabled_flag, 'Y', 1, 'N', 2)  
         ,dfusg.column_seq_num  



Feel free to point out if anything is missing/wrong in this blog.

No comments:

Post a Comment