Profile Options in Oracle Applications


A user profile is a collection of changeable options that affect the way your applications run.  Oracle Applications establishes a value for each option in a user's profile when the user logs on or changes responsibility. Oracle Applications provides these options so that you can alter the behavior of your applications to suit your own preferences.


Example Use Case for Profile Options:
In this example, we’ll assume that you are an Oracle Applications developer building a screen in the Order Entry module. Here is the high-level list of requirements for the screen that is to be developed:

The screen should be flexible enough to ensure that different users of the screen can give different levels of discounts. For example, a clerk Order Entry user can give no more than a 5 percent discount. But a Sales Manager can enter an order with 15 percent discount.

There should not be any hard-coding regarding the maximum permissible discount.

There will be a discount field in the screen.

When the discount value is entered in the discount field, an error will be raised if the user violates the maximum permissible discount.

Follow these steps to build the screen:
1.    Define a profile option named ONT Maximum Discount Allowed. This profile option will be created using the short name ONT_MAX_DISCOUNT. The short name is the internal name used by AOL.
2.    Insert the following code in the when-validate-item of the discount field (assuming the screen is built in Oracle Forms):

IF:oe_line_block.discount_value > fnd_profile.value('ONT_MAX_DISCOUNT')
THEN
message( 'You can't give discount more than '
|| fnd_profile.value('ONT_MAX_DISCOUNT') || '%' ) ;
raise form_trigger_failure ; -- raise error after showing message
END IF ;