Assigning "HR:Query Only mode" profile in Oracle Apps

Hi All,

My requirement is to assign HR : Query Only mode profile to a user programmatically. I am using JAVA as programming language. Here are some details based on my investigation-

1. Information about the profiles is stored in the FND_PROFILE_OPTIONS table
and the association of a profile with a user is stored in the
FND_PROFILE_OPTION_VALUES table.
2. The FND_PROFILE package contains function("Save") for assigning a profile
to a user.
3. The "Save" function does not seem to work for profile
"PER_QUERY_ONLY_MODE" i.e the Query Only mode profile.

Save function however, works fine for profiles like ENABLE_SECURITY_GROUPS and few others. I am still unable to figure out why is the behaviour this way?
When the "HR : Query Only Mode" Profile is added from the UI, an entry
appears in the FND_PROFILE_OPTION_VALUES table. But the Save function of the FND_PROFILE package does not allow to add this entry!

Please help. Here is the code that is being used for the purpose-

declare
b boolean;
begin
FND_GLOBAL.APPS_INITIALIZE(0, 20420, 1);
//Initialize the flobal parameters : set the environment
b := FND_PROFILE.SAVE('per_query_only_mode', 'Y' , 'USER',1008682);
//Save profile inf
if b = TRUE then
dbms_output.put_line('success');
else
dbms_output.put_line('some error occured');
end if;
end;

Thanks,
Smita Raut
smita_rautAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cj_1969Commented:
If it is working for other and just not this one profile, it might have some built in logic ... are there any other profiles associated to this user?  If so, then assigning a read-only profile wouldn't be an acceptable addition, the other profiles over ride it.  
Is this the only profile assigned to thsi user?

Another question ... are any other users using this profile?  Take a look at one of those IDs and see if there is something else that needs to be added to the account to make this work.

Any additional info you can provide would be helpful in figuring this out.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smita_rautAuthor Commented:
Yes. This is the only profile assigned to the user.
Also, I created a new user without any profiles and responsibilities assigned. Then  I tried assigning the profile(per_query_only_mode) to the user. This failed.

Note that "HR : Query Only Mode" Profile can be successfully added through the UI.

Here are some more observations :
1) The profile ENABLE_SECURITY_PROFILE has the application ID as 0 i.e FND(Oracle Application Library) and we are using the FND_PROFILE.Save method for assigning profile.
The profile PER_QUERY_ONLY_MODE has application id as 800 i.e PER(Human Resources)
Whether this can make a differnce??
ENABLE_SECURITY_GROUPS is listed in the document for "Profile Options For Oracle Applications Library) : (Link :http://demo.publicsoft.nl/pls/DEMO/fndgfm/fnd_help.get/US/FND/AUG00009365.HTM)  
 
 I tried to find out if there is a listing of Profile Options for HR application but could not find much in that respect.
 
Also I tried to check if there appears an entry in the PER_SECURITY_PROFILES_V and PER_SECURITY_USERS_V views, but could not find any.
I doubt that the FND_profile package may not work for PER profiles. But am not sure about this.

Thanks,
Smita
0
smita_rautAuthor Commented:
It was a stupid thing I realized. I was using per_query_only_mode instead of PER_QUERY_ONLY_MODE. Its case sensitive.

Since cj_1969 is the only user who responded to this query, I am rewarding the points to him.

Thanks,
Smita
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.