18 August, 2025

Query to get TCA DFF Information - Oracle EBS

 SELECT
    ffv.descriptive_flexfield_name    "DFF Name",
    ffv.application_table_name        "Table Name",
    ffv.title                         "Title",
    ap.application_name               "Application",
    ffc.descriptive_flex_context_code "Context Code",
    ffc.descriptive_flex_context_name "Context Name",
    ffc.description                   "Context Desc",
    ffc.enabled_flag                  "Context Enable Flag",
    att.column_seq_num                "Segment Number",
    att.form_left_prompt              "Segment Name",
    att.application_column_name       "Column",
    fvs.flex_value_set_name           "Value Set",
    att.display_flag                  "Displayed",
    att.enabled_flag                  "Enabled",
    att.required_flag                 "Required"
FROM
    apps.fnd_descriptive_flexs_vl    ffv,
    apps.fnd_descr_flex_contexts_vl  ffc,
    apps.fnd_descr_flex_col_usage_vl att,
    apps.fnd_flex_value_sets         fvs,
    apps.fnd_application_vl          ap
WHERE
        ffv.descriptive_flexfield_name = att.descriptive_flexfield_name
    AND ap.application_id = ffv.application_id
    AND ffv.descriptive_flexfield_name = ffc.descriptive_flexfield_name
    AND ffv.application_id = ffc.application_id
    AND ffc.descriptive_flex_context_code = att.descriptive_flex_context_code
    AND fvs.flex_value_set_id (+) = att.flex_value_set_id
    AND ffv.title IN ( 'Customer Information', 'Party Site Information', 'Party Information', 'Address Information', 'Site Use Information'
    )
    --AND att.form_left_prompt LIKE 'give TITLE NAME'
ORDER BY
    ffv.title,
    ffc.descriptive_flex_context_code,
    att.column_seq_num

Assign responsibility to user based on program responsibility

 DECLARE
   lv_user_name        VARCHAR2 (20) := 'XXUSER';
   --lv_req_resp_key     VARCHAR2 (50) := 'APPLICATION_DEVELOPER';
   lv_description      VARCHAR2 (100) := 'Adding Responsibility to user for report testing';
   lv_req_resp_name    VARCHAR2 (200);
   lv_appl_shrt_name   VARCHAR2 (20);
   lv_appl_name        VARCHAR2 (50);
   lv_resp_key         VARCHAR2 (50);
  
BEGIN

for c_cur in (

Select RESPONSIBILITY_KEY lv_req_resp_key, 
(select application_short_name  from fnd_application_vl fav where fr.application_id = fav.application_id) lv_appl_shrt_name
From apps.fnd_Responsibility fr,
apps.fnd_responsibility_tl frt,
apps.fnd_request_groups frg,
apps.fnd_request_group_units frgu,
apps.fnd_concurrent_programs_tl fcpt
Where upper(fcpt.user_concurrent_program_name) like upper('%Aged Trial Balance with Payments%')
and request_group_name = 'XX_AR_INQ_REPORTS'
and fcpt.concurrent_program_id = frgu.request_unit_id
and frgu.request_group_id = frg.request_group_id
and frg.request_group_id = fr.request_group_id
and fr.responsibility_id = frt.responsibility_id
Order By 2
      )

      loop
   fnd_user_pkg.addresp (username         => lv_user_name,
                         resp_app         => c_cur.lv_appl_shrt_name,
                         resp_key         => c_cur.lv_req_resp_key,
                         security_group   => 'STANDARD',
                         description      => lv_description,
                         start_date       => SYSDATE,
                         end_date         => NULL
                                              );
   COMMIT;
  end loop;
   DBMS_OUTPUT.put_line ('The responsibility ' || lv_req_resp_name || ' is added to the user ' || lv_user_name);
  
EXCEPTION
   WHEN OTHERS THEN
      DBMS_OUTPUT.put_line ('Responsibility IS NOT added due to ' || SQLCODE || '; ' || SUBSTR (SQLERRM, 1, 250));
      ROLLBACK;
END;

Query to get all details of the concurrent program

 SELECT DISTINCT fcpl.user_concurrent_program_name "Concurrent Program Name",
  fcp.concurrent_program_name "Short Name"                                 ,
  fat.application_name                                                     ,
  fl.meaning execution_method                                              ,
  fe.execution_file_name                     ,
  fcp.output_file_type                                                     ,
  fdfcuv.column_seq_num "Column Seq Number"                                ,
  fdfcuv.end_user_column_name "Parameter Name"                             ,
  fdfcuv.form_left_prompt "Prompt"                                         ,
  fdfcuv.enabled_flag " Enabled Flag"                                      ,
  fdfcuv.required_flag "Required Flag"                                     ,
  fdfcuv.display_flag "Display Flag"                                       ,
  fdfcuv.flex_value_set_id "Value Set Id"                                  ,
  ffvs.flex_value_set_name "Value Set Name"                                ,
  flv.meaning "Default Type"                                               ,
  fdfcuv.default_value "Default Value"
 FROM apps.fnd_concurrent_programs fcp ,
  apps.fnd_concurrent_programs_tl fcpl   ,
  apps.fnd_descr_flex_col_usage_vl fdfcuv,
  apps.fnd_flex_value_sets ffvs          ,
  apps.fnd_lookup_values flv             ,
  apps.fnd_lookups fl                    ,
  apps.fnd_executables fe                ,
  apps.fnd_executables_tl fet            ,
  apps.fnd_application_tl fat
  WHERE 1                     = 1
AND fcp.concurrent_program_id = fcpl.concurrent_program_id
AND fcp.enabled_flag          = 'Y'
AND fcpl.user_concurrent_program_name = 'XX Vendor Invoice Payment Report' --<Your Concurrent Program Name>
AND fdfcuv.descriptive_flexfield_name = '$SRS$.'
  || fcp.concurrent_program_name
AND ffvs.flex_value_set_id = fdfcuv.flex_value_set_id
AND flv.lookup_type(+)     = 'FLEX_DEFAULT_TYPE'
AND flv.lookup_code(+)     = fdfcuv.default_type
AND fcpl.language          = 'US'
AND flv.language(+)        = 'US'
AND fl.lookup_type         ='CP_EXECUTION_METHOD_CODE'
AND fl.lookup_code         =fcp.execution_method_code
AND fe.executable_id       = fcp.executable_id
AND fe.executable_id       =fet.executable_id
AND fet.language           = 'US'
AND fat.application_id     =fcp.application_id
AND fat.language           = 'US'
ORDER BY fdfcuv.column_seq_num;