Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

CONFIGURING / CREATING

DESCRIPTIVE FLEXFIELD
Posted January 30th, 2012 by  faisal   &  filed under  FlexFields .
Descriptive FlexField:

In this post I am going to Answer following Questions. But the Major topic is regarding Configuring  a DFF in Oracle Apps /
EBS .

Q: How to Create / Configure  Descriptive Flexfield.

Q: How to configure Descriptive flexfield for Purchase Order Header.

Q: What is DFF where is it over the Form.

Q: Which Profile use to Automatically Open DFF when navigate to [ ]

Q: How to find out DFF name and Application.

Q: How to find out underlying Tables of a View.  or How to find out objects used by a View.

Q: Is there any way to determine what the underlying tables are in a view from within a stored procedure?

Q: How to find of Tables used by PO_HEADERS_V in Oracle Apps.

 The presence of a descriptive Flexfield on a form is indicated by brackets [ ].  Whenever you see this, there is
a descriptive flexfield defined for use with that form.

 In some cases there may be multiple descriptive flexfields associated with the same form.

Note:    To Open Descriptive Flexfield automatically when you navigate to brackets, you can use the “Open Descr Window”
profile option.   How to set Profile option please refer following link.

Profile Options in Oracle Apps / EBS


 

Crating  Descriptive  Flexfield:

1)   Most important thing to know that you are not going to create new field in database. Basically You are going to configure
DFFs already provided by Oracle, The descriptive flexfield columns are usually named ATTRIBUTEn where n is a number.
For example, if you want to configure a descriptive flexfield on an Purchase Order (Header) form and want to associate it with
Attribute1

First of all  we need to know the Title of DFF which need to configure.  Follow the following steps.

1)  Find out the Table Name used for PO Header. Navigate to Help –> Record History and copy the table name as shown in
image bellow.

2) Now in my case PO_HEADERS_V is not a table, its a view.  We need to find out underline Table Name of this view. You can
use following query to find out the table name. Use Toad, Pl-SQL Developer or SPL Plus.

select name , type , referenced_name , referenced_type

from user_dependencies

where name = ‘PO_HEADERS_V’

and ( type = ‘VIEW’ or referenced_type = ‘TABLE’)


3) Now in this particular case “PO_HEADERS_V” again consists on views.  You can see the “PO_HEADERS” View in above
query result.  Now query again but change ”PO_HEADERS_V” with ”PO_HEADERS” in where clause like following.

select name , type , referenced_name , referenced_type

from user_dependencies

where name = ‘PO_HEADERS’

and (type = ‘VIEW’ or referenced_type = ‘TABLE’)

Now in result you can see  Table Name “ PO_HEADERS_ALL”


 

4)  Once having noted down the table, Try to find the Title of the DFF for that Table. We go to Flexfield/Register in Application
Developer Responsibility as shown in figure bellow.

Now note down the Application and Title of DFF.

5)  Now navigate to Segments and Query  entering Application Name = Purchasing and Title = “PO Headers” as shown bellow.
Before you being configure the DFF make sure to uncheck “Freeze Flexfield Definition” Check Box.

6)   Now click on the Segments, here you can define segments or cells.
7)  You can attach LOV/ List by Pressing Value Set Button.
8) Once you finalize the changes, you will be prompted to Freeze the DFF definition. Click on OK

9)  Now navigate to Purchase Order Screen and click on [ ] in header. You can see DFF as configured.
DFF are used to capture the additional or extra Business information of the organization. You use descriptive flexfields to collect information
beyond what is collected by Oracle Applications.

A descriptive flexfield appears on a form as a double-character field enclosed by brackets. All DFF columns are defined as Attribute
Columns. Descriptive flexfields store their data in columns called ATTRIBUTEn, where n is a number. In some cases there may be multiple
descriptive flexfields for use with the same form. There are around 5000+ DFF available with the package.

DFF have two different types of Segments

1. Global DFF: Displays information common to all contexts.


2. Context Sensitive DFF: Displays information appropriate only to a particular context.

Steps to find the Title and Application of DFF:


1. Click on a field in the same form in which the descriptive flexfield appears.

2. Select Help->Diagnostics->Examine. This opens a window showing information on the selected field. Note the name of the block in which
the field is located.

(Field should be “DESC_FLEX”)

3. Click the Block list of values button to display a list of the available blocks for this form and select “$DESCRIPTIVE_FLEXFIELD$“
4. Click on the the Field list of values button.Each entry is prefixed by the name of the block in which the descriptive flexfield appears. Find
the entries for the block whose name you determined in step 2.

Field value will be like “Block Name.Field”, Eg: DAILY_RATE_TYPE.DESC_FLEX

5. Value in the value field indicates the DFF Application and Title.In above example,General Ledger is the Application and Daily Rates is
the Title.

Note=> To remove the Diagnostics Password Screen, set “Utilities:Diagnostics” profile value to Yes at user level

Steps to Register DFF:


1. Navigate to Application Developer Responsibility-> Flexfield-> Descriptive -> Register and query the Title and Application.

2. You can change the Context Prompt to a meaningful name if needed. Also Can enabled any columns in additional to attribute columns if
needed by clicking “Column” button.Then save.

Use Column window to specify the columns your descriptive flexfield can use as segment columns.

Steps to Define DFF:


1. Navigate to System Administrator Responsibility->Application->Flexfield-> Descriptive-> Segments & query the application and title.
2. Enable the Required and Displayed check-box of Context field. Then add the context field values and enter the segment details for Global
Data Elements and other context field values. Also enable the Displayed, Enabled & Required check-boxes of Context field value segments
accordingly.

If you have any context-sensitive segments for your flexfield, you should always check the Displayed check box if you do not specify either a
default value or a reference field.

Global segment =>Displays information common to all contexts.

Context-sensitive segment =>Displays information appropriate only to a particular context.

With a combination of global and context-sensitive segments,all the global segments and a context prompt appears when the user opens the
flexfield. Once the user chooses a context, the appropriate context-sensitive segments are added to the already visible global segments.

As per our DFF, the global data segment “Store” and the context field prompt “Payment Type?” will be displayed when the user opens the
flexfield. The “Payment Type?” prompt will list the context field values other than global data segment.That is Check,Credit Card and
Finance.Once the user selects a context field value, the appropriate segment of that  context field value will be added to the already visible
global segments.
5. Then Freeze the flexfield and compile it.

Now if you navigate to the Conversion Rate Type window and click on the DFF, you can see the global data segment “Store” and the context
field prompt “Payment Type?”.If you select Payment type as “Check” then Check context field segment will be displayed along with “Store”
and “Payment Type?” fields. Similarly for “Credit Card” and “Finance”.
Steps to Register and Define Reference field based DFF
Context Field=> A field created in the descriptive flexfield structure that is used to allow the user to manually select different contexts.

Reference Field=> A field on the existing form whose value is used to automatically distinguish between contexts.

We are going to create a DFF in Asset Workbench form with reference to the Category field in the same form.

1. Click on the Category field and navigate to Diagnostics->Examine form to get the field name.

2. Get the Application and title details of the DFF by navigating to  Diagnostics-> Examine

3. Navigate to Application Developer Responsibility-> Flexfield-> Descriptive -> Register and query the Title and Application.Add the field
name which we got from step 1 as reference field after clicking the “Reference Fields” button.
Also enable the columns your descriptive flexfield can use as segment columns by clicking the “Column” button, if any.

4. Navigate to System Administrator Responsibility->Application->Flexfield-> Descriptive-> Segments and query the application and
title.Enter the reference field value and enable the “Synchronize with Reference Field” option.

Also add context field values and their segment values.In our example the context field values are the Category Codes.

Below screenshot shows the segment values of some context fields.


5. Then Freeze the flexfield and compile.

Now navigate to the Assets Workbench form.After selecting the Category, click on the DFF to enter additional details.

======================================================
Oracle applications - Key Flex Field Structures & Table Details.
Here is some of quite commonly used AOL FND (Foundation) tables and their usage. There are many other tables also in FND but
here i am putting only few commonly used tables. for other table if needed we can dig further.

FND_ID_FLEXS stores registration information about key flexfields. Each row includes the four–character code that identifies the
key flexfield, the title of the flexfield (by which a user identifies theflexfield), the name of the combinations table that contains the key
flexfield columns, and the name of the structure defining (MultiFlex) column for the flexfield (SET_DEFINING_COLUMN_NAME).
Each row also contains values that identify the application that owns the combination table and the application that owns the key
flexfield, a table–type flag that specifies whether the combinations table is specificor generic (S or G), whether dynamic inserts are
feasible for the flexfield(Y or N), whether the key flexfield can use ID type value sets, and the name of the unique ID column in the
combinations table. You need one row for each key flexfield in each application. Oracle Application ObjectLibrary uses this
information to generate a compiled key flexfield definition

FND_ID_FLEX_SEGMENTS: FND_ID_FLEX_SEGMENTS stores setup information about keyflexfield segments, as well as the
correspondences between application table columns and the key flexfield segments the columns are used for. Each row includes a
flexfield application identifier, the flexfield code,which identifies the key flexfield, the structure number(ID_FLEX_NUM), the value set
application identifier, the segment number (the segment’s sequence in the flexfield window), the name of the column the segment
corresponds to (usually SEGMENTn, where n is an integer). Each row also includes the segment name, whether security is enabled
for the segment, whether the segment is required, whether the segment is one of a high, low segment pair, whether the segment is
displayed, whether the segment is enabled (Y or N), type of default value, display information about the segment such as prompts
and display size, and the value set the segment uses. Each row also includes a flag for whether the table column is indexed; this
value is normally Y. You need one row for each segment of each structure for each flexfield. Oracle Application Object Library uses
this information to generate a compiled key flexfield definition to store in the FND_COMPILED_ID_FLEXS table Thanks –
Shivmohan Purohit

FND_ID_FLEX_STRUCTURES : FND_ID_FLEX_STRUCTURES stores structure information about keyflexfields. Each row


includes the flexfield code and the structurenumber (ID_FLEX_NUM), which together identify the structure, and the name and
description of the structure. Each row also includes values that indicate whether the flexfield structure is currently frozen, whether
rollup groups are frozen (FREEZE_STRUCTURED_HIER_FLAG), whether users can dynamically insert new combinations of
segment values through the flexfield pop–up window, and whether the flexfield should use segment cross–validation rules. Each row
also contains information about shorthand flexfield entry for this structure, including whether shorthand entry is enabled, the prompt
for the shorthand window, and the length of the shorthand alias field in the shorthandwindow. You need one row for each structure
of each key flexfield. Oracle Application Object Library uses this information to generate acompiled key flexfield definition to store in
the FND_COMPILED_ID_FLEXS table

FND_FLEX_VALUES stores valid values for key and descriptive flexfield segments. Oracle Application Object Library uses this
table when users define values for independent or dependent type value sets. Oracle Application Object Library also uses this table
when users define parent values for ranges of child values that exist in a validation table(Oracle Application Object Library stores
the parent values in this table). Each row includes the value (FLEX_VALUE) and its hierarchy level if applicable as well as the
identifier of the value set the value belongs to. If the value is a dependent value, PARENT_FLEX_VALUE_LOW contains the
independent value this value depends upon. Oracle Application Object Library does not use the PARENT_FLEX_VALUE_HIGH
column. If ENABLED_FLAG contains N, this value is currently invalid, regardless of the start and end dates.

If ENABLED_FLAG contains Y, the start and end dates indicate if this value is currently valid.SUMMARY_FLAG indicates if this
value is a parent value that has child values, and STRUCTURED_HIERARCHY_LEVEL contains the rollup group the parent value
belongs to, if any (1 through 9). COMPILED_VALUE_ATTRIBUTES contains the compiled values of anysegment qualifiers assigned
to this value. These values are in a special Oracle Application Object Library format, and you should never modify them.

VALUE_CATEGORY and ATTRIBUTE1 through ATTRIBUTE50 are descriptive flexfield columns, where VALUE_CATEGORY is
the context (structure defining) column.
These descriptive flexfield columns do not contain values unless you have defined the descriptive flexfield at your site. You need
one row for each independent, dependent or parent value belonging to a value set.Oracle Application Object Library uses this
information to ensure that users enter valid values in flexfield segments

FND_FLEX_VALUE_HIERARCHIES stores information about child value ranges for key flexfield segment values. Each row
includes an identification of the parent value the range belongs to, as well as the low and high values that make up the range of
child values. FLEX_VALUE_SET_ID identifies the value set to which the parent value belongs. You need one row for each range of
child values (you can have more than one row for each parent value). Oracle Application Object Library provides this information for
applications reporting purposes.

SELECT 
B.APPLICATION_ID, B.ID_FLEX_CODE, B.ID_FLEX_NUM, 
B.ID_FLEX_STRUCTURE_CODE,
B.CONCATENATED_SEGMENT_DELIMITER, 
B.CROSS_SEGMENT_VALIDATION_FLAG, B.DYNAMIC_INSERTS_ALLOWED_FLAG, B.ENABLED_FLAG, 
B.FREEZE_FLEX_DEFINITION_FLAG, B.FREEZE_STRUCTURED_HIER_FLAG, B.SHORTHAND_ENABLED_FLAG, 
T.ID_FLEX_STRUCTURE_NAME, T.DESCRIPTION 
FROM FND_ID_FLEX_STRUCTURES_TL T, FND_ID_FLEX_STRUCTURES B 
WHERE B.APPLICATION_ID = T.APPLICATION_ID 
AND B.ID_FLEX_CODE = T.ID_FLEX_CODE 
AND B.ID_FLEX_NUM = T.ID_FLEX_NUM 
AND T.LANGUAGE = userenv(‘LANG’)
AND B.ENABLED_FLAG = ‘Y’
AND B.FREEZE_STRUCTURED_HIER_FLAG = ‘Y’
AND B.ID_FLEX_CODE = ‘GL#’
AND B.ID_FLEX_NUM = &&number
Here are some more SQLs to find the GL combinations structures:

SELECT s.FLEX_VALUE_SET_ID,s.FLEX_VALUE_SET_NAME, v.FLEX_VALUE, t.DESCRIPTION


FROM fnd_flex_values v,fnd_flex_value_sets s,fnd_flex_values_tl t 
WHERE FLEX_VALUE_SET_NAME LIKE ‘%&&Company_Department%’
AND s.FLEX_VALUE_SET_ID = v.FLEX_VALUE_SET_ID
AND t.FLEX_VALUE_ID = v.FLEX_VALUE_ID
ORDER BY FLEX_VALUE
SELECT s.FLEX_VALUE_SET_ID,s.FLEX_VALUE_SET_NAME, v.FLEX_VALUE, t.DESCRIPTION
FROM fnd_flex_values v,fnd_flex_value_sets s,fnd_flex_values_tl t 
WHERE FLEX_VALUE_SET_NAME LIKE ‘%&&Company_Account%’
AND s.FLEX_VALUE_SET_ID = v.FLEX_VALUE_SET_ID
AND t.FLEX_VALUE_ID = v.FLEX_VALUE_ID
ORDER BY FLEX_VALUE

SELECT s.FLEX_VALUE_SET_ID,s.FLEX_VALUE_SET_NAME, v.FLEX_VALUE, t.DESCRIPTION


FROM fnd_flex_values v,fnd_flex_value_sets s,fnd_flex_values_tl t 
WHERE FLEX_VALUE_SET_NAME LIKE ‘%&&Company_Future%’
AND s.FLEX_VALUE_SET_ID = v.FLEX_VALUE_SET_ID
AND t.FLEX_VALUE_ID = v.FLEX_VALUE_ID
ORDER BY FLEX_VALUE

SELECT s.FLEX_VALUE_SET_ID,s.FLEX_VALUE_SET_NAME, v.FLEX_VALUE, t.DESCRIPTION


FROM fnd_flex_values v,fnd_flex_value_sets s,fnd_flex_values_tl t 
WHERE FLEX_VALUE_SET_NAME LIKE ‘%&&Company_Location_FA%’
AND s.FLEX_VALUE_SET_ID = v.FLEX_VALUE_SET_ID
AND t.FLEX_VALUE_ID = v.FLEX_VALUE_ID
ORDER BY FLEX_VALUE

SELECT s.FLEX_VALUE_SET_ID,s.FLEX_VALUE_SET_NAME, v.FLEX_VALUE, t.DESCRIPTION


FROM fnd_flex_values v,fnd_flex_value_sets s,fnd_flex_values_tl t 
WHERE FLEX_VALUE_SET_NAME LIKE ‘%&&Company_Country_FA%’
AND s.FLEX_VALUE_SET_ID = v.FLEX_VALUE_SET_ID
AND t.FLEX_VALUE_ID = v.FLEX_VALUE_ID
ORDER BY FLEX_VALUE

SELECT s.FLEX_VALUE_SET_ID,s.FLEX_VALUE_SET_NAME, v.FLEX_VALUE, t.DESCRIPTION


FROM fnd_flex_values v,fnd_flex_value_sets s,fnd_flex_values_tl t 
WHERE FLEX_VALUE_SET_NAME LIKE ‘%&&Company_State_FA%’
AND s.FLEX_VALUE_SET_ID = v.FLEX_VALUE_SET_ID
AND t.FLEX_VALUE_ID = v.FLEX_VALUE_ID
ORDER BY FLEX_VALUE

SELECT s.FLEX_VALUE_SET_ID,s.FLEX_VALUE_SET_NAME, v.FLEX_VALUE, t.DESCRIPTION


FROM fnd_flex_values v,fnd_flex_value_sets s,fnd_flex_values_tl t 
WHERE FLEX_VALUE_SET_NAME LIKE ‘%&&Company_City_FA%’
AND s.FLEX_VALUE_SET_ID = v.FLEX_VALUE_SET_ID
AND t.FLEX_VALUE_ID = v.FLEX_VALUE_ID
ORDER BY FLEX_VALUE

SELECT *
FROM fnd_flex_value_sets a
,fnd_flex_values b 
WHERE a.flex_value_set_id = b.flex_value_set_id 
AND a.flex_value_set_name like 'YES_NO'

SELECT *
FROM fnd_flex_value_sets a
WHERE a.flex_value_set_name like 'YES_NO'

You might also like