A flexfield is a flexible data field that your organization can customize to your business needs without programming.
A flexfield is a field which is made up of subfields or segments.
A flexfield appears on your form as a popup window that contains a prompt for each segment. Each segment has a name and a set of valid values.
Also covers how to create custom Key Flexfield
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in Oracle Apps
1. Understanding Flex Fields with
Accounting Flexfields(Chart of Accounts)
Visit https://the-cool-fox.blogspot.com
2. What is Flex field?
A flexfield is a flexible data field that your organization can customize to your business needs without programming.
A flexfield is a field which is made up of sub–fields, or segments.
A flexfield appears on your form as a popup window that contains a prompt for each segment. Each segment has a name
and a set of valid values.
Visit https://the-cool-fox.blogspot.com
FlexField = Flexible Field
3. Example of Flex field
As we said, flexfield is a field made up of sub–fields, or segments. It essentially means that it is combination of other fields.
For example, if we take Full_Name as flexfield, then it will have the combination of other fields namely First_Name,
Middle_Name and Last_Name
Full_Name
Flex Field
First_Name Gurpreet
Middle_Name Singh
Last_Name Bhinder
Visit https://the-cool-fox.blogspot.com
4. Example of Flex field in Oracle Apps
Best example of FlexFields in Oracle Apps can be Chart Of Accounts in which we define accounting flexfields structures. A
chart of accounts is a listing of the names of the accounts that a company has identified and made available for recording
transactions in its general ledger. Suppose a company has different departments and accounts, and want to record
transactions as per this structure. So they can create their own accounting flexfields defining combination of like:
Company, Department, Accounts.
Visit https://the-cool-fox.blogspot.com
In this screenshot, we can see GL_Accounts screen.
If you start editing any account you will be presented
with “Chart of accounts” dialog, showing all the
segments ( like Company, Account, CostCentre etc.)
and their currently assigned values.
GL
Responsibility
Setup Accounts Combinations
Navigation
5. Types of Flex field
Key Flex Field (KFF) is a field you can customize to enter multi-segment values such as part numbers, account numbers,
and so on.
Descriptive Flex Field (DFF) is a field you customize to enter additional information for which your Oracle Applications
product has not already provided a field.
Visit https://the-cool-fox.blogspot.com
Flex Fields
Key Flex Fields (KFF)
Descriptive Flex Fields
(DFF)
6. Key Flex Field (KFF)
A key flexfield is a field made up of segments, where each segment has both a value and a meaning
A key flexfield is flexible enough to let you use any code scheme you want to describe an entity. When your organization
initially installs an Oracle Applications product, your organization's implementation team customizes all the key flexfields in
that product to use meaningful code segments to describe each key flexfield entity. Your organization decides for each key
flexfield, how many segments an entity has, what each segment means, what values each segment can have, and what each
segment value means. Your organization can also define rules that govern what combination of segment values are valid
(cross-validation rules), or define dependencies among the segments. The result is that your organization can use the
codes it needs rather than change its codes to meet someone else's requirements.
The Accounting Flexfield in your Oracle application is an example of a key flexfield that identifies a unique chart of
accounts. One organization may choose to customize the Accounting Flexfield to have three segments called Company,
Department, and Account, while another organization may choose to customize the flexfield to have six segments called
Company, Cost Center, Account, Product, Product Line, and Subaccount.
KFF are must to have fields. For example, to record financials transaction you must define accounting flexfields so that you
can record transactions to particular account.
Visit https://the-cool-fox.blogspot.com
7. Descriptive Flex Field (DFF)
Descriptive Flex Field (DFF) is a field you customize to enter additional information for which your Oracle Applications
product has not already provided a field.
A descriptive flexfield gives you room to expand your forms, since Oracle Applications cannot predict all the possible
information you may want to track. Your organization can use descriptive flexfields to capture additional information that
is important and unique to your business.
A descriptive flexfield appears in a block as a two character, unnamed field enclosed in square brackets [ ]
Descriptive flexfields have two different types of segments, global and context–sensitive.
A global segment is a segment that always appears in the descriptive flexfield pop–up window.
A context–sensitive segment is a segment that may or may not appear depending upon what other information is present
in your form.
Visit https://the-cool-fox.blogspot.com
8. KFF vs DFF
Visit https://the-cool-fox.blogspot.com
Key Flex Field (KFF) Descriptive Flex Field (DFF)
A key Flexfield is a ‘Key’ building block of a module and is
required for defining the structure of objects of that
module, e.g. account structure, item structure etc.
A descriptive Flexfield helps more in describing an object
(like a transaction or screen) more than the available fields
on that screen
Key Flexfield captures mandatory business information like
company department, account etc.
Descriptive Flexfield captures additional business
information like color of order item etc.
Key Flexfield is mandatory Descriptive Flexfield is optional
Key Flexfield is displayed like normal text item Descriptive Flexfield is displayed in square brackets [ ]
Key Flexfield’s data is stored in the segments Descriptive Flexfield’s data is stored in the attributes
Key Flexfield’s 30 Segment columns are reserved for Key
Flexfield’s data
Descriptive Flexfield’s 15 attribute columns are reserved
for Descriptive Flexfield’s data
9. Flex field SQLs
Visit https://the-cool-fox.blogspot.com
Flex field
Structure
Segments
Value Sets
Values
SELECT *
FROM fnd_id_flexs;
SELECT *
FROM fnd_id_flex_structures;
SELECT *
FROM fnd_id_flex_segments;
SELECT *
FROM fnd_flex_value_sets;
SELECT *
FROM fnd_flex_values;
10. Steps to create
Custom Key Flex
fields
Register a database table
Register database columns
Define Flex Fields
Define Value Sets
Define Flex field Structure
Define Segments
11. Register Table
To register the existing database table in oracle apps use the below procedure of AD_DD package
Visit https://the-cool-fox.blogspot.com
Parameter Name Description
p_appl_short_name Application Short Name
p_tab_name Table Name
p_tab_type Table Type (‘T’ - for enabling auto size or ‘S’ - for disabling auto size)
p_next_extent Size of secondary extents (in kilobytes); NULL for partitioned tables
p_pct_free Minimum percentage of free space in a block; NULL for partitioned tables
p_pct_used Minimum percentage of used space in a block; NULL for partitioned tables
12. Register Table
Visit https://the-cool-fox.blogspot.com
Table Type
Valid types are:
• Interim - Table is used only temporarily.
• Seed Data - Table stores primarily setup data.
• Special Flexfield Data - Table is used by flexfields.
• Transaction Data - Table stores primarily transaction data.
Initial Extent/Next Extent
The initial and next extent sizes in kilobytes for your table. Values must be greater than 0.
% Free/ % Used
A value between 1 and 100 per cent. A Percent Free value must exist such that the sum of the Percent Used field and the Percent Free
field is between 1 and 100.
Min Extents/ Max Extents
A value of 1 extent or more for the minimum extents value. The maximum extents value must be greater or equal to the minimum extents
value. A low value for maximum extents helps prevent fragmentation of your database table.
Auto Size
Indicates whether the table should be larger or smaller for different customers. If the Auto Size button is not checked, the table should
have the same size for all customers. In general, seed data tables should have AutoSize = No.
13. Important SQLs
Visit https://the-cool-fox.blogspot.com
Table type has values from TABLE_TYPE lookup:
SELECT lookup_type,
lookup_code,
meaning,
description
FROM fnd_lookup_values
WHERE lookup_type='TABLE_TYPE';
Check registered tables using:
SELECT application_id,
table_id,
table_name,
user_table_name,
table_type,
description
FROM fnd_tables
WHERE table_name='GL_CODE_COMBINATIONS';
14. Register Column
To register the table in oracle apps use the below procedure of AD_DD package
Visit https://the-cool-fox.blogspot.com
15. Register Column
Visit https://the-cool-fox.blogspot.com
Parameter Name Description
p_appl_short_name Application Short Name
p_tab_name Table Name
p_col_name Column Name
p_col_seq Column Sequence
p_col_type Column Data Type
p_col_width Column Size
p_nullable Is NULL values allowed flag
p_translate Is translate allowed flag
p_precision Precision
p_scale Scale
17. Important SQLs
Visit https://the-cool-fox.blogspot.com
Check columns of registered tables using:
SELECT column_sequence,
column_name,
user_column_name,
column_type,
width,
description,
precision,
scale
FROM fnd_columns
WHERE table_id=584
ORDER BY column_sequence;
20. Define Flex Fields
To register the key flexfield use the below form. As the below screenshot, shows you the Accounting Flexfield
Visit https://the-cool-fox.blogspot.com
Application Developer Flexfield Key Register
Navigation
21. Important SQLs
Visit https://the-cool-fox.blogspot.com
Below SQL statement shows important details about the Accounting Flexfield.
SELECT
a.application_id,
b.application_name,
a.id_flex_code,
a.id_flex_name,
a.description,
a.application_table_name,
a.unique_id_column_name,
a.set_defining_column_name,
a.concatenated_segs_view_name
FROM
fnd_id_flexs a,
fnd_application_tl b
WHERE
a.application_id=b.application_id
AND a.id_flex_code='GL#';
CHART_OF_ACCOUNTS_ID maps to ID_FLEX_NUM column of FND_ID_FLEX_SEGMENTS
22. Define Value Sets
Value sets are the list of values. You can assign value set to each of your segments to restrict that segment to choose
values that you have already defined.
Visit https://the-cool-fox.blogspot.com
Application Developer Application Validation Set
Navigation
23. Important SQLs
Visit https://the-cool-fox.blogspot.com
Below SQL statement shows values present in the value set
SELECT
a.flex_value_set_id,
a.flex_value_id,
a.flex_value,
b.flex_value_meaning,
a.enabled_flag
FROM
fnd_flex_values a,
fnd_flex_values_tl b
WHERE
a.flex_value_id=b.flex_value_id
AND flex_value_set_id ='1012802'
24. Important SQLs
Visit https://the-cool-fox.blogspot.com
Below SQL statement shows validation types available for value sets
SELECT lookup_type,
lookup_code,
meaning,
description
FROM fnd_lookup_values
WHERE lookup_type='SEG_VAL_TYPES';
25. Define Values
Use the following form to define the values
Visit https://the-cool-fox.blogspot.com
Application Developer Application Validation Values
Navigation
26. Important SQLs
Visit https://the-cool-fox.blogspot.com
Below SQL statement shows validation types available for value sets
SELECT lookup_type,
lookup_code,
meaning,
description
FROM fnd_lookup_values
WHERE lookup_type='SEG_VAL_TYPES';
27. Define Flex Value Structure
Use the following form to define the flex value structure. Here we have defined one structure (XXTL_UK_ACCOUNTS) for
accounting flexfield
Visit https://the-cool-fox.blogspot.com
Application Developer Flexfield Key Segments
Navigation
Click on Segments to define segments
28. Important SQLs
Visit https://the-cool-fox.blogspot.com
Below SQL statement shows details about the flex structure
SELECT
a.application_id,
a.id_flex_code,
a.id_flex_num, --chart of account id
a.id_flex_structure_code,
b.id_flex_structure_name,
b.description
FROM
fnd_id_flex_structures a,
fnd_id_flex_structures_tl b
WHERE
a.id_flex_num = b.id_flex_num
AND a.application_id = '101'
AND a.id_flex_code = 'GL#'
AND a.id_flex_num = '50309';
29. Define Segments
Use the following form to define the segments. You can see that we have assigned value sets to each segment
Visit https://the-cool-fox.blogspot.com
30. Important SQLs
Visit https://the-cool-fox.blogspot.com
Below SQL statement shows details about the flex segments
SELECT
a.application_id,
a.id_flex_code,
a.id_flex_num,
a.application_column_name,
a.segment_name,
a.segment_num,
a.flex_value_set_id,
b.description
FROM
fnd_id_flex_segments a,
fnd_id_flex_segments_tl b
WHERE
a.id_flex_num = b.id_flex_num AND
a.application_column_name = b.application_column_name
AND a.application_id = '101'
AND a.id_flex_code = 'GL#'
AND a.id_flex_num = '50309';