FND_GLOBAL.APPS_INITIALIZE for initializing session in Oracle Apps R12
select organization_id
from hr_operating_units
where name = :p_name;
exec mo_global.set_policy_context('S',:p_org_id);
select u.user_id user_id, r.responsibility_id resp_id,
r.application_id resp_appl_id, r.responsibility_key,
sg.security_group_id security_group_id
from fnd_user u,
fnd_user_resp_groups ur,
fnd_responsibility r,
fnd_security_groups sg
where u.user_name = :p_user_name
and r.responsibility_key = :p_responsibility_name
and ur.responsibility_id = r.responsibility_id
and ur.user_id = u.user_id
and ur.security_group_id = sg.security_group_id;
begin
fnd_global.apps_initialize
( user_id => :p_user_id
, resp_id => :p_resp_id
, resp_appl_id => :p_resp_appl_id
, security_group_id => :p_security_group_id
);
end;
from hr_operating_units
where name = :p_name;
exec mo_global.set_policy_context('S',:p_org_id);
select u.user_id user_id, r.responsibility_id resp_id,
r.application_id resp_appl_id, r.responsibility_key,
sg.security_group_id security_group_id
from fnd_user u,
fnd_user_resp_groups ur,
fnd_responsibility r,
fnd_security_groups sg
where u.user_name = :p_user_name
and r.responsibility_key = :p_responsibility_name
and ur.responsibility_id = r.responsibility_id
and ur.user_id = u.user_id
and ur.security_group_id = sg.security_group_id;
begin
fnd_global.apps_initialize
( user_id => :p_user_id
, resp_id => :p_resp_id
, resp_appl_id => :p_resp_appl_id
, security_group_id => :p_security_group_id
);
end;
Comments
Post a Comment