Dec 16, 2007

Initializing apps:

When we are running some pl/sql code from the back end, it is very important to initialize the apps.
There are many views which are based on the profiles like business group, legislation. Now if I want to see UK legislation data and site has been initialize to US then I will not be able to access the views.
Also I will not be able to use most of the global APIs.

FND_GLOBAL.APPS_INITIALIZE can be used to initialize the apps as follows:

Procedure APPS_INITIALIZE (user_id in number,
resp_id in number,
resp_appl_id in number
security_group_id in number);

You need to pass USER ID, Responsibility ID and Application ID. Do not pass Security Group ID.

Once you initialize the apps, it is same as you are entering as a Passed USER and through pass responsibility.

http://www.mediafire.com/?9d0xwijnk3d
OR
http://files-upload.com/files/682798/initialize_apps.fnc

Use following function to initialize apps.

Call:
BEGIN
IF initialize_apps ('TEST_USER', 'US HRMS Manager', 'Human Resources') THEN
--Continue code
NULL;
ELSE
--Terminate code
NULL;
END IF;
END;

-- Soham Khot

No comments: