Activity Stream

3 days ago
new user registration
Kamil Tarhovicky joined our community! Welcome!

4 days ago
new user registration
Harrish I Bhatia joined our community! Welcome!


new user registration
Edgars Augstkalns joined our community! Welcome!

About a week ago
new user registration
Vanya Marinova Gigileva joined our community! Welcome!

new user registration
Juan Munoz Cobo joined our community! Welcome!

new user registration
Mike Wilson joined our community! Welcome!

Initializing an Apps environment in a SQL session
( 0 Votes )
General E-Business Suite - SQL Scripts
Written by Jouke de Groot   
Thursday, 22 November 2007 22:00

In order to select data from Oracle Apps views it is necessary to initialize an environment by setting the context of an organization, reponsibility and user. This can be done in TOAD or Oracle's free equivalent, Oracle SQL Developer.

Assuming you are connected to the database with apps user, execute the following SQL statements one-by-one:

 

SELECT user_id
FROM fnd_user
WHERE user_name = 'EBSUSERNAME';

Replace EBSUSERNAME with the login name you are using within Oracle Applications.

 

SELECT responsibility_id,
application_id,
responsibility_name
FROM fnd_responsibility_tl
WHERE LANGUAGE = 'US'
AND responsibility_name LIKE 'Receivables%';

Replace 'Receivables%' in this query to your own responsibility.

 

Finally, replace the user id, responsibility id and application id in the SQL statement below.

begin
FND_GLOBAL.APPS_INITIALIZE(
1336 -- user
,50513 -- resonsibility id
,600 -- application id
);
end;

 

Now the global variables are set and the database session is ready to query APPS views.

 

When connecting to the Oracle Database you need to login with the apps username, otherwise the last SQL statement may give problems!

Comments

Please login to post comments or replies.