Upload
adel-elshafey-hamed
View
652
Download
10
Embed Size (px)
Citation preview
Flexfields
Oracle Applications : Flexfields
2
Oracle Apps Team
Flexfields
Flexfields
Purpose and Applications• Flexibility to implement Code Structure• Flexibility to capture Additional Information
3
Oracle Apps Team
Flexfields
Flexfields
As the name suggests, a flexfield is a “Flexible Field”.
A flexfield is a field made up of segments (which are actually table columns). Each segment has a name that can be assigned, and a set of valid values.
There are two types of flexfields in Oracle Applications: Key flexfields (KFF) and descriptive flexfields (DFF).
Using key and descriptive flexfields, you give end users the ability to customize your application to match their business needs, without programming.
4
Oracle Apps Team
Flexfields
Key-Flexfields
A key flexfield represents an “intelligent key” that uniquely identifies an application entity.
Each key flexfield segment has a name you assign, and a set of valid values you specify. Each value has a meaning which can be specified.
A key flexfield provides with a flexible ”code” data structure that users can set up however they like using key flexfield segments.
5
Oracle Apps Team
Flexfields
Key-Flexfields
Key flexfields let you satisfy the needs of different customers as per their business practices, without having to reprogram the application.
For each segment one can also define valid values for each segment, as well as cross–validation rules to describe valid segment combinations.
Oracle General Ledger’s Accounting Flexfield is an example of a key flexfield used to uniquely identify a general ledger account.
6
Oracle Apps Team
Flexfields
Key Flexfields
You could use the Item Flexfield in an inventory application to uniquely identify inventory parts. It could contain such segments as product class, product code, size, color and packaging code.
You could define valid values for the color segment, for example, to range from 01 to 10, where 01 means red, 02 means blue, and so on.
You could even specify cross–validation rules to describe valid combinations of segment values.
• For example, products with a specific product code may only be available in certain colors.
7
Oracle Apps Team
Flexfields
Key-Flexfield
A Flexfield Segment Is a Single Sub-field of a Flexfield Each segment is a single column of a table. Flexfield segments are usually validated against a set of
valid values, called a value set. Key Flexfields Identify an Entity Key flexfields serve as an intelligent primary key, where
each segment contains meaningful information. Key flexfields are integral parts of a form. They appear
as normal fields until the flexfield window pops up. Often the segment descriptions also appear on the form
in a concatenated-values field.
8
Oracle Apps Team
Flexfields
Oracle Apps provided Key-Flexfield
Oracle Applications Key Flexfields Accounting Flexfield: Oracle General Ledger Asset Key Flexfield: Oracle Assets Bank Details KeyFlexfield : Oracle Payroll Category Flexfield: Oracle Assets Item Catalogs: Oracle Inventory Item Categories :Oracle Inventory Location Flexfield: Oracle Assets Position Flexfield: Oracle Personnel Sales Orders: Oracle Inventory Sales Tax Location Flexfield Oracle ReceivablesStock Locators : Oracle Inventory System Items : Oracle Inventory Territory Flexfield :Oracle Receivables
Oracle Apps Team
Flexfields
Oracle Applications Key Flexfields
Accounting
CategoryAsset
Location
OracleAssets
OracleGeneralLedger
Account AliasesItem CatalogsItem Categories
Sales Orders
Stock Locators
System Items
Oracle Inventory
Bank DetailsCost AllocationPeople Group
OraclePayroll
Grade JobPersonal AnalysisPositionSoft Coded
OracleHumanResources
TerritorySales Tax LocationOracle
Receivables
Oracle Service ItemOracleService
11
Oracle Apps Team
Flexfields
Accounting Keyflexfield
Has special features and is used for Chart of Account definition
Requires setup of • Flexfield Qualifiers• Segment qualifiers• Parent-Child Relationship and Hierarchy• Segments used with Rollup groups
Features for Security Features : Dynamic Insert Valueset Security Cross validation Rules Shorthand Alias
12
Oracle Apps Team
Flexfields
Descriptive Flexfields
Descriptive flexfields provide customizable ”expansion space” to capture information which otherwise is not captured by the application.
It lets you satisfy different groups of users without having to reprogram your application.
13
Oracle Apps Team
Flexfields
Descriptive Flexfields
Descriptive flexfields can be context sensitive, where the information your application stores depends on other values your users enter in other parts of the form.
Each descriptive segment has a name you assign. You can specify valid segment values or set up criteria to validate the entry of any value.
Example : Customer Retail info, Asset info based on asset type.
14
Oracle Apps Team
Flexfields
Descriptive Flexfield
A Field Made Up of Sub-fields Flexfields appear in a pop-up window on a form. Flexfields are implemented as a set of database
columns, with one column for each segment. The brackets [ ] indicate the presence of a descriptive
flexfield. When the cursor reaches the brackets, the descriptive
flexfield pops open. If the descriptive flexfield is not enabled, the cursor
skips over the brackets.
16
Oracle Apps Team
Flexfields
Flexfields
Customizing Flexfields• Customizing a flexfield means specifying the prompt,
length and data type of each flexfield segment. • It also includes specifying valid values for each
segment, and the meaning of each value to your application.
• You or your end users can even define cross–validation rules to specify valid combinations of segment values ( in case of Key Flexfields)
17
Oracle Apps Team
Flexfields
Flexfields
A Flexfield May Have One or More Structures Both key and descriptive flexfields can have more than one
structure. Standard report submission parameter windows behave as
descriptive flexfield structures. • Each parameter acts as a segment.• Tailor structures for specific end-user needs.
18
Oracle Apps Team
Flexfields
Flexfields
Multiple Structures• Flexfields lets you define multiple segment structures
for the same flexfield. • Your flexfield can display different prompts and fields
for different end users based on a data condition in your form or application data.
• Most of the features used with your flexfield segments also apply to your parameter window for Standard Request Submission programs.
19
Oracle Apps Team
Flexfields
Definitions
Segment• For a key flexfield, a segment is a single piece of the
complete entity code ( like item part code)• For a descriptive flexfield, a segment is a single field or a
single attribute of the entity• A segment is represented by a single column in a table.• A segment is a single sub–field within a flexfield.• You define the appearance and meaning of individual
segments when customizing a flexfield.
20
Oracle Apps Team
Flexfields
Definitions
Combination• For a key flexfield, a combination of segment values that make
up the complete code or key. • You can define valid combinations with simple cross–
validation rules when you customize your key flexfield.
21
Oracle Apps Team
Flexfields
Definitions
Structure• A flexfield structure is a particular arrangement of flexfield
segments.• The maximum size of the structure depends on the individual
flexfield.• A flexfield may have one or more structures. Both key and
descriptive flexfields can have more than one structure. • Users can tailor structures for specific needs. • If you add or remove segments, or rearrange the order of
segments in a flexfield, you get a different structure.
22
Oracle Apps Team
Flexfields
Definitions
Values, Validation and Value Sets• Your end user enters a segment value into a segment while
using an application. Generally, the flexfield validates each segment against a set of valid values (a ”value set”) that are usually predefined.
23
Oracle Apps Team
Flexfields
Definitions
Combinations Table• For a key flexfield, a database table you include in your
application to store valid combinations of key flexfield segment values.
• Each key flexfield must have a combinations table. It contains columns for each flexfield segment, as well as other columns. This is the same table you use as your entity table.
Combinations Form• For a key flexfield, a combinations form is the form whose
base table (or view) is the combinations table. The only purpose of the combinations form is to maintain the combinations table.
24
Oracle Apps Team
Flexfields
Definitions
Dynamic Insertion• Dynamic insertion is the insertion of a new valid combination
into a key flexfield combinations table from a form other than the combinations form.
• All validation rules still will apply during insertion
Structure Defining Column• A column you include in a combinations table or entity table so
the flexfield can support multiple segment structures.
25
Oracle Apps Team
Flexfields
Customizing a DFF
Planning a Descriptive flexfield.• The planning phase can be broken into smaller, though still
interrelated, steps:–Decide which flexfields to implement–Learning about a specific flexfield–Planning the structure–Planning the segments–Planning the segment validation–Planning to use additional features–Documenting your plan
26
Oracle Apps Team
Flexfields
Customizing a Flexfield
Customize the Flexfield’s Appearance• Flexfield title• Number and order of segments• Prompts• Value sets, values, and value descriptions
Use Flexfield Functionality for Validation• Pop-up windows• Individual segment validation• Cross-segment validation
Customize to the Situation• Flexfields allow the application to adjust to fit specific
business needs.• Use multiple structures to match different needs in different
situations.
27
Oracle Apps Team
Flexfields
Customizing a DFF
Planning the segment validation• For each segment, plan your validation. Consider what types
of values you will be using in your flexfield segments. These decisions affect how you set up your value sets and values.
• Plan for field prompts• Define dependencies among the segments or customize a
descriptive flexfield to display context–sensitive segments, so that different segments or additional pop–up windows appear depending on the values you enter in other fields or segments.
28
Oracle Apps Team
Flexfields
Different Structures
One Flexfield Captures Different Information
Use different structures for different situations.
Make the flexfield structure depend automatically on the value of another field. This is called using a reference field.
Define the flexfield to allow choosing the structure when entering the flexfield. This is called using a context field.
29
Oracle Apps Team
Flexfields
Structures Concept
For a descriptive flexfield, a structure consists of any global segments plus all context-sensitive segments for a particular context field value.
Context-sensitive structures are all the segments defined for a context field value.
30
Oracle Apps Team
Flexfields
Customizing a DFF : Reference field
Planning for Reference Fields• Reference fields are fields from which a descriptive flexfield can
get a context field value (optional, but recommended). • Reference fields must be separate fields Frequently, most of the
existing (non–flexfield) fields in your form can also serve as reference fields.
• They are NOT the structure defining field (typically ATTRIBUTE_CATEGORY is a structure defining field).
• Good reference fields are those that have a short, fairly static list of possible values.
31
Oracle Apps Team
Flexfields
Customizing a DFF
Planning for Reference Fields• You specify fields as reference fields when you register your
descriptive flexfield in the Register Descriptive Flexfield form. Your users then have the option of using a reference field or not when they set up your flexfield.
• Reference field is just an ordinary field on the form before you choose to use it as a reference field
• Use a reference field on the form to derive a context field value.
32
Oracle Apps Team
Flexfields
Context field
Determine which context-sensitive structure appears with a context field.
Context Fields is NOT a Segment. The context field has a context field prompt. The response, called a context field value, determines
which group of context-sensitive segments appears next.
Each value for the context field can correspond to a separate context-sensitive structure.
Context fields do not always display. Non-displayed context fields derive values from a default or from a reference field, and the user cannot change the context field value.
33
Oracle Apps Team
Flexfields
Elect to Hide the Context Field Use a reference field to supply the context field value.
The context field never appears, so that users cannot change the value.
Or, use the reference field as a default but allow users to override. Visible context fields are alterable.
Change the value of the context field without changing the value in the reference field.
Context field
34
Oracle Apps Team
Flexfields
Customizing DFF
Create different context-sensitive segments to appear only for a particular context field value. Different context field values cause different context-sensitive segments to pop open.
35
Oracle Apps Team
Flexfields
Global Field
Define global segments that always appear in the descriptive flexfield pop-up window, regardless of context (any other information in the form).
Define global segments before any context-dependentstructures.
36
Oracle Apps Team
Flexfields
Customizing a DFF
Planning Validations • Choose a Validation Type for Your Value Set. There are
several validation types that affect the way users enter and use segment or parameter values: None (not validated at all) Independent Dependent Table Special (advanced) Pair (advanced) Translatable Independent Translatable Dependent
37
Oracle Apps Team
Flexfields
Building & Implementing a DFF
There are 4 main steps to implement a DFF.• Define the DFF Database columns in the table
(ATTRIBUTEn VARCHAR2(150)• Define the Structure column ATTRIBUTE_CATEGORY
VARCHAR2(30)• Register the table and its columns with AOL.• Register the DFF and its segments using proper value sets
as per the plan prepared.• Add Flexfields to Forms
38
Oracle Apps Team
Flexfields
Adding Flexfields to Forms
There are four basic parts to calling a flexfield from an Oracle Forms window. These steps apply to both key and descriptive flexfields.
To code a flexfield into your form :• Create your hidden fields• Create your displayed fields• Create your flexfield definition• Invoke your flexfield definition from several event triggers
39
Oracle Apps Team
Flexfields
Flexfield Underlying Table
Table have flexfield columns as any other columns defined as per standard suggested by oracle.
Attribute columns are built in by the developer. Their number cannot increase.
Use only as many segments as the table has available columns (for a single flexfield structure that contains both global and context-sensitive segments).
Most columns called Attribute#. ( 1 to 15) Attribute_category is used as structure column and stores the
context value. Global segments use the same column in all flexfield
structures.Context-sensitive segments use a column only for that particularstructure.
40
Oracle Apps Team
Flexfields
DF Table Definition
Context-sensitive Segments Can Reuse Columns
Since context-sensitive segments only use columns for their particular structure, two segments in different context-sensitive structures can share the same column.
Defining global segments first prevents wastefully using all columns for context-sensitive segments.
41
Oracle Apps Team
Flexfields
View Generation
A view is generated by AOL to allow access data based on the descriptive flexfield definition
42
Oracle Apps Team
Flexfields
Customizing a DFF options
Use a combination of these features to create a descriptive flexfield.
What Kind of Segments Create global segments ? Create context-sensitive segments ? A context field that the user sees (override allowed
Yes) ? How to choose which context-sensitive segments
appear/populate the context field ? Choose which context-sensitive segments appear by
using a reference field ? Specify a default context field value ? (to choose which
context-sensitive segments appear by default)
Oracle Apps Team
Flexfields
Validating Input Using Value Sets
__ Item Information _________
Category
Item
Computer
Monitor
COM
876
COM APPL FURN
Category value set
Item value set
876755 933
Oracle Apps Team
Flexfields
None Validation is minimal
Independent Input must exist on previously defined list of values.
Dependent Input is checked against a subset of values based on a prior value.
Table Input is checked against values in an
application table.
Special Value set uses a flexfield itself.
Types of Value Sets
Oracle Apps Team
Flexfields
Pair Two flexfields together specify a range of valid values.
Translatable Independent Input must exist on previously defined list of values; translated
value can be used.
Translatable Dependent Input is checked against a subset of values based on a prior
value; translated value can be used.
Types of Value Sets
Oracle Apps Team
Flexfields
Validation Type None
Values are checked for expected data type,length, and so on.
Values are not checked against an approved values list.
Examples include credit card number, street address, phone number.
Oracle Apps Team
Flexfields
Independent Value Sets
__ Item Information _________
Category
Item
Computer
Monitor
COM
876
COM APPL FURN
Category value set
Oracle Apps Team
Flexfields
Dependent Value SetsCategory value set Item value set
COM Computer
APPL Appliances
FURN Furniture
755 Modem
876 Monitor
933 Printer
320 Microwave
560 Refrigerator
876 Washer
877 Desk
154 Table
677 Bunk Bed
Oracle Apps Team
Flexfields
Table-Validated Value Sets
WHERE REGION = ‘Western’
Cities_West value set
Customer table
Acme ComputersNorth Bay FoodsMidwest GrainSouthern MillingRockies Mining
San JoseBostonChicagoCharlestonDenver
WesternEasternEasternSouthernWestern
Name CityRegion
San Jose Denver
50
Oracle Apps Team
Flexfields
Value Sets
Value Set Options
Set Options Format Type Validation Type
Name Format Type Independent
Description Maximum Length Dependent
Security Available Precision None
LongList Enabled ? Alphabetic Characters? Table
Uppercase Only? Special
Right-justify Zero-fillNumbers?
Pair
Minimum Value
Maximum Value
Oracle Apps Team
Flexfields
Validation Types: Summary
**Application Object Library
Type List of ValuesAvailable
Values Stored In
None
Table
Special/Pair
N/A
Depends on value set
No
Independent
Dependent
AOL* Table
AOL* Table
Yes
Yes
Yes Application Table
TranslatableIndependent
TranslatableDependent
AOL* TableYes
AOL* TableYes
Depends on value set
Oracle Apps Team
Flexfields
Predefined Value Sets Choosing a predefined value set limits the necessary
maintenance of values.
Most predefined value sets are table-validated value sets.
A useful value set is Yes_No, containing the values Yes and No.
Never alter value sets provided by Oracle Applications, especially the SRS value set.
Steps in defining Valueset
Valueset Type: None
Valueset Type: Independent
Valueset Type: Dependent
Valueset Type: Table
Valueset Type: Table
Values for Independent Valueset
Values for Independent Valueset
64
Oracle Apps Team
Flexfields
Setting Up Flexfields
Demo of Keyflexfield enabling & customization Demo of DFF enabling & customization Demo of ValueSet creation