A flexfield in Oracle Application is a field made up of sub–fields, or segments.  They are basically used to implement code structure or to capture additional information. There are two types of flexfields: key flexfields and descriptive flexfields. A key flexfield appears on your form as a normal text field with an appropriate prompt while a descriptive flexfield appears on your form as a two–character–wide text field with square brackets [ ] as its prompt.
Here is a brief comparison between KFF and DFF:

KFF vs. DFF

What is value set in Oracle application AOL?

  • Value set is primarily a container for your values, you define your value set such that it can control the types of values that are allowed into the value set (either predefined or nonvalidated). You can specify the format of your values.
  • Oracle Application Object Library uses value sets as important components of key flexfields, descriptive flexfields, and Standard Request Submission (value sets for report parameters for your reports that use the Standard Request Submission feature).

When to defining Values for Value Sets?

  • After you register your Flexfields & report parameters, if you are using independent or dependent value sets, you can enter values into each corresponding value set using the Segment Values form.
  • Values for the Value Sets, we are defining will be kept in the Oracle Application Object Library tables.

How many Format Types the value set have?

  • Char
  • Date
  • DateTime
  • Number
  • Standard Date
  • Standard Date Time
  • Time

You should take a note that Date and Date Time value set formats will be obsolete now and are provided for backward compatibility only. For new value sets, use the format types Standard Date and Standard Date Time.
What is Security type in value set?

  • By Security Rules window, we can define value security rules for ranges of flexfield and report parameter values.

There are two levels where you must activate Security, the one at value set level and other at individual segment or parameter level. You make Flex field Value Security available for your value set by choosing Hierarchical Security or Non-Hierarchical Security for the Security Type. When you make security available for a value set, all segments and report parameters that use that value set can use security. You then enable security for a particular segment or parameter.

  • Choose Hierarchical Security, If you want Security on a parent value to Cascade down to its child value or else you can choose Non-Hierarchical Security.

How many Character Formatting Options have for value set?

  • Numbers Only (0 – 9)
    • We cannot prevent users from entering a value that contains the radix character.
    • Cannot be used in Translatable Independent and Translatable Dependent value sets.
  • Uppercase Only(A-Z)
    • Here also we cannot use in Translatable Independent and Translatable Dependent value sets.
  • Right justify and Zero fill Numbers(001)
    • If you have selected Numbers Only (0-9) flag, then it wont allow you to affect this flag.
    • We are recommended to use this in Accounting Flex fields.
  • Minimum and Maximum Value Range
    • Your Minimum/maximum value may not be longer than the maximum size you specify for this value set.
    • Once you specify a range of values, you cannot define a new valid value that falls outside this range.
    • The Minimum Value and Maximum Value fields can therefore allow you to create a value set with a validation type of None.

How many validation Type does value set have?
There are several validation types that affect the way users enter and use segment or parameter values:

  • None (not validated at all)
    • Allow users to enter any value.
    • Only Format Validations will be done.
  • Independent
    • Provides a predefined list of values.
    • Independent values are stored in an Oracle Application Object Library table.
  • Dependent
    • Same like Independent Value Set, except the List of Values shown to you will depends on which the Independent value you have selected in the Prior Segment.
    • Must define your independent value set before you define the dependent value set that depends on it.
    • Advisable to create your independent values first.
    • Must create at least one dependent value for each independent value, or else it wont allow you to enter into that segment or field.
  • Table
    • It use your own application tables as value sets for flex field segments and report parameters instead of the special values tables which Oracle Applications provides.
    • You can also use validation tables with other special arguments to make your segments depend on profile options or field values.
    • You can use any existing application table, view, or synonym as a validation table.
    • If we are using non registered table for your value set, then we have to Create the necessary grants and synonyms to APPS Schema.
    • The value column and the defined ID column in the table must return a unique row for a given value or ID.
    • If the Hidden Id column is provided the value passed to the report will be Hidden and not the Value column.
    • Similarly, when you specify :$FLEX$.Value_Set_Name, your flex field segment or report parameter defaults to always use the hidden ID column to compare with your WHERE clause .
    • We can use Special BIND variable such as :$PROFILES$.Option_name, :$FLEX$.Value_set_name, :block.field in the WHERE clause.
  • Special
    • Special validation value sets allow you to call key flex field user exits to validate a flex field segment or report parameter using a flex field within a flex field mechanism. You can call flex field routines and use a complete flex field as the value passed by this value set.
  • Pair
    • Pair validation value set allows user to pass a range of concatenated Flex field segments as parameters to a report.
  • Translatable Independent & Translatable Dependent
    • These value sets are similar to Independent and Dependent value sets except that translated values can be displayed to the user. Translatable Independent and Translatable Dependent value sets allow you to use hidden values and displayed (translated) values in your value sets. In this way your users can see a value in their preferred languages, yet the values will be validated against a hidden value that is not translated.
    • We can convert the Independent value set to a Translatable Independent value set, or a Dependent value set to a Translatable Dependent value set. These are the only types of conversions allowed.

Which Oracle table store Value sets and underline information?

  • FND_FLEX_VALUE_HIERARCHIES
  • FND_FLEX_VALUE_SETS
  • FND_ID_FLEX_SEGMENTS
  • FND_FLEX_VALUE_NORM_HIERARCHY
  • FND_FLEX_HIERARCHIES
  • FND_FLEX_VALUE
  • FND_FLEX_VALIDATION_EVENTS
  • FND_FLEX_VALUE_RULE_LINES
  • FND_FLEX_VALUE_RULE
  • FND_FLEX_VALUE_RULE_USAGE
  • FND_RESPONSIBLITY
  • FND_TABLES
  • FND_FLEX_VALIDATION_TABLES

Any method to upload flexfield value?
Yes, FNDLOAD is utility which can be used for moving value set across different environment.
Do we have any restriction on value set?
Yes, here are some listed one:

  • Table Validated Value Sets
    • We cannot use table-validated id value sets for any accounting flexfield or any other key flexfields.
    • We cannot use :$FLEX$, :$PROFILES$ in table name, value and id of table validated value sets.
    • We cannot use DISTINCT clause in any of the column fields or in the WHERE clause of a table validate value set.
    • In an id value set, the value can be non-unique but id should be unique. In a non-id value set, value should be unique.
    • We can only use columns selected for the table-validated value set must be of type NUMBER, DATE or VARCHAR2.
    • Support for SQL expression in columns of Table Validated value sets will be obsolete in future release.
  • Translatable Independent and Translatable Dependent Valuesets
    • The Numbers Only and Uppercase Only option cannot be used.
    • Must have “Char” format type.
  • Special/Pair valuesets
    • Special/Pair value sets are user-exit value sets . PL/SQL APIs will not be able to validate them.

Lets now define a simple value set in R12:
Step 1: Go to Application Developer, and select menu /Validation/Set
Create a value set name as COUNTRY_LIST which will contain a list of countries. Make it an independent value set. Format type is CHAR. Save the work.

Step 2: Go to Application Developer, and select menu /Validation/Values
The below window will appear. Put the Search Name as COUNTRY_LIST and click Find.

Step 3: Enter the country details in this window. Save the work.

Now the value set is ready to be used in any concurrent program.

This tutorial will tell you the basic steps to create a Hello Word Page in OA Framework.
Earlier Posts:

Step 1: Start JDeveloper. Create a New OA Workspace and Empty OA Project with the New…Dialog

Step 2: Create the OA Component Page

JDeveloper creates your top-level page layout region for you automatically when you create your page.

Step 3: Modify the Page Layout (Top-level) Region

  • Set the ID property to PageLayoutRN.
  • Verify that the Region Style property is set to pageLayout.
  • Verify that the Form property is set to True.
  • Verify that the Auto Footer property is set to True.
  • Set the Window Title property to <your name>: Hello World Window Title. This becomes the window title for the page.
  • Set the Title property to <your name>: Hello World Page Header.
  • Set the AM Definition property to oracle.apps.fnd.framework.server.OAApplicationModule (you will have to type in the value). This is a generic application module supplied by the OA Framework.

Step 4: Create the Second Region (Main Content Region)

Create your second region under the page layout region by selecting the page layout region in the Structure window and choosing New > Region from the context menu.
  • Replace the default value in the ID property with MainRN.
  • Set the Region Style property to messageComponentLayout (this provides an indented single- or multiple-column layout for the child items of the region).

Step 5: Create the First Item (Empty Field)

Create your first item under the second region (main content region) by selecting the second region in the Structure window and choosing New > messageTextInput from the context menu. This item will take any name as parameter.
  • Set the ID property to HelloName.
  • Verify that your Item Style property is set to messageTextInput (this style provides a text label and an input field).
  • Set the Prompt property to Name.
  • Set the Visual Length to 20.
  • Set the Data Maximum Length to 50.

Step 6: Create a Container Region for the Go Button

To add a non-message-type bean such as a submitButton to a messageComponentLayout region, you must first add the bean to a messageLayout region.
Select the messageComponentLayout region and select New > messageLayout.
Name this region ButtonLayout.

Step 7: Create the Second Item (Go Button)

Create your Go button item by selecting the messageLayout region, ButtonLayout, in the Structure window and choosing New > Item from the context menu.
Set the following properties for your button item:
  • Set the value of the ID property to Go.
  • Set the Item Style property to submitButton.
  • Set the Attribute Set property to /oracle/apps/fnd/attributesets/Buttons/Go.

Step 8: Save Your Work (Save-All)

Step 9: Run Your Page Using the Run Option

You can try out your page using the Run option on the context menu. If you are using a database other than what you already have in your project settings, you will need to modify the Runtime Connection project settings by selection your project file and choosing Project Properties… from the main menu. Specifically, you must use a combination of Username, Password, (Responsibility) Application Short Name and Responsibility Key that is valid for your database to enable your session to log in.
The output will be like:
Here the Go Button has no functionality. Now to add some functionality to this Button, we need to add a Controller.

Step 10: Add a Controller

Add a controller to display a message when the user clicks on the Go button. Select your second region (MainRN) and choose Set New Controller… from the context menu.

Step 11: Edit Your Controller

When you create a controller .java file will be automatically created and it will contain below 2 methods.
  • public void processRequest(OAPageContext pageContext, OAWebBean webBean) { }
  • public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { }
Now you need to add the below code in the java file to add the required functionality.
  • Add the following line as the last line of the import section to make the OA Framework OAException routines available:
import oracle.apps.fnd.framework.OAException;

  • Add the below code in processFormRequest method

if (pageContext.getParameter("Go") != null)
{
String userContent = pageContext.getParameter("HelloName");
String message = "Hello, " + userContent + "!";
throw new OAException(message, OAException.INFORMATION);
}

Step 12: Build Your Controller

Build your controller by selecting Rebuild from the context menu within the code editor window.

Step 13: Test Your Work Using the Run Option

Save your work, and then test it using the Run option. Type something into your field and then click the Go button. You should see the page with an informational message that contains what you typed into the field, as shown:
Congratulations…! You have created your first OA Page. I will try to put articles on how to create search, create and update page in OAF in future. 

If you want to do some OAF Development in JDeveloper for the first time, you will need to do the following things.
1] Download JDeveloper Patch
Based on your instance release level, check out the version of JDeveloper to use using below link.
You can identify the OA Framework version in your instance by activating diagnostics and click the “About This Page” from any OAF page. Click the “Technology Components” tab. The OA Framework version in the top row of the table can then be matched to the JDeveloper Patch.
Download the JDeveloper Patch.
2] Extract the JDeveloper patch in a directory say D:DevSuiteHome_1jdev
The patch actually contains below three directories
  • jdevbin – Includes an extended version of the Oracle JDeveloper 10executable and OA Framework class libraries.
  • jdevhome – Includes the OA Framework Toolbox Tutorial source and developer working area.
  • jdevdoc – Contains documentation.
3] Define an environment variable
Define an environment variable JDEV_USER_HOME for your local machine. This has to be set to jdevhomejdev directory. In above example it has to be D:DevSuiteHome_1jdevjdevhomejdev.
My Computer  Properties  Advanced tab  Environment Variables  New
Variable: JDEV_USER_HOME
Value: D:DevSuiteHome_1jdevjdevhomejdev
4] Extract Tutorial.zip
Extract D:DevSuiteHome_1jdev jdevbinTutorial.zip into D:DevSuiteHome_1jdev jdevhome.
It will create following directories
D:DevSuiteHome_1jdev jdevhomejdevmyhtml
D:DevSuiteHome_1jdev jdevhomejdevmyprojects
5] Get the DBC file
Obtain the FND database connection (.dbc) file from the system administrator who installed the OA Framework database where you want to do your development.
For the instance to use, you can get the .dbc file from $FND_SECURE and put it in <JDEV_USER_HOME>dbc_filessecure i.e. D:DevSuiteHome_1jdevjdevhomejdev dbc_filessecure
6] Creating a Desktop Shortcut to JDeveloper
To facilitate launching JDeveloper, create a desktop shortcut to jdevbinjdevbinjdevw.exe.
7] Configuring the Environment Encoding of JDeveloper
Confirm the environment encoding of your JDeveloper if it is appropriately set.
Go to Tools – Preferences – Environment – Encoding
If Encoding is not set to “UTF-8″, set it to “UTF-8″.
The initial setup is now complete!….Now you are ready to develop your first OAF page. For more information you can refer OAF Developer’s Guide.

Although Discoverer provides many functions for calculation in reports, sometime we require to use custom PL/SQL functions to meet additional Discoverer end user requirements (for example, to provide a complicated calculation). For this we first need to create the functions in database through Toad or other PL/SQL editors.
To access custom PL/SQL functions using Discoverer, you must register the functions in the EUL. When you have registered a custom PL/SQL function, it appears in the list of database functions in the “Edit Calculation dialog” and can be used in the same way as the standard Oracle functions.
Note: To register a PL/SQL function you must have EXECUTE privilege on that function.
You can register custom PL/SQL functions in two ways:
  •  Import automatically, by importing the functions (recommended)
  •  Manually

How to register custom PL/SQL functions automatically:

To register PL/SQL functions automatically you must import them in the following way:
 1. Choose Tools | Register PL/SQL Functions to display the “PL/SQL Functions dialog: Functions tab”.
  
 2. Click Import to display the “Import PL/SQL Functions dialog”. This dialog enables you to select the PL/SQL functions that you want to import.

 
3. Select the functions that you want to import. You can select more than one function at a time by holding down the Ctrl key and clicking another function.
 
4. Click OK.
Discoverer imports the selected functions and displays the function details in the “PL/SQL Functions dialog: Functions tab”. Information about the selected functions is imported automatically. In other words, you do not have to manually enter information or validate the information.
 
5. Click OK.
The PL/SQL function is now registered for use in Discoverer.

How to register custom PL/SQL functions manually:

To manually register a PL/SQL function for use in Discoverer:
1. Choose Tools | Register PL/SQL Functions to display the “PL/SQL Functions dialog: Functions tab”.
2. Click New and specify the function attributes.
 
3. Click Validate to check the validity and accuracy of the information you have entered.
4. If the function is invalid, correct the attributes and click Validate again.
5. (Optional) if the function accepts arguments:
a. Display the “PL/SQL Functions dialog: Arguments tab”.
b. On the Arguments tab, click New and specify the argument attributes.
 
6. Click OK when you have finished defining the function.
The custom PL/SQL function is now registered for use in Discoverer.
It is always recommended to register PL/SQL functions by importing automatically (especially if you have many functions to register), because it is easy to make mistakes when manually entering information about functions. When you import functions, all of the information about each function (for example, names, database links, return types, lists of arguments) is imported.