google analytics

meta

adsense

Friday, October 28, 2011

Oracle Applications - Query to list all the responsibilities assigned to a user


Oracle Applications - Query to list all the responsibilities assigned to a user

SELECT DISTINCT
fu.user_name, frtl.RESPONSIBILITY_NAME
FROM fnd_responsibility fr
, fnd_responsibility_TL frtl
, fnd_user_resp_groups furg
, fnd_user fu
WHERE furg.responsibility_id = fr.responsibility_id
AND frtl.responsibility_id = fr.responsibility_id
and fr.APPLICATION_ID=furg.RESPONSIBILITY_APPLICATION_ID
AND fu.user_id = furg.user_id
AND fu.user_name = '12345'  -- username here
order by fu.user_name

Tuesday, October 25, 2011

Combine multiple text files to one - DOS

Dos command to combine multiple text files into one consolidated file.

copy /a *.* all.txt

Tuesday, October 18, 2011

Submit concurrent request as child request of a main Concurrent program


Step 1: read the concurrent request data using fnd_conc_global.request_data
Step 2: If request data from step 1 is not null, then the program is restarting after the child requests are processed and the master has restarted. Go to step 7.
      Step 3: If the request data is null submit child programs using fnd_request.submit_request with child request                TRUE.
      Step 4: When all the child programs are done submitting, set the request data of the concurrent request to  some text, so that when the master is restarted the               request data is not null
      Step 5: Pause the master and allow the child requests to execute using fnd_conc_global.set_req_globals(conc_status => 'PAUSED',request_data => 'MASTER DONE')
      Step 6: When the child requests are executed the master restarts and goes to Step 1
Step 7: Do post processing actions and exit.


Pseudo code below :


req_data := fnd_conc_global.request_data;



if (req_data is not null) then
i := to_number(req_data);
i := i + 1;
if (i < 11 ) then
errbuf := 'Done!';
retcode := 0 ;
return;
end if;
else
i := 1;
end if;

req_id:= fnd_request.submit_request('FND', 'CHILD',
'Child ' || to_char(i), NULL,
TRUE, fnd_conc_global.printer);
if req_id = 0 then
--
-- If request submission failed, exit with error.
--
errbuf := fnd_message.get;
retcode := 2;
else
--
-- Here we set the globals to put the program into the
-- PAUSED status on exit, and to save the state in
-- request_data.
--
fnd_conc_global.set_req_globals(conc_status => 'PAUSED',
request_data => to_char(i));
errbuf := 'Sub-Request submitted!';
retcode := 0 ;
end if;
return;
end;

Oracle Applications - Query to quickly get the Financials family pack level

The below query will be useful to quickly get the financials family pack level you are in:

SELECT bug_number,decode(bug_number,
'3653484', 'FIN_PF.G',
'3153675', 'FIN_PF.F',
'2842697', 'FIN_PF.E',
'3016445', 'FIN_PF.D1',
'2380068', 'FIN_PF.C',
'2218339', 'FIN_PF.B',
'1807809', 'FIN_PF.A',
'no family packs applied') "Family Pack Level"
FROM ad_bugs
WHERE
bug_number in ('3653484', '3153675', '2842697', '3016445', '2380068', '2218339', '1807809')
ORDER BY 1;



Oracle Applications - Query to get all the functions and menus listed under a responsibility

A simple query to get all the menu listings attached to a responsibility. Particularly useful when you want to know in which responsibility a particular menu is attached.You can alter the below query to take the menu name as the where condition instead of the Responsibility name:

SELECT a.responsibility_name,c.prompt,c.description,d.menu_name
FROM apps.fnd_responsibility_tl a,
apps.fnd_responsibility b,
apps.fnd_menu_entries_tl c,
apps.fnd_menus_tl g,
apps.fnd_menus d,
apps.fnd_application_tl e,
apps.fnd_application f
WHERE a.responsibility_id(+) = b.responsibility_id
AND a.responsibility_name like '%ITD%AR%MANAGER%'
AND g.menu_id = d.menu_id
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'
AND c.LANGUAGE = 'US'
AND g.LANGUAGE = 'US'
and e.LANGUAGE = 'US';




LinkWithin

Related Posts Plugin for WordPress, Blogger...