Vous êtes sur la page 1sur 5

-------------------Change Password Of User---------------begin if fnd_user_pkg.changepassword('USER_NAME','welcome@123') then null; ----------1.List Of Function Attached to the MENU----------SELECT DISTINCT fmep.menu_id, DECODE(fmep.function_id,NULL, DECODE(fmec.

function_id, NULL,DECODE(fmec1.function_id,NULL, 'No Func',fmec1.function_id ), fmec.function_id), fmep.function_id) funcID, fff.user_function_name, fff.description FROM fnd_form_functions_tl fff, fnd_menu_entries fmec1, fnd_menu_entries fmec, fnd_menu_entries fmep WHERE fmep.menu_id = (SELECT menu_id FROM fnd_menus WHERE menu_name='INV_NAVIGATE'--- --Change the menu according to your requirement AND ROWNUM=1) AND fmep.sub_menu_id = fmec .menu_id(+) AND fmec.sub_menu_id = fmec1 .menu_id (+) AND fff.function_id = DECODE (fmep.function_id,NULL,DECODE(fmec.function_id, NULL, DECODE(fmec1.function_id,NULL,-999,fmec1.function_id), fmec.function_id), fmep.function_id) ORDER BY DECODE(fmep .function_id,NULL, DECODE(fmec.function_id, NULL, DECODE(fmec1.function_id,NULL, 'No Func',fmec1.function_id ), fmec.function_id), fmep.function_id); / / *----------------------------------------------------------------------2. Script to find the Where the Concurrent Progran Can Be Run like Responsibility,Application,Request Group Details -------------------------------------------------------------------------*/ select distinct a.application_id, a.concurrent_program_id, a.user_concurrent_program_name, a.description, b.request_group_id, request_group_name, e.responsibility_name from fnd_concurrent_programs_tl a, fnd_request_groups b, fnd_request_group_units c,

fnd_responsibility d, fnd_responsibility_tl e where a.concurrent_program_id = c.request_unit_id and b.request_group_id = c.request_group_id and b.request_group_id = d.request_group_id and d.responsibility_id = e.responsibility_id and a.application_id = b.application_id and b.application_id = c.application_id and d.application_id = e.application_id and a.user_concurrent_program_name like '&Concurrent_Program_Name' --and a.concurrent_program_id = 45220; / select * from fnd_concurrent_programs_tl where user_concurrent_program_name like '%Workflow%ack%' / /*----------------------------------------------------------------------3.a. Script to find the Details of Concurrent Progran Run by Particular user, b. Details like Responsibility,Application,Request Group Details -------------------------------------------------------------------------*/ select distinct user_concurrent_program_name, responsibility_name, user_name, request_date, argument_text, request_id, requested_by, phase_code, status_code, a.concurrent_program_id, a.responsibility_id, logfile_name, outfile_name from fnd_concurrent_requests a, fnd_concurrent_programs_tl b, fnd_responsibility_tl c, fnd_user d where a.CONCURRENT_PROGRAM_ID = b.concurrent_program_id and a.responsibility_id = c.responsibility_id and a.requested_by = d.user_id and user_name like 'VSREERAMOJU'; / / *----------------------------------------------------------------------4. Script to find the Customization of Forms using Personlization -------------------------------------------------------------------------*/ select distinct a.form_name , a.enabled, c.USER_FORM_NAME, d.APPLICATION_NAME from FND_FORM_CUSTOM_RULES a, FND_FORM b, FND_FORM_TL c,

fnd_application_tl d where enabled = 'Y' and a.form_name = b.form_name and b.form_id = c.form_id and b.application_id = d.application_id order by application_name; / --1.Running Workflow From Back-End---declare v_itemtype VARCHAR2(50); v_itemkey VARCHAR2(50); v_process VARCHAR2(50); v_userkey VARCHAR2(50); begin v_itemtype := 'FYI_467'; v_itemkey := 'Test Back-End Script'; v_userkey := 'Test-Venu'; v_process := 'FYI_Notification'; WF_ENGINE.Threshold := -1; WF_ENGINE.CREATEPROCESS(v_itemtype, v_itemkey, v_process); wf_engine.setitemuserkey(v_itemtype, v_itemkey, v_userkey ); wf_engine.setitemowner (v_itemtype, v_itemkey,'VSREERAMOJU');----SYSADMIN'); WF_ENGINE.STARTPROCESS(v_itemtype, v_itemkey); commit; exception when others then dbms_output.put_line(SQLERRM); end; / ----------5.NO Of Orders Per Month-----select b.name,b.description,to_char(ordered_date,'Mon') Month, count(0) NoOfOrders from oe_order_headers_all a, oe_transaction_types_tl b where 1=1 and a.order_type_id = b.transaction_type_id and ordered_Date between '01-SEP-2000' and '01-OCT-2011' --and org_id = 1 group by b.name, b.description,to_char(ordered_date,'Mon') order by to_char(ordered_date,'Mon'); / ---No Of Lines Shipped per Order--------select b.name,b.description,to_char(schedule_ship_date,'Mon') Month, count(0) NoOfOrders from oe_order_lines_all a, oe_transaction_types_tl b, oe_order_headers_all c where 1=1 and c.order_type_id = b.transaction_type_id and a.header_id = c.header_id and a.org_id = c.org_id and schedule_ship_date between '01-SEP-2009' and sysdate --and a.org_id = 1 group by b.name, b.description,to_char(schedule_ship_date,'Mon');

/ --------6.Active Responsibility Of User----------------SELECT fu.user_name, frt.responsibility_name, furgd.start_date, furgd.end_date FROM fnd_user fu, fnd_user_resp_groups_direct furgd, fnd_responsibility_tl frt WHERE fu.user_id = furgd.user_id AND furgd.responsibility_id = frt.responsibility_id AND UPPER (fu.user_name) = UPPER ('&User_Name'); / / --------7.Script to Find the Menu Attached to Responsibility-------SELECT DISTINCT a.responsibility_name, c.user_menu_name FROM apps.fnd_responsibility_tl a, apps.fnd_responsibility b, apps.fnd_menus_tl c, apps.fnd_menus d, apps.fnd_application_tl e, apps.fnd_application f WHERE a.responsibility_id = b.responsibility_id AND a.responsibility_NAME = '&NAME' AND b.menu_id = c.menu_id AND b.menu_id = d.menu_id AND e.application_id = f.application_id AND f.application_id = b.application_id AND a.LANGUAGE = 'US'; --------8.Concurrent Programs Attached to the Responsibility---------------select frg.request_group_name ,fcpt.user_concurrent_program_name CONC_PGM_NAME from fnd_concurrent_programs_tl fcpt ,fnd_request_group_units frgu ,fnd_request_groups frg ,fnd_responsibility fr ,fnd_responsibility_tl frt where 1 = 1 and frgu.request_unit_id = fcpt.concurrent_program_id and frg.request_group_id = frgu.request_group_id and fr.request_group_id = frg.request_group_id and frt.responsibility_id = fr.responsibility_id and frt.language = USERENV('LANG') and fcpt.language = USERENV('LANG') and frt.responsibility_name = '&RESPONSIBILITY_NAME' order by fcpt.user_concurrent_program_name ----------------Which Respponsibility we can Run Program--------------select responsibility_name--,a.* from fnd_responsibility_tl a where responsibility_id in (select DISTINCT responsibility_id from fnd_concurrent_requests where concurrent_program_id in( select distinct concurrent_program_id from fnd_concurrent_programs_tl where user_concurrent_program_name like '&Program_Name' ));

------------------------Organization Hierarcy-----------------------SELECT LPAD(' ',10 * (LEVEL-1)) || ORG.NAME HIERARCHY, ORG.ORGANIZATION_ID ORGANIZATION_ID, ORG.BUSINESS_GROUP_ID BUSINESS_GROUP_ID FROM HR_ALL_ORGANIZATION_UNITS ORG, PER_ORG_STRUCTURE_ELEMENTS OSE WHERE 1=1 AND ORG.ORGANIZATION_ID = OSE.ORGANIZATION_ID_CHILD --AND OSE.ORG_STRUCTURE_VERSION_ID = 61 -- STRUCTURE VERSION START WITH OSE.ORGANIZATION_ID_PARENT = 81 -- PARENT ID OF TOP LEVEL ORGANIZATION CONNECT BY PRIOR OSE.ORGANIZATION_ID_CHILD = OSE.ORGANIZATION_ID_PARENT ORDER SIBLINGS BY ORG.LOCATION_ID, OSE.ORGANIZATION_ID_CHILD http://samiora.blogspot.com/2009/08/useful-sql-scripts-for-oracle.html

Vous aimerez peut-être aussi