Activity Stream

3 days ago
new user registration
Parasuraman Vaidyanathan joined our community! Welcome!

More than a week ago
new download
Kandasamy Nagappan downloaded Aging 4 buckets


new user registration
Kandasamy Nagappan joined our community! Welcome!

new user registration
Zakeer Shaik joined our community! Welcome!

More than 2 weeks ago
new user registration
Narasinga Chennuri joined our community! Welcome!

new download
Marek Skulski downloaded Aging 4 buckets

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.