Tuesday, September 11, 2012

Queries - FND

Find the Java file version :

SELECT f.filename, v.version
  FROM ad_files f, ad_file_versions v
 WHERE f.file_id = v.file_id AND f.filename IN ('OutBoundAMImpl.class')


Find the Concurrent Programs List :

  SELECT fa.application_name,
         fa.application_short_name,
         fcp.concurrent_program_name,
         fcp.user_concurrent_program_name,
         fe.execution_file_name,
         fl.meaning
    FROM fnd_concurrent_programs_vl fcp,
         fnd_application_vl fa,
         fnd_executables fe,
         fnd_lookups fl
   WHERE     fcp.application_id = fa.application_id
         AND fcp.executable_id = fe.executable_id
         AND fl.lookup_code = fe.execution_method_code
         AND fl.lookup_type = 'CP_EXECUTION_METHOD_CODE'
         AND fcp.enabled_flag = 'Y'
ORDER BY fa.application_name


Find the attribute definition on any table:

SELECT DFF.descriptive_flexfield_name "FIELD NAME",
       dffC.application_id,
       DFFC.application_column_name "COLUMN",
       DFFC.descriptive_flex_context_code "CODE",
       DFFC.end_user_column_name "NAME",
       dff.application_table_name "TABLE"
  FROM FND_DESCRIPTIVE_FLEXS DFF, FND_DESCR_FLEX_COLUMN_USAGES DFFC
 WHERE     DFF.application_id = dffc.application_id
       AND DFF.descriptive_flexfield_name = DFFC.descriptive_flexfield_name
       AND DFFC.application_id = '401'
       AND dff.descriptive_flexfield_name = 'Lot Attributes'

       AND dff.application_table_name = 'MTL_LOT_NUMBERS'