<ROOT>
 <APPS_INITIALIZE_DATA>
  <USER_NAME>ENGINATICS</USER_NAME>
  <RESPONSIBILITY_KEY>SYSTEM_ADMINISTRATOR</RESPONSIBILITY_KEY>
  <APPLICATION_SHORT_NAME>SYSADMIN</APPLICATION_SHORT_NAME>
 </APPS_INITIALIZE_DATA>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: FND W3H_Role_Functions -->
 <REPORTS_ROW>
  <GUID>82288223EF8D3869E053B46B63588994</GUID>
  <SQL_TEXT>select * from (
	select frm.function_name AS Name,frmt.user_function_name AS DisplayName,
frm.type AS Type,
(select user_name from fnd_user where user_id=frm.created_by) AS CreatedBy, 
frm.creation_date AS CreationDate,
(select user_name from fnd_user where user_id=frm.last_updated_by) AS LastUpdatedBy, 
frm.last_update_date AS LastUpdateDate
from fnd_form_functions frm,fnd_form_functions_tl frmt,
fnd_compiled_menu_functions fcm,fnd_responsibility fr,wf_local_roles wur
where frmt.function_id=frm.function_id and frmt.language=userenv(&apos;LANG&apos;)
and frm.function_id=fcm.function_id
and fcm.menu_id=fr.menu_id
and fr.responsibility_key=substr(wur.name,instr(wur.name,&apos;|&apos;,1,2)+1,
(instr(wur.name,&apos;|&apos;,1,3)-1-instr(wur.name,&apos;|&apos;,1,2)))
and wur.name= :PARAM1
union 
 /* This selects the functions assigned to the sub roles with partition_id=2 (FND_RESP).
    This case handles the hierarchy between the roles for FND_RESP orig_system 
 */
 select frm.function_name AS Name,frmt.user_function_name AS DisplayName,
 frm.type AS Type,
 (select user_name from fnd_user where user_id=frm.created_by) AS CreatedBy, 
 frm.creation_date AS CreationDate,
 (select user_name from fnd_user where user_id=frm.last_updated_by) AS LastUpdatedBy, 
 frm.last_update_date AS LastUpdateDate
 from fnd_form_functions frm,fnd_form_functions_tl frmt,
 fnd_compiled_menu_functions fcm,fnd_responsibility fr,wf_local_roles wur
 where frmt.function_id=frm.function_id and frmt.language=userenv(&apos;LANG&apos;)
 and frm.function_id=fcm.function_id
 and fcm.menu_id=fr.menu_id
 and fr.responsibility_key=substr(wur.name,instr(wur.name,&apos;|&apos;,1,2)+1,
 (instr(wur.name,&apos;|&apos;,1,3)-1-instr(wur.name,&apos;|&apos;,1,2)))
 and wur.orig_system=&apos;FND_RESP&apos;
 and wur.name in
 (
  select super_name from wf_role_hierarchies
  where enabled_flag=&apos;Y&apos;
  connect by prior super_name=sub_name
  and prior enabled_flag=&apos;Y&apos;
  start with sub_name= :PARAM1
 )
union
/* This selects the functions granted to the given role */
 select distinct frm.function_name AS Name,frmt.user_function_name AS DisplayName,
frm.type AS Type,
(select user_name from fnd_user where user_id=frm.created_by) AS CreatedBy, 
frm.creation_date AS CreationDate,
(select user_name from fnd_user where user_id=frm.last_updated_by) AS LastUpdatedBy, 
frm.last_update_date AS LastUpdateDate
from fnd_grants fg,fnd_form_functions frm,fnd_form_functions_tl frmt,
fnd_compiled_menu_functions fcm
where frmt.function_id=frm.function_id and frmt.language=userenv(&apos;LANG&apos;)
and frm.function_id=fcm.function_id
and fcm.menu_id=fg.menu_id 
and fg.grantee_key= :PARAM1
union 
/* This selects the functions granted to sub-roles of a given function */
select distinct frm.function_name AS Name,frmt.user_function_name AS DisplayName,
 frm.type AS Type,
 (select user_name from fnd_user where user_id=frm.created_by) AS CreatedBy, 
 frm.creation_date AS CreationDate,
 (select user_name from fnd_user where user_id=frm.last_updated_by) AS LastUpdatedBy,
 frm.last_update_date AS LastUpdateDate
 from fnd_grants fg,fnd_form_functions frm,fnd_form_functions_tl frmt,
 fnd_compiled_menu_functions fcm
 where frmt.function_id=frm.function_id and frmt.language=userenv(&apos;LANG&apos;)
 and frm.function_id=fcm.function_id
 and fcm.menu_id=fg.menu_id 
 and fg.grantee_key in 
 (
  select super_name from wf_role_hierarchies
  where enabled_flag=&apos;Y&apos;
  connect by prior super_name=sub_name
  and prior enabled_flag=&apos;Y&apos;
  start with sub_name= :PARAM1
 )
) &amp;PARAM2
</SQL_TEXT>
  <ENABLED>Y</ENABLED>
  <XDO_APPLICATION_SHORT_NAME>FND</XDO_APPLICATION_SHORT_NAME>
  <XDO_DATA_SOURCE_CODE>W3H_Role_Functions</XDO_DATA_SOURCE_CODE>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <REPORT_NAME>FND W3H_Role_Functions</REPORT_NAME>
    <DESCRIPTION>Application: مكتبة وحدات التطبيقات
Source: 
Short Name: W3H_Role_Functions
DB package: </DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <REPORT_NAME>FND W3H_Role_Functions</REPORT_NAME>
    <DESCRIPTION>Application: Basisbibliothek
Source: 
Short Name: W3H_Role_Functions
DB package: </DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>FND W3H_Role_Functions</REPORT_NAME>
    <DESCRIPTION>Application: Application Object Library
Source: 
Short Name: W3H_Role_Functions
DB package: </DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <REPORT_NAME>FND W3H_Role_Functions</REPORT_NAME>
    <DESCRIPTION>Application: 应用对象程序库
Source: 
Short Name: W3H_Role_Functions
DB package: </DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>BI Publisher</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>&amp;param2</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:param1</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
  </PARAMETERS>
  <PARAMETER_DEPENDENCIES>
  </PARAMETER_DEPENDENCIES>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
  <UPLOAD_DEPENDENCIES>
  </UPLOAD_DEPENDENCIES>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
