We help IT Professionals succeed at work.

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

smita_raut
smita_raut asked
on
Medium Priority
878 Views
Last Modified: 2008-02-01
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
Comment
Watch Question

CERTIFIED EXPERT
Commented:
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.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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

Author

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
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.