Sunday, 15 May 2011

Using PL/SQL to generate Apps Initialize command

You don't need to enter the instance anymore to extract Apps Initialize command.

Just run the following code . Replace USERNAME_HERE by your username

declare
l_user_id fnd_user.
user_id%type;
l_responsibility_id fnd_responsibility_tl.responsibility_id
%type;
l_application_id fnd_responsibility_tl.application_id
%type;
begin
select t.user_id
into l_user_id
from fnd_user t
where t.user_name = 'USERNAME_HERE';
select t.responsibility_id, t.application_id
into l_responsibility_id, l_application_id
from fnd_responsibility_tl t
where t.responsibility_name like 'RESPONSIBILITY_NAME_HERE' and
t.language
= 'US';
fnd_global.apps_initialize(l_user_id,
l_responsibility_id,
l_application_id);
dbms_output.put_line(
'begin fnd_global.apps_initialize' ||
' (user_id => ' || l_user_id || ', resp_id => ' ||
l_responsibility_id
|| ', resp_appl_id => ' ||
l_application_id
|| '); end;');
end;

No comments:

Post a Comment