Saturday, June 12, 2010

Initialize Apps

-->
To run or execute the Oracle API from the back-end, we need to initialize the Apps first. Here is the script for initializing oracle apps from back end. Procedure initialize_apps
Declare
v_user_id number;
v_resp_id number;
v_application_id number;
l_resp_name varchar2(200); -- Resp name
l_user_name varchar2(50); -- Username
BEGIN
-- Query to get user_id
SELECT user_id
INTO v_user_id
FROM fnd_user
WHERE user_name = l_user_name;
-- Get the application_id and responsibility_id
SELECT application_id
, responsibility_id
INTO v_application_id
,v_resp_id
FROM fnd_responsibility_tl
WHERE responsibility_name = l_resp_name;
--Initialixze the Application to use the API.
FND_GLOBAL.APPS_INITIALIZE( user_id => v_user_id
, resp_id => v_resp_id
, resp_appl_id => v_application_id
);
END;

No comments:

Post a Comment