add

About Me

My photo
Oracle Apps - Techno Functional consultant

Tuesday, June 21

Profile Option In Oracle

Profile is one of the changable option it will change the way of
application execution.

When User Log in to the application and select the the resp or Appl
system will automatically captures all the profile value as per the
profile values application will run.

Ex: If client have three Organizations 1)Hyd
2)Ban
3)Chn
If "hyd" users connect to the Application system will retrive the
data from database which is related to the Hyderabad branch.
If user is working for 'CHN' brnach then chennai branch setups or data
will be retrieved.

For every user we will assign the Profile value

Ex: Operation

Position - Profile Name
Profile Values
--------------
Manager
Supervisior
Clerk
Operator
Trainess

When we want assign any profile value we have four levels
we have to select any one of the level.


Profile Level Profile Profile Value
------------- ------- --------------
User - OPERATIONS - Print - 10(This is for for Operations)
Responsibility - 22Responsi - Print - 5(This is for 22resp users)
Application - GL Applica - Print - 4(This is for GL App Users)
Site - --- - Print - 2(This is for ALL Users)

Site : this is lowest level to assign the Profile values site values
are applicable for all the users.when we install Application by default
site level values will be assigned.

Application: These values are applicable for the users who are having
the access for the application. If user is eligible for both
application and site level values then application level value will
override the site level value.

Responsibility:We will select the responsibility name assign the value
which is applicalbe only for the users who are having the access for
specified responsibility.

Responsibility level value will override both application and site
level values.

User: This is highest level in the profile option.
we will select the user name and assign the profile value which is
applicable only for this user.
User level value will override all other profile level values.

Diff between Application and Responsibility:
============================================
Both are Group of Forms(Menu)
Group of ConcurrentPrograms(Request Group)
Group of Users (Data group)
But Application as per the Business functionality requirement
Responsibility will group as per the position requirement.

Some of the Imp Profile Names:

GL:Set Of Books
MO:Operating Unit
Hr:Business Groups
MFG_ORGANIZATION_ID
USER_ID
RESP_ID
USERNAME
RESP_NAME and so on..........

==========================================================

note: In the Projects most of the profile values will be assigned at the Responsibility
level.

Diff Between Application and Responsibility:
=========== ===============

Applciation is nothing Colletion of Forms,Reports and Program which are related for
specific business functionality.

Responsibility is nothing but Colletion of Forms,Reports and Program which are related for
specific Position in the Organization.

For Ex : We have to create One Responsibility For the Clerk. Which is accesable by all
the Clerks.
It Contains the Forms and Reports which are required for the Clerk.

We have to Create new Responsibility for the Manager,Which is accesable by all the
Managers.
It COntains the Forms and Reports which are required for the manager.

Where as Application includes all the Forms,Reports and Programs.If we assign the
application to the user he will access all the forms and Reports.
Intead of that we will create the responsibility and we will assign to the User.

Common Profiles:
================

Gl:Set of Books: Which is Financial Profile option will be uset to assin SetofBooks
HR:Business Group : Which will used to assign the Business Group
MO:Operating Unit : To assign the Operating Unit (Branch) to the users.
MFG_ORGANIZATION_ID: Will Be used to assign the Manufacturing Organization ID.

USER_ID
USERNAME
RESP_NAME and so on.........

We can find all the Profile details in Application Developer Responsibility.
We can assign the Profile values in System Administrator Responsibility.

Application Developer=>Profile =>Press CTRL+F11 we can find all the profiles.

System administrator=>profile=>System=> Select Profilename,Level =>Find button
then assign the Profile value.

Set Of Books :SOB is nothing but collection of Currency
Calendar
Chart of Accounts.
We will assign the SOB as a profile value to the user as per the Profile value system
will automatically change the application running.

Base on the SOB name we can find the change in the currency and calendar and accounts

SELECT NAME,
CURRENCY_CODE,
PERIOD_SET_NAME,
CHART_OF_ACCOUNTS_ID
FROM GL_SETS_OF_BOOKS

SELECT * FROM GLFV_CHARTS_OF_ACCOUNTS WHERE CHART_OF_ACCOUNTS_ID = 50713

22USER GL:Set Of Books Vision Operations (USA) USD
23USER GL:Set Of Books Vision Korea KRW
24USER GL:Set Of Books Vision Italy ITL

Create Three users
Assign Profile values from System administrator (Profile=>System)
open the GL Form and verify the curency values (GL=>Journal=>Enter=>new Journal)

Note: Most of the profile values will be assigned at Responsibility Level.

Retrieve the Profile Value from Backend:(SQL,PL/SQL,Forms6i,Reports6i)

===============================================================

Fnd_Profile.Get('ProfileName',
local Variable);

local Variable:= Fnd_Profile.Value('Profile Name');

Both API's will be used to retrieve the Profile value frombackend

Get() is Procedure
Value() is Function

Oracle Has provided both Procedure and Function becuase in some of the areas we can not
use procedure then we can use function.

For Ex: in SELECT clause we can not use procedure we have to go for using the Function.

1)We would like to display the Set of Books name
User name
Respname in the first page of the report.

22USER
23USER
24USER

Ans)

1)Define the Local Variable
2)Goto before Report Trigger write the follwoing API

:P_SOBNAME:= Fnd_Profile.value('GL_SET_OF_BKS_NAME');
:USERNAME := Fnd_Profile.value('USERNAME');
Fnd_Profile.Get('RESP_NAME',
:RESPNAME);
3)Goto Layout model Header section and Display the Variable Name.

4)Submit from Diff Users and test the Output we can find the Difference.

2)Develop the PL/SQL Program for vendor Name updation. Vendor name should be updated
if "OPERATIONS" user submit the Program for other users should not get update.

Parameters are VendorID
VendorName

Create Or Replace Procedure ven_update(Errbuf OUT varchar2,
Retcode OUT varchar2,
v_id IN number,
v_name IN varchar2) as
l_name varchar2(100);
begin
l_name:=Fnd_Profile.value('USERNAME');
If l_name = 'OPERATIONS' then
UPDATE PO_VENDORS
SET VENDOR_NAME = v_name
WHERE VENDOR_ID =v_id;
commit;
Fnd_File.Put_line(Fnd_File.Output,'vendorname has updated succesfully');
Else
Fnd_File.Put_line(Fnd_File.Output,'Access Denied for updateion');
End If;
End;

Note: We can pass the profile value as default value by using Profile default type.
Select Default type = profile
Default Value= Profile Name
When we are passing Profile value as default we are suppose to hide the Parameter
because profile is confidential Information we are not suppose to give permission for
modifications.

No comments: