Defining Key Flexfields PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

Lesson Topics

At the end of this lesson, you should be able to:


• Explain intelligent keys and provide examples
• Identify key flexfields that are required by Oracle Applications
• Explain the purpose of flexfield qualifiers and optional key flexfield features
• Design a key flexfield structure
• Define the key flexfield structure and segment attributes
• Define flexfield qualifiers and segment qualifiers
• Implement optional features as needed

<Course name> <Lesson number>-1


Lesson Overview
Key flexfields create unique identifiers for use internally by Oracle Applications. The
combinations of values for the segments of a key flexfield identify entities. These code
combinations are used throughout Oracle Applications.
Depending on which key flexfield you are defining, you might need to specify flexfield
qualifiers and segment qualifiers. There are also several optional features of key flexfields
you may wish to implement.
Finally, this lesson covers the mechanics of the definition process.

<Course name> <Lesson number>-2


Building Intelligent Keys for Oracle Applications
Intelligent keys are multipart key values in which each part of the key contains meaningful
information. You use key flexfields to build the intelligent keys required by Oracle
Applications.
Because key flexfields are integrated with the internal processing of Oracle Applications,
there are more requirements for the structure and content of key flexfields than was the
case with descriptive flexfields.

<Course name> <Lesson number>-3


Requirements for Key Flexfields
Key flexfields have a dual purpose. They must collect information required by Oracle
Applications and still allow for user customization.

Provide Required Information


• Provide information needed for reports and processing. For some applications,
particular items of information must be identified within the flexfield. For example,
Oracle General Ledger requires the balancing segment of the Accounting Flexfield.
• Build unique IDs for use by the applications while giving users meaningful codes.

Provide Customization Capability


• Tailor the flexfield to the company’s business practice instead of changing the
practice to fit the flexfield.
• Retain the information the company already keeps.

<Course name> <Lesson number>-4


Key Flexfields Used by Oracle Applications
The slide shows the key flexfields used by Oracle Applications. The number of key
flexfields is significantly smaller than the number of descriptive flexfields.

<Course name> <Lesson number>-5


Implementing Key Flexfields: Procedure
The slide shows the steps involved in implementing a key flexfield. The first two steps are
covered in this lesson. The remaining steps are covered in the remainder of the course.

<Course name> <Lesson number>-6


Key Flexfield Structures
Although it is possible for a key flexfield to use multiple structures, it is much less typical
than with descriptive flexfields. Most key flexfields use only one structure. However, key
flexfields still allow the user to control the structure of the flexfield. For example, the slide
shows two different accounting flexfield structures defined by two different businesses.
Each business defines an accounting flexfield that reflects its operating structure
While in many cases the user has control over which descriptive flexfield structure is used,
with key flexfields the application usually determines the correct structure with which to
function. For example, Oracle General Ledger determines which accounting flexfield
structure to use from the profile option Set of Books.

<Course name> <Lesson number>-7


Key Flexfield Code Combinations
Key flexfields typically consist of several segments. The values provided by these
segments make up the code combinations that function as intelligent keys for use by
Oracle Applications.

<Course name> <Lesson number>-8


Storing Code Combinations
Each flexfield stores its code combinations in a database table called a code combinations
table. In the combinations table, there is one column for every key flexfield segment.
These columns are usually named SEGMENTn, where n is a number. There is a set
number of SEGMENT columns available for each key flexfield. You assign a key flexfield
segment to a particular SEGMENT column when you define the key flexfield.
Each row in the combinations table (that is, each unique combination of segment values) is
identified by a unique ID value stored in a unique ID column. This column functions as the
primary key for the combinations table. For key flexfields that have multiple structures,
there is also a structure ID column.

<Course name> <Lesson number>-9


Key Flexfield Application Tables
This SQL*Plus query can be used to show Oracle Applications key flexfields and the
tables in which they store their code combinations.
ID_FLEX_NAME APPLICATION_TABLE_NAME
--------------------------- -----------------------
Accounting Flexfield GL_CODE_COMBINATIONS
Category Flexfield FA_CATEGORIES_B
Asset Key Flexfield FA_ASSET_KEYWORDS
Location Flexfield FA_LOCATIONS
Oracle Service Item Flexfield MTL_SYSTEM_ITEMS_B
Territory Flexfield RA_TERRITORIES
Sales Tax Location Flexfield AR_LOCATION_COMBINATIONS
Item Categories MTL_CATEGORIES_B
Account Aliases MTL_GENERIC_DISPOSITIONS
Item Catalogs MTL_ITEM_CATALOG_GROUPS
Sales Orders MTL_SALES_ORDERS
System Items <Course name> <Lesson number>-10
MTL_SYSTEM_ITEMS_B
Stock Locators MTL_ITEM_LOCATIONS
Key Flexfield Qualifiers
Both descriptive flexfields and key flexfields allow the user to design the flexfield
structures and their segments. With descriptive flexfields, neither the information gathered
nor the way the information is structured is used internally by Oracle Applications. Key
flexfields, however, are different.
Oracle Applications use certain pieces of information collected by some key flexfield
segments internally. For example, Oracle General Ledger needs to know which segment in
the Accounting flexfield to use for balancing operations. But since the location of the
balancing segment in the accounting flexfield can be customized, the application must
have a way of locating the segment it needs within any accounting flexfield structure.
Being able to locate particular segments in a key flexfield structure is the purpose for
qualifiers. A qualifier is a label attached to a particular key flexfield segment so it can be
located by the application requiring its information.

<Course name> <Lesson number>-11


Types of Key Flexfield Qualifiers
Qualifiers allow the user to retain the ability to customize the structure of the flexfield
while still allowing the Oracle Application to find the information it needs to process.
There are two types of qualifiers:
• Flexfield qualifiers identify a segment in a flexfield.
• Segment qualifiers identify a value in a segment.
The slide shows both types of qualifiers assign to an accounting flexfield combination.

<Course name> <Lesson number>-12


Flexfield Qualifiers Identify Key Flexfield Segments
The flexfield asks each segment a yes/no question.
Flexfield qualifiers may be unique, global, and required:
• Unique: “Is this the segment that this flexfield can have only one of?”
• Required: “Is this the segment this flexfield must have to do its work?”
• Global: “Is this a segment?” Global qualifiers exist as “carriers” for segment
qualifiers.

Assigning Flexfield Qualifiers to Segments


• Global qualifiers need not be assigned since they apply automatically to every
segment in the flexfield.
• Assign flexfield qualifiers while defining segments.

<Course name> <Lesson number>-13


Key Flexfields Using Qualifiers
The slide shows the key flexfields that use qualifiers and the Oracle application that uses
each key flexfield.

<Course name> <Lesson number>-14


Identifying Values in Flexfield Segments with Segment Qualifiers
A segment qualifier is similar to the segment asking each value the question, “What type
of value are you?”
For example, the account number 300 may be used within a company as a revenue
account.
Use the following segment qualifiers with the accounting flexfield:
• Allow Budgeting
• Allow Posting
• Account Type: Asset, Expense, Liability, Ownership/Stockholder’s Equity, or
Revenue

<Course name> <Lesson number>-15


Other Key Flexfield Features
Some other capabilities of key flexfields are available for use. You should consider using
these capabilities where appropriate:
• Dynamic insertion of new values
• Cross-validation of segment value combinations
• Security on values accessible
• Aliases to speed entry of frequently used value combinations

<Course name> <Lesson number>-16


Allowing Dynamic Insertion of New Code Combinations
Key flexfield code combinations appear on many types of windows. Typically, Oracle
Applications use a particular form (called a combination form) for directly entering the
new code combinations. These same code combinations then be displayed by many other
windows. On these related windows, however, the fields are typically read-only and not
updateable. Therefore new code combinations cannot be entered from these forms.
If you allow dynamic insertion, you can enter new code combinations from such display
windows as well as from regular entry windows.

<Course name> <Lesson number>-17


Validating the Combinations of Segment Values to Control Data Integrity

For key flexfields with multiple segments, you can define rules to cross-check value
combinations entered. In this way, you can prevent combinations of segment values that
are illogical or that should not be allowed from being entered.
The slide shows an illogical combination of values for the Asset key flexfield being
disallowed.

<Course name> <Lesson number>-18


Using Value Security
You can specify who can use particular segment values by defining flexfield value security
rules.
For example, the slide shows a security rule disallowing use of the value COM from the
Category value set. The unsecured Category value set allows used of this value.
Define the rules for a particular value set and then associate the rule with the appropriate
responsibility.

<Course name> <Lesson number>-19


Using Shorthand Aliases to Speed Data Entry
Allow users to enter data faster and more easily with shorthand aliases. An alias is a label
for a particular combination of key flexfield segment values. Give aliases to combinations
that are entered frequently. Then just enter the alias into the flexfield to automatically
populate the values for the segments.

<Course name> <Lesson number>-20


Planning Decisions
Application Question: Does the application support different segment structures?
Related Question: How many structures are needed?

Application Question: How many segment columns are available?


Related Question: What segments are needed?

Application Question: What flexfield qualifiers does this flexfield use or need?
Related Question: Do segments correspond to each needed qualifier?

Application Question: Are dynamic inserts feasible?


Related Question: Who can create new combinations?

Application Question: Should cross-validation be enabled?


Related Question: Is protection from invalid combinations needed?

<Course name> <Lesson number>-21


Application Question: Should shorthand flexfield entry be enabled?
Related Question: Are many combinations used repeatedly?
Designing Key Flexfield Layout
Design the structures needed and the segments for each structure:
• Identify the structure titles.
• Plan the number and order of segments.
• Identify the segment separator.
• Determine the value sets and values to be used.
• Plan the window prompts.

<Course name> <Lesson number>-22


Designing Key Flexfield Segments
Decide how each segment of the key flexfield should behave and what values to allow in
each segment.
Enabled or Displayed - Can users see this segment? Disabled segments are not displayed.
If the segment does not display, use a default value to populate it.
Required - Can users leave the segment without entering a value? Most key flexfield
segments require a value.
Validation - Most key flexfield segments provide a list of values. Use a predefined value
set, or design a new one for this segment. Not using a value set is equivalent to using a
validation type of None, character format, width same as underlying segment column,
uppercase allowed, and no right justification or zero fill.
Value Security - Should security rules for the value set apply to this segment?
Related Segments - Link segments with ranges of Low and High to enforce a relationship
between them.

<Course name> <Lesson number>-23


Specifying Segment Defaults - Examples
Default Type: Constant
Default Value: The constant specified.
Example: USA
Result: USA

Default Type: Current Date


Default Value: The date at the time of entry.
Example:
Result: MAY 01, 2000

Default Type: Current Time


Default Value: The Date/Time at the time of entry.
Example:
Result: 14:30:00 MAY 01, 2000

<Course name> <Lesson number>-24


Default Type: Field
Default Value: The value in the specified field. Use the format block:field
Planning Values for Use with Key Flexfields
Plan the values for the independent and dependent value sets created for this key flexfield.
Choose values logically and systematically. Grouping values together logically makes
defining security and validation rules much easier.
Oracle General Ledger Values Information
Certain applications (especially Oracle General Ledger) require special handling of values:
• Oracle General Ledger applications require that segment qualifiers be assigned to
some values used by the Accounting Flexfield.
• Oracle General Ledger applications can create hierarchies of values using rollup
groups and parent-child relationships for processing and reporting.
The Oracle General Ledger courses provide more details.

<Course name> <Lesson number>-25


Defining Key Flexfields: Procedure
Use the following procedure to define a key flexfield:
• Define new value sets if needed.
• Define key flexfield structure.
• Define the structure segments, including qualifiers.
• Freeze and compile the flexfield definition.
• Define value set values, including any qualifiers.

<Course name> <Lesson number>-26


<Course name> <Lesson number>-27
<Course name> <Lesson number>-28
Specifying the Key Flexfield Behavior
Enabled - This enables shorthand entry of frequently used value combinations.
Segment Separator - Specify a segment separator character. Segment separators are
especially important for key flexfields since their values are often displayed concatenated.
Cross-Validate Segments - This enables cross-checking of segment value combinations.
Freeze Rollup Groups - Rollup groups are used by the Accounting flexfield.
Allow Dynamic Inserts - This allows new key value combinations to be dynamically
created and inserted into the table.
When you have defined the flexfield level attributes, click the Segments button to continue
defining individual segments for this structure.

<Course name> <Lesson number>-29


Defining Segment Attributes
Use the Segments Summary window to define most of the segment attributes.
Number - This specifies the sequence in which the fields will appear on the window.
Name - The name by which this segment is know within Oracle Applications. Name the
segment intuitively. Other segments may refer to this one for validation information. Also,
the view generated uses the segment names for its column names.
Window Prompt - The prompt that will appear on the window. The segment name is the
default.
Column - Specify the SEGMENT column in the underlying base table that contains this
segment’s data. A pop-up list shows the SEGMENT columns that are still available for use.
Displayed - If you choose to not display a segment, specify a default to populate it.
Enabled - This flags the segment as available for use.

<Course name> <Lesson number>-30


Defining Validation and Size Attributes
Validation Information
• Use the Validation block fields to specify value set information.
• Choose a predefined value set with a list of values or design one for this particular
segment with the Value Sets window.
• Specify default information if you need to populate the segment with a default value.
• Determine whether security rules should apply to this value set for this segment.
Size Specifications
• Display Size determines the field size on the flexfield. Specify a display size the
same as the maximum segment size to avoid scrolling.
• Keep prompts small for neater reports.
Click the Flexfield Qualifiers button to determine whether this flexfield has any qualifiers
to be assigned.

<Course name> <Lesson number>-31


<Course name> <Lesson number>-32
<Course name> <Lesson number>-33
<Course name> <Lesson number>-34
Defining Segment Qualifiers
Specify additional qualifiers at the value level when appropriate. For example, Allow
Budgeting is an Accounting Flexfield segment qualifier.
Whenever possible do not change a value, change its description. If reuse is not possible,
disable unused values, do not delete them.

<Course name> <Lesson number>-35


<Course name> <Lesson number>-36
Refer to Practice – Define a KFF [LAB00016]
Refer to Practice - Define a KFF with a Dependent Segment [LAB00017]

<Course name> <Lesson number>-37


Summary
Key flexfields are used to build identifiers required by Oracle Applications. Key flexfields
allow the user to provide information needed by Oracle Applications while still structuring
that information to reflect a particular business environment.
The procedure for defining a key flexfield is similar to that for defining a descriptive
flexfield. However, there are additional attributes for key flexfields that may also need to
be defined. Additionally, key flexfields have several optional features that should be
implemented where appropriate.
The additional requirements and options for key flexfields include:
• By using qualifiers in key flexfields you can require that certain segments and certain
values be identified for processing.
• You can allow security checking and integrity checking.
• You can define aliases to speed data entry.
• You can enter key flexfield value combinations from different windows, if allowed.

<Course name> <Lesson number>-38

You might also like