Beruflich Dokumente
Kultur Dokumente
This documentation contains proprietary information of Oracle Corporation. It is provided under a license
agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse
engineering of the software is prohibited. If this documentation is delivered to a U.S. Government Agency of the
Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable:
Use, duplication or disclosure by the Government is subject to restrictions for commercial computer software
and shall be deemed to be Restricted Rights software under Federal law, as set forth in subparagraph (c)(1)(ii)
of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988).
This material or any portion of it may not be copied in any form or by any means without the express prior
written permission of the Education Products group of Oracle Corporation. Any other copying is a violation of
copyright law and may result in civil and/or criminal penalties.
If this documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is
delivered with “Restricted Rights,” as defined in FAR 52.227-14, Rights in Data-General, including Alternate III
(June 1987).
The information in this document is subject to change without notice. If you find any problems in the
documentation, please report them in writing to Worldwide Education Services, Oracle Corporation, 500 Oracle
Parkway, Box SB-6, Redwood Shores, CA 94065. Oracle Corporation does not warrant that this document is
error-free.
Oracle and all references to Oracle Products are trademarks or registered trademarks of Oracle Corporation.
All other products or company names are used for identification purposes only, and may be trademarks of their
respective owners.
Author
Bill Sawyer
Gursat Olgun, Terry Barnes, Hani Georgi, Millie Wang, Mike Konopik, Phil
Cannon, Dee Galbreath
Oracle Tutor
Table of Contents
Introduction ...........................................................................................................................1-1
Introduction .........................................................................................................................1-2
Objectives ............................................................................................................................1-3
Benefits of Flexfields...........................................................................................................1-4
Key and Descriptive Flexfields............................................................................................1-5
Key Flexfields......................................................................................................................1-6
Descriptive Flexfields ..........................................................................................................1-7
Additional Terminology ......................................................................................................1-8
Identifying Key Flexfields ...................................................................................................1-18
Identifying Descriptive Flexfields .......................................................................................1-23
Summary..............................................................................................................................1-27
Lesson Appendix .................................................................................................................1-28
Practice ................................................................................................................................1-33
Diagnostic Tools and Methods..............................................................................................2-1
Diagnostic Tools and Methods ............................................................................................2-2
Objectives ............................................................................................................................2-3
General Overview................................................................................................................2-5
Basic Applications Tools.....................................................................................................2-7
Entity Relationship Diagrams (ERDs).................................................................................2-11
What is an Entity?................................................................................................................2-12
Entities and Instances ..........................................................................................................2-13
Attributes .............................................................................................................................2-14
Relationships .......................................................................................................................2-15
Drawing Entities in ERDs....................................................................................................2-17
Drawing Attributes in ERDs................................................................................................2-18
Drawing Relationships in ERDs ..........................................................................................2-19
Perspectives of Relationships in ERDs................................................................................2-20
Reading Relationships in ERDs...........................................................................................2-21
Elements of an Oracle Applications ERD............................................................................2-22
Key Flexfields ERD.............................................................................................................2-23
Developer's Key Flexfields ERD.........................................................................................2-25
Descriptive Flexfields ERD .................................................................................................2-26
Developer's Descriptive Flexfields ERD .............................................................................2-28
Flexfield Values ERD..........................................................................................................2-29
Developer's Flexfield Values ERD ......................................................................................2-31
Diagnostic Database Scripts ................................................................................................2-32
Diagnostic Applications Scripts...........................................................................................2-38
Applications Configuration Files.........................................................................................2-53
Flexfield Diagnostic Scripts.................................................................................................2-55
Additional Flexfield Scripts.................................................................................................2-68
Flexfield Test Form .............................................................................................................2-72
Java Code Tracing ...............................................................................................................2-83
Diagnostic Style...................................................................................................................2-93
Summary..............................................................................................................................2-95
Practice Overview................................................................................................................2-97
High-Level Design..................................................................................................................3-1
High-Level Design...............................................................................................................3-2
Objectives ............................................................................................................................3-3
Flexfield Components..........................................................................................................3-4
Summary..............................................................................................................................3-30
Profile
Before you begin this course, you should have the following qualifications:
Prerequisites
• Defining Flexfields
Oracle Publications
Additional Publications
• read.me files
• Oracle Magazine
This course uses simplified navigation paths, such as the following example, to
direct you through Oracle Applications.
(N) Invoice > Entry > Invoice Batches Summary (M) Query > Find (B) Approve
1. (N) From the Navigator window, select Invoice > Entry > Invoice Batches
Summary.
(N) = Navigator
(M) = Menu
(T) = Tab
(I) = Icon
(H) = Hyperlink
(B) = Button
This course uses a “navigation path” convention to represent actions you perform
to find pertinent information in the Oracle Applications Help System.
1. In the navigation frame of the help system window, expand the General
Ledger entry.
4. Review the Enter Journals topic that appears in the document frame of the
help system window.
Introduction
Chapter 1 - Page 1
Introduction
Introduction
Introduction
Introduction
Chapter 1 - Page 2
Objectives
Objectives
Objectives
After
After this
this lesson,
lesson, you
you should
should be
be able
able to:
to:
•• Describe
Describe thethe philosophy
philosophy behind
behind flexfields
flexfields within
within
Oracle Applications.
Oracle Applications.
•• Define
Define and
and use
use standard
standard terminology
terminology thatthat applies
applies
to
to flexfields.
flexfields.
•• Define
Define and
and use
use standard
standard terminology
terminology thatthat applies
applies
to
to flexfield
flexfield related
related features.
features.
•• Recognize
Recognize Key Key and
and Descriptive
Descriptive flexfields
flexfields inin Oracle
Oracle
Applications.
Applications.
•• Identify
Identify Key
Key and
and Descriptive
Descriptive flexfields
flexfields assigned
assigned to
to
aa given
given form.
form.
®
Introduction
Chapter 1 - Page 3
Benefits of Flexfields
Benefits
Benefits of
of Flexfields
Flexfields
•• Customize
Customize applications
applications toto support
support your
your own
own
accounting,
accounting, product,
product, and
and other
other codes
codes
•• Enable
Enable construction
construction of
of intelligent
intelligent keys
keys
•• Customize
Customize applications
applications to to capture
capture additional
additional data
data
•• Use
Use the
the application
application toto validate
validate values
values and
and value
value
combinations
combinations entered
entered by by the
the user
user
•• Support
Support multiple
multiple field
field structures
structures depending
depending on
on
data context
data context
Flexfields were the initial invention of one man, Jeff Walker. Jeff Walker
established the internal Applications Division in 1987 with two initial
products, General Ledger and Purchasing. Jeff brought the concept of
flexfields from his own company that he had left to join Oracle. From that
humble beginning flexfields have, by Release 11i, come into their own.
Introduction
Chapter 1 - Page 4
Key and Descriptive Flexfields
Key
Key and
and Descriptive
Descriptive Flexfields
Flexfields
Key flexfields
build unique __ Item Information _________
entity identifiers Category COM Computer
Item 876 Monitor
Color LTN Light tan
Descriptive flexfields
Payment Type CC gather additional
information
Store 54321
Dept 987
Number 4958-2938-4747
Exp. Dt 12 - 99
Introduction
Chapter 1 - Page 5
Key Flexfields
Key
Key Flexfields
Flexfields
Key
flexfield __ Item Information _______________
window Category COM Computer
Item 876 Monitor
Color LTN Light tan
®
You can think of Key Flexfields as Intelligent Keys. Anytime you see a
field that can be 1) treated as a combined entity, and 2) be composed of
individual, configurable segments that the customer can define to meet
their business model, it will be a Key Flexfield.
For recognition purposes, note that the Key Flexfield looks no different
than any other field on the form. Visually, there are no clues at first glance
to indicate Key Flexfields. However, when a user navigates to the field on
the form, the List of Values (LOV) indicator will clue the user to more
information. If they click the LOV Indicator or type the LOV quick key, the
Key Flexfield window will open to allow them to enter the data in a field-by-
field manner.
Also, because of their importance to the application, there are far fewer
Key Flexfields than Descriptive Flexfields. Currently, in Release 11i, there
are 29 Key Flexfields.
Introduction
Chapter 1 - Page 6
Descriptive Flexfields
Descriptive
Descriptive Flexfields
Flexfields
You can think of Descriptive Flexfields as the way that the customer can
add additional fields to any given form without customizing the form. As
such, the data in Descriptive Flexfields is generally transaction-oriented.
Introduction
Chapter 1 - Page 7
Additional Terminology
Additional
Additional Terminology
Terminology
•• Flexfield
Flexfield Window
Window
•• Segment
Segment
•• Structure
Structure
•• Segment
Segment Prompts
Prompts
•• Segment
Segment Attributes
Attributes
•• Registering
Registering aa Flexfield
Flexfield
•• Generating
Generating aa Flexfield
Flexfield View
View
•• Freezing
Freezing aa Flexfield
Flexfield
•• Compiling
Compiling aa Flexfield
Flexfield
Introduction
Chapter 1 - Page 8
• Freezing a Flexfield the process of marking a flexfield with a
warning against changes to it after the
freezing process.
• Compiling a Flexfield an internal process that improves
flexfield performance.
Introduction
Chapter 1 - Page 9
Additional Terminology
Additional
Additional Terminology
Terminology
•• SRS
SRS
•• Value
Value Sets
Sets
•• Segment
Segment Value
Value Descriptions
Descriptions
•• Validation
Validation Type
Type -- None
None
•• Independent
Independent Value
Value Sets
Sets
•• Dependent
Dependent Value
Value Sets
Sets
•• Table-driven
Table-driven Value
Value Sets
Sets
•• ID
ID Value
Value Sets
Sets
•• Special
Special Value
Value Sets
Sets
•• Pair
Pair Value
Value Sets
Sets
®
Introduction
Chapter 1 - Page 10
• Table-driven Value Sets a validation type that provides a list of
values for a segment with the list
coming from an Applications table.
• ID Value Sets a value set that uses a hidden column
as the stored value.
• Special Value Sets a validation type, used primarily for
SRS, that allows a flexfield within a
flexfield.
• Pair Value Sets a validation type, used primarily for
SRS, that allows a pair of flexfield
fields within a flexfield, with the pair
being used to specify a range
(e.g., Low and High) of values.
Introduction
Chapter 1 - Page 11
Additional Terminology
Additional
Additional Terminology
Terminology
•• Key
Key Flexfields
Flexfields
•• SEGMENTs
SEGMENTs
•• Combinations
Combinations
•• Combinations
Combinations Table
Table
•• Code
Code Combination
Combination IDs
IDs
•• Multiple
Multiple Structures
Structures
•• Security
Security Rules
Rules
•• Cross-validation
Cross-validation Rules
Rules
•• Shorthand
Shorthand Aliases
Aliases
Introduction
Chapter 1 - Page 12
• Combinations Table a unique table for each Key flexfield that
stores the unique combinations.
• Code Combination IDs a foreign key into the combinations
table.
• Multiple Structures the ability of a key flexfield to display
one of multiple segment structures
based on a data condition on the form or
in the Application data. (see Contexts)
• Security Rules a restriction of values from a value set
that a given user can access during data
entry.
• Cross-validation Rules cross-validation of Key flexfield segment
values that allows a customer to control
creation of new code combinations, and
maintenance of the existing code
combinations.
• Shorthand Aliases speeds data entry by allowing shorthand
aliases to represent certain code
combinations.
Introduction
Chapter 1 - Page 13
Additional Terminology
Additional
Additional Terminology
Terminology
•• Flexfield
Flexfield Qualifiers
Qualifiers
•• Segment
Segment Qualifiers
Qualifiers
•• Combinations
Combinations Form
Form
•• Foreign
Foreign Key
Key Reference
Reference Form
Form
•• Range
Range Flexfield
Flexfield Form
Form
•• Dynamic
Dynamic Insert
Insert
•• Range
Range Flexfields
Flexfields
Introduction
Chapter 1 - Page 14
• Dynamic Insert the insertion of a new valid combination
into the combinations table from a form
other than the combinations
(maintenance) form.
• Range Flexfields a flexfield that supports high and low
values for each Key segment rather
than just single values.
Introduction
Chapter 1 - Page 15
Additional Terminology
Additional
Additional Terminology
Terminology
•• Descriptive
Descriptive Flexfields
Flexfields
•• ATTRIBUTEs
ATTRIBUTEs
•• GLOBAL
GLOBAL ATTRIBUTEs
ATTRIBUTEs
•• Contexts
Contexts
•• Structure
Structure Column
Column
•• Reference
Reference Fields
Fields
•• Global
Global Data
Data Elements
Elements
Introduction
Chapter 1 - Page 16
• Reference Fields a means to tie context sensitivity to a
field on the form.
• Global Data Elements segment(s) that always appear in the
pop-up window, regardless of context.
Introduction
Chapter 1 - Page 17
Identifying Key Flexfields
Identifying
Identifying Key
Key Flexfields
Flexfields
•• Visually
Visually identifying
identifying aa Key
Key flexfield
flexfield on
on the
the form
form
•• Identifying
Identifying which
which Key
Key flexfields
flexfields are
are available
available inin
your Application
your Application
•• Identifying
Identifying the
the core
core attributes
attributes of
of any
any given
given Key
Key
flexfield
flexfield
•• Identifying
Identifying which
which Key
Key flexfield
flexfield is
is used
used by
by the
the field
field
on
on the
the form
form
•• Additional
Additional methods
methods
There are several types of identification of key flexfields. The types are as
follows:
Visual Identification
Introduction
Chapter 1 - Page 18
Available Key Flexfields
With that, you can see all of the key flexfields that have been defined to
your Application. In Release 11i there are approximately 30 key flexfields.
This is subject to change, especially with the growth in CRM products.
Whatever the number, it is still relatively small in comparison to the total
number of Application products.
The initial form shows 10 fields that can be defined for any given key
flexfield.
Introduction
Chapter 1 - Page 19
foreign key.
Structure Column name of the column in the combinations
table which, if defined, differentiates between
flexfield structures.
Dynamic Insert Feasible (checkbox) dynamic inserts are
feasible only if your combinations table
contains no mandatory, non-flexfield columns
AND your flexfield does not require any
special validation of new flexfield
combinations.
Allow ID Value Sets (checkbox) defines if your Key flexfield
allows value sets that use a Hidden ID in
your flexfield.
Note: For more detailed information on these and the additional forms
used for Registering a Key Flexfield, see pg 14-71 of the Oracle
Applications Developer’s Guide, Release 11i, P/N: A75545.
(http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/115devg.pdf)
Key Flexfields take a little work to determine which key flexfield and which
structure within that key flexfield is being used.
select a.id_flex_code,
trim(translate(a.id_flex_name,'*{}''',' ')) id_flex_name,
b.id_flex_structure_name
Introduction
Chapter 1 - Page 20
from fnd_id_flexs a, fnd_id_flex_structures_tl b
where a.id_flex_code = b.id_flex_code AND
b.id_flex_structure_name like '<PUT YOUR STRUCTURE HERE>'
Additional Methods
There are a few other flexfield diagnostic methods we will discuss at this
point.
Introduction
Chapter 1 - Page 21
I. Query on the TYPE field, putting in the name of the Quickcode
Type you had previously recorded (step G)
J. Examine the LOOKUPS available to you for that Segment
Qualifier
Introduction
Chapter 1 - Page 22
Identifying Descriptive Flexfields
Identifying
Identifying Descriptive
Descriptive Flexfields
Flexfields
•• Visually
Visually identifying
identifying aa Descriptive
Descriptive flexfield
flexfield on
on the
the
form
form
•• Identifying
Identifying which
which Descriptive
Descriptive flexfields
flexfields are
are
available in your Application
available in your Application
•• Identifying
Identifying the
the core
core attributes
attributes of
of any
any given
given
Descriptive
Descriptive flexfield
flexfield
•• Identifying
Identifying which
which Descriptive
Descriptive flexfield
flexfield is
is used
used by
by
the
the field
field on
on the
the form
form
Visual Identification
Introduction
Chapter 1 - Page 23
Single-record Descriptive Flexfield
1. Change into the Receivables Manager responsibility
2. Navigate to TRANSACTIONS … TRANSACTIONS
3. Note the descriptive flexfield at the top right of the form
With that, you can see all of the descriptive flexfields that have been
defined to your Application. In Release 11i there are over 1,500
descriptive flexfields. This is subject to change, especially with the growth
in CRM products.
The initial form shows 8 fields that can be defined for any given key
flexfield.
Introduction
Chapter 1 - Page 24
Name a unique name used by the forms trigger
Title the user-friendly name of your flexfield
Description
Table Application the application to which the table is registered
Table Name the name of the table where your ATTRIBUTE
columns exist.
Structure Column name of the column, usually
ATTRIBUTE_CATEGORY, that differentiates
between flexfield contexts (structures)
Context Prompt the default value of the context prompt
Note: For more detailed information on the forms used for Registering a
Descriptive Flexfield, see pg 14-78 of the Oracle Applications Developer’s
Guide, Release 11i, P/N: A75545.
(http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/115devg.pdf)
1. Navigate to the window and block for which you want to identify the
Descriptive flexfield.
2. From the Menu choose, Help … Tools … Examine.
3. The Examine Field and Variable Values window initially displays the
hidden block and field names of the field your cursor was in when
you opened Examine. Record the block name displayed to help you
select the correct flexfield in a later step.
4. Use the list on the Block field to choose
$DESCRIPTIVE_FLEXFIELD$.
5. If there is more than one descriptive flexfield for your form, use the
list on the Field field to select the one you want (the list displays the
hidden block names and field names for all descriptive flexfields on
the form).
6. If you do not see the descriptive flexfield you want, it may be
because your form has special logic that prevents the flexfield from
being read by Examine, such as logic that makes the flexfield
appear only under certain conditions. Make sure the Descriptive
Introduction
Chapter 1 - Page 25
flexfield is visible, that those conditions are met, and that your
cursor is in the same block as the flexfield. Try using Examine
again.
7. The flexfield title that appears in the Value field is the title of your
Descriptive flexfield.
Introduction
Chapter 1 - Page 26
Summary
Summary
Summary
You
You should
should feel
feel comfortable
comfortable with
with the
the following
following
statements
statements about
about your
your knowledge
knowledge ofof flexfields:
flexfields:
•• II know
know that
that flexfields
flexfields bring
bring necessary
necessary capabilities
capabilities
to Oracle Applications.
to Oracle Applications.
•• II know
know that
that flexfields
flexfields are
are configurable
configurable toto the
the
customer's
customer's business
business needs.
needs.
•• II know
know the
the basic
basic terminology
terminology surrounding
surrounding
flexfields.
flexfields.
•• II know
know several
several diagnostic
diagnostic techniques
techniques for
for probing
probing
flexfields.
flexfields.
Introduction
Chapter 1 - Page 27
Lesson Appendix
Lesson
Lesson Appendix
Appendix
•• Key
Key Flexfield
Flexfield Warnings
Warnings and
and Attentions
Attentions
•• Descriptive
Descriptive Flexfield
Flexfield Warnings
Warnings and
and Attentions
Attentions
•• Value
Value Set
Set Warnings
Warnings and
and Attentions
Attentions
Lesson Appendix
KEY FLEXFIELDS:
WARNING: Plan your key flexfield structures carefully, including all your
segment information such as segment order and field lengths, before you
define your segments using this form. You can define your key flexfields
any way you want, but changing your structures once you acquire any
flexfield data may create data inconsistencies that could have a significant
impact on the behavior of your application or require a complex
conversion program. Changing your existing structures may also
adversely affect the behavior of any cross–validation rules or shorthand
aliases you have set for your structures, so you should be sure to
manually disable or redefine any cross–validation rules (using the Cross–
Introduction
Chapter 1 - Page 28
Validation Rules window) and shorthand aliases (using the Shorthand
Aliases window) to reflect your changed structures.
WARNING: You should not use any WHERE clause and/or ORDER BY
clause at all for a value set you intend to use with the Accounting Flexfield.
Introduction
Chapter 1 - Page 29
DESCRIPTIVE FLEXFIELDS:
ATTENTION: If you are upgrading from Release 10, the value for your
context name is copied to the context code and context name in Release
11. The name and description are translatable, and will appear in the
customer’s chosen language. The context code is not translatable.
VALUE SETS:
WARNING: You should take special care to avoid a situation where you
have a value set that contains a flexfield which in turn contains a flexfield
(as a value set of one of its segments). There are two situations where
this could cause a problem. The first situation (recursion) is where a
flexfield calls itself as one of its segments, leading to an infinite chain of
pop–up windows. Such a loop may also be indirect. The second potential
problem may lead to data truncation and data corruption problems: since a
flexfield is often passed as its concatenated flexfield values, the length of
these concatenated flexfields can quickly exceed the maximum size of the
value set and the underlying segment column in the flexfield table. This is
less likely to cause a problem for key flexfields than for descriptive
flexfields or range flexfields, because key flexfields are usually passed as
a single code combination ID number instead of as concatenated segment
values and therefore take less space. Though the Define Value Set form
and the Define Segments forms do not prevent you from defining flexfield
loops or multiple flexfields within flexfields, you can cause serious
truncation problems and possible data corruption problems in your
application by allowing this to occur. Plan and define your value sets
carefully to avoid these value sets within value sets.
Introduction
Chapter 1 - Page 30
WARNING: Date and DateTime will be obsolete in Release 12 and are
provided for backward compatibility only. For new value sets, use the
format types Standard Date and Standard DateTime.
ATTENTION: You should not specify a hidden ID column for value sets
you use with your Accounting Flexfield or most other key flexfields.
Introduction
Chapter 1 - Page 31
ATTENTION: If you are using flexfields server–side validation, you
cannot use the INTO clause for your value set. You must either remove
your INTO clauses or turn off flexfields server–side validation using the
profile option Flexfields:Validate on Server.
ATTENTION: You cannot modify values for a value set if that value set
is currently being modified by another user, either using the Segment
Values Window or the Account Hierarchy Editor with Oracle General
Ledger. If you get a message saying that the value set is already being
modified, you can try again at a later time.
Introduction
Chapter 1 - Page 32
Practice
Practice
Practice
This
This practice
practice covers
covers the
the following:
following:
1.
1. Important
Important terminology
terminology
2.
2. Diagnostic
Diagnostic techniques
techniques
3.
3. Skills
Skills practice
practice
Exercises
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
Introduction
Chapter 1 - Page 33
combinations table. The column name for Code Combination IDs is
generally followed except where more than 1 instance of the key flexfield
must be stored in the table.
2. What are the typical column names for Key and Descriptive
Flexfields to store their data?
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
Introduction
Chapter 1 - Page 34
4. From the same form as Step 3, query the transactions with the
Reference # of 10001. Click on the DISTRIBUTIONS button,
once you have queried the record. What is the name of the Key
flexfield whose form label is “GL Account”?
___________________________________________________
How many segments can you define for that Key flexfield?
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
Introduction
Chapter 1 - Page 35
B. Identifying which Key flexfields are available in your Application
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
C. Using the Key flexfield you identified in Step A, identify its core
attributes.
___________________________________________________
Introduction
Chapter 1 - Page 36
F. Using the Descriptive flexfield you identified in Step A, identify
its core attributes.
___________________________________________________
Introduction
Chapter 1 - Page 37
Copyright © Oracle Corporation, 2000. All rights reserved.
Introduction
Chapter 1 - Page 38
Diagnostic Tools and
Methods
Chapter 2
Diagnostic
Diagnostic Tools
Tools and
and Methods
Methods
Objectives
Objectives
After
After this
this lesson,
lesson, you
you should
should be
be able
able to:
to:
•• Read
Read andand understand
understand Entity
Entity Relationship
Relationship
Diagrams (ERDs).
Diagrams (ERDs).
•• Read
Read andand understand
understand the
the Oracle
Oracle Applications
Applications
Flexfield
Flexfield ERDs.
ERDs.
•• Run
Run and
and understand
understand Oracle
Oracle SQL
SQL scripts
scripts that
that probe
probe
Oracle
Oracle database
database objects.
objects.
•• Identify
Identify and
and understand
understand the
the major
major configuration
configuration
files used with Oracle Applications.
files used with Oracle Applications.
Objectives
Objectives
•• Run
Run and
and understand
understand flexfield
flexfield diagnostic
diagnostic scripts
scripts
and
and forms.
forms.
•• Begin
Begin developing
developing your
your own
own diagnostic
diagnostic style.
style.
General
General Overview
Overview
What
What is
is the
the "RIGHT"
"RIGHT" diagnostic
diagnostic style?
style?
In this lesson, and the rest of the course, it would be my fondest desire to,
“give you the right answer.” Unfortunately for both of us, there is seldom a
“right” answer. Fortunately for both of us, there are almost always several
“right” answers. So what is a “right” answer?
Note, I did not say anything about how long it took you to get the “right”
answer. There is nothing about how elegant the solution is. There is no
need to fully understand the solution. There is nothing about customer
satisfaction. A “right” answer simply fixes the problem. Are these factors,
and many others, important? Maybe.
Why maybe? All of these factors swirl around any given problem. At any
given time with any given customer facing any given problem, some of
these issues will be important, and others will be insignificant. It is your
job to figure out those factors, and to recognize them during your
resolution process.
Another reason we can’t discuss these factors is that most times they are
outside of your control. How long should it take to solve a problem? Is it
I don’t want to bog you down in the details. I simply want to provide you
with a toolkit you can use to solve many problems you might face in
Oracle Applications. You will, over time, develop your own style of using
those tools.
Basic
Basic Applications
Applications Tools
Tools
•• Help è
Help è About
About Oracle
Oracle Applications
Applications
•• Help è
Help è Record
Record History
History
•• Help è
Help Diagnostics è
è Diagnostics è Examine
Examine
•• Help è
Help Diagnostics è
è Diagnostics è Examine
Examine …
… choose
choose
$DESCRIPTIVE_FLEXFIELD$
$DESCRIPTIVE_FLEXFIELD$ block
block
•• Help è
Help Diagnostics è
è Diagnostics è Examine
Examine …
… choose
choose
$ENVIRONMENT$ block
$ENVIRONMENT$ block
•• Help è
Help Diagnostics è
è Diagnostics è Examine
Examine …
… choose
choose
$PROFILES$ block
$PROFILES$ block
As a refresher, you may have forgotten some of the simple diagnostic and
probing tools built directly into Oracle Applications.
Basic
Basic Applications
Applications Tools
Tools
•• Help è
Help Diagnostics è
è Diagnostics è Display
Display Database
Database Error
Error
•• Help è
Help Diagnostics è
è Diagnostics Properties è
è Properties èItem
Item
•• Help è
Help Diagnostics è
è Diagnostics èTrace
Trace (checkbox)
(checkbox)
•• Utilities:
Utilities: SQL
SQL Trace
Trace profile
profile option
option
•• Application
Application Developer
Developer responsibility
responsibility
10. Set the “Utilities: SQL Trace” profile option. This profile option
can only be set by the System Administrator.
Entity
Entity Relationship
Relationship Diagrams
Diagrams (ERDs)
(ERDs)
•• ItIt describes
describes exactly
exactly the
the information
information needs
needs of
of the
the
business.
business.
•• ItIt facilitates
facilitates discussion.
discussion.
•• ItIt helps
helps to
to prevent
prevent mistakes,
mistakes, misunderstanding.
misunderstanding.
•• ItIt forms
forms important
important “Technical
“Technical Reference”
Reference”
documentation.
documentation.
•• ItIt is
is the
the basis
basis for
for the
the physical
physical creation
creation of
of database
database
objects within the Oracle Applications database.
objects within the Oracle Applications database.
ERDs are conceptual models that show entities and relationships. While it
really is that simple, we should answer the question, why?
What
What is
is an
an Entity?
Entity?
•• An
An Entity
Entity is:
is:
–– “Something”
“Something” of of significance
significance to
to the
the business
business
about which data must be
about which data must be known.known.
–– A
A name
name forfor the
the things
things that
that you
you can
can list.
list.
–– Usually
Usually aa noun.
noun.
•• Examples:
Examples: objects,
objects, events
events
•• Entities
Entities have
have instances.
instances.
Entities
Entities and
and Instances
Instances
PERSON
PERSON Mahatma
Mahatma Gandhi
Gandhi
PRODUCT
PRODUCT 2.5
2.5 x 35 mm copper
x 35 mm copper nail
nail
PRODUCT
PRODUCT TYPE
TYPE nail
nail
EMPLOYMENT
EMPLOYMENT CONTRACT
CONTRACT my
my previous
previous contract
contract
JOB
JOB violinist
violinist
SKILL
SKILL LEVEL
LEVEL fluent
fluent
TICKET
TICKET RESERVATION
RESERVATION tonight:
tonight: Hamlet
Hamlet in
in the
the Royal
Royal
PURCHASE
PURCHASE the
the CD
CD II bought
bought yesterday
yesterday
ELECTION
ELECTION for
for parliament
parliament next
next fall
fall
PRINTER
PRINTER PREFERENCE
PREFERENCE …
…
DOCUMENT
DOCUMENT VERSION
VERSION ...
...
®
Attributes
Attributes
•• Also
Also represents
represents something
something ofof significance
significance to
to the
the
business
business
•• Is
Is aa single
single valued
valued property
property detail
detail of
of an
an entity
entity
•• Is
Is aa specific
specific piece
piece of
of information
information that:
that:
–– Describes
Describes
–– Quantifies
Quantifies
–– Qualifies
Qualifies
–– Classifies
Classifies
–– Specifies
Specifies
an
an entity.
entity.
®
Relationships
Relationships
•• Also
Also represent
represent something
something ofof significance
significance to
to the
the
business
business
•• Express
Express how
how entities
entities are
are mutually
mutually related
related
•• Always
Always exist
exist between
between two
two entities
entities (or
(or one
one entity
entity
twice)
twice)
•• Always
Always have
have two
two perspectives
perspectives
•• Are
Are named
named at
at both
both ends
ends
Relationships
Relationships
JOB manager
EMPLOYEE cook
Shintaro waitress
dish washer
Jill financial controller
Adam
Ahmed porter
waiter
Maria
piano player
Numerical
Numerical observation:
observation:
•• All
All EMPLOYEES
EMPLOYEES have
have aa JOB
JOB
•• No
No EMPLOYEE
EMPLOYEE hashas more
more than
than one
one JOB
JOB
•• Not
Not all
all JOBS
JOBS are
are held
held by
by an
an EMPLOYEE
EMPLOYEE
•• Some
Some JOBS
JOBS are
are held
held by
by more
more than
than one
one EMPLOYEE
EMPLOYEE
®
Drawing
Drawing Entities
Entities in
in ERDs
ERDs
•• Drawn
Drawn as
as aa “softbox”
“softbox”
•• Name
Name singular
singular
EMPLOYEE JOB
•• Name
Name inside
inside
ELECTION
•• Neither
Neither size,
size,
nor
nor position
position
has
has aa special
special TICKET
meaning
meaning ORDER
RESERVATION
JOB ASSIGNMENT
Drawing
Drawing Attributes
Attributes in
in ERDs
ERDs
EMPLOYEE JOB
* Family Name * Title
* Address o Description
o Birth Date
o Shoe Size
o Email
Drawing
Drawing Relationships
Relationships in
in ERDs
ERDs
EMPLOYEE JOB
has
held by
Perspectives
Perspectives of
of Relationships
Relationships in
in ERDs
ERDs
mandatory:
mandatory: optional:
optional:
held by
Reading
Reading Relationships
Relationships in
in ERDs
ERDs
P split into Q
part of
Key Flexfields
The Development Team ERDs differ from the AOL TRM ERDs in two (2)
slight ways. One, the key relationships are labeled to allow for easier
reading. Two, some additional tables and views are listed. The
Development Team ERDs are included after the AOL TRM ERDs for
comparison.
Key Flexfields:
FND_ID_FLEX_STRUCTURES
add … FND_ID_FLEX_STRUCTURES_TL
add … FND_ID_FLEX_STRUCTURES_VL
FND_FLEX_VALIDATION_RULES
add … FND_FLEX_VALIDATION_RULES_TL
add … FND_FLEX_VALIDATION_RULES_VL
FND_ID_FLEX_SEGMENTS
add … FND_ID_FLEX_SEGMENTS_TL
add … FND_ID_FLEX_SEGMENTS_VL
FND_VALUE_ATTRIBUTE_TYPES
add … FND_VALUE_ATTRIBUTE_TYPES_TL
add … FND_VALUE_ATTRIBUTE_TYPES_VL
Account Generator:
WF_RUNNABLE_PROCESSES_V
add … WF_ITEM_TYPES
add … WF_ITEM_TYPES_TL
add … WF_ITEM_TYPES_VL
qualifies
for
FLEXFIELD QUALIFIER VALUE FLEXFIELD SEGMENT (TL)
qualified
by
for validated a
by portion
of
used made
by up of
defined
for defined
for
defined
for
SHORTHAND
ALIAS
using
CROSS VALIDATION
EXCLUDE RULE LINE
for for
CROSS VALIDATION
RULE STATISTIC
has
has
for
CROSS VALIDATION for CROSS
RULE LINE VALIDATION
RULE (TL) context
made for
up of
has
represented made
as up of
has
Descriptive Flexfields
The Development Team ERDs differ from the AOL TRM ERDs in two (2)
slight ways. One, the key relationships are labeled to allow for easier
reading. Two, some additional tables and views are listed. The
Development Team ERDs are included after the AOL TRM ERDs for
comparison.
Descriptive Flexfields:
FND_DESCRIPTIVE_FLEXS
add … FND_DESCRIPTIVE_FLEXS_TL
add … FND_DESCRIPTIVE_FLEXS_VL
FND_DESCR_FLEX_COLUMN_USAGES
add … FND_DESCR_FLEX_COL_USAGE_TL
add … FND_DESCR_FLEX_COL_USAGE_VL
FND_DESCR_FLEX_CONTEXTS
add … FND_DESCR_FLEX_CONTEXTS_TL
add … FND_DESCR_FLEX_CONTEXTS_VL
a used
validated portion by
against of
made
used up of
by
a
portion
of
DEFAULT CONTEXT FIELD
COMPILED DESCRIPTIVE FLEXFIELD
a reference
for
for
APPLICATION TABLE
qualified by
Flexfield Values
The Development Team ERDs differ from the AOL TRM ERDs in two (2)
slight ways. One, the key relationships are labeled to allow for easier
reading. Two, some additional tables and views are listed. The
Development Team ERDs are included after the AOL TRM ERDs for
comparison.
Value Sets:
FND_ID_FLEX_SEGMENTS
add … FND_DESCR_FLEX_COLUMN_USAGES
FND_FLEX_HIERARCHIES
add … FND_FLEX_HIERARCHIES_TL
add … FND_FLEX_HIERARCHIES_VL
FND_FLEX_VALUES
add … FND_FLEX_VALUES_TL
add … FND_FLEX_VALUES_VL
FND_FLEX_VALUE_RULES
add … FND_FLEX_VALUE_RULES_TL
add … FND_FLEX_VALUE_RULES_VL
FND_RESPONSIBILITY
add … FND_RESPONSIBILITY_TL
add … FND_RESPONSIBILITY_VL
VALUE SET
FLEXFIELD VALUE HIERARCHY
validated
against
used
containing used in
by validated
FLEXFIELD SEGMENT by
(TL)
used by
made
up of
containing
NORM HIERARCHY
part of
containing
using
part of part of
made
up of
validated by
FLEXFIELD
VALIDATION EVENT
used
for dependent
on
defined
for
parent of
SECURITY RULE for FLEXFIELD
ELEMENT VALUE
restricted
made SECURITY
by
up of RULE (TL) validated
by
assigned
to
used for
FLEXFIELD
VALIDATION TABLE
registered
as
defined
for
used
secured as
RESPONSIBILITY (TL) by
FLEXFIELD VALUE
SECURITY RULE
APPLICATION TABLE
defined USAGE
for
Diagnostic
Diagnostic Database
Database Scripts
Scripts
•• Describe
Describe Database
Database Space
Space
•• Describe
Describe Data
Data Files
Files
•• Describe
Describe aa Database
Database Object
Object
•• Count
Count Database
Database Objects
Objects by
by Type
Type
•• Table
Table Definitions
Definitions
•• Describe
Describe Tablespace
Tablespace
•• Describe
Describe Database
Database Users
Users
There are numerous scripts that one could run to explore and probe the
database objects contained within an Oracle Applications database. This
section covers a few of the more important scripts. Appendix A provides
you with a more detailed listing, and a link to where those scripts can be
downloaded.
In addition to these custom scripts, there are many scripts that Oracle has
provided to the customers that are shipped with Oracle Applications.
These scripts are kept in the $AD_TOP/sql directory, and are discussed in
this section as well.
rem ddbspace.sql
rem
ttitle 'Database Size and Free Space'
rem
col tablespace_name format a15 heading 'TABLESPACE'
col file_id format 999 heading 'ID'
col file_bytes format 999,999,999 heading 'FILE SIZE|(K)'
col free_extents format 9,999 heading 'FREE|EXTENT'
col free_bytes format 999,999,999 heading 'FREE SIZE|(K)'
rem dfile.sql
rem
set linesize 132
rem
ttitle 'Data Files by Tablespace'
rem
col tablespace_name format a15 heading 'TABLESPACE'
col file_id format 9999 heading 'ID'
col bytes format 9,999,999,999,999 heading 'BYTES'
col blocks format 9,999,999 heading 'BLOCKS'
col status format a9 heading 'STATUS'
col file_name format a65 heading 'FILE NAME'
rem
break on report on tablespace_name skip 1
compute sum of bytes blocks on report tablespace_name
rem
select tablespace_name, file_id, bytes, blocks, status,
file_name
from sys.dba_data_files
order by tablespace_name, file_id;
rem
rem dobject.sql
rem
ttitle 'Database Objects'
rem
col owner format a12 heading 'OWNER'
col object_name format a30 heading 'OBJECT NAME'
rem col object_id format 99999 heading 'ID'
col object_type format a13 heading 'OBJECT TYPE'
col created format a9 heading 'CREATED'
col modified format a9 heading 'MODIFIED'
col status format a1 heading 'S'
rem
break on owner skip 1
rem
select owner, object_name, object_type, created,
decode( last_ddl_time, created, null, last_ddl_time ) modified,
decode( status, 'VALID', null, 'INVALID', 'I', '?' ) status
from sys.dba_objects
where owner like upper('&owner')
and object_type like upper('&type')
and object_name like upper('&object')
order by owner, object_name;
rem dobjcnts.sql
rem
set linesize 132
rem
ttitle 'Data Dictionary Object Summary by Owner/Type'
rem
col owner format a12 heading 'OWNER'
col total_count format 999999 heading 'TOTAL'
col cluster_count format 99 heading 'CLU'
col table_count format 99999 heading 'TABLE'
col index_count format 99999 heading 'INDEX'
col view_count format 99999 heading 'VIEW'
col synonym_count format 999999 heading 'SYNONYM'
col sequence_count format 9999 heading 'SEQ'
col dblink_count format 999 heading 'DB|LINK'
rem dtcol80.sql
rem
ttitle 'Table Definitions'
col owner format a8 heading 'OWNER'
col table_name format a24 heading 'TABLE NAME'
col column_id format 999 heading 'ID'
col nullable format a1 heading 'N'
col column_name format a24 heading 'COLUMN NAME'
col data_type format a14 heading 'DATA TYPE'
rem
break on owner on table_name skip 1
rem
select owner, table_name, column_id,
decode( nullable, 'N', 'N', null ) nullable,
column_name, data_type ||
decode( data_type,
'VARCHAR2', '(' || to_char(data_length) || ')',
'DATE', null,
'NUMBER', decode( data_precision, null, null,
'(' || to_char(data_precision) ||
decode( data_scale, null, null, 0, null,
',' || to_char(data_scale) ) || ')' ),
'CHAR', '(' || to_char(data_length) || ')',
'VARCHAR', '(' || to_char(data_length) || ')',
'RAW', '(' || to_char(data_length) || ')'
) data_type
from sys.dba_tab_columns
where owner like upper('&owner')
and table_name like upper('&table')
and column_name like upper('&column')
order by owner, table_name, column_id;
rem dtspace.sql
rem
ttitle 'Tablespace Definitions'
col contents format a9 heading 'CONTENTS'
col status format a9 heading 'STATUS'
col tablespace_name format a25 heading 'TABLESPACE'
col initial_extent format 999,999 heading 'INITIAL|EXTENT|(K)'
col next_extent format 999,999 heading 'NEXT|EXTENT|(K)'
rem duser.sql
rem
ttitle 'Database Users'
rem
col user_id format 9990 heading 'ID'
col username format a12 heading 'USERNAME'
col dt format a1 heading ''
col default_tablespace format a15 heading 'DEFAULT'
col tt format a1 heading ''
col temporary_tablespace format a12 heading 'TEMPORARY'
col profile format a18 heading 'PROFILE'
col created format a9 heading 'CREATED'
rem
select user_id, username,
decode( default_tablespace, 'SYSTEM', '*', null ) dt,
default_tablespace,
decode( temporary_tablespace, 'SYSTEM', '*', null ) tt,
temporary_tablespace,
profile, created
from sys.dba_users
where username like upper('&user')
order by username;
Diagnostic
Diagnostic Applications
Applications Scripts
Scripts
•• Check
Check and
and List
List Compilation
Compilation Errors
Errors
•• List
List Job
Job Timing
Timing Information
Information
•• Count
Count Objects
Objects by
by Type
Type
•• Applications
Applications Configuration
Configuration Script
Script
•• List
List Product
Product Dependencies
Dependencies
•• List
List Pinned
Pinned Objects
Objects
•• Report
Report Database
Database Configuration
Configuration
•• Report
Report Table
Table Sizes
Sizes
•• Show
Show Imminent
Imminent Extent
Extent Failure
Failure
•• Show
Show User
User Space
Space
®
In addition to the SQL Scripts shown in the previous section, there are
numerous scripts that are shipped with the Application. These scripts are
stored in the $AD_TOP/sql directory.
REM ================================================================
REM The select below is equivalent to
REM "show errors <object type> <object name>"
REM
REM Note that we only show errors for enabled triggers. If there
REM are disabled triggers with errors, we ignore them.
REM ================================================================
--
-- Copyright (c) 2000 Oracle Corporation Redwood Shores, California, USA
-- All rights reserved.
--
-- FILENAME
-- adtimdet.sql
--
-- RCS HEADER
-- $Header: adtimdet.sql 115.0 2000/04/27 20:35:45 rlotero ship $
--
-- DESCRIPTION
-- Script to list timing information for all jobs in a given phase.
--
-- NOTES
--
-- sqlplus <APPS username>/<APPS password> @adtimdet.sql \
-- <SESSION_ID> <PHASE_NUMBER> <OUTPUT FILE>
--
-- where SESSION_ID : Identifier for the session
spool &&3
spool off
commit;
exit;
break on report
compute sum of objcnt on report
spool adutconf.lst
prompt
prompt Oracle Applications Database Configuration Report
prompt
prompt
prompt All dates are shown in DD-MM-YYYY format
prompt
show pause
prompt
prompt --> Sql*Plus NEWPAGE setting
prompt
show newpage
prompt
prompt --> Rollback Segment Information
prompt
prompt --> Start of Application Information Gathering
prompt
select decode(a.APPLICATION_short_name,
'SQLAP','AP','SQLGL','GL','OFA','FA',
a.APPLICATION_short_name) apps
, o.ORACLE_username
, fmi.module_short_name
, fmi.module_version
, decode(fmi.status,'I','Installed','S','Shared',
'N','Inactive',fmi.status) status
, decode(fmi.db_status,'I','Installed',
'N','Inactive',db_status) module_db_status
from fnd_oracle_userid o, fnd_application a, fnd_module_installations fmi
where fmi.application_id = a.application_id(+)
and fmi.oracle_id = o.oracle_id(+)
order by 1,2,3
/
select data_group_id,
data_group_name
, decode(default_group_flag,'N','No','Y','Yes',
default_group_flag) default_group_flag
, to_char(creation_date,'DD-MM-YYYY') creation, created_by crby
, to_char(last_update_date,'DD-MM-YYYY') updated, last_updated_by luby
from fnd_data_groups
select decode(installed_flag,'I','Installed','B','Base','Unknown')
installed_flag, language_code, nls_language from fnd_languages
where installed_flag in ('I','B')
order by installed_flag;
prompt
prompt --> End of Application Information Gathering
spool off
exit;
spool adutfpd.lst
spool off
set lines 79
column type format a12
column OBJECT format a36
column loads format 99990
column execs format 9999990
column kept format a4
column "TOTAL SPACE (K)" format a20
spool ADXCKPIN.lst
spool off
exit;
REM +=======================================================================+
REM | Copyright (c) 1990 Oracle Corporation, Redwood Shores, CA, USA |
REM | All rights reserved. |
REM +=======================================================================+
REM | $Header: ADXRCSDC.sql 115.0 1998/04/24 16:40:34 appldev ship $
REM
set heading on
set pages 1000
set linesize 78
break on TSPACE
ttitle 'Overall Database Configuration'
set heading off
select ' Rollback Segments' from sys.dual;
set heading on
ttitle off
EXIT;
REM +=======================================================================+
REM | Copyright (c) 1990 Oracle Corporation, Redwood Shores, CA, USA |
REM | All rights reserved. |
REM +=======================================================================+
REM | $Header: ADXRSFTS.sql 115.0 1998/04/24 16:41:10 appldev ship $
REM
REM FILENAME
REM ADXRSFTS.sql - Report State, Find Table Size
REM formerly, tabsize.sql
REM
REM DESCRIPTION
REM Find the size (blocks, extents, extpct) of the given table.
REM
REM NOTES
REM Usage:
REM sqlplus SYSTEM/<SYSTEM_password> @ADXRSFTS.sql <username> <tablename>
REM
REM HISTORY
REM 05/14/90 L Doo Created.
REM
REM +=======================================================================+
set heading on
set verify off
ttitle 'Size for Table &&1..&&2'
EXIT
REM +=======================================================================+
REM | Copyright (c) 1989 Oracle Corporation, Redwood Shores, CA, USA |
REM | All rights reserved. |
REM +=======================================================================+
REM | $Header: ADXRSSIE.sql 115.1 1998/05/11 10:14:07 schadala ship $
REM
REM FILENAME
REM ADXRSSIE.sql - Report State, Show Imminent next-Extent failure
REM formerly, blowup.sql
REM
REM DESCRIPTION
REM Generate a list of tables and indexes whose next extent to be grabbed
REM would be too large to be allocated in their corresponding tablespaces.
REM
REM NOTES
REM Usage: sqlplus SYSTEM/<SYSTEM_password> @ADXRSSIE.sql
REM
REM HISTORY
REM 12/12/89 L. Doo Created.
REM 12/18/89 L. Doo Added the absolute path for blowup_table.sql
REM and blowup_ind.sql.
REM 07/21/92 A. Chang Converted to use straight SQL, not PL/SQL
REM
REM +=======================================================================+
set heading on
ttitle "NEXT EXTENT BLOWUP REPORT"
set pagesize 67
column tablespace heading "Tablespace" format a10
column type heading "Object Type" format a11
column name heading "Object Name" format a30
column partition_name heading "Partition" format a10
column next_extent heading "Next Extent (b)" format 9,999,999,999
break on tablespace
EXIT
REM +=======================================================================+
REM | Copyright (c) 1990 Oracle Corporation, Redwood Shores, CA, USA |
REM | All rights reserved. |
REM +=======================================================================+
REM | $Header: ADXRSSUS.sql 115.0 1998/04/24 16:41:48 appldev ship $
REM
REM FILENAME
REM ADXRSSUS.sql - Report State, Show User Space
REM formerly, byuser.sql
REM
REM DESCRIPTION
REM Report how much space each user has.
REM
REM NOTES
REM Usage: sqlplus SYSTEM/<SYSTEM_password> @ADXRSSUS.sql
REM
REM HISTORY
REM 01/16/90 D Touw Created
REM
REM +=======================================================================+
set heading on
set pages 122
set linesize 79
set newpage 0
EXIT
Applications
Applications Configuration
Configuration Files
Files
•• adconfig.txt
adconfig.txt
•• def.txt
def.txt
•• applprod.txt
applprod.txt
•• applterr.txt
applterr.txt
•• applora.txt
applora.txt
•• APPLSYS.env
APPLSYS.env
•• adovars.env
adovars.env
Flexfield
Flexfield Diagnostic
Diagnostic Scripts
•• Check
Check Key
Key Flexfields
Flexfields
•• Check
Check Descriptive
Descriptive Flexfields
Flexfields
•• Check
Check Flexbuilder
Flexbuilder Rules
Rules
•• Check
Check Value
Value Sets
Sets
There are a few scripts that have been provided for us by the Flexfield
Development Team that could possibly highlight problems with Flexfields.
Additionally, there are some scripts that have been independently
developed that are listed in this section for your use.
The Flexfield Development Teams scripts are shipped with the Application
for 11i. They are kept in the $FND_TOP/sql directory.
Each of the above scripts is too long to reproduce. The scripts are
available from several sources. One, you can get them from any Oracle
Applications Release 11i file system. Two, you can get them from the
following URL:
http://atgorl.us.oracle.com/wsawyer/diagnostic_scripts/flexfields/
prompt /=====================================================================\
prompt | KEY FLEXFIELDS CONSISTENCY CHECKS
prompt |======================================================================
prompt |
prompt | DESCRIPTION
prompt | Key Flexfields data integrity check script.
prompt |
prompt | Forms :
prompt | FNDFFIIF : Key Flexfield Registration Form
prompt | Maintains KFF registration.
prompt | Responsibility : Application Developer
prompt | Navigation Path : Flexfield->Key->Register
prompt |
prompt | FNDFFMIS : Key Flexfield Segment Definition Form
prompt | Maintains KFF structure and segment definitions
prompt | Responsibility : Application Developer
prompt | Navigation Path : Flexfield->Key->Segments
prompt |
prompt | FNDFFMSA : Key Flexfield Shorthand Alias Definition Form
prompt | Maintains KFF SHAs.
prompt | Responsibility : Application Developer
prompt | Navigation Path : Flexfield->Key->Aliases
prompt |
prompt | FNDFFMCV : Key Flexfield Cross Validation Definition Form
prompt | Maintains KFF CVRs.
prompt | Responsibility : Application Developer
prompt | Navigation Path : Flexfield->Key->CrossValidation
prompt |
prompt | FNDFFMWP : Account Generator Process Assignment Form
prompt | Maintains KFF/AG process assignments.
prompt | Responsibility : Application Developer
prompt | Navigation Path : Flexfield->Key->Accounts
prompt |
prompt | Abbreviations in this script:
prompt | KFF : Key Flexfield.
prompt | SHA : Shorthand Alias.
prompt | CVR : Cross Validation Rule.
prompt | AG : Account Generator.
prompt |
prompt | To help find the history of the corruption, all the select stmts
prompt | also dump the WHO columns from relevant tables.
prompt | (Dates will be in RRRR/MM/DD format.)
prompt |
prompt | 'WHO <table name without fnd_ prefix>'
prompt | =========================
prompt | 'CD :<creation_date>
prompt | CB :<created_by>
prompt /=====================================================================\
prompt | DESCRIPTIVE FLEXFIELDS CONSISTENCY CHECKS
prompt |======================================================================
prompt |
prompt | DESCRIPTION
prompt | Descriptive Flexfields data integrity check script.
prompt |
prompt | Forms :
prompt | FNDFFIDF : Descriptive Flexfield Registration Form
prompt | Maintains DFF registration.
prompt | Responsibility : Application Developer
prompt | Navigation Path : Flexfield->Descriptive->Register
prompt |
prompt | FNDFFMDC : Descriptive Flexfield Segment Definition Form
prompt | Maintains DFF context and segment definitions
prompt +======================================================================
prompt | FlexBuilder data integrity check script.
prompt |
prompt | If these select statements return rows, there are data integrity
prompt | problems.
prompt | The rules and explanations below contain information about solving
prompt | problems using either FlexBuilder Setup forms or SQL*Plus DML
I should have put this comment in the check script. too late...
QUESTION:
Client would like to verify that inserting No into these Null fields will keep
the same process as the Null value. He wants to verify there will be no
change in function by inserting this 'no' value.
ANSWER:
In segment usages column NULL means all Yes. Customer should use
assignments form and set the usage flags to 'Yes'.
prompt /=====================================================================\
prompt | VALUE SETS CONSISTENCY CHECKS
prompt |======================================================================
Additional
Additional Flexfield
Flexfield Scripts
Scripts
•• Descriptive
Descriptive Flexfield
Flexfield Definitions
Definitions
•• Describe
Describe Flexfield
Flexfield Tables
Tables
Here are some additional flexfield diagnostic scripts that may help.
rem fnddflex.sql
rem
ttitle 'Descriptive Flex Table/Column Definitions'
rem
col applicaiton_id format 99999 heading 'APPL|ID'
col descriptive_flexfield_name format a20 heading 'FLEXFIELD NAME'
col title format a20 heading 'TITLE'
col descriptive_flex_context_code format a20 heading 'FLEX CONTEXT CODE'
col application_table_name format a20 heading 'TABLE NAME'
col application_column_name format a20 heading 'APPLICATION|COLUMN NAME'
col end_user_column_name format a20 heading 'END USER|COLUMN NAME'
rem
break on application_id on application_table_name on descriptive_flexfield_name -
on title on descriptive_flex_context_code
rem
select f.application_id,
f.descriptive_flexfield_name,
f.title,
c.descriptive_flex_context_code,
f.application_table_name,
DECLARE
flextable_name ALL_TAB_COLUMNS.table_name%TYPE;
flexcol_name ALL_TAB_COLUMNS.column_name%TYPE;
flexcol_nullable ALL_TAB_COLUMNS.nullable%TYPE;
flexcol_dtype ALL_TAB_COLUMNS.data_type%TYPE;
flexcol_dlen ALL_TAB_COLUMNS.data_length%TYPE;
flexcol_dprec ALL_TAB_COLUMNS.data_precision%TYPE;
flexcol_dscale ALL_TAB_COLUMNS.data_scale%TYPE;
tableinfo_name ALL_TABLES.table_name%TYPE;
tableinfo_tblsp ALL_TABLES.tablespace_name%TYPE;
tableinfo_part ALL_TABLES.partitioned%TYPE;
tableinfo_pfree ALL_TABLES.pct_free%TYPE;
tableinfo_pused ALL_TABLES.pct_used%TYPE;
tableinfo_nrows ALL_TABLES.num_rows%TYPE;
tableinfo_init ALL_TABLES.initial_extent%TYPE;
tableinfo_next ALL_TABLES.next_extent%TYPE;
tableinfo_min ALL_TABLES.min_extents%TYPE;
tableinfo_max ALL_TABLES.max_extents%TYPE;
tableinfo_pinc ALL_TABLES.pct_increase%TYPE;
oldtable_name ALL_TAB_COLUMNS.table_name%TYPE;
oldcol_name ALL_TAB_COLUMNS.column_name%TYPE;
CURSOR flextables IS
SELECT ATC.table_name, ATC.column_name, ATC.nullable, ATC.data_type,
ATC.data_length, ATC.data_precision, ATC.data_scale
FROM ALL_TAB_COLUMNS ATC, ALL_TABLES ATBLS
WHERE (ATC.table_name LIKE 'FND%FLEX%' OR
CURSOR tableinfo IS
SELECT table_name, tablespace_name, partitioned, pct_free, pct_used,
num_rows, initial_extent, next_extent, min_extents, max_extents,
pct_increase
FROM ALL_TABLES
WHERE table_name LIKE 'FND%FLEX%' OR
table_name LIKE 'FND%SEGMENT%' OR
table_name LIKE 'FND%VAL%ATTRIB%' OR
table_name LIKE 'FND%CONTEXT_FIELD'
ORDER BY table_name;
BEGIN
DBMS_OUTPUT.ENABLE (1000000);
OPEN flextables;
OPEN tableinfo;
oldtable_name := ' ';
oldcol_name := ' ';
LOOP
FETCH flextables INTO flextable_name, flexcol_name, flexcol_nullable,
flexcol_dtype, flexcol_dlen, flexcol_dprec, flexcol_dscale;
EXIT WHEN flextables%NOTFOUND;
IF oldcol_name <> flexcol_name THEN
oldcol_name := flexcol_name;
IF oldtable_name <> flextable_name THEN
FETCH tableinfo INTO tableinfo_name, tableinfo_tblsp,
tableinfo_part, tableinfo_pfree, tableinfo_pused,
tableinfo_nrows, tableinfo_init, tableinfo_next,
tableinfo_min, tableinfo_max, tableinfo_pinc;
DBMS_OUTPUT.PUT_LINE (CHR(10));
DBMS_OUTPUT.PUT_LINE ('TABLE NAME: '||flextable_name);
DBMS_OUTPUT.PUT_LINE ('TABLESPACE: '||tableinfo_tblsp);
DBMS_OUTPUT.PUT_LINE ('PARTITIONED: '||tableinfo_part);
DBMS_OUTPUT.PUT_LINE ('% FREE: '||LPAD(TO_CHAR(
tableinfo_pfree),10,' ')||' % USED: '
||LPAD(TO_CHAR(tableinfo_pused),10,' '));
DBMS_OUTPUT.PUT_LINE ('# OF ROWS: '
||LPAD(TO_CHAR(ROUND(tableinfo_nrows,0)),10,' '));
DBMS_OUTPUT.PUT_LINE ('INIT EXTENT: '
||LPAD(TO_CHAR(tableinfo_init),10,' ')||' NEXT EXTENT: '
||LPAD(TO_CHAR(tableinfo_next),10,' '));
DBMS_OUTPUT.PUT_LINE ('MIN EXTENTS: '
||LPAD(TO_CHAR(tableinfo_min),10,' ')||' MAX EXTENTS: '
||LPAD(TO_CHAR(tableinfo_max),10,' '));
DBMS_OUTPUT.PUT_LINE ('% INCREASE: '
||LPAD(TO_CHAR(tableinfo_pinc),10,' '));
DBMS_OUTPUT.PUT_LINE (CHR(10));
DBMS_OUTPUT.PUT_LINE ('Name NULL?
TYPE');
Flexfield
Flexfield Test
Test Form
Form
•• Testing
Testing Key
Key Flexfields
Flexfields
•• Testing
Testing Descriptive
Descriptive Flexfields
Flexfields
•• Testing
Testing Range
Range Flexfields
Flexfields
The Flexfield Test form can be used to test any key flexfield structure as
defined in a foreign key form (i.e.,. you can use VALIDATE modes of
FULL, PARTIAL, PARTIAL_IF_POSSIBLE and NONE). Currently the test
form supports only the Oracle General Ledger Accounting Flexfield
structures to be tested in the combinations (maintenance) form (i.e.,
VALIDATE mode of FOR_INSERT).
You can modify the definition of the key flexfield in the test form by clicking
the "Define" button. This takes you to the Key Flexfield Definition
Arguments screen.
You can set the values for all the arguments to key flexfield definition (i.e.,
the call to FND_KEY_FLEX.DEFINE procedure) in this screen. Please
refer to the Oracle Applications Developer's Guide for descriptions of
You can use the BLOCK.FIELDs given below with the following arguments
that require a BLOCK.FIELD value.
You can also set the INSERT and UPDATE properties of the block where
the flexfield is defined by checking the corresponding checkboxes. The
"Use Data Field" checkbox can be used to test the case where you pass in
a DATA_FIELD to the flexfield definition.
Once the Flexfield has been defined click the "Flexfield" button on the
main window to get to the Key Flexfield Test screen.
The "Copy" field is to be used in cases where you used the COPY
argument to the Flexfield Definition. Using this argument you can "copy"
values from this field to the flexfield window.
The "Segments" field is where the flexfield is defined. You can enter code
combinations into this field or use "List of Values" or "Field Edit" from this
field to open the Key Flexfield window.
The "ID" field will display the code combination id (When doing a "FULL"
validation).
The "Data Field" will display the concatenated id values (When the "Use
Data Field" checkbox is checked in the Arguments screen).
The fields "Valatt 1 - 5" will display the segment qualifier values if used in
the VALATT argument to the flexfield definition.
The fields "Segment 1 - 30" will display the individual segment values
depending on the segment to column mapping of the key flexfield
segments (If USEDBFLDS argument is set to "Y").
This block will allow you to test your flexfield definition. It allows you to
enter code combinations, query up combinations and do inserts.
The Flexfield Test form can be used to test descriptive flexfields that use
the standard naming conventions for column names; ATTRIBUTE1
through ATTRIBUTE30, or GLOBAL_ATTRIBUTE1 through
GLOBAL_ATTRIBUTE30 for the segment columns, and either
ATTRIBUTE_CATEGORY, ATTRIBUTE_CATEGORY_CODE or
CONTEXT for the context column. If the descriptive flexfield you wish to
test does not have such columns you can replicate your flexfield setup on
a special test flexfield called "Test Descriptive Flexfields" (Owned by the
"Application Object Library" application). This is a descriptive flexfield that
has been created for testing purposes.
If you have a context reference field defined for your flexfield, that field will
not exist in this form. As a workaround temporarily change the context
reference field to "DESCR_FLEX.ATTRIBUTECAT". Similarly
:BLOCK.FIELD references in your value sets and defaults will not work as
these fields will not exist in this form. As a workaround the form provides
five fields called "DESCR_FLEX.REFERNECE1 through
DESCR_FLEX.REFERENCE5 that can be used for such cases. Update
value sets and defaults that have such :BLOCK.FIELD references to use
these fields instead.
You can set the values for all the arguments to descriptive flexfield
definition (i.e., the call to FND_DESCR_FLEX.DEFINE procedure) in this
screen. Please refer to the Oracle Applications Developer's Guide for
descriptions of these arguments. These fields default to the default values
of these arguments.
You can also set the INSERT and UPDATE properties of the block where
the flexfield is defined by checking the corresponding checkboxes. The
"Use Data Field" checkbox can be used to test the case where you pass in
a DATA_FIELD to the flexfield definition.
Once the Flexfield has been defined click the "Flexfield" button on the
main window to get to the Descriptive Flexfield Test screen.
The ID field can be used to enter any numeric ID value to identify this
record. This is a required field, so a value should be entered before you
save the record.
The "Context Reference Field" is the field that you can use as a reference
field for the flexfield context value. The internal name of this field is
DESCR_FLEX.ATTRIBUTECAT. The LOV on this field will give you a list
of enabled contexts for the flexfield.
The next field [ ] is the field where the descriptive flexfield is defined.
Navigating to this field should open the Descriptive Flexfield window.
The "Attribute 1 - 30" fields will display the individual segment values
depending on the segment to column mapping of the descriptive flexfield
segments. (If USEDBFLDS argument is set to "Y")
This block will allow you to test your flexfield definition. It allows you to
enter descriptive flexfield values, query up records based on descriptive
flexfield values and do inserts.
The test form can be used to test the Range Flexfield implementation of
any frozen key flexfield structure. The test form also allows you to enable
and test up to two Type fields.
You can modify the definition of the range flexfield in the test form by
clicking the "Define" button. This takes you to the Range Flexfield
Definition Arguments screen.
You can enable up to two Type fields in the range flexfield window. The
form has two fields called RANGE_FLEX.SEGMENTS_TYPE1 and
RANGE_FLEX.SEGMENTS_TYPE2 for the concatenated type values.
For concatenated type descriptions there are two fields named
RANGE_FLEX.DESCRIPTIONS_TYPE1 and DESCRIPTIONS_TYPE2
and for concatenated type ID values there are fields
RANGE_FLEX.DATA_FIELD_TYPE1, and
RANGE_FLEX.DATA_FIELD_TYPE2. There are also fields
SEGMENT1_TYPE1 through SEGMENT30_TYPE1 and
SEGMENT1_TYPE2 through SEGMENT30_TYPE2 to store individual
segment type values. So if you need to setup both type fields, the value
for the TYPE_FIELD will be:
RANGE_FLEX.SEGMENTS\n_TYPE1\0RANGE_FLEX.SEGMENTS\n_TYPE2
RANGE_FLEX.DESCRIPTIONS\0RANGE_FLEX.DESCRIPTIONS
You can also set the INSERT and UPDATE properties of the block where
the flexfield is defined by checking the corresponding checkboxes.
Once the Flexfield has been defined click the "Flexfield" button on the
main window to get to the Range Flexfield Test screen.
The ID field can be used to enter any numeric ID value to identify this
record. This is a required field, so a value should be entered before you
save the record.
The four regions "Low", "High", "Type1" and "Type2" have the
concatenated values field, the concatenated descriptions field and the
concatenated ID values field for the low values, the high values and the
two type (if enabled) values. The range flexfield is defined on the
concatenated Low values field. Navigating to this field will open up the
range flexfield window.
Java
Java Code
Code Tracing
Tracing
http://www-apps.us.oracle.com/atg/flex/static/aoldebug.html
http://www-apps.us.oracle.com/atg/flex/static/aoldebug.html
The simplicity that the internet computing architecture brings to users and
administrators has contributed greatly to the success that Oracle
Applications has been enjoying against its principal competitors.
However, the complexity that it brings to the development and
maintenance activities has presented a great many challenges. Forms
provides User Exits for running applications C code from within a form
trigger; however, lacking a way to call back into Forms from within a User
Exit requires alternative means for bringing up any kind of dialogs with
Forms. So things like alert windows, the help-about window, language-
translation window, and the Flexfield edit window have all been
implemented using Java support on the client side. This is not a great
stretch, by itself. The main problem is that none of the debugging tools
seems capable of operating on this code, given the physical fragmentation
between the tiers and the indirect means of passing control between them.
With the most powerful means of diagnosing bugs unavailable, the
developer/maintainer is left with one of the least sophisticated means for
diagnosing problems and isolating bugs: debug messages, or trace
statements. This mechanism was first formalized for AOL dialogs in the
AOLDebug class, to provide a framework for categorizing messages, so
that they can be selectively enabled and disabled to focus ones attention
on particular areas of the code needing diagnosis.
Note that this support is targeted for internal developers and maintainers,
and is not "part of the product"; as such, we did not go to the trouble of
incorporating the standard user niceties (such as translatable button
labels), or providing the usual A.D.A. functionality (like shortcut keys, or
the showfields LOV popup).
The tracing code is always present and always running. Each time a
trace-output instruction is encountered, AOLDebug will check the tracing
categories associated with the output; if any of these categories is
currently enabled for output, the line will be output. To view the defined
categories and optionally modify which are currently enabled for output,
just hit the BLOCK_MENU key from inside any of the AOL dialogs. The
AOLDebugBox dialog should be pretty straightforward - with a checkbox
for each category, which is checked if the category is enabled, or
unchecked if it is not enabled. You can use the mouse to select the
categories you want; keyboard-only control is also provided: The arrow
keys move up and down in the list; if a checkbox currently has the input
focus, the spacebar will toggle it on/off, and the ENTER key will commit
the current choices; but if a button has the focus, the spacebar or ENTER
key will press that button.
The buttons along the bottom of the dialog perform the following functions:
Once you have obtained the traces you need, just open one of the AOL
dialogs, bring up the AOLDebugBox dialog, click on the Defaults button,
then the OK button, to restore the system to its initial quiet mode.
Opening this dialog to reconfigure the tracing tends to generate tracing
output, itself, since it's an AOL dialog. If you're just going to be quitting the
apps session, you might as well just exit the apps, directly - the extra
tracing output generated by the really-exit confirmation dialog will be less
than the extra output generated by bringing up the AOLDebugBox dialog
to disable the output...
When support for file/stream output is added, the output destination(s) will
be selected using a different panel in the AOLDebugBox dialog.
Choosing fewer categories means less output, and narrower output focus.
As a general rule, fault-isolation tracing will begin with a fairly broad net,
and progressively narrow, until just one or two specific categories are
needed. It is generally not useful, for instance, to enable categories that
generate highly detailed trace output, until the target has been narrowed
One thing worth noting about this output: The only line that actually shows
data is near the top, when the event's attributes are output. The rest of
this trace simply shows the entry and exit for the principal methods, and a
couple of brief text lines that indicate which path is being taken at critical
conditional points. This illustrates how a small set of sparse traces,
carefully positioned, can be enough to 'see' what is going on, in many
cases. Also, by placing the event-detail output in the 'right' code location,
we only have to see it one time, for one event. This not only makes the
output less verbose, it also means the reader doesn't have to waste time
looking at multiple lines showing the same event, trying to figure out
whether two lines represent two events or just one. (This was extracted
from a trace that was captured by enabling just three trace categories:
KEYS, TRACEENTRY, and TRACEEXIT...)
1. Start general, then get detailed. If you have no idea what code
to watch, enabling entry/exit tracing can give you an idea of
where a problem is occurring. Then enable more detailed
Developer Notes
If you are writing java client code and wish to include tracing support
inside your code, please refer to the instructions in the header section of
the AOLDebug, AOLDebugFlag, and AOLDebugBox source files (in the
oracle.apps.fnd.ui package), for up-to-date developer-oriented information.
A few classes that already have tracing in them can be used as examples.
Refer to the oracle.apps.fnd.flex.FlexWindow class, or to the
CommonDialog, FormattedTextField, and AOLDebugBox classes in the
oracle.apps.fnd.ui package.
Development-Time Tips
One approach to this would be like a full-court press: Make sure that
every step of a calculation and every branch of execution in the code
contains a trace statement, to expose the information relevant to that step
or branch, and make sure every method in every class has call/entry/exit
tracing in it. This would make the debugging trace log effectively the
same as single-stepping through the code, providing complete visibility
into every nontrivial action the code can take. If tracing was free and time
was infinite, this approach would clearly be the best. But tagging each
generated trace line with the current method name requires a stack trace
to be captured and the calling method's name to be parsed from the
appropriate line in that trace -- so an incremental performance loss is
incurred with each line that is output to the trace. Plus, the more trace
hooks that are in a piece of code, the harder it is to actually read the code;
and the more trace lines that are generated to a log, the harder it is to sift
through all the output and find the pieces of information that are relevant
to the behavior being diagnosed. So clearly, some kind of cost/benefit
equation applies to tracing support, and some good judgement must be
exercised -- both by the developer, when choosing where to put the trace
points in the code, and by the maintainer, when choosing which trace
areas to enable for a log.
There are three main choices to make, when wiring your code up to use
debug tracing:
Diagnostic
Diagnostic Style
Style
•• II know
know what
what II know.
know.
•• II know
know what
what II don't
don't know.
know.
•• II don't
don't know
know what
what II don't
don't know.
know.
This scenario is where you have a strong idea what the problem is, and
you use your techniques to confirm the problem.
This scenario is where you encounter a problem, and you have an idea
where to start looking for the problem.
This scenario is where you encounter a problem, and you don’t even have
an idea where to start looking for an answer.
In all of these scenarios, it is imperative that you know and use diagnostic
techniques. However, as the scenarios increase, it becomes even more
imperative to have a good diagnostic style. Why?
Well, using scenario 3, what can you do? If you have a diagnostic style,
you may NOT be able to say where or what the problem is. But! you will
be able to definitively say where or what it is not.
So, what style should you use? Answer, your own. This sounds like a
trite answer, but it is not meant that way. The only style you’re going to be
able to easily follow is your own. Adopting other people’s style forces you
to accept their weaknesses, and to ignore your own strengths. In most
diagnostic situations, there will be multiple methods to get an answer.
Using a method that plays into your strengths is the most effective. Also,
accept that any given style is going to have weaknesses. Those
weaknesses will mean that some problems appear more difficult than
others, and some problems will take more time than others. Don’t let the
weaknesses discourage you from developing and pursuing a style. Even
no style is, in effect, a style.
Summary
Summary
You
You should
should feel
feel comfortable
comfortable with
with the
the following
following
statements
statements about
about your
your knowledge
knowledge of of flexfields
flexfields ::
•• II can
can read
read and
and understand
understand Entity
Entity Relationship
Relationship
Diagrams (ERDs)
Diagrams (ERDs)
•• II can
can read
read and
and understand
understand the
the Oracle
Oracle Applications
Applications
Flexfield
Flexfield ERDs.
ERDs.
•• II can
can run
run and
and understand
understand Oracle
Oracle SQL
SQL scripts
scripts that
that
probe
probe Oracle
Oracle database
database objects.
objects.
•• II can
can identify
identify and
and understand
understand the
the major
major
configuration
configuration files
files used
used with
with Oracle
Oracle Applications.
Applications.
Summary
Summary
•• II can
can run
run and
and understand
understand flexfield
flexfield diagnostic
diagnostic
scripts
scripts and
and forms.
forms.
•• II am
am developing
developing mymy own
own diagnostic
diagnostic style,
style, and
and II am
am
aware of its importance.
aware of its importance.
Practice
Practice Overview
Overview
This
This practice
practice covers
covers the
the following
following topics:
topics:
•• Skills
Skills practice
practice
•• Running
Running SQL
SQL scripts
scripts
•• Using
Using Oracle
Oracle Applications
Applications forms
forms
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
F. Find 1 field that is in the table that is not on the form. What is it?
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
D. Name them
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
__________________________________________________
High-Level Design
Chapter 3 - Page 1
High-Level Design
High-Level
High-Level Design
Design
High-Level Design
Chapter 3 - Page 2
Objectives
Objectives
Objectives
After
After this
this lesson,
lesson, you
you should
should be
be able
able to:
to:
•• Find
Find the
the tables
tables that
that are
are part
part of
of Flexfields.
Flexfields.
•• Find
Find the
the forms
forms that
that are
are part
part of
of Flexfields.
Flexfields.
•• Find
Find the
the C
C code
code that
that makes
makes up
up Flexfields.
Flexfields.
•• Find
Find the
the PL/SQL
PL/SQL code
code that
that makes
makes up
up Flexfields.
Flexfields.
•• Find
Find the
the Java
Java code
code that
that makes
makes up
up Flexfields.
Flexfields.
•• Find
Find the
the remaining,
remaining, miscellaneous
miscellaneous pieces
pieces that
that are
are
part
part of
of Flexfields.
Flexfields.
High-Level Design
Chapter 3 - Page 3
Flexfield Components
Flexfield
Flexfield Components
Components
•• Tables
Tables
•• Forms
Forms
•• C
C code
code
•• PL/SQL
PL/SQL code
code
•• Java
Java files
files
•• Other
Other components
components
Flexfield Tables
While the number of tables that contain Descriptive and Key Flexfield data
is numerous, there are only a few tables that are part of the Flexfield
Definition. The following script will list those tables for you.
High-Level Design
Chapter 3 - Page 4
col max format A10 Heading " Max"
col pct_increase format 90 Heading "In%"
High-Level Design
Chapter 3 - Page 5
KEY FND_VAL_ATTRIBUTE_TYPES_TL Translatable info about segment qualifiers
KEY FND_FLEX_HASH Prevents conflicting combinations
High-Level Design
Chapter 3 - Page 6
Flexfield Forms
There are only 13 forms that are used to maintain Flexfields. The URL
listed is the link to the latest version of that form in ARU.
High-Level Design
Chapter 3 - Page 7
To obtain this list of forms, do the following.
Why FNDFF%? All the forms developed and used to define and maintain
flexfields are designated with FNDFF as the starting characters.
High-Level Design
Chapter 3 - Page 8
Flexfield C Code
Header files are kept in $FND_TOP/include, and start with fdf*.h, with the
exception of fdfile.h. Source files are kept in $FND_TOP/src/flex, and are
named fdf*.*c.
Header Files
High-Level Design
Chapter 3 - Page 9
Key Flexfields
High-Level Design
Chapter 3 - Page 10
no compiled definition exists, reads data from
flex tables and builds compiled definition
[->fcfidcom()]
fdfrks() Read flexfield structure definition [->fdfbks()]
fdfbks() gets compiled struct definition [->fdficget()] , if
no compiled definition exists, reads data from
flex tables and builds compiled definition
[->fcfiscom()]
(See fdfcom.lc for fcfidget, fdfidcom, fdfisget,
fdfiscom)
fdfakf() Allocate Key Flex Read/Write Structure
fdffkf() Free Key Flex r/w structure
fdfkva.lc Key Flex Validation routines (Cross validation,
VRULE, etc.)
fdfvcc() Validate a code combination. Get it from
database [->fdfgcd()], do cross validation if
required [->fdfvxr()], do VRULE validation if
required [->fdfcvr()].
fdfvxr() Read cross validation rules [->fdfgxr()], and
validate against rules [->val_value()].
fdfgcd() Build and execute the select statement to get a
combination from the code combinations table
given either CCID, or segment values and
caches it.
fdficd() Do dynamic inserts. Lock the table, build the
insert statement and insert a new code
combination into the code combinations table.
fdfplv() Call server side procedure
FND_FLEX_PLSQL.VALIDATE for AT&T
special case validation. (Checks
FDFLEXVALIDATE env variable.)
fdfksr.lc Key Flexfield Server Validation Calls.
fdfksr() Cover function to call flex server side
validation.
fdfccs() Cover function to call flex server side security
check
(FND_FLEX_SERVER.SEGS_SECURED)
fdfgli.lc General Ledger Insertion routine. (This is
High-Level Design
Chapter 3 - Page 11
owned and maintained by the Government GL
team. Contact : Nancy Raabe, Manisha
Desai.)
fdfgli() General Ledger Insert routine
fdfglf() General Ledger Free routine
Descriptive Flexfields
High-Level Design
Chapter 3 - Page 12
Range Flexfields
Flexfield Window
High-Level Design
Chapter 3 - Page 13
fdfssr() Sets up segment references to parents,
children, default dependencies, High/Low
ranges etc.
fdfsvx() Setup value set extensions.
fdfimc() Install Free memory callback.
fdffre() Free allocated data structures.
fdfcvc() Free value caches.
fdffdm() Free Desc flex data.
fdffks() Free Key flex structure data.
fdffkm() Free Key flex data.
fdfffu.lc Form flex (10SC Flexfield) user exits
register_form_flex()
Code for the DEFINE_FFLEX user exit,
(Called from the DEFINE procedure in
packages FND_KEY_FLEX,
FND_DESCR_FLEX, and
FND_RANGE_FLEX in FNDSQF library)
Saves flex definition in forms in flex data
structures.
update_form_flex()
Updates form flex.
compile_form_flex()
Compiles the pseudo flex in the whole form.
update_fflex_args()
Code for the UPDATE_FFLEX user exit.
(Called from UPDATE_DEFINITON
procedures) Updates the flex definition.
event_form_flex()
Code for the FFLEX user exit. (Called from the
FND_FLEX.EVENT procedure). Handles the
various event logic.
find_descr_flex()
Finds all the Desc Flexs in a block. #FND
FIND_DFLEXS.
fdffrf() FounDation Flex FRee Form.
fdfdlist() Returns list of BLOCK.FIELDs in a form on
which Descriptive flexfields have been defined.
fdfdfind() Finds the Descriptive flexfield defined on the
High-Level Design
Chapter 3 - Page 14
given field.
fdffld.lc Key and Descriptive Flexfield field processing
(getting and putting values between flex
structures and form fields)
fdfgfv() Reads [->afugfv()] values from segment fields,
concatenated segment/description/id fields in
the forms and populates the segment buffers.
fdfpfv() Puts [->afupfv()] values from the segment
buffers to the segment fields and concatenated
segment/description/id fields.
fdfbqf() FounDation Flexfield Build Query for Field
fdfsfv() Scan flexfield field values
fdfcfv() Clear flexfield field values
fdfcaf() Clear all flexfield segment fields
fdfcff() Check if form field is database field
Validation Functions
High-Level Design
Chapter 3 - Page 15
validated value set.
fdfxux() FounDation Flexfields eXecute User-eXit
(build fakefields, etc)
fdfsux() FounDation Flexfield segment execute
user-exit
fdfahb() FounDation Flexfields allocate host binding
variable buffer.
fdfshb() FounDation Flexfields setup Segment based
host binding buffers
fdfavc() Flexfields Value Cache Allocation function
fdffvc() Flexfields Value Cache Free function
fdfrvc() Flexfields Read Value from Cache
fdfwvc() Flexfields Write Value to Cache
fdfgvd() Get value from database
fdfrvd() Read value from database
fdfvds() FounDation Flexfield Value Default Source
fdfsds() FounDation Flexfield Segments Default
Source
fdfgsr() FounDation Flexfield Get Security Rules
fdfvcmp() FounDation Flexfields Value CoMPare
fdfvcol() FounDation Flexfields Value COLumn
expression
fdfvsr() Read security rules [->fdfgxr()] and validate
values against security rules.
fdfvsd() Loads default values for segments. [->fdfgdf()]
and validates them.
fdfgdf() Compute the default value for a segment.
fdfvvr() FounDation Flexfield Validate Value against
vRules
fdfsva() FounDation Flexfields segment validation
fdfsvr() FounDation Flexfield Setup Value Rule
(VRULE)
Other Utilities
High-Level Design
Chapter 3 - Page 16
buffers.
fdfcsv() Reads values from segment buffers and
generates concatenated
values/ids/descriptions. Does delimiter
substitution when values have delimiter
character.
fdfphv() Parses sql strings for bind variables like
:$FLEX$, $PROFILES$, :BLOCK.FIELD etc.
fdfaqb() Flexfields Query Buffer Allocation function
fdffq1() Flexfields Query Buffer Free function (generic
function)
fdffqb() Flexfields Query Buffer Free function
fdfugv() Foundation Flexfields Utility Get Validation
type
fdfgst() Foundation Flexfield Get Segment attribute
Type number
fdfgvt() Foundation Flexfield Get Value aTtribute
number
fdfgvp() Foundation Flexfield Get Value attribute
Position
fdfpvv() Foundation Flexfield Parse Value attribute
Values
fdfgdv() Foundation Flexfield Get Derived Value
fdfufa() Foundation Flexfields Utility, interpret field
attributes
fdfdtj.lc Flexfields Date/Number Routines.
is_*_valueset_*()
Check value set format types.
fdfcon*() Canonical conversions.
fdfdtj() Converts dates to julian values.
fdfjtd() Converts julian values to dates.
fdfsin() Checks if a value is a number.
fdfisd() Checks if a value is a date.
fdfisndt() Checks if a value is a date in the
NLS_DATE_FORMAT.
fdfcondt() Converts dates between format masks.
fdfdtmask() Gets current NLS_DATE_FORMAT.
fdffile.lc Some basic file output functions for use with
High-Level Design
Chapter 3 - Page 17
debug code.
fdflist.lc A very basic list implementation.
fdfstr.lc A very basic implementation of StringBuffer.
fdfobj.lc Object utility functions.
fdfdbg.lc Flexfield debugging code to print structures.
FlexBuilder
Flexfield C APIs
High-Level Design
Chapter 3 - Page 18
(2) Create default Children
(CREATEDEFCLD),
(3) Validate value (FLEXVALIDATE)
POPVTV, VALVTV and CREATEDEFCLD are
called from FNDFFMSV form.
FLEXVALIDATE is called from FNDFFMSV,
FNDFFMVS, FNDFFMIS, and FNDFFMDC
forms.
fdfdvu.lc User exit to check to see if validation will
succeed or fail for a Descriptive flexfield.
(DESCVALID) This is called from the Conc.
Manager Forms.
fdftdu.lc Date translation - create hybrid of id and value
strings (TRANSLATE_DATE). Called from
FNDFFMCV.
High-Level Design
Chapter 3 - Page 19
Cross Validation Rule Violation Report (FNDFFRXR)
fdfrxr.oc main() Reporting cross validation rule violation.
fdfgcx.lc Get code combination for cross validation
(similar to fdfgcd)
High-Level Design
Chapter 3 - Page 20
Flexfield PL/SQL Code
Table Handlers
High-Level Design
Chapter 3 - Page 21
File Name Package Name Entity Table Names
AFFFDFFS.pls
AFFFDFFB.pls fnd_Descriptive_flexs_pkg Descript FF FND_DESCRIPTIVE_FLEXS
FND_DESCRIPTIVE_FLEXS_TL
FND_DESCRIPTIVE_FLEXS_VL
AFFFDFCS.pls
AFFFDFCB.pls fnd_descr_flex_contexts_pkg
DFF Context FND_DESCR_FLEX_CONTEXTS
FND_DESCR_FLEX_CONTEXTS_TL
FND_DESCR_FLEX_CONTEXTS_VL
AFFFDFSS.pls
AFFFDFSB.pls fnd_descr_flex_col_usage_pkg
DFF Segment FND_DESCR_FLEX_COLUMN_USAGES
FND_DESCR_FLEX_COL_USAGE_TL
FND_DESCR_FLEX_COL_USAGE_VL
AFFFSTRS.pls
AFFFSTRB.pls fnd_id_flex_structures_pkg KFF Structure FND_ID_FLEX_STRUCTURES
FND_ID_FLEX_STRUCTURES_TL
FND_ID_FLEX_STRUCTURES_VL
AFFFSEGS.pls
AFFFSEGB.pls fnd_id_flex_segments_pkg KFF Segment FND_ID_FLEX_SEGMENTS
FND_ID_FLEX_SEGMENTS_TL
FND_ID_FLEX_SEGMENTS_VL
AFFFVATS.pls
AFFFVATB.pls fnd_val_attribute_types_pkg KFF Seg Qual FND_VALUE_ATTRIBUTE_TYPES
FND_VAL_ATTRIBUTE_TYPES_TL
FND_VAL_ATTRIBUTE_TYPES_VL
AFFFVDRS.pls
AFFFVDRB.pls fnd_flex_vdation_rules_pkg KFF CV Rule FND_FLEX_VALIDATION_RULES
FND_FLEX_VDATION_RULES_TL
FND_FLEX_VDATION_RULES_VL
AFFFVLSS.pls
AFFFVLSB.pls fnd_flex_values_pkg Flex Value FND_FLEX_VALUES
FND_FLEX_VALUES_TL
FND_FLEX_VALUES_VL
AFFFVLRS.pls
AFFFVLRB.pls fnd_flex_value_rules_pkg Flex Value FND_FLEX_VALUE_RULES
Security Rule FND_FLEX_VALUE_RULES_TL
FND_FLEX_VALUE_RULES_VL
AFFFHIRS.pls
AFFFHIRB.pls fnd_flex_hierarchies_pkg Rollup Group FND_FLEX_HIERARCHIES
FND_FLEX_HIERARCHIES_TL
FND_FLEX_HIERARCHIES_VL
Setup Packages
High-Level Design
Chapter 3 - Page 22
AFFFVAIB.pls fnd_flex_val_api Value set setup package.
AFFFDAIS.pls
AFFFDAIB.pls fnd_flex_dsc_api Descriptive flexfield setup package.
AFFFKAIS.pls
AFFFKAIB.pls fnd_flex_Key_api Key flexfield setup and query package.
AFFFWKFS.pls
AFFFWKFB.pls fnd_flex_workflow Main engine for account generator.
select_process() Returns the assigned process to a Flex Struct
and WF Item.
initialize() Initializes the workflow engine for account
generator.
generate() Generates the account.
generate_partial() Generates the partial account to be used in next
process.
load_concatenated_segments() This is a special procedure for loading values
returned by the flexbuilder upgrade plsql function
to the workflow process. This function should
ONLY be called for this case.
AFFFWKAS.pls
AFFFWKAB.pls fnd_flex_workflow_apis Workflow activity APIs.
start_generation Start Generating Code Combination
assign_to_segment Assign Value to Segment
get_value_from_combination Copy Segment Value from Code Combination
get_value_from_combination2 Copy Segment Value from other Structure Code
Combination
copy_from_combination Copy Values from Code Combination
copy_segment_from_combination Get Value from Code Combination
copy_segment_from_combination2 Get Value from other Structure Code Combination
is_combination_complete Is Code Combination Complete?
validate_combination Validate Code Combination
abort_generation Abort Generating Code Combination
end_generation End Generating Code Combination
High-Level Design
Chapter 3 - Page 23
Server Side Validation Packages
High-Level Design
Chapter 3 - Page 24
Query Packages
AFFFVDUS.pls
AFFFVDUB.pls fnd_vset Value set query package.
AFFFAPIS.pls
AFFFAPIB.pls fnd_flex_apis Key and Descriptive flexfield
query package used by forms
libraries.
Other packages
High-Level Design
Chapter 3 - Page 25
Flexfield Java Files
The classes listed here are a portion of the full set of AOL classes, which
are all bundled together in the file fndaol.jar. Flex-related files that are
newly introduced or no longer being used for 11i releases are marked with
+11i or -11i, respectively.
High-Level Design
Chapter 3 - Page 26
FormButton A basic push button that runs within a
CommonDialog context.
FormCheckbox A basic checkbox that runs within a
CommonDialog context. +11i
FormattedTextArea A multi-line text box that runs within a
CommonDialog context.
FormattedTextField A single-line text box that runs within a
CommonDialog context.
IconButton A basic push button for use in iconic toolbars,
with support hooks for shortcut keys. -11i
KeyboardShortcut A simple implementation of shortcut keys
(needed before AWT support was provided).
ShortcutSource An interface implemented by any widget that
listens for shortcut keys.
TabHandler An interface for classes that can handle tab-Key
focus navigation within a dialog. +11i
ODF Files
You can find the ODF files in $FND_TOP/admin/odf/, and they are named
affl*.odf.
You can find the Data Extract file in $FND_TOP/admin/import/, and they
are named affl*.*.
High-Level Design
Chapter 3 - Page 27
affldsa.ctl
affldsa.dat
affldsa.exp Descriptive flexfields DATA EXTRACT files.
affldsa.log
affldsa.sum
afflkya.ctl
afflkya.dat
afflkya.exp Key flexfields DATA EXTRACT files.
afflkya.log
afflkya.sum
afflbda.ctl
afflbda.dat
afflbda.exp Flexbuilder DATA EXTRACT files.
afflbda.log
afflbda.sum
SQL Files
You can find the SQL Files in $FND_TOP/sql/, and they are named
afff*.sql.
afffcvr1.sql
afffcvr2.sql Cross validation rule upgrade/fix scripts.
afffupg1.sql
afffupg2.sql Flexfields upgrade scripts.
High-Level Design
Chapter 3 - Page 28
These scripts should be OBSOLETED.
File Name Description
affldcm.sql Delete Compiled flexfields.
affldds.sql Delete a Descriptive flexfield definition from AOL tables
affldds2.sql Delete a Descriptive flexfield definition from AOL tables
affldky.sql Delete Key flexfield definition from AOL tables
affldky2.sql Delete Key flexfield definition from AOL tables
affldvs.sql Delete flexfield value set from AOL tables.
afflpdm.sql Flexfields Pre DataMerge, Delete Protected descriptive
flex data for all applications.
Other Files
High-Level Design
Chapter 3 - Page 29
Summary
Summary
Summary
You
You should
should feel
feel comfortable
comfortable with
with the
the following
following
statements
statements about
about your
your knowledge
knowledge of of flexfields
flexfields ::
•• II can
can find
find the
the tables
tables that
that are
are part
part of
of Flexfields.
Flexfields.
•• II can
can find
find the
the forms
forms that
that are
are part
part of
of Flexfields.
Flexfields.
•• II can
can find
find the
the C
C code
code that
that makes
makes upup Flexfields.
Flexfields.
•• II can
can find
find the
the PL/SQL
PL/SQL code
code that
that makes
makes up
up
Flexfields.
Flexfields.
•• II can
can find
find the
the Java
Java code
code that
that makes
makes up
up Flexfields.
Flexfields.
•• II can
can find
find the
the remaining
remaining miscellaneous
miscellaneous pieces
pieces that
that
are
are part
part of
of Flexfields.
Flexfields.
High-Level Design
Chapter 3 - Page 30
Practice Overview
Practice
Practice Overview
Overview
This
This practices
practices covers
covers the
the following:
following:
•• Skills
Skills practice
practice finding
finding tables,
tables, forms,
forms, C
C code,
code,
PL/SQL
PL/SQL code, Java code, and other pieces of
code, Java code, and other pieces of
Flexfields.
Flexfields.
in database? _______________
B. FNDFFCVL.rdf? _______________
C. afflex.odf? _______________
D. fdfkfu.lc? _______________
High-Level Design
Chapter 3 - Page 31
4. How would you go about finding error messages related to
flexfields?
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
High-Level Design
Chapter 3 - Page 32
Test it … did it work? __________
High-Level Design
Chapter 3 - Page 33
Copyright © Oracle Corporation, 2000. All rights reserved.
High-Level Design
Chapter 3 - Page 34
Flexfield Programs
Chapter 4
Flexfield Programs
Chapter 4 - Page 1
Flexfield Programs
Flexfield
Flexfield Programs
Programs
Flexfield Programs
Chapter 4 - Page 2
Objectives
Objectives
Objectives
After
After this
this lesson,
lesson, you
you should
should bebe able
able to:
to:
•• Define
Define and
and discuss
discuss the
the flexfield
flexfield memory
memory model
model
•• Define
Define and
and discuss
discuss the
the flexfield
flexfield client
client validation
validation
vs.
vs. server
server validation
validation model
model
•• Discuss
Discuss flexfield's
flexfield's programmatic
programmatic flowflow
•• Discuss
Discuss the
the flexfield
flexfield compiler
compiler
•• Discuss
Discuss the
the flexfield
flexfield view
view generator
generator
•• Discuss
Discuss the
the flexfield
flexfield hierarchy
hierarchy compiler
compiler
Flexfield Programs
Chapter 4 - Page 3
Flexfield Memory Model
Flexfield
Flexfield Memory
Memory Model
Model
Database
Database
Browser
Browser
Server
Server
(PC/Mac/etc.)
(PC/Mac/etc.)
(SERVER)
(SERVER)
Forms
Forms
Server
Server
(CLIENT)
(CLIENT)
1. Browser
2. Forms Server (CLIENT)
3. Database Server (SERVER)
Note, the Browser layer, generally referred to as the client, is NOT the
client we are speaking of in discussion of the flexfield memory model. For
memory and validation purposes, the client is the forms server. Why?
Because the forms server is where the form is running, and the memory it
needs is maintained.
Flexfield Programs
Chapter 4 - Page 4
But, why do we implement such a memory model? Performance. The
memory model significantly increases the performance of flexfields with a
minimal price (flushing the cache on changes). Since flexfield changes
should be relatively infrequent if at all, the price is minimal.
Flexfield Programs
Chapter 4 - Page 5
Flexfield Programming Concept
Flexfield
Flexfield Programming
Programming Concept
Concept
•• Client
Client validation
validation vs.
vs. Server
Server validation
validation
•• Flexfield's
Flexfield's programmatic
programmatic flow
flow
1. By Flex itself. (i.e. when you use a key flexfield in a form, flex will
call validation engine to validate your combination.)
2. By Product Programs. (i.e. Both of the above validation engines
have public APIs and they can be called from product forms.)
Flexfield Programs
Chapter 4 - Page 6
3. If it is set to 'Yes', Client Side Engine will call Server Side one, and
Server Side Engine will validate the combination.
Flex User Exits will always call Client Side Engine First, But depending on
above profile option Server Side Engine may be used. There are 5
possible paths.
Flex:Val Engine
Caller Engine Called on Ser. Used
Flex User Exit Client Yes Server
Flex User Exit Client No Client
Other Program Client Yes Server
Other Program Client No Client
Other Program Server <Unchecked> Server
Note: 'Other Program' means anything other then Flex User Exits. They
are written by Product Teams, and maintained by them. These can be
Concurrent programs, Server side PL/SQL programs. (for example,
invoice add program, year-end month-end financial programs etc...)
As a known fact, the PL/SQL Server Side Validation engine is much much
slower than Client Side C engine. Customers, depending on their network
performance, should select the Client Side engine. If they have very bad
network performance, suggest that they set the profile option Flexfield
:Validate on Server to 'Yes'. Why? The Client Side engine has to make
DB connection everytime it needs something from DB. If the customer’s
network performance is bad, this may take some time.
fnd_flex_ext
fnd_flex_keyval
Flexfield Programs
Chapter 4 - Page 7
Account Generator always calls server side validation engine, so all new
combinations generated by Account Generator will be committed to
database.
Note : If a new combination is validated when user types it for the first time
in Maintenance Form, then nothing will be locked, until user makes a
Save. Between first type-in and Save, some other user may create same
combination in a Foreign Key Form on the fly. In this case, Maintenance
Form user will get combination exists error, when he/she makes a Save.
So in any case Flex will not create same combination twice.
Flexfield Programs
Chapter 4 - Page 8
Flexfield Flow
Flexfield Programs
Chapter 4 - Page 9
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
key_flex( )
'P'
'P' 'L'
'L'
popid( ) argv[0][0]? loadid( )
1 'V'
'V' 3
valid( )
2
®
Flexfield Programs
Chapter 4 - Page 10
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
popid( )
1
Process input arguments
Flexfield Programs
Chapter 4 - Page 11
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
popid( ) continued
1
IF (entered)
{
Call fdfgfv( ) to load values from form fields to
segment buffers
Flexfield Programs
Chapter 4 - Page 12
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
popid( ) continued
1
IF (not entered)
{
Call fdfvsd( ) to load default values
}
Flexfield Programs
Chapter 4 - Page 13
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
popid( ) continued
1
Call fdfpfv( ) to write values back to form fields
return
Flexfield Programs
Chapter 4 - Page 14
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
valid( )
2
IF read_only return;
Flexfield Programs
Chapter 4 - Page 15
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
valid( ) continued
2
Process remaining input args
IF (entered)
{
Call fdfgfv( ) to load values from form fields to
segment buffers
IF (not entered)
{
Call fdfgfc( ) to get values from COPY field if req'd
}
®
Flexfield Programs
Chapter 4 - Page 16
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
valid( ) continued
2
IF (not entered and flex is required)
{
Call fdfvsd( ) to load default values for required
segments only.
}
Flexfield Programs
Chapter 4 - Page 17
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
valid( ) continued
2
Call fdfpfv( ) to write values back to form fields
return
Flexfield Programs
Chapter 4 - Page 18
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
loadid( )
3
Process input arguments
Flexfield Programs
Chapter 4 - Page 19
Flexfield's Programmatic Flow
Flexfield's
Flexfield's Programmatic
Programmatic Flow
Flow
loadid( ) continued
3
IF not FULL mode, also call fdfgfv( ) to get
segment values from form fields
return
Flexfield Programs
Chapter 4 - Page 20
Flexfield Programs
Flexfield
Flexfield Programs
Programs
•• Flexfield
Flexfield Compiler
Compiler
•• Flexfield
Flexfield View
View Generator
Generator
•• Flexfield
Flexfield Hierarchy
Hierarchy Compiler
Compiler
Flexfield Compiler
Syntax:
Flexfield Programs
Chapter 4 - Page 21
Compile a key flexfield structure.
fdfcmp <oracleid>/<passwd> 0 Y K <AppShortName>
<IdFlexCode> <IdFlexNum>
Compile a descriptive flexfield.
fdfcmp <oracleid>/<passwd> 0 Y D <AppShortName>
<DescFlexName>
Compile an SRS report descriptive flexfield.
fdfcmp <oracleid>/<passwd> 0 Y R <AppShortName>
<ReportName>
Description:
Arguments:
Note: You will use Examine window to get some of the internal data. DO
NOT CHANGE ANYTHING IN EXAMINE WINDOW. IF YOU DO SO,
YOU WILL CORRUPT INTERNAL FLEX DATA. Please, let System
Administrators do these steps for you.
Flexfield Programs
Chapter 4 - Page 22
For A mode:
You don't need any argument for this mode. fdfcmp will compile all
flexfields.
Now you have all three arguments that is going to be used in fdfcmp call
for K mode.
For D mode:
Flexfield Programs
Chapter 4 - Page 23
3. Query the descriptive flexfield that you want to compile.
4. Value in Application field is the application name of the owner
application.
5. Navigate to … Application -> Register … to get application
short name. This value will be used for <ApplShortName>
6. Repeat steps 2 and 3.
7. From the menu … Do Help -> Tools -> Examine.
8. Select Block : TABLE, Field :
DESCRIPTIVE_FLEXFIELD_NAME.
The value in the Value field is the internal name for this
Descriptive flexfield. This value will be used for
<DescFlexName>.
9. Now click on the Cancel button to close Examine window.
10. Close the form.
11. Exit from Oracle Applications.
Now you have both of the arguments that is going to be used in fdfcmp
call for D mode.
For R mode:
Examples:
Flexfield Programs
Chapter 4 - Page 24
Compile '$SRS$.FNDXYZ' descriptive flexfield.
fdfcmp apps/apps 0 Y D 'FND' '$SRS$.FNDXYZ'
fdfcmp apps/apps 0 Y R 'FND' 'FNDXYZ'
Following SQL statements will dump the fdfcmp command with correct
arguments. Save the output of these select statements to a file and use it
as a shell script.
Examples:
Flexfield Programs
Chapter 4 - Page 25
AND d.descriptive_flexfield_name LIKE '$SRS$.%' will compile all SRS flexfields.
AND d.title = 'Your Flexfield Title' will compile the DFF with
given title.
Examples:
<YOUR CONDITION> Effect
AND k.id_flex_code = 'GL#' will compile all KFF structures for 'GL#'
key flexfield which is Accounting
flexfield.
Flexfield Programs
Chapter 4 - Page 26
AND a.application_short_name = 'SQLGL'
will compile all structures of all key
flexfields owned by Oracle General
Ledger. (SQLGL)
Flexfield Programs
Chapter 4 - Page 27
Flexfield View Generator
Syntax:
Note:
0 is the number zero, not the letter 'O'.
If you set FDFVGNLOG environment variable to a file name,
Flexfield View Generator will dump the SQL statement to this
Flexfield Programs
Chapter 4 - Page 28
file.
Ex. : In UNIX c-shell : $>setenv FDFVGNLOG myfile.txt
FDFVGNLOG environment variable is obsoleted, see
bug847842. Flex will always dump the SQL statement to
concurrent program log file. (L<pid>.log)
Description:
The flexfields view generator, FNDFFVGN, generates key and descriptive
flexfield views.
Arguments:
Flexfield Programs
Chapter 4 - Page 29
How to get these arguments:
Note: You will use Examine window to get some of the internal data. DO
NOT CHANGE ANYTHING IN EXAMINE WINDOW. IF YOU DO SO,
YOU WILL CORRUPT INTERNAL FLEX DATA. Please, let System
Administrators do these steps for you.
Flexfield Programs
Chapter 4 - Page 30
11. From the menu … Do Help -> Tools -> Examine.
12. Select Block : STRUCT, Field : ID_FLEX_NUM. The value in
the Value field is the internal number for this key flexfield
structure. This value will be used for
<STRUCTURE NUMBER>.
13. Click on the Cancel button to close Examine window.
14. If there is a value in View Name field for this structure, you can
use it for <STRUCTURE VIEW NAME>, or you can use another
proper name.
15. Close the form and exit from Oracle Applications.
Now you have all arguments that is going to be used in FNDFFVGN call
either in mode 1 or mode 2.
For mode 3:
Flexfield Programs
Chapter 4 - Page 31
9. Click on the Cancel button to close Examine window.
10. Close the form and exit from Oracle Applications.
Now you have the arguments that is going to be used in FNDFFVGN call
in mode 3.
Examples:
Flexfield Programs
Chapter 4 - Page 32
k.id_flex_num || ' ''' ||
k.structure_view_name || '''' "FNDFFVGN-1 Command"
FROM fnd_id_flex_structures k
WHERE k.freeze_flex_definition_flag = 'Y'
AND k.structure_view_name IS NOT NULL;
Flexfield Programs
Chapter 4 - Page 33
Flexfield Hierarchy Compiler
The Hierarchy Compiler is based on the values defined for a given value
sets. The compiler does have some rules and restrictions.
Given that, not every change to values will require the Hierarchy Compiler
to re-run. There are 4 types of updates that will cause the Hierarchy
Compiler to be submitted.
The Hierarchy Compiler IS NOT submitted when the changes only occur
to child values, including new child values.
Syntax:
Arguments:
Flexfield Programs
Chapter 4 - Page 34
<VALUE SET ID> Flexfield Value Set Id. 1234
Note: You will use Examine window to get some of the internal data. DO
NOT CHANGE ANYTHING IN EXAMINE WINDOW. IF YOU DO SO, YOU
WILL CORRUPT INTERNAL FLEX DATA. Please, let System
Administrators do these steps for you.
Now you have all arguments that is going to be used in FNDFFCHY call.
Examples:
Flexfield Programs
Chapter 4 - Page 35
Following SQL statements will dump the FNDFFCHY command with
correct arguments. Save the output of these select statements to a file and
use it as a shell script.
Flexfield Programs
Chapter 4 - Page 36
Summary
Summary
Summary
You
You should
should feel
feel comfortable
comfortable with
with the
the following
following
statements
statements about
about your
your knowledge
knowledge of of flexfields:
flexfields:
•• II can
can define
define and
and discuss
discuss the
the flexfield
flexfield memory
memory
model.
model.
•• II can
can define
define and
and discuss
discuss flexfield
flexfield client
client validation
validation
vs.
vs. server
server validation.
validation.
•• II can
can discuss
discuss flexfield's
flexfield's programmatic
programmatic flow.flow.
•• II can
can discuss
discuss the
the flexfield
flexfield compiler.
compiler.
•• II can
can discuss the flexfield view generator
discuss the flexfield view generator
•• II can
can discuss
discuss the
the flexfield
flexfield hierarchy
hierarchy compiler
compiler
Flexfield Programs
Chapter 4 - Page 37
Practice Overview
Practice
Practice Overview
Overview
This
This practice
practice covers
covers the
the following
following topics:
topics:
•• Skills
Skills building
building
•• Flexfield
Flexfield compiler
compiler
•• Flexfield
Flexfield view
view generator
generator
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
Flexfield Programs
Chapter 4 - Page 38
2. You get an error message that points to the flexfield module,
valdesc(). Which file is that kept in, and how would you go about
finding a solution?
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
Flexfield Programs
Chapter 4 - Page 39
Copyright © Oracle Corporation, 2000. All rights reserved.
Flexfield Programs
Chapter 4 - Page 40
Additional Topics
Chapter 5
Additional Topics
Chapter 5 - Page 1
Additional Topics
Additional
Additional Topics
Topics
Additional Topics
Chapter 5 - Page 2
Objectives
Objectives
Objectives
After
After this
this lesson,
lesson, you
you should
should be
be able
able to:
to:
•• Understand
Understand and
and discuss
discuss code
code combinations
combinations
•• Understand
Understand and
and discuss
discuss dynamic
dynamic insertion
insertion
•• Understand
Understand and
and discuss
discuss Account
Account Generator
Generator
•• Understand
Understand and
and discuss
discuss value
value set
set security
security
•• Understand
Understand and
and discuss
discuss shorthand
shorthand aliases
aliases
•• Understand
Understand and
and discuss
discuss cross-validation
cross-validation rules
rules
•• Understand
Understand and
and discuss
discuss flexfield
flexfield data
data loaders
loaders
Additional Topics
Chapter 5 - Page 3
Additional Topics
Additional
Additional Topics
Topics
•• Code
Code Combinations
Combinations
•• Dynamic
Dynamic Insertion
Insertion
•• Account
Account Generator
Generator
•• Value
Value Set
Set Security
Security
•• Shorthand
Shorthand Aliases
Aliases
•• Cross-validations
Cross-validations Rules
Rules
•• Flexfield
Flexfield Data
Data Loaders
Loaders
Code Combinations
Additional Topics
Chapter 5 - Page 4
corresponding unique ID number (a code combination ID number or
CCID) for that code. Then, other tables in the application have a column
that stores just the unique ID for the code. For example, if you have a part
number code, such as PAD–YEL–11x14, the ”Parts” combinations table
stores that code along with its ID, 57494. If your application allows you to
take orders for parts, you might then have an ”Orders” table that stores
orders for parts. That ”Orders” table would contain a single column that
contains the part ID, 57494, instead of several columns for the complete
code PAD–YEL–11x14.
Combinations are used only by key flexfields, and are created in one of 3
ways.
1. Through the key flexfield maintenance form (if this form exists
for this key flexfield).
2. Through dynamic insertion of new combinations (if possible).
3. Through generation and validation of new combinations through
the Account Generator.
Code combination IDs are generated from a sequence associated with the
combination table.
Additionally, here is a pair of scripts that you can use to list all of the tables
that have your Key Flexfield referenced in them.
Additional Topics
Chapter 5 - Page 5
Script 1: Determine the TABLE_ID of the combinations table
Script 2: Using that TABLE_ID, list all the tables that contain code
combination id for that table, and list the name of the columns where that
code combination is kept.
Additional Topics
Chapter 5 - Page 6
Dynamic Insertion
Generally there is only one, if any, maintenance form for a given key
flexfield. In some applications, there may not be a maintenance form. In
these cases, you would use dynamic inserts (or Account Generator) to
create new combinations.
1. It must be feasible for the Key Flexfield (i.e., check the flexfield
registration)
2. It must be allowed for the Key Flexfield Structure (i.e., check
the segment info)
3. It must be called by the form (i.e., form must make a
DINSERT() call)
Additional Topics
Chapter 5 - Page 7
Account Generator
There are some terms that are used in both Workflow and Account
Generator that you should be able to use.
Additional Topics
Chapter 5 - Page 8
Lookup Type: A lookup type is a static list of values. This list can be
referenced by activities and by item type, message or activity attributes.
For example, an activity can reference a lookup type for its possible result
values.
Additional Topics
Chapter 5 - Page 9
Debugging Steps:
1. Required Patches
Insure the latest synchronous processing patch has been applied.
Currently this is: bug 1116513. This patch includes substantial changes in
synch processing, and must be applied before any problems can be
investigated.
2. ACCOUNT_GENERATOR:DEBUG_MODE Profile
Is there an error or exception causing the calling form to rollback? If not,
you can use the ACCOUNT_GENERATOR:DEBUG_MODE profile to
inspect the results of your process.
3. Error Handling
Additional Topics
Chapter 5 - Page 10
a. Retrieve full details of the error from the flex error buffers.
You can make use of the Message Dictionary History feature to
make error details available in the "History" window without
overly frightening users with technical details. For example:
begin
id := fnd_flex_workflow.initialize(...);
wf_engine.SetItemAttrText(...);
if (not fnd_flex_workflow.generate
(..., error_message)) then
fnd_message.set_string(error_message);
fnd_message.set_name('PROD',
'MY_FRIENDLY_ERROR_MESSAGE');
fnd_message.history;
end if;
exception
when others then
fnd_message.set_string(
fnd_flex_workflow.get_message);
fnd_message.set_name('PROD',
'MY_FRIENDLY_ERROR_MESSAGE');
fnd_message.history;
end;
Common Errors
Additional Topics
Chapter 5 - Page 11
WFENG_SYNCH_ITEM: Item '&ITEMTYPE/&ITEMKEY' cannot be
accessed while synchronous process in progress.
- A previous call to the Account Generator either did not complete
or errored out, and the error was ignored.
If all else fails, you can call the flex apis directly in sqlplus with debug
logging enabled. This produces a detailed log of every step taken by the
Account Generator (using dbms_out.put_line for output). Example:
set serveroutput on
exec dbms_output.enable(1000000);
begin
fnd_flex_workflow.debug_on;
id := fnd_flex_workflow.initialize(...);
wf_engine.SetItemAttrText(...);
if (not fnd_flex_workflow.generate(..., error_message))
then
dbms_output.put_line(error_message);
end if;
exception
when others then
dbms_output.put_line(fnd_flex_workflow.get_message);
end;
Additional Topics
Chapter 5 - Page 12
calling application when it completes those activities and reaches a
notification, block, wait, deferred or end activity.
Additional Topics
Chapter 5 - Page 13
10. None of the following Standard activities are allowed:
A. And
B. Block (restricted by the conditions stated in the Limited
Blocking bullet point above.)
C. Defer Thread
D. Wait
E. Continue Flow/Wait for Flow
F. Role Resolution
G. Voting
H. Compare Execution Time
I. Notify
11. No use of the background engine, that is, activities are never
deferred.
12. No data is ever written to the Oracle Workflow tables and as a
result:
A. The process cannot be viewed from the Workflow Monitor.
B. No auditing is available for the process.
13. Only the following WF_ENGINE API calls are allowed to be
made, and in all cases, the itemkey supplied to these APIs must
be specified as #SYNCH or wf_engine.eng_synch:
A. WF_ENGINE.CreateProcess
B. WF_ENGINE.StartProcess
C. WF_ENGINE.GetItemAttribute
D. WF_ENGINE.SetItemAttribute
E. WF_ENGINE.GetActivityAttribute
F. WF_ENGINE.CompleteActivity (for the limited usage of
blocking-type activities)
14. WF_ENGINE API calls for any item besides the item for the
current synchronous item are not allowed.
Additional Topics
Chapter 5 - Page 14
Value Set Security
Flexfield value set security allows you to restrict the values accessible in a
given value set by responsibility. Value set security applies to any value
set. So, you can restrict values for descriptive and key flexfields, and you
can use it to restrict parameter values on reports and programs.
In order to implement or change value set security, you must take the
following steps:
Additional Topics
Chapter 5 - Page 15
Shorthand Aliases
Shorthand aliases allow for quicker data entry and improved accuracy of
key flexfields.
You cannot enter invalid values into a single segment of a shorthand alias,
but the Shorthand Aliases window does not identify invalid combinations
of segment values in an alias. If you define aliases that contain values that
become invalid later, your flexfield detects these invalid values at the time
you use your alias in your flexfield window. Your flexfield then does not
allow you to enter the invalid values. Your flexfield also checks your alias
against your security and cross–validation rules when you use your alias
to enter data in your flexfield window.
Note that if the alias contains a value that you are restricted from using (by
flexfield value security), that value disappears immediately and you must
enter a different value in that segment. After you enter an alias that
represents a complete flexfield combination, the flexfield validates your
combination using the criteria you define in the Cross–Validation Rules
window.
If you change your key flexfield structure after you define your aliases, you
must change your existing aliases to match your new structure. Changes
that make your existing aliases invalid include:
Additional Topics
Chapter 5 - Page 16
Cross-Validation Rules
Additional Topics
Chapter 5 - Page 17
7. Accomplish your control objectives primarily with include ranges
when you have a stricter structure for your key flexfield
structure. With include ranges, you list valid combinations
instead of invalid combinations.
8. Accomplish your control objectives primarily with exclude ranges
when your key flexfield structure is less structured and your key
flexfield segments do not have a lot of interdependencies. In this
situation, you generally want to accept most combinations. You
just want some exceptions to this general rule.
9. Blank segment values in your rules make the rules easier to
define and maintain. A blank segment value means you want to
include or exclude ”all the way to the end” of the range (either
minimum or maximum).
10. You should use several simple validation rules instead of using
one complex rule. Simple validation rules let you provide a more
specific error message and return your cursor to the most
appropriate key flexfield segment. Simple rules are also easier
to maintain over time.
Examples:
Low High
Rule 1: Include _.5.6 9.7.8
Value = 3 . 6 . 7
Additional Topics
Chapter 5 - Page 18
Low High
Rule 1: Include 6.3 8.5
Exclude 7.2 9.4
Value = 7 . 5
Additional Topics
Chapter 5 - Page 19
Flexfield Data Loaders
So, beginning in Release 11i, the Development Teams must use the forms
to create seed data. While this removes data integrity problems, it does
create another issue. Do they have to use the forms to create seed data
in EVERY database? The answer is NO.
Flexfield Entitites:
Includes table details of table validated value sets, and user exit details of
special/pair validated value sets. Does not include the values, security
rules, rollup groups, or value hierarchies for the value set. These entities
should be down/up loaded seperately.
KEY : FLEX_VALUE_SET_NAME
Usage Example :
Additional Topics
Chapter 5 - Page 20
DESC_FLEX : Descriptive Flexfields.
KEY : APPLICATION_SHORT_NAME,
DESCRIPTIVE_FLEXFIELD_NAME
Usage Example :
Usage Example :
Additional Topics
Chapter 5 - Page 21
Includes Security Rules, Security Rule Lines, and Security Rule Usages.
References VALUE_SET.
Usage Example :
Usage Example :
Additional Topics
Chapter 5 - Page 22
Usage Example :
# Entities -
#
# VALUE_SET -- Value set.
# | -- FND_FLEX_VALUE_SETS
# +--VSET_TABLE -- Table for 'F' value sets.
# | -- FND_FLEX_VALIDATION_TABLES
# +--VSET_EVENT -- User exit text for 'U/P' value sets.
# -- FND_FLEX_VALIDATION_EVENTS
#
# DESC_FLEX -- Descriptive Flexfield.
# | -- FND_DESCRIPTIVE_FLEXS
# | -- FND_DESCRIPTIVE_FLEXS_TL
# +--DFF_COLUMN -- Registered DFF Columns.
# | -- FND_COLUMNS
# +--DFF_REF_FIELD -- Context Reference Fields.
# | -- FND_DEFAULT_CONTEXT_FIELDS
# +--DFF_CONTEXT -- DFF Contexts.
# | -- FND_DESCR_FLEX_CONTEXS
# | -- FND_DESCR_FLEX_CONTEXS_TL
# +--DFF_SEGMENT -- DFF Segments.
# -- FND_DESCR_FLEX_COLUMN_USAGES
# -- FND_DESCR_FLEX_COL_USAGE_TL
#
# KEY_FLEX -- Key Flexfield.
# | -- FND_ID_FLEXS
# +--KFF_COLUMN -- Registered KFF Columns.
# | -- FND_COLUMNS
# +--KFF_FLEX_QUAL -- Flexfield Qualifiers.
# | | -- FND_SEGMENT_ATTRIBUTE_TYPES
# | +--KFF_SEGMENT_QUAL -- Segment Qualfiers.
# | -- FND_VALUE_ATTRIBUTE_TYPES
# | -- FND_VAL_ATTRIBUTE_TYPES_TL
# +--KFF_STRUCTURE -- Structures.
# | -- FND_ID_FLEX_STRUCTURES
# | -- FND_ID_FLEX_STRUCTURES_TL
Additional Topics
Chapter 5 - Page 23
# +--KFF_WF_PROCESS -- Account Generator Processes.
# | -- FND_FLEX_WORKFLOW_PROCESSES
# +--KFF_SH_ALIAS -- Shorthand Aliases.
# | -- FND_SHORTHAND_FLEX_ALIASES
# +--KFF_CVR_RULE -- Cross Validation Rules
# | | -- FND_FLEX_VALIDATION_RULES
# | | -- FND_FLEX_VDATION_RULES_TL
# | | -- FND_FLEX_VALIDATION_RULE_STATS
# | +--KFF_CVR_LINE -- Cross Validation Rule Lines
# | -- FND_FLEX_VALIDATION_RULE_LINES
# | -- FND_FLEX_INCLUDE_RULE_LINES
# | -- FND_FLEX_EXCLUDE_RULE_LINES
# | -- FND_FLEX_VALIDATION_RULE_STATS
# +--KFF_SEGMENT -- Segments.
# | -- FND_ID_FLEX_SEGMENTS
# | -- FND_ID_FLEX_SEGMENTS_TL
# +--KFF_FLEXQ_ASSIGN -- Flexfield Qualifier Assignments
# | -- FND_SEGMENT_ATTRIBUTE_VALUES
# | -- FND_FLEX_VALIDATION_QUALIFIERS
# +--KFF_SEGQ_ASSIGN -- Segment Qualifier Assignments (Value
# set dynamic attributes.)
# -- FND_FLEX_VALIDATION_QUALIFIERS
#
#
# VALUE_SECURITY_RULE -- Flexfield Value Security Rules
# | -- FND_FLEX_VALUE_RULES
# | -- FND_FLEX_VALUE_RULES_TL
# +--VSEC_LINE -- Flexfield Value Security Rule Lines.
# | -- FND_FLEX_VALUE_RULE_LINES
# +--VSEC_USAGE -- Security Rule Assignments to
# Responsibilities.
# -- FND_FLEX_VALUE_RULE_USAGES
#
#
# VALUE_ROLLUP_GROUP -- Flexfield Value Hierarchies. (Rollup
# Groups)
# -- FND_FLEX_HIERARCHIES
# -- FND_FLEX_HIERARCHIES_TL
#
#
# VALUE_SET_VALUE -- Flexfield Value.
# | -- FND_FLEX_VALUES
# | -- FND_FLEX_VALUES_TL
# +--VAL_NORM_HIERARCHY -- Flexfield Value Normalized
# | Hierarchies.
# | -- FND_FLEX_VALUE_NORM_HIERARCHY
# | -- FND_FLEX_VALUE_HIERARCHIES
# | (Populated by FNDFFCHY)
# +--VAL_QUAL_VALUE -- Compiled Value Attributes. (Dynamic
# Attributes)
# -- FND_FLEX_VALUES
Additional Topics
Chapter 5 - Page 24
Summary
Summary
Summary
You
You should
should feel
feel comfortable
comfortable with
with the
the following
following
statements
statements about
about your
your knowledge
knowledge of
of flexfields:
flexfields:
•• II understand
understand and
and can
can discuss
discuss code
code combinations.
combinations.
•• II understand
understand and
and can
can discuss
discuss dynamic
dynamic insertion.
insertion.
•• II understand
understand and
and can
can discuss
discuss Account
Account Generator.
Generator.
•• II understand
understand and
and can
can discuss
discuss value
value set
set security.
security.
•• II understand
understand and
and can
can discuss
discuss shorthand
shorthand aliases.
aliases.
•• II understand
understand and
and can
can discuss
discuss cross-validation
cross-validation
rules.
rules.
•• II understand
understand and
and can
can discuss
discuss flexfield
flexfield data
data
loaders.
loaders.
®
Additional Topics
Chapter 5 - Page 25
Practice Overview
Practice
Practice Overview
Overview
This
This practice
practice covers
covers the
the following
following topics:
topics:
•• Skills
Skills practice
practice
•• Cross-validation
Cross-validation Rules
Rules
•• Code
Code Combinations
Combinations
•• Shorthand
Shorthand Aliases
Aliases
1. Cross-valid Rules
You have a 5 segment Accounting Flexfield. Defined as follows:
Additional Topics
Chapter 5 - Page 26
LOW VALUE HIGH VALUE
Include 00.000.0000.0000.000 ZZ.ZZZ.ZZZZ.ZZZZ.ZZZ
Exclude 00.000.2100.0000.000 ZZ.ZZZ.2299.ZZZZ.199
Exclude 00.000.2100.0000.300 ZZ.ZZZ.2299.ZZZZ.ZZZ
Valid/Invalid
00.000.2100.0000.199 ________________
00.000.2100.0000.250 ________________
00.000.2100.0000.400 ________________
00.000.3000.0000.200 ________________
00.000.2299.0000.210 ________________
00.000.2299.0000.600 ________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
Additional Topics
Chapter 5 - Page 27
What table is its combinations table?
___________________________________________________
Look at the record that was created for that combination. How
did you do this?
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
___________________________________________________
Additional Topics
Chapter 5 - Page 28
Custom Flexfields
Chapter 6
Custom Flexfields
Chapter 6 - Page 1
Custom Flexfields
Custom
Custom Flexfields
Flexfields
Custom Flexfields
Chapter 6 - Page 2
Objectives
Objectives
Objectives
After
After this
this lesson,
lesson, you
you should
should bebe able
able to:
to:
•• Define
Define aa Descriptive
Descriptive flexfield
flexfield in
in the
the database
database
•• Register
Register the
the Descriptive
Descriptive flexfield
flexfield in
in the
the Application
Application
•• Add
Add that
that Descriptive
Descriptive flexfield
flexfield to
to aa form
form
•• Define
Define aa Key
Key flexfield
flexfield in
in the
the database
database
•• Register
Register the
the Key
Key flexfield
flexfield in
in the
the Application
Application
•• Add
Add that
that Key
Key flexfield
flexfield to
to aa form
form
•• Add
Add aa Descriptive
Descriptive flexfield
flexfield to
to aa report
report
•• Add
Add aa Key
Key flexfield
flexfield to
to aa report
report
Custom Flexfields
Chapter 6 - Page 3
Overview
Overview
Overview
Important
Important links
links for
for this
this chapter
chapter
(base
(base URL:
URL: http://pkm.us.oracle.com/%7Egseiden/11idoc/)
http://pkm.us.oracle.com/%7Egseiden/11idoc/)
•• Oracle
Oracle Applications
Applications Developer's
Developer's Guide:
Guide:
…
… acrobat/115devg.pdf
acrobat/115devg.pdf
•• Oracle
Oracle Applications
Applications User
User Interface
Interface Standards:
Standards:
…
… acrobat/115uistan.pdf
acrobat/115uistan.pdf
•• Oracle
Oracle Applications
Applications Flexfield
Flexfield Guide:
Guide:
…
… acrobat/115flexug.pdf
acrobat/115flexug.pdf
•• Oracle
Oracle Workflow
Workflow Guide:
Guide:
…
… acrobat/115wfug.pdf
acrobat/115wfug.pdf
•• Oracle
Oracle Applications
Applications AOL
AOL Tech.
Tech. Reference
Reference Manual:
Manual:
…
… acrobat/aoltrm.pdf
acrobat/aoltrm.pdf
®
Custom Flexfields
Chapter 6 - Page 4
4. Oracle Workflow Guide
http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/115wfug.pdf
Custom Flexfields
Chapter 6 - Page 5
Customizing a Descriptive Flexfield
Customizing
Customizing a Descriptive
Descriptive Flexfield
Flexfield
•• Define
Define the
the Descriptive
Descriptive flexfield
flexfield in
in the
the database
database
•• Register
Register the
the Descriptive
Descriptive flexfield
flexfield in
in the
the Application
Application
•• Add
Add the
the Descriptive
Descriptive flexfield
flexfield to
to aa form
form
The first part of creating a new descriptive flexfield is to define that flexfield
to your database. The rules for doing this are as follows:
2. The table name can not include the string “_SRS_”. This
naming scheme is reserved for the Standard Request
Submission feature.
Custom Flexfields
Chapter 6 - Page 6
5. Ensure that you initially add enough segments to cover future
uses, since you can not add extra segments later. As a good
rule, pick twice as many columns as you think the users might
ever need.
You register your custom tables using a PL/SQL routine in the AD_DD
package.
EXECUTE
ad_dd.register_table(‘APPL_SHORT_NAME’,’TABLE_NAME’,’TABLE
_TYPE’, NEXT_EXTENT’, PCT_FREE, PCT_USED);
EXECUTE
ad_dd.register_column(‘APPL_SHORT_NAME’,’TABLE_NAME’,’COLU
MN_NAME’,COLUMN_SEQUENCE, ‘COLUMN_TYPE’, COLUMN_WIDTH,
‘NULLABLE’, ‘TRANSLATE’, PRECISION, SCALE);
Custom Flexfields
Chapter 6 - Page 7
TABLE_TYPE is ‘T’ for Transaction Table. There are also ‘S’ types, but
those are used for “seed data” and only used by Oracle Applications.
TRANSLATE is ‘N’ or ‘Y’. Use ‘Y’ is the column values will be translated.
Translated values are only used by Oracle Applications products.
SCALE is the number of digits to the right of the decimal point. Default is
NULL.
Custom Flexfields
Chapter 6 - Page 8
3. Fill out the form
Finally, to add a descriptive flexfield into your form, you must do the
following:
Custom Flexfields
Chapter 6 - Page 9
While possible, it is not recommended that your form’s base
table is not the base table for your descriptive flexfield columns.
PRE-QUERY FND_FLEX.EVENT(‘PRE-QUERY’);
POST-QUERY FND_FLEX.EVENT(‘POST-QUERY’);
PRE-INSERT FND_FLEX.EVENT(‘PRE-INSERT’);
PRE-UPDATE FND_FLEX.EVENT(‘PRE-UPDATE’);
WHEN-VALIDATE-RECORD FND_FLEX.EVENT(‘WHEN-VALIDATE-RECORD’);
WHEN-NEW-ITEM-INSTANCE FND_FLEX.EVENT(‘WHEN-NEW-ITEM-INSTANCE’);
WHEN-VALIDATE-ITEM FND_FLEX.EVENT(‘WHEN-VALIDATE-ITEM’);
Custom Flexfields
Chapter 6 - Page 10
If you define any of these triggers at the block or field level, your
need to make sure the block or field level triggers have
execution style set to “Before”.
Custom Flexfields
Chapter 6 - Page 11
Customizing a Key Flexfield
Customizing
Customizing aa Key
Key Flexfield
Flexfield
•• Define
Define the
the Key
Key flexfield
flexfield in
in the
the database
database
•• Register
Register the
the Key
Key flexfield
flexfield in
in the
the Application
Application
•• Add
Add the
the Key
Key flexfield
flexfield to
to aa form
form
For each key flexfield, you must create a combinations table. You can
build a special form to allow combinations to be defined (a Maintenance
Form), or you can let Oracle Applications create sequences dynamically
for you. In addition to the combinations table, you may also have 1 or
more tables for forms with foreign key references or range flexfields.
Custom Flexfields
Chapter 6 - Page 12
entity. Although it is a NUMBER(38) column, Oracle
Applications supports code combination IDs up to two billion.
Custom Flexfields
Chapter 6 - Page 13
For Table with Foreign Key Reference
You register your custom tables using a PL/SQL routine in the AD_DD
package.
Custom Flexfields
Chapter 6 - Page 14
EXECUTE
ad_dd.register_table(‘APPL_SHORT_NAME’,’TABLE_NAME’,’TABLE
_TYPE’, NEXT_EXTENT’,PCT_FREE,PCT_USED);
EXECUTE
ad_dd.register_column(‘APPL_SHORT_NAME’,’TABLE_NAME’,’COLU
MN_NAME’, COLUMN_SEQUENCE, ‘COLUMN_TYPE’, COLUMN_WIDTH,
‘NULLABLE’, ‘TRANSLATE’, PRECISION, SCALE);
TABLE_TYPE is ‘T’ for Transaction Table. There are also ‘S’ types, but
those are used for “seed data” and only used by Oracle Applications.
TRANSLATE is ‘N’ or ‘Y’. Use ‘Y’ is the column values will be translated.
Translated values are only used by Oracle Applications products.
Custom Flexfields
Chapter 6 - Page 15
PRECISION is the total number of digits in a number. Default is NULL.
SCALE is the number of digits to the right of the decimal point. Default is
NULL.
5. Code is the short, unique code that invokes your flexfield from a
form trigger
7. Pick the name of the table that contains your key flexfield
combinations table.
11. Indicate whether to allow value sets that use a hidden ID in your
flexfield.
CLICK on the COLUMNS button to enable table columns for your key
flexfield. The form that opens here should have all of your registered
columns pre-populated in the form. If not, you must delete your table’s
Custom Flexfields
Chapter 6 - Page 16
registration, and re-register it into your Application. Columns with names
like SEGMENT1 … SEGMENTn are automatically enabled. Other
columns must be explicitly enabled.
Finally, to add a key flexfield into your form, you must do the following:
Your hidden ID, structure field and segment fields must be text
items on the null canvas. They should be text items not display
items, and will use the TEXT_ITEM property class. Set the field
query lengths to 255.
In some foreign key forms, you may need to create extra non-
atabase fields that represent the columns in your combinations
table. Put your SEGMENT1 to SEGMENTn fields on the null
canvas. These fields are used by dynamic insertion on the
chance that the concatenated field size is over 2000 characters.
If you do not do this, your key flexfield data may be truncated.
You should also create one set of these for each key flexfield.
Custom Flexfields
Chapter 6 - Page 17
3. Create your flexfield definition.
PRE-QUERY FND_FLEX.EVENT(‘PRE-QUERY’);
POST-QUERY FND_FLEX.EVENT(‘POST-QUERY’);
PRE-INSERT FND_FLEX.EVENT(‘PRE-INSERT’);
PRE-UPDATE FND_FLEX.EVENT(‘PRE-UPDATE’);
WHEN-VALIDATE-RECORD FND_FLEX.EVENT(‘WHEN-VALIDATE-RECORD’);
WHEN-NEW-ITEM-INSTANCE FND_FLEX.EVENT(‘WHEN-NEW-ITEM-INSTANCE’);
WHEN-VALIDATE-ITEM FND_FLEX.EVENT(‘WHEN-VALIDATE-ITEM’);
If you define any of these triggers at the block or field level, your
need to make sure the block or field level triggers have
execution style set to “Before”. It is recommended that all the
flexfield triggers be at the form level. But, for large or complicate
forms, you may code PRE-QUERY, POST-QUERY, PRE-
NSERY, PRE-UPDATE, and WHEN-VALIDATE-RECORD at
the block level on all blocks with flexfields. You then code the
WHEN-NEW-ITEM-INSTANCE and WHEN-VALIDATE-ITEM at
the item level for items on which the flexfields are defined.
Custom Flexfields
Chapter 6 - Page 18
Customizing a Flexfield on a Report
Customizing
Customizing aa Flexfield
Flexfield on
on aa Report
Report
•• Construction
Construction
•• Display
Display
You use a two step method to report on flexfield values. The first step
creates the appropriate SQL statement dynamically based upon the user’s
flexfield. The output of the first step is used as input to the
second step. The second step formats this raw data for display.
Step 1 (Construction): The first step requires you to include one or more
lexical parameters (Oracle Reports variables that can be changed at
runtime) in your SQL statement. You call the user exit FND FLEXSQL with
different arguments to specify that part of the query you would like to build.
The user exit retrieves the appropriate column names (SQL fragment) and
inserts it into the lexical parameter at runtime before the SQL query is
executed. The query then returns site– and runtime–specific flexfield
information.
Step 2 (Display): The second step requires you to call another user exit,
FND FLEXIDVAL, on a ”post–record” basis. You create a new formula
column to contain the flexfield information and include the user exit call in
this column. This user exit determines the exact information required for
display and populates the column appropriately. By using the flexfield
routines the user exit can access any flexfield information. Use this step
Custom Flexfields
Chapter 6 - Page 19
for getting descriptions, prompts, or values. This step derives the flexfield
information from the already selected concatenated values and populates
the formula column on a row by row basis.
You call FND FLEXIDVAL once for each record of flexfield segments. The
flexfield user exits for Oracle Reports are similar to their Oracle
Application Object Library (using SQL*Forms) counterparts LOADID(R) or
LOADDESC and POPID(R) or POPDESC; one to construct or load the
values (FLEXSQL), the other to display them (FLEXIDVAL). The token
names and meanings are similar.
FND FLEXSQL
Call this user exit to create a SQL fragment usable by your report to tailor
your SELECT statement that retrieves flexfield values. This fragment
allows you to SELECT flexfield values or to create a WHERE, ORDER
BY, GROUP BY, or HAVING clause to limit or sort the flexfield values
returned by your SELECT statement. You call this user exit once for each
fragment you need for your select statement. You define all flexfield
columns in your report as type CHARACTER even though your table may
use NUMBER or DATE or some other datatype.
FND FLEXIDVAL
Call this user exit to populate fields for display. You pass the key flexfields
data retrieved by the query into this exit from the formula column. With this
exit you display values, descriptions and prompts by passing appropriate
token (any one of VALUE, DESCRIPTION, APROMPT or LPROMPT).
These are the basic steps you use every time you write an Oracle Reports
report that accesses flexfields data.
Custom Flexfields
Chapter 6 - Page 20
3. Define your required parameters
4. Define your other parameters
5. Call FND FLEXSQL from your Before Report Trigger to populate
P_FLEXDATA
6. Call FND FLEXSQL from your Before Report Trigger to populate
other parameters
7. Define your report query or queries
8. Create formula columns
9. Populate segment values formula column
10. Populate segment descriptions
11. Create your default report layout
12. Finish your report
Custom Flexfields
Chapter 6 - Page 21
Summary
Summary
Summary
You
You should
should feel
feel comfortable
comfortable with
with the
the following
following
statements
statements about
about your
your knowledge
knowledge of of flexfields:
flexfields:
•• II can
can define
define aa Descriptive
Descriptive flexfield
flexfield in
in the
the database.
database.
•• II can
can register
register aa Descriptive
Descriptive flexfield.
flexfield.
•• II can
can add
add aa Descriptive
Descriptive flexfield
flexfield to
to aa form.
form.
•• II can
can define
define aa Key
Key flexfield
flexfield in
in the
the database.
database.
•• II can
can register
register aa Key
Key flexfield.
flexfield.
•• II can
can add
add aa Key
Key flexfield
flexfield to
to aa form.
form.
•• II can
can add
add aa flexfield
flexfield to
to aa report.
report.
Custom Flexfields
Chapter 6 - Page 22
Practice Overview
Practice
Practice Overview
Overview
This
This practice
practice covers
covers the
the following
following topics:
topics:
•• Skills
Skills practice
practice
•• Descriptive
Descriptive flexfields
flexfields
•• Key
Key flexfields
flexfields
Exercises:
Custom Flexfields
Chapter 6 - Page 23
Copyright © Oracle Corporation, 2000. All rights reserved.
Custom Flexfields
Chapter 6 - Page 24
Appendix A
Chapter 7
Appendix A
Chapter 7 - Page 1
Appendix A
Appendix
Appendix A
A -- Useful
Useful Websites
Websites
Appendix A
Chapter 7 - Page 2
Links
Links
Links
•• Flexfield
Flexfield Development
Development Team:
Team:
http://www-apps.us.oracle.com/atg/flex/static/
http://www-apps.us.oracle.com/atg/flex/static/
•• Release
Release 11i
11i ATG
ATG Documentation:
Documentation:
http://pkm.us.oracle.com/%7Egseiden/11idoc/html/technology
http://pkm.us.oracle.com/%7Egseiden/11idoc/html/technology
set.html
set.html
•• Oracle
Oracle Applications
Applications Flexfields
Flexfields Guide:
Guide:
http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/
http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/
115flexug.pdf
115flexug.pdf
•• Oracle
Oracle Workflow
Workflow Guide:
Guide:
http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/
http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/
115wfug.pdf
115wfug.pdf
•• Oracle
Oracle Applications
Applications Developer's
Developer's Guide:
Guide:
http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/
http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/
115devg.pdf
115devg.pdf
®
Appendix A
Chapter 7 - Page 3
Links
Links
Links
•• Oracle
Oracle Applications
Applications User
User Interface
Interface Standards:
Standards:
http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/
http://pkm.us.oracle.com/%7Egseiden/11idoc/acrobat/
115uistan.pdf
115uistan.pdf
•• Customizing
Customizing and
and Extending
Extending Oracle
Oracle Applications:
Applications:
http://www-apps.us.oracle.com/atg/standards/codestan.html
http://www-apps.us.oracle.com/atg/standards/codestan.html
•• Sara
Sara Woodhull's
Woodhull's Page:
Page:
http://www-apps.us.oracle.com/~swoodhul/
http://www-apps.us.oracle.com/~swoodhul/
•• User
User Interface
Interface Standards
Standards Team:
Team:
http://www-apps.us.oracle.com/atg/standards/uistan.html
http://www-apps.us.oracle.com/atg/standards/uistan.html
Appendix A
Chapter 7 - Page 4
Appendix B
Chapter 8
Appendix B
Chapter 8 - Page 1
Appendix B
Appendix
Appendix B
B -- Useful
Useful Scripts
Scripts
Appendix B
Chapter 8 - Page 2
Scripts Library
Scripts
Scripts Library
Library
•• Scripts
Scripts Library:
Library:
http://atgorl.us.oracle.com/wsawyer/Oracle_Scripts/
http://atgorl.us.oracle.com/wsawyer/Oracle_Scripts/
Scripts
There are all kinds of scripts that you can use to probe, explore, diagnose,
and tinker with Oracle, both the Database and Applications. Currently,
these scripts are available at the following URL:
http://atg.us.oracle.com/wsawyer/Oracle_Scripts/
Currently, these scripts have only been staged for your use. There is no
web page listing them. At this point, we are simply making them available.
In the future, a web page describing them may be available.
Why no web page? Well, one, it takes a lot of work to create one. Two,
you are learning advanced diagnostic skills. Part of those skills is learning
to take scripts, and discover what they do. These scripts are all good.
They will help. So, you are already ahead of the curve. You know that
each one of these scripts was written for a reason. It is your job to figure
out the why and what. Good luck.
Appendix B
Chapter 8 - Page 3
Copyright © Oracle Corporation, 2000. All rights reserved.
Appendix B
Chapter 8 - Page 4
Appendix C
Chapter 9
Appendix C
Chapter 9 - Page 1
Appendix C
Appendix
Appendix C
C -- Useful
Useful WebIV
WebIV Entries
Entries
Appendix C
Chapter 9 - Page 2
WebIV
WebIV
WebIV
•• WebIV
WebIV Sites:
Sites:
http://webiv.us.oracle.com/
http://webiv.us.oracle.com/
http://webiv.uk.oracle.com/
http://webiv.uk.oracle.com/
http://webiv.au.oracle.com/
http://webiv.au.oracle.com/
WebIV Entries
There are numerous WebIV entries concerning flexfields. You may find
some of the following helpful.
Appendix C
Chapter 9 - Page 3
Table value set in use be changed?
Note.104536.1 Int/R.R Trouble Shooting FFs
Note.111979.1 Ext/R.R APP-00668 APP-00874 APP-00992
Compiling Key FF 11I
Appendix C
Chapter 9 - Page 4
Appendix D
Chapter 10
Appendix D
Chapter 10 - Page 1
Appendix D
Appendix
Appendix D - Collected
Collected Emails
Emails
Appendix D
Chapter 10 - Page 2
Email List
Email
Email List
List
•• FLEXREP
FLEXREP is
is the
the email
email list
list for
for asking
asking questions
questions
concerning
concerning flexfields.
flexfields.
•• INFOAOL
INFOAOL is
is the
the email
email list
list for
for asking
asking questions
questions
about
about ATG
ATG issues.
issues.
Collected Emails
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
QUESTION:
Appendix D
Chapter 10 - Page 3
If (( fnd_flex_keyval.validate_ccid(
APPL_SHORT_NAME =>’SQLGL’,
KEY_FLEX_CODE => ‘GL#’,
STRUCTURE_NUMBER =>p_chart_of_accounts_id,
COMBINATION_ID =>p_ccid,
DISPLAYABLE => ‘ALL’,
DATA_SET => NULL,
VRULE => NULL,
SECURITY => ‘ENFORCE’,
GET_COLUMNS => NULL,
RESP_APPL_ID => FND_GLOBAL.resp_appl_id,
RESP_ID => FND_GLOBAL.resp_id,
USER_ID => FND_GLOBAL.user_id))) then
If ( NOT( fnd_flex_keyval.is_valid ) OR
( fnd_flex_keyval.is_secured) )
then
return(FALSE);
else
return(TRUE);
end if;
Else
return(FALSE);
End if;
Could anyone point out what I could be doing wrong in using this function
or if there is any other way in which I could trap this error on the server
side?
ANSWER:
If you need to check those properties you can select the enabled flag from
the combinations table directly (by CCID) after validate_ccid() has
completed.
Appendix D
Chapter 10 - Page 4
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
QUESTION:
ANSWER:
QBE is supported for flexfields on both foreign key forms and combination
forms. WIth foreign key forms you don’t need the SEGMENTn columns in
your forms. After you enter the query conditions for the flexfield in ENTER-
QUERY mode, flex will create a sub-query and place it in the code
combination id field in your form. As documented, you should make sure
that your code combination id field, is a text item (not a display item) with a
query length of 2000.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
Does anybody know APIs to validate flexfields which have value sets?
ANSWER:
Flexfields has PLSQL APIs to validate both key and descriptive flexfields.
You can find the documentation at: http://www-
apps.us.oracle.com:80/atg/flex/static/server_validation/index.html
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VIEW GENERATOR
Appendix D
Chapter 10 - Page 5
QUESTION:
ANSWER:
Make sure you are using correct syntax for FNDFFVGN call. Before
running FNDFFVGN, please set FDVGNLOG environment variable to a
file name that will be created and FNDFFVGN will dump the sql statement
to this file.
If this file is succesfully created and contains the correct sql statement
then it means this is not Flex problem, you should contact to AD team,
since we are calling ad_ddl functionality to execute the sql statement.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
When folks incorrectly define a value set with a width narrower than the
underlying database column, GPFs such as the one reported in bug
663123 can occur. Is there a script to check for these value sets?
ANSWER:
Appendix D
Chapter 10 - Page 6
value as a column size. Right now we don’t have a script to check these
conditions, and it is difficult to check it out. However following script lists all
value sets that uses SQL statements instead of pure column names (It is
looking whether there is a space in the expression or not). Someone
should look at the list and check all column sizes and then decide whether
the size of column is enough or not, and this person should be the one
who created this value set. The best way to solve this problem is to create
a view on the table names and move SQL statements to this view, then
register it by using ad_dd.register_table and ad_dd.register_column
functions, and then use this view and its columns as underlying table and
columns for the value set.
fvt.id_column_name ID_COLUMN_NAME,
fvt.id_column_type || ‘-‘ ||
fvt.id_column_size ID_TYPE_SIZE,
fvt.meaning_column_name MEANING_COLUMN_NAME,
fvt.meaning_column_type || ‘-‘ ||
fvt.meaning_column_size MEANING_TYPE_SIZE
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
QUESTION:
Appendix D
Chapter 10 - Page 7
In BOM/ENG, we are facing an issue with the FF values not being
populated when the form function is called from the special menu. It works
fine if called directly from the menu under the responsibility. When the
Resources form is called from the special menu in the Departments form,
the FF values for the Absorption and Variance accounts are not
populated. But this works fine if the Resources form is called directly from
the BOM responsibility. The FND_FLEX.EVENT() procedures calls have
all been coded correctly into the form triggers. The post-query
fnd_flex.event(‘POST-QUERY’) is firing in both cases but the the FF
values are populated only when the form is called directly and not from the
special menu. Please refer to bug# 696908 for more details.
ANSWER:
Flex doesn’t check which navigation path was used. Are you passing any
parameter to the form which depends on navigation path? (For example
chart_of_accounts_id, set_of_books, responsibility_id, user_id, etc.) If so,
do they effect any flex parameter in fnd_key_flex.define(...) function call?
Are you calling fnd_key_flex.update_definition(...) to change flex
parameters? Are you coded your triggers according to Coding
Standards? Is there a security rule for this key flexfield? What is the value
of QUERY_SECURITY argument in fnd_key_flex.define(...) call? If you set
this argument to ‘Y’ please set it to ‘N’ and see if you can see the
combination. If there is a security rule we do not show the combination.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
DESCRIPTIVE FLEXFIELDS
QUESTION:
ANSWER:
Appendix D
Chapter 10 - Page 8
4) To load the value set with the 3 values you want, use
SETUP_DESCR_VSETS (part of the fdfdds module)
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
ANSWER:
There is no API to create new values. They have to use the form. I was
working to code an API for this purpose but it is not very easy to do so,
due to segment qualifiers and descriptive flexfields attached to value sets.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
QUESTION:
We are looking into using “Table validation” value sets for the “Accounting
Flexfields” (instead of Independant). I‘ve read somewhere in the
documentation recommending against this setup.
Here are my questions:
1. Does Oracle Applications support using “table validation” value sets
for Key Accounting Flexfield?
2. If not, please outline in details the reason why and the effects upon
implementing this way.
ANSWER:
Appendix D
Chapter 10 - Page 9
have to maintain them yourself and since it is not very well known by other
developers it is not done and flex team will not support segment qualifiers
stored in other tables.
2. Hierarchies. Again flex maintains hierarchies in flex tables if you use
ind/dep value sets. If you use table validated value sets we only maintain
parent value hierarchy not child values. So you will loose most of the
hierarchy and roll-up functionality.
3. You cannot use WHERE clause in table validated value sets used in
Accounting Flexfield. If you cannot use WHERE clause you loose your
power over segment values.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
ACCOUNT GENERATOR
QUESTION:
The client site I am at presently will be importing purchase orders into the
Purchasing tables so that these same PO’s can be matched in Payables
and the costs transferred to Projects. In order to populate the account
CCID’s correctly in PO_DISTRIBUTIONS_ALL, I need to be able to
access FlexBuilder logic. The import procedure is being written in
PL/SQL. The client will not be using WorkFlow at this time. Are there any
other packages available to convert the FlexBuilder logic to PL/SQL?
I’m not sure what you mean by “client will not be using WorkFlow at this
time”. Workflow comes bundled with Apps, and is part of the technology
stack in Apps R11. You _can’t_ not use it. In the FlexBuilder case, the
customer uses workflow only as a GUI to customzing the FlexBuilder
logic.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
DESCRIPTIVE FLEXFIELDS
QUESTION:
Appendix D
Chapter 10 - Page 10
and they establish a business group per localization - will the data in the
descriptive flexfields be correct for the localization of the business group?
ANSWER:
I don’t know what you mean by ‘business groups’. Let’s assume you are
talking about multi-org. installation. Descriptive Flexfields are installed in
AOL, this means they are available to all org’s. If you want to have
descriptive flexfield dependent on org-id, you can set up your flexfield
such as, it uses org-id as context and you can create context sensitive
segments for different org’s. You just need to use org-id field as a context
reference field for your descriptive flexfield. Please see Flexfield Manual
for details about how to set up descriptive flexfields, and reference fields.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
DESCRIPTIVE FLEXFIELDS
QUESTION:
I have and analyst that has asked me about the ATTRIBUTE columns in
FND_FLEX_VALUES and FND_FLEX_VALUES_VL. There are
ATTRIBUTE1-50 columns in FND_FLEX_VALUES, but only
ATTRIBUTE1-44 in FND_FLEX_VALUES_VL. I have tried setting up a
descriptive flexfield using attribute 45, and it compiled successfully, and I
was able to enter data into that segment and save it. Do you know what
would be affected by not having columns ATTRIBUTE45-50 in the VL
table?
ANSWER:
Appendix D
Chapter 10 - Page 11
customers used consulting solution, and customer should contact to
consulting to get view creation scripts.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
QUESTION:
Is there an AOL API which can be used for seeding “Cross Validation
Rules”?
ANSWER:
We don’t have an API to seed cross validation rules. It is not an easy thing
to do with simple SQL statements. The only way to create CVRs is to use
the FNDFFMCV form.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
ANSWER:
Here is the details about how to control which locking mode will be used
while inserting new code combinations.
Appendix D
Chapter 10 - Page 12
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
DESCRIPTIVE FLEXFIELDS
QUESTION:
The form has three different blocks making reference to the same flexfield.
I don’t see a feasible way to change to the form to accomodate the current
block:item reference in the flexfield definition. Could three different blocks
use the same name LINES? Is there some way to resolve this flexfield
block:item reference conflict?
ANSWER:
Rule of thumb : If you are using a :B.F in any part of flex definition this :B.F
must exist in the form that holds the flexfield. So if you are using same
flexfield in two different forms, and :B.F doesn’t exist in one of them, flex
will fail in the form that doesn’t have the :B.F
Solution : Product team should create common :B.F’s in both forms and
populate them properly before flex takes control (i.e. before
fnd_flex.event(...) calls), and customer should use these :B.F’s. (example:
:GLOBAL.MY_FIELD).
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
ANSWER:
Appendix D
Chapter 10 - Page 13
We DO NOT have any api to create a value for value sets. If you want to
seed values you have to create a table validated value set and create
those values in your table, otherwise you cannot seed values. If customer
really nedds independent/dependent value set, then, those values MUST
be created manually by using Flex Value Define Form by the customer.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
ANSWER:
This is a known problem in cross validation and security rules. (if there is a
range you may have this problem.) Problem is, if you use numbers and
characters in your value set at the same time, and if your range has mixed
boundaries, depending on character set, flex may behave different. We
suggest customers to divide these ranges into smaller ranges (as
numbers only and characters only) and do not use mixed boundaries.
From: To:
----- ----
Include 0000 ZZZZ
Exclude 8888 BBBB
From: To:
----- ----
Include 0000 9999
Include AAAA ZZZZ
Exclude 8888 9999
Exclude AAAA BBBB
I think there is no solution other than that. Different character sets have
different ordering. In code we just use SQL BETWEEN statement. If
BETWEEN handler is fixed such that it works independent of char set then
we won’t have this problem.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
Appendix D
Chapter 10 - Page 14
FLEXFIELDS
QUESTION:
ANSWER:
For descriptive flexfields use fnd_dflex, and for key flexfields use
fnd_flex_key_api.
Please see http://www-apps.us.oracle.com/atg/flex/static/flexapi.html for
further details.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
FLEXFIELDS
ANSWER:
ID FLEX_VALUE_SET_NAME
-- -------------------------------------------
1 $FLEX$.DF_CONTEXTS : to handle desc. flex contexts.
2 $FLEX$.INDEPENDENT : to handle independent value sets.
3 $FLEX$.DEPENDENT : to handle dependent value sets.
4 $FLEX$.SHORTHAND : to handle key flex shorthand
aliases.
5 $FLEX$.QUALIFIERS : to handle qualifiers.
6 $FLEX$.IND_STD_DATE : to handle independent standard
Appendix D
Chapter 10 - Page 15
date value sets.
7 $FLEX$.DEP_STD_DATE : to handle dependent standard
date value sets.
8 $FLEX$.KEY_FLEXFIELD : to handle key flexfields.
9 $FLEX$.DESCRIPTIVE_FLEXFIELD : to handle desc.
flexfields.
10 $FLEX$.RANGE_FLEXFIELD : to handle range flexfield.
First 7 of them are table validated, 8th and 9th ones are special and last
one is pair validated. This may surprise you, but all flexfield functionalities
are handled by these 10 value sets. Customers should not know anything
about these value sets, any little change in these value sets will make a
big change in flexfield functionality.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
In the same flexfield where we had the bug, we are using some value sets
of special validation type to store code combination ids in our global
attributes. Reading the flex field manual, it’s very clear that the
parameter DINSERT should always be equal to ‘N’. However, some
consulting guys doing testing for us reported the inability to dynamically
create accounts as a bug. So, I tried to set the flag to ‘Y’ to see what
happened... Apparently it worked fine, but I closed the bug with status 92
(not a bug)... Is documentation accurate and we must not use dynamic
insertion in a value set? Can we set DINSERT to ‘Y’ without risking data
integrity problems?
ANSWER:
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
Appendix D
Chapter 10 - Page 16
ANSWER:
I : 00.000000.000000.0000 - 99.999999.999999.9999
I : AA.AAAAAA.AAAAAA.AAAA - ZZ.ZZZZZZ.ZZZZZZ.ZZZZ
E : 60.700000.200000.0001 - 99.999999.900000.9999
E : 60.700000.200000.AAAA - 99.999999.900000.ZZZZ
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
DESCRIPTIVE FLEXFIELDS
QUESTION:
Appendix D
Chapter 10 - Page 17
user_exit can be called from these value sets, not just predefined FND).
Would we also be able to raise an error message using this technique?
ANSWER:
DFFs are not validated at all. Only individual segments against their value
sets and may be dependencies between them. The reason is, DFFs are
only to collect optional information. We don’t plan about adding extra
validation to any of the flexfields. Also we plan to drop USER_EXIT
validation in flexfields in R12. We are planning to add PL/SQL function
validated value sets. Then you will be able to validate individual segments
by calling PL/SQL functions. We never thought someone will call a
PL/SQL function by using SQL defaulting mechanism. Please do not push
flex limits. Flex is not a design engine for your customized forms. I think,
you are using Developer DFFs. We are also thinking not to support
Developer DFFs in R12, we will make all flexfields fully customizable by
customers. Once again, Flexfields do not have the same functionality as
Forms do. If you want to have full trigger, and PL/SQL validation please
create another block in your form, and maintain it by yourself.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VIEW GENERATOR
QUESTION:
Any input on this? I think AD is calling FNDFFVGN for these _KFV views
because it’s important for them to be set up correctly after AutoInstall
finishes. I think the versions created by the Inventory ODF files are just
stubs that allow all of the packages/views to compile correctly. Should we
continue to create the corresponding renamed views in Rel 11.5? Or is
this no longer required?
ANSWER:
Appendix D
Chapter 10 - Page 18
One side note:
For every table name change we cannot spend this much time fixing
databases and creating synonyms. We already told product teams not to
write any code that depends on _KFV views. These views can easily be
changed by customer and can easily become invalid. Since combinations
are selected from these views without validating or checking security,
using these views over code combinations table has a big security and
validation hole. Flex team has all kind of validation APIs (both in C and
PL/SQL) and whenever a combination is needed these APIs should be
used to get it. Product teams should clean-up their code and make it
independent of _KFV views. We create these views only to be used by
customers not to be used by developers in their code.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
I have noticed that when defining a Value Set for date validation, I have, in
R11, 2 options:
Format Type = ‘Date’
Format Type = ‘Standard Date’.
What is the difference between these two?
ANSWER:
http://www-spps.us.oracle.com/atg/flex/static/datevsetmasks.html
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VIEW GENERATOR
Appendix D
Chapter 10 - Page 19
QUESTION:
If you can take the create view statement created by the FNDFFVGN
executable and run it successfully in SQL Plus, but it fails when used in
FNDFFVGN with errors in ad_ddl, doesn’t this indicate that this is a
problem with ad_ddl and not flexfield code? Then the INV developer is
stating that the create view statement itself is wrong because it includes
ORGANIZATION_ID in it, but this view is created based upon the flexfield
definition, so I do not see how this is our issue either.
ANSWER:
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
QUESTION:
ANSWER:
Appendix D
Chapter 10 - Page 20
Only limitation is hardware. As long as they have enough memory cross
validation should work fine. However we do not suggest going beyond
100s, to be safe let’s say at most 1000. Adding each cross validation will
decrease the performance. If they have many CVRs (let’s say more than
10,000) they should expect poor performance. In fact we do not check
CVR’s for existing combinations, we only check it while creating new
combinations. So validation performance will be good for existing
combinations but, it will take some time to validate new combinations. If
they are worried about CVRs to be checked for existing combinations then
they can run FDFRXR and this program will mark invalid existing
combinations as disabled.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
FLEXFIELDS
ANSWER:
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
FLEXFIELDS
ANSWER:
Appendix D
Chapter 10 - Page 21
available. (this is the case in Account Generator.) If client side code is
used then Flexfields:Validate On Server profile option should be set to “Y”.
(this happens when flex window pops-up, and flex C apis are called from
concurrent programs.) If this profile option is set to Y then in all cases flex
will end up calling SSV engine. I tried to call AT functions from client side,
but it is not straight forward, and it wasn’t very easy on the server side
also, there are too many variables to control the behavior of DINSERT
feature. Since same code is used by both Maintenance Forms, and
Foreign Key Forms, depending on Form and validation, things are getting
complicated.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
FLEXFIELDS
QUESTION:
Basically we need to use the query api for both key and descriptive
flexfield in our sql statement for a 11I project. In order to use these apis in
sql, they have to be defined as pragma WNDS, and WNPS. You said you
were going to change these apis to meet the requirement. Also we have
the same requirement for value set api, do you know who I can contact for
value set api?
ANSWER:
I didn’t know WNPS was required for this purpose and it seems our APIs
cannot have WNPS pragma, because of fnd_message functions and
some debug utilities we have. Because of that, you cannot use Flex APIs
in SQL statements. You guys should find another way to implement your
new functionality. I am not sure what exactly you are trying to do in your
new functionality, but Flex Setup Data or Setup APIs should not be used
at run time, and Flex Data should be accessed only through Flex Setup
Forms.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
Appendix D
Chapter 10 - Page 22
1. If a value set without any precision is attached to say Quantity GDF
(global flex field) and user wants to see the value like say 50,000 (without
any decimal component) and similarly in other countries as 50.000, then
what should be the value set to be attached ? Should that value set be
with precision value 0 ?
2. What should be max size to be attached to a number value set
without any precision. Should it be 38 or 41.
ANSWER:
If you don’t specify a precision, you’ll still be able to use a real value which
will be stores in canonical and displayed in native format. Basically, the
AOL F routine will work exactly like the routines now, except that if a real
number is stored, it will use canonical format.
1. Flex does not use G(roup) separator in Number values. So
customers cannot see 50,000 in US or 50.000 in Europe. They will always
see 50000. We cannot provide this functionality because of buffer size
problems. (I guess we discussed this and you said Group separator is not
important.)
2. Maximum length is the total string length (in bytes not in chars) of
the number. (decimal separator and decimal part of the number is
included in maximum length.)
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
Appendix D
Chapter 10 - Page 23
I need to have distinct in the select clause of a table-validated set.
ANSWER:
Create a view based on your select statement, and define your value set
based on this view.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
ANSWER:
This is probably a sign that your view isn't listed in the AD tables as it
should be.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
KEY FLEXFIELDS
QUESTION:
The problem comes when I run this select and expect only one row to
return. Instead I get two rows, segment 3 & segment 4:
SELECT I.SEGMENT_NUM
FROM
Appendix D
Chapter 10 - Page 24
FND_ID_FLEX_SEGMENTS I,FND_ID_FLEX_SEGMENTS
D,FND_FLEX_VALUE_SETS VI,
FND_FLEX_VALUE_SETS VD
WHERE I.FLEX_VALUE_SET_ID = VI.FLEX_VALUE_SET_ID
AND D.FLEX_VALUE_SET_ID = VD.FLEX_VALUE_SET_ID
AND VI.FLEX_VALUE_SET_ID =
VD.PARENT_FLEX_VALUE_SET_ID
AND I.ID_FLEX_CODE = 'GL#'
AND I.ID_FLEX_CODE = D.ID_FLEX_CODE
AND I.ID_FLEX_NUM = D.ID_FLEX_NUM
AND I.ID_FLEX_NUM = 1000045
AND D.SEGMENT_NUM = 5;
Is there a way to get only the segment the segment5 depends on.
ANSWER:
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
DESCRIPTIVE FLEXFIELDS
QUESTION:
Is there a PL/SQL API for finding the number and type of a descriptive
flexfield segments given the flexfield name? I have a flexfield name like
$SRS$.FNDSCARU, and I need to find the number of segments, and
whether they are dates. I am selecting this right now from
fnd_descr_flex_column_usages and fnd_flex_value_sets, but I was
wondering if there was an API to do this.
ANSWER:
http://www-apps.us.oracle.com/atg/flex/static/flexapi.html
Appendix D
Chapter 10 - Page 25
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
The issue is with Flexfields where value sets are independently validated
and where the value is a word (varchar). Existing values are in American
English, but we'd like to translate these. The proposal is to change them
from independent to table valdation in which we'd provide language
support on the values which appear on screens and in LOV's. One
question is can one take an existing value set that is independently
validated and make it table validated? We'd also like advice on this
general approach to translation of these flexfield values.
ANSWER:
MY_TABLE_B
id_col
------
1
2
3
MY_TABLE_TL
language id_col value_col desc_col
-------- ------ --------- --------
US 1 A desc A.
US 2 B desc B.
US 3 C desc C.
FR 1 {A} {desc A.}
FR 2 {B} {desc B.}
FR 3 {C} {desc C.}
Appendix D
Chapter 10 - Page 26
MY_TABLE_VL is the usual join view based on above two tables and
current language.
Then flex will store id's internally and will display translated value to user.
In this case
Table : FND_LOOKUPS
id column : LOOKUP_CODE
value column : MEANING
meaning column : DESCRIPTION
where clause : where lookup_type = '<MY_LOOKUP>'
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
CROSS-VALIDATION REPORT
This report does not take into account different org_ids for multi-org, does
it? I think it only lists every combination which will violate your cross
validation rules without regards to which org_id the code combination was
created for.
Appendix D
Chapter 10 - Page 27
The 3rd argument is structure number, and this corresponds to
chart_of_accounts_id in Accounting flex case, and I think there should be
only one chart_of_accounts_id per organization. The one-to-one mapping
between structure_numbers and chart_of_accounts_ids is handled by GL.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
ACCOUNT GENERATOR
QUESTION:
ANSWER:
First of all this customer should contact to PA team. I think they can create
a dummy WF process which does nothing, and assign this process to their
structure by using FNDFFMWP form. (Accounts Form). Or they can
customize the PA form, and comment out Acct.Gen. call.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
FLEXFIELDS
Appendix D
Chapter 10 - Page 28
QUESTION:
Once a ff structure has been created for a key ff and saved, it can be
renamed and modified, but can it be deleted from the Key Flexfields
window?
ANSWER:
There is also an API to delete DFF contexts. They don't want to delete
whole flexfield, just some of the contexts.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
ANSWER:
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
Appendix D
Chapter 10 - Page 29
ANSWER:
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
FLEXFIELDS
QUESTION:
The problem happens with insert and update. For inventory_item key flex
field, the list of value does bring up the right key flex field windows but
does not populate the concatinated_segments_field once a inventory item
is selected. Only one item works, either the regular item or mirror item,
depends on the order of FND_KEY_FLEX.DEFINE calls. The one
specified in later FND_KEY_FLEX.DEFINE call works.
ANSWER:
Please see
http://www-apps.us.oracle.com/atg/flex/static/flexonmirror.html
for details about flexfields on mirrored fields.
Appendix D
Chapter 10 - Page 30
In 11.5 environment you can set GLOBAL.FND_FLEX_FNDSQF_DEBUG
to 'DEBUG' before opening-up your form and follow the flex calls and find
out what is happening and when it is happening. See AOL release notes
about Flexfield FNDSQF debugger. http://www-
apps.us.oracle.com/atg/atgrel/aol11.5.29.txt
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
FLEXFIELDS
ANSWER:
FND FLEXIDVAL
src/srw/xirfnd.oc: FND()
src/util/fduxit.lc: fdaxit() function searches the
global structure and finds
out FLEXSQL is mapped to
fdpidk(), and this
function is externdef for
fdxidk() in fdxidk.lc
src/util/fdxidk.lc: fdxidk()
src/util/fdxidk.lc: fdslfx()
src/flex/fdfsrw.lc: fdfsrw()
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
FLEXFIELDS
QUESTION:
Appendix D
Chapter 10 - Page 31
There is the subject of value set defaulting, why or why not do defaults
work in FF and there is a diagnostic flag that will tell you why the FF did
not default.
ANSWER:
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
HIERARCHY COMPILER
QUESTION:
We get some bugs because some people don't know when and when it
should not compile when changing or adding values in the values form.
ANSWER:
Appendix D
Chapter 10 - Page 32
flag is changed from checked (Y) to unchecked (N). But running the
compiler is harmless.
Creating a new value which falls in one the hierarchy ranges does not
require running the hierarchy compiler.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
VALUE SETS
QUESTION:
ANSWER:
When you define a value set and then try to attatch it to a segment by
doing a quick pick but you do not see the value set you defined, the
reason is because if you defined a value set where the maximum value is
greater than the underlying table column (used by the segment) then flex
will not allow you to attach this value set. Also if you define a table
validated value set with a hidden id and the KFF does not use a hidden ID
then flex will not allow attachment.
Appendix D
Chapter 10 - Page 33
Copyright © Oracle Corporation, 2000. All rights reserved.
Appendix D
Chapter 10 - Page 34