Most of the Oracle application screens come with a facility to expand the space to capture custom fields. This facility of adding new custom fields (without any programming) is called DFF or Descriptive Flex Fields. The advantage of DFF is that around 15 new custom fields can be captured on each of the database table based block or form without doing any programming. The availability of facility of DFF on a screen is shown by square bracket [ ] and is shown below in figure 1.
For
using a DFF facility on a standard screen, it has to be activated
first. The activation is done by system administrator responsibility and
it includes deciding number of fields to be used, window title of the
fields, valid values of the fields, context etc. Once activated, the DFF
field is immediately available for use. It can be used by clicking on
the [ ] field which pops up a screen to capture the enabled fields.
DFF Features
DFF
is directly mapped to a table and each segment of DFF is mapped to an
individual field of the table. These fields are often named as
ATTRIBUTE1, ATTRIBUTE2, …, ATTRIBUTE15 (most of the time, we have
maximum of 15 attribute fields available in each standard table). In
addition to these 15 attribute fields, there is also one field called
ATTRIBUTE_CATEGORY. This field is called Context field or Structure
Field. How the structure field is used is explained below:
Some
time there is a requirement to capture context sensitive information in
DFF fields. Suppose in HR form, we want to capture some custom
information. If we are entering record for an Employee, we want to
capture certain information; on the other hand, if we are entering
record for an Applicant, then we want to capture some other custom
information. This can be achieved by defining different contexts. In the
example, just given, we can define two contexts, Employee and
Applicant. Depending upon what context is chosen, we will show the
corresponding fields to the users for entry.
Uses
DFF
is a very powerful feature of oracle applications which provides lot of
extensibility to an implementation. Since Oracle Applications is
implemented across diverse businesses and each business may need
different kind of information to be captured (in addition to the
standard information capturing which oracle provides), DFF comes in very
handy to capture the custom information. Fields captured by DFF are
stored in the database and are automatically queried whenever
corresponding record is queried on the screen.
Examples
- A business ABC wants to capture additional supplier attributes like supplier turnover, supplier’s rating etc. These fields are not captured by standard oracle application screen and can be captured by activating DFF on supplier screen.
- A leasing company wants to capture maximum mileage allowed and mileage penalty imposed for extra miles for the trucks it leases. These fields are not provided in the standard oracle applications and can be captured by activating DFF on lease authoring screen.
How to enable DFF
Enabling
a DFF can be best illustrated by an example. We will take GL Daily Rate
Screen (Navigation: GL Super User => Setup => Rates => Daily)
for this discussion.
The screen is shown below. The screen has the DFF facility available but is not active currently.
We want to enable this DFF to capture two more fields:
Exchange Rate Source
Exchange Rate Time
- First step is to find out the corresponding table name for this screen. This can be found by querying the record and then going to Help => Diagnostics => Examine and checking the Last Query field in the System Block. This will provide us with the table name underlying the data. In this example, our table name is GL_DAILY_RATES.
- Now go to Application Developer Responsibility and Navigate to Flexfield => Descriptive => Register. Now do a query based on this table name (GL_DAILY_RATES).
We note down the Title (which is Daily Rates).
- Now, we know the title of the standard DFF available for the Daily Rate screen. This DFF needs to be now enabled. For doing this navigate to FlexField=>Descriptive=>Segments screen and do a query based on the DFF title (Daily Rates).
Global
Data Elements context is always pre-populated. If we do not want any
context, then we can just click on segments button and define the
required segments. However, if we need to define different contexts,
then those context can be entered here and the corresponding segments
can be entered for each of chosen contexts.
- Click on the Segments button, and enter the values as shown below. We can associate value-set for each segment so that users can enter only valid values when entering a record.
- Save the changes and come back to the previous screen. Click on Freeze Flexfield definition check-box and save the changes.
- Now, we are done with activating the DFF. Come back to the Daily Rate Screen and see that DFF is enabled and can be used to capture two new fields as shown below:
Defining a new DFF
DFF
is implemented using the Attribute column fields in a table. For
example, let us consider definition of a table GL_DAILY_RATES.
SQL> desc gl_daily_rates
Name Null? Type
------------------------------- -------- ----
FROM_CURRENCY NOT NULL VARCHAR2(15)
TO_CURRENCY NOT NULL VARCHAR2(15)
CONVERSION_DATE NOT NULL DATE
CONVERSION_TYPE NOT NULL VARCHAR2(30)
CONVERSION_RATE NOT NULL NUMBER
STATUS_CODE NOT NULL VARCHAR2(1)
CREATION_DATE NOT NULL DATE
CREATED_BY NOT NULL NUMBER(15)
LAST_UPDATE_DATE NOT NULL DATE
LAST_UPDATED_BY NOT NULL NUMBER(15)
LAST_UPDATE_LOGIN NOT NULL NUMBER(15)
CONTEXT VARCHAR2(150)
ATTRIBUTE1 VARCHAR2(150)
ATTRIBUTE2 VARCHAR2(150)
ATTRIBUTE3 VARCHAR2(150)
ATTRIBUTE4 VARCHAR2(150)
ATTRIBUTE5 VARCHAR2(150)
ATTRIBUTE6 VARCHAR2(150)
ATTRIBUTE7 VARCHAR2(150)
ATTRIBUTE8 VARCHAR2(150)
ATTRIBUTE9 VARCHAR2(150)
ATTRIBUTE10 VARCHAR2(150)
ATTRIBUTE11 VARCHAR2(150)
ATTRIBUTE12 VARCHAR2(150)
ATTRIBUTE13 VARCHAR2(150)
ATTRIBUTE14 VARCHAR2(150)
ATTRIBUTE15 VARCHAR2(150)
RATE_SOURCE_CODE VARCHAR2(15)
This
table contains a field called CONTEXT and 15 Attribute columns. The
Context field stores the structure or content of the DFF and attribute
columns store the actual values of the custom fields.
When
we create a DFF definition (as shown below), we choose a Structure
Column (CONTEXT in the below example) and also choose a prompt for the
Context.
The
fields to be used in the DFF design can be associated by clicking on
the Columns button and checking the enabled button as shown below:
There is also a button called Reference Fields, which is used for defining the reference fields for DFF as shown below:
Reference fields are useful for automatically prompting user to enter required values. This can be explained by an example:
Suppose
a manufacturing firm sells three kinds of items – Computer, Printers
and Fax Machines. Depending upon the item type, we would like to capture
different kind of custom information from the user. If ‘item type’ is a
reference field in the DFF definition, then we can choose ‘item type’
in the reference field during DFF enabling. For each item type, we can
define a context field (Computer, Printers, Fax Machines) and the
corresponding segments. When user enters item information, depending
upon the item type, the corresponding DFF structure appears
automatically.
FAQ on DFF
- Can we create a custom DFF?
Ans. Yes, we can create a custom DFF. But the table to be used in the DFF should be registered with Oracle Applications.
- How do we use a custom DFF?
Ans. Custom DFF can be used only in a custom form. For details on how to use a custom DFF in custom form, please see Oracle Forms section.
- What is meant by Global Context?
Ans.
When we need to capture same kind of information for all the records,
then global context can be used. In this case, for all the records, the
same structure appears for data entry.
- How do we use different Attribute columns during DFF activation?
Ans.
If we are using two different contexts (say Printer and Fax) and not
using Global Context, then we can re-use the attribute columns. That
means, an attribute column associated with Printer context can also be
associated with the Fax context. However, if we are using global context
also, then the attributes used in global context cannot be re-used for
any other context. For example, if we are using Attribute1 to Attribute3
in the global context, then we can use only Attribute4 to Attribute15
in the other contexts.
- What is the Difference between Reference Field and Context?
Ans:
When we use multiple contexts, user has to manually select a context
when entering values. Based on the context chosen, corresponding fields
are shown to the user. However, when we use a reference field, a context
is automatically defaulted to the user (which cannot be changed). A
reference field is one of the fields from the same table.
- How do we use Reference Field?
Ans:
Reference field is defined during the DFF definition. Reference field
is one of the fields from the same table. Usually, reference field
chosen should be quite selective. For example, a field having 500
distinct value is not a good reference field. However, a field having
around 10 distinct values or less can be a good reference field. When
reference field is used in the DFF activation, we need to define
structure for each of the unique value of the reference field. Once
defined properly, based on the reference field, a DFF structure is
automatically displayed to the user during data entry.
No comments:
Post a Comment