DFF Guide
DFF Guide
DFF Guide
RELEASE 11
March, 1998
OracleR Applications Flexfields Guide Release 11 The part number for this volume is A5818801. Copyright E 1994, 1998 Oracle Corporation. All rights reserved.
Contents
Preface
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About This Users Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Do Not Use Database Tools to Modify Oracle Applications Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why Flexfields Have A Separate Manual . . . . . . . . . . . . . . . . Other Information Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related Users Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Thank You . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Flexfield Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Flexfield Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Descriptive Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Benefits of Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Flexfields Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Setting Up Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Entry and Ongoing Maintenance . . . . . . . . . . . . . . . . . . Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 1
Chapter 2
Planning and Defining Key Flexfields . . . . . . . . . . . . . . . . . . . . . 2 1 Additional Terms and Concepts for Key Flexfields . . . . . . . . . . . 2 2 Intelligent Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3
Contents
Combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Combinations Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Types of Key Flexfield Forms . . . . . . . . . . . . . . . . . . . . . . . . . . Dynamic Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Key Flexfield Features . . . . . . . . . . . . . . . . . . . . . . . . . . . Planning Your Key Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key Flexfield Structure Planning Diagram . . . . . . . . . . . . . . . Key Flexfield Segments Window . . . . . . . . . . . . . . . . . . . . . . . . . . . Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Key Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Key Flexfield Structures . . . . . . . . . . . . . . . . . . . . . . . Defining Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Choosing Your Value Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defaulting Segment Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . Segment Prompts and Display Lengths . . . . . . . . . . . . . . . . . . Flexfield Qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reporting Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reporting Attributes Zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 3 Planning and Defining Descriptive Flexfields . . . . . . . . . . . . . . Descriptive Flexfield Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Segments Use Underlying Columns . . . . . . . . . . . . . . . . Reference Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Descriptive Flexfield Features . . . . . . . . . . . . . . . . . . . . Different Arrangements of Segments . . . . . . . . . . . . . . . . . . . . . . . Planning Your Descriptive Flexfield . . . . . . . . . . . . . . . . . . . . . . . . Descriptive Flexfield Structure Planning Diagrams . . . . . . . . Descriptive Flexfield Segments Window . . . . . . . . . . . . . . . . . . . . Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Descriptive Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . Defining Descriptive Flexfield Structures . . . . . . . . . . . . . . . . Context Field Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Identifying Descriptive Flexfields in Oracle Applications . . . . . . Identifying Descriptive Flexfields . . . . . . . . . . . . . . . . . . . . . . . Values and Value Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Values and Value Sets . . . . . . . . . . . . . . . . . . . . . . . . . Planning Values and Value Sets . . . . . . . . . . . . . . . . . . . . . . . . Choosing Value Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23 24 25 27 2 12 2 13 2 14 2 15 2 17 2 18 2 18 2 19 2 22 2 25 2 26 2 28 2 30 2 30 2 30 31 32 35 37 38 39 3 17 3 18 3 23 3 23 3 23 3 25 3 27 3 31 3 31 41 42 43 43 46
Chapter 4
Format Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Set Maximum Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Character Formatting Options . . . . . . . . . . . . . . . . . . . . . . . . . Minimum and Maximum Value Range . . . . . . . . . . . . . . . . . . Decide What Your User Needs . . . . . . . . . . . . . . . . . . . . . . . . . Choosing a Validation Type for Your Value Set . . . . . . . . . . . Plan Values to Use Range Features . . . . . . . . . . . . . . . . . . . . . . Value Set Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . Predefined Value Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Values and Value Sets . . . . . . . . . . . . . . . . . . . . . . . . . Relationship Between Independent and Dependent Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parent and Child Values and Rollup Groups . . . . . . . . . . . . . Rollup Groups Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Rollup Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Implementing TableValidated Value Sets . . . . . . . Using Validation Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Your Validation Table . . . . . . . . . . . . . . . . . . . . . . . . . Creating Grants and Synonyms for Your Table . . . . . . . . . . . WHERE Clauses and Bind Variables for Validation Tables . Using bind variables in WHERE/ORDER BY clauses . . . . . Bind Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example of $FLEX$ Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defaulting Flexfield Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Precedence of Default Values, Shorthand Entry Values, and COPY Values in Key Flexfields . . . . . . . . . . . . . . . . . . . . . Changing the Value Set of an Existing Flexfield Segment . . . . . . Using Special and Pair Value Sets . . . . . . . . . . . . . . . . . . . . . . . . . . Value Set Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Value Set Windows . . . . . . . . . . . . . . . . . . . . . . . Defining Value Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dependent Value Set Information Window . . . . . . . . . . . . . . Validation Table Information Window . . . . . . . . . . . . . . . . . . . Column Type Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Column Size Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WHERE / ORDER BY Field . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Columns Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Allow Parent Values Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Validation Routines Window . . . . . . . . . . . . . . . . . . . . Segment Values Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
46 4 10 4 11 4 13 4 14 4 15 4 19 4 20 4 20 4 21 4 22 4 23 4 25 4 25 4 27 4 28 4 30 4 31 4 31 4 32 4 33 4 37 4 39 4 39 4 40 4 43 4 44 4 44 4 44 4 44 4 45 4 46 4 48 4 51 4 51 4 52 4 53 4 54 4 55 4 56
Contents
iii
Segment Values Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Segment Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Hierarchy and Qualifiers Information . . . . . . . . . . . Qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hierarchy Details Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Define Child Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . View Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Navigate Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Move Child Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 5 Using Additional Flexfields Features . . . . . . . . . . . . . . . . . . . . . . Overview of Shorthand Flexfield Entry . . . . . . . . . . . . . . . . . . . . . Defining Shorthand Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . Disabling or Enabling a Shorthand Alias . . . . . . . . . . . . . . . . Shorthand Aliases Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Flexfield Value Security . . . . . . . . . . . . . . . . . . . . . . . Effects of Flexfield Value Security . . . . . . . . . . . . . . . . . . . . . . . Understanding Flexfield Value Security . . . . . . . . . . . . . . . . . Activating Flexfield Value Security . . . . . . . . . . . . . . . . . . . . . Define Security Rules Window and Assign Security Rules Window . . . . . . . . . . . . . . . . . . . . . . . . Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Security Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Security Rule Elements . . . . . . . . . . . . . . . . . . . . . . . Assigning Security Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CrossValidation Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How CrossValidation Works . . . . . . . . . . . . . . . . . . . . . . . . . . Designing Your CrossValidation Rules . . . . . . . . . . . . . . . . . Maintaining Your CrossValidation Rules and Valid Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CrossValidation Rules Window . . . . . . . . . . . . . . . . . . . . . . . . . . . Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Crossvalidation Rules . . . . . . . . . . . . . . . . . . . . . . . Defining Crossvalidation Rule Elements . . . . . . . . . . . . . . . . Key Flexfields in Oracle Applications . . . . . . . . . . . . . . . . . . . . . Key Flexfields by Flexfield Name . . . . . . . . . . . . . . . . . . . . . . . . . . Key Flexfields by Owning Application . . . . . . . . . . . . . . . . . . . . . . Tables of Individual Key Flexfields in Oracle Applications . . . . . Account Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 58 4 59 4 60 4 61 4 63 4 64 4 66 4 66 4 69 51 52 55 56 58 58 59 5 10 5 11 5 14 5 16 5 16 5 16 5 17 5 19 5 21 5 23 5 25 5 31 5 32 5 33 5 33 5 34 5 35 61 62 63 64 65
Chapter 6
Accounting Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Asset Key Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bank Details KeyFlexField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Category Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cost Allocation Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Grade Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Item Catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Item Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Job Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Location Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . People Group Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Personal Analysis Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Position Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sales Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sales Tax Location Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Oracle Service Item Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Soft Coded KeyFlexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stock Locators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Items (Item Flexfield) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Territory Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 7 Standard Request Submission . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Flexfields and Standard Request Submission . . . . . Planning Your Report Parameters . . . . . . . . . . . . . . . . . . . . . . Using Flexfield Information in Your Report Parameters . . . . Report Parameter Window Planning Diagrams . . . . . . . . . . . Reporting on Flexfields Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Reporting on Flexfields Data . . . . . . . . . . . . . . . . . . . Overview of Flexfield Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key Flexfield Concatenated Segment View . . . . . . . . . . . . . . . Key Flexfield Structure View . . . . . . . . . . . . . . . . . . . . . . . . . . . Descriptive Flexfield View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Flexfield View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Segment Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . Using Flexfield Views to Write a Report . . . . . . . . . . . . . . . . . Examples of Flexfield Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key Flexfield Views Examples . . . . . . . . . . . . . . . . . . . . . . . . . Descriptive Flexfield View Example . . . . . . . . . . . . . . . . . . . . Oracle Reports 2.5 Flexfield Support API . . . . . . . . . . . . . . . . . . . .
66 67 68 69 6 10 6 11 6 12 6 13 6 14 6 15 6 16 6 17 6 18 6 19 6 20 6 21 6 22 6 23 6 24 6 25 71 72 73 74 78 81 82 83 83 84 85 86 87 89 8 11 8 11 8 14 8 18
Chapter 8
Contents
General Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Implementation Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND FLEXSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND FLEXIDVAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Oracle Reports and Flexfields ReportWriting Steps . . . . . . . . . . Flexfield Report Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Report 1: Simple Tabular Report . . . . . . . . . . . . . . . . . . . . . . . . Report 2: Simple Tabular Report With Multiple Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Report 3: Tabular Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Report 4: MasterDetail Report . . . . . . . . . . . . . . . . . . . . . . . . . Report 5: Masterdetail Report on Multiple Structures . . . . . Chapter 9 Key Flexfield Routines for Special Validation . . . . . . . . . . . . . . Syntax for Key Flexfield Routines . . . . . . . . . . . . . . . . . . . . . . . . . . Foreign Key Reference Flexfield . . . . . . . . . . . . . . . . . . . . . . . . Range Key Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Validation Value Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Validation Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Your Special Validation Function . . . . . . . . . . . . . . . Example of Special Validation . . . . . . . . . . . . . . . . . . . . . . . . . . Example of Special Validation for a Single Segment . . . . . . . Example of Pair Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Variables with Special and Pair Validation . . . . . . . . . Account Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of the Account Generator . . . . . . . . . . . . . . . . . . . . . . . . Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Account Generator Process Diagram . . . . . . . . . . . . . . . . . . . . How the Account Generator Works . . . . . . . . . . . . . . . . . . . . . Where the Account Generator Derives Segment Values . . . . The Account Generator in Oracle Applications . . . . . . . . . . . . . . . Overview of Implementing the Account Generator . . . . . . . . . . . Customizing the Account Generator . . . . . . . . . . . . . . . . . . . . . . . . Determine Characteristics of Combination . . . . . . . . . . . . . . . Decide From Where Each Segment Derives Its Value . . . . . . Modify Your Account Generator Process . . . . . . . . . . . . . . . . Test Your Account Generator Setup . . . . . . . . . . . . . . . . . . . . . . . . . Standard Flexfield Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Start Generating Code Combination . . . . . . . . . . . . . . . . . . . . Assign Value to Segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copy Segment Value from Code Combination . . . . . . . . . . . .
8 18 8 20 8 22 8 26 8 30 8 36 8 37 8 41 8 46 8 56 8 67 91 92 92 9 17 9 23 9 25 9 26 9 29 9 30 9 31 9 32 10 1 10 2 10 2 10 5 10 8 10 9 10 11 10 12 10 13 10 14 10 14 10 16 10 20 10 21 10 21 10 21 10 22
Chapter 10
Copy Values from Code Combination . . . . . . . . . . . . . . . . . . . Get Value from Code Combination . . . . . . . . . . . . . . . . . . . . . Is Code Combination Complete? . . . . . . . . . . . . . . . . . . . . . . . Validate Code Combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . Abort Generating Code Combination . . . . . . . . . . . . . . . . . . . End Generating Code Combination . . . . . . . . . . . . . . . . . . . . . Converting from FlexBuilder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Choosing the Process for a Flexfield Structure . . . . . . . . . . . . . . .
10 22 10 22 10 23 10 23 10 23 10 24 10 25 10 27
Appendix A
Flexfields Planning Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . Overall Key Flexfield Worksheet . . . . . . . . . . . . . . . . . . . . . . . Overall Key Flexfield Worksheet (With Shorthand Entry) . . Key Flexfield Structure Worksheet . . . . . . . . . . . . . . . . . . . . . . Key Flexfield Structure Worksheet (Continued) . . . . . . . . . . . Overall Descriptive Flexfield Worksheet . . . . . . . . . . . . . . . . . Descriptive Flexfield Structure Worksheet . . . . . . . . . . . . . . . Descriptive Flexfield Structure Worksheet (Continued) . . . . Value Set Worksheet (Independent Validation Type) . . . . Value Set Worksheet (Dependent Validation Type) . . . . . . Value Set Worksheet (None Validation Type) . . . . . . . . . . . Value Set Worksheet (Table Validation Type) . . . . . . . . . . . Value Set Worksheet (Table Validation Type, Continued) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Set Worksheet (Special or Pair Validation Type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Set Worksheet (Special or Pair Validation Type, Continued) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index
A1 A3 A4 A5 A6 A7 A8 A9 A 10 A 11 A 12 A 13 A 14 A 15 A 16
Contents
vii
Preface
Welcome to Release 11 of the Oracle Applications Flexfields Guide. This guide includes the information you need to work with Oracle Applications flexfields features effectively. It contains detailed information about the following: Overview and reference information Flexfield implementation suggestions Specific flexfield features How to use Oracle Applications flexfield forms and windows This preface explains how this users guide is organized and introduces other sources of information that can help you.
Preface
ii
The HTML version of this book is optimized for onscreen reading, and lets you follow hypertext links for easy access to books across our entire library; you can also search for words and phrases if your national language is supported by Oracles Information Navigator. The HTML documentation is available from the Oracle Applications toolbar, or from a URL provided by your system administrator. Note that the HTML documentation is translated into several languages. You can order an Oracle Applications Documentation Library CD containing Adobe Acrobat versions of each manual in the Oracle Applications documentation set. Using this CD, you can search for information, read it onscreen, and print individual pages, sections, or entire books. When you print from Adobe Acrobat, the resulting printouts look just like pages from an Oracle Applications hardcopy manual. Note: There may be additional material that was not available when this users guide was printed. To learn if there is a documentation update for this product, look at the main menu on this products HTML help.
Assumptions
This guide assumes you have a working knowledge of the principles and customary practices of your business area. It also assumes you are familiar with Oracle Applications. If you have never used Oracle Applications, we suggest you attend one or more of the Oracle Applications training classes available through Oracle Education. (See Other Information Sources for more information about Oracle Applications and Oracle training.) This guide also assumes that you are familiar with the Oracle Applications graphical user interface. To learn more about the Oracle Applications graphical user interface, read the Oracle Applications Users Guide.
Preface
iii
Because Oracle Applications tables are interrelated, any change you make using an Oracle Applications form can update many tables at once. But when you modify Oracle Applications data using anything other than Oracle Applications forms, you may change a row in one table without making corresponding changes in related tables. If your tables get out of synchronization with each other, you risk retrieving erroneous information and you risk unpredictable results throughout Oracle Applications. When you use Oracle Applications forms to modify your data, Oracle Applications automatically checks that your changes are valid. Oracle Applications also keeps track of who changes information. But, if you enter information into database tables using database tools, you may store invalid information. You also lose the ability to track who has changed your information because SQL*Plus and other database tools do not keep a record of changes. Consequently, we STRONGLY RECOMMEND that you never use SQL*Plus, Oracle Data Browser, database triggers, or any other tool to modify Oracle Applications tables, unless we tell you to do so in our manuals.
iv
If this manual refers you to other Oracle Applications documentation, use only the Release 11 versions of those manuals unless we specify otherwise. Oracle Applications Users Guide This guide explains how to navigate, enter data, query, run reports, and introduces other basic features of the graphical user interface (GUI) available with this release of Oracle Applications. This guide also includes information on setting user profiles, as well as running and reviewing reports and concurrent requests. You can also access this users guide online by choosing Getting Started with Oracle Applications from any Oracle Applications help file.
Preface
CountrySpecific Manuals Use these manuals to meet statutory requirements and common business practices in your country or region. They also describe additional features added to Oracle Applications to meet those requirements. Look for a Users Guide appropriate to your country; for example, see the Oracle Financials for the Czech Republic Users Guide for more information about using this software in the Czech Republic. Oracle Applications Character Mode to GUI Menu Path Changes This is a quick reference guide for experienced Oracle Applications end users migrating from character mode to a graphical user interface (GUI). This guide lists each character mode form and describes which GUI windows or functions replace it. Oracle Financials Open Interfaces Guide This guide is a compilation of all open interface discussions in all Oracle Financial Applications users guides. Oracle Applications Developers Guide This guide contains the coding standards followed by the Oracle Applications development staff. It describes the Oracle Application Object Library components needed to implement the Oracle Applications user interface described in the Oracle Applications User Interface Standards. It also provides information to help you build your custom Developer/2000 forms so that they integrate with Oracle Applications. Oracle Applications User Interface Standards This manual contains the user interface (UI) standards followed by the Oracle Applications development staff. It describes the UI for the Oracle Applications products and how to apply this UI to the design of an application built by using Oracle Forms 4.5.
vi
Financials, Oracle Manufacturing, or Oracle Human Resources in your specific hardware and operating system software environment. Oracle Applications Upgrade Manual This manual explains how to prepare your Oracle Applications products for an upgrade. It also contains information on finishing the upgrade procedure for each product. Refer to this manual and the Oracle Applications Installation Manual when you plan to upgrade your products. Oracle Applications System Administrators Guide This manual provides planning and reference information for the Oracle Applications System Administrator. It contains information on how to define security, customize menus and online help, and manage processing. Oracle Application Object Library Technical Reference Manual The Oracle Application Object Library Technical Reference Manual contains database diagrams and a detailed description of Oracle Applications flexfields database tables, forms, reports, and programs. This information helps you convert data from your existing applications, integrate Oracle Applications with nonOracle applications, and write custom reports with Application Object Library. You can order a technical reference manual for any product you have licensed. Technical reference manuals are available in paper format only.
Other Information
Training Oracle Education offers a complete set of training courses to help you and your staff master Oracle Applications. We can help you develop a training plan that provides thorough training for both your project team and your end users. We will work with you to organize courses appropriate to your job or area of responsibility. Training professionals can show you how to plan your training throughout the implementation process so that the right amount of information is delivered to key people when they need it the most. You can attend courses at any one of our many Educational Centers, or you
Preface
vii
can arrange for our trainers to teach at your facility. In addition, we can tailor standard courses or develop custom courses to meet your needs. Support From onsite support to central support, our team of experienced professionals provides the help and information you need to keep Oracle Applications working for you. This team includes your Technical Representative, Account Manager, and Oracles large staff of consultants and support specialists with expertise in your business area, managing an Oracle server, and your hardware and software environment.
About Oracle
Oracle develops and markets an integrated line of software products for database management, applications development, decision support, and office automation, as well as a complete family of financial, manufacturing, and human resource applications. Oracle products are available for mainframes, minicomputers, personal computers, network computers, and personal digital assistants, allowing organizations to integrate different computers, different operating systems, different networks, and even different database management systems, into a single, unified computing and information resource. Oracle offers its products, along with related consulting, education, and support services, in over 140 countries around the world. Oracle Corporation is the worlds leading supplier of software for information management, and is the worlds second largest software company.
Thank You
Thank you for using Oracle Applications and this users guide. We value your comments and feedback. At the end of this manual is a Readers Comment Form you can use to explain what you like or dislike about Oracle Applications or this users guide. Mail your
viii
comments to the following address or call us directly at (650) 5067000. Oracle Applications Documentation Manager Oracle Corporation 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Or, send electronic mail to [email protected].
Preface
ix
CHAPTER
Flexfield Concepts
This chapter provides you with a conceptual overview of flexfields. You learn about: The general features of flexfields Flexfields terminology The benefits of flexfields The distinction between a key and descriptive flexfield The overall setup process for flexfields
Flexfield Concepts
11
Figure 1 1
ComputerMonitorLight Tan
Popup Window
Part Number Key Flexfield Category COM Item 876 Computer Monitor Light Tan
Prompt
Color LTN
Jane Rawlins
Segment
12
Key Flexfields
Most organizations use codes made up of meaningful segments (intelligent keys) to identify general ledger accounts, part numbers, and other business entities. Each segment of the code can represent a characteristic of the entity. For example, your organization might use the part number PADNRYEL8 1/2x14 to represent a notepad that is narrowruled, yellow, and 8 1/2 by 14. Another organization may identify the same notepad with the part number PD8x14YNR. Both of these part numbers are codes whose segments describe a characteristic of the part. Although these codes represent the same part, they each have a different segment structure that is meaningful only to the organization using those codes. The Oracle Applications store these codes in key flexfields. Key flexfields are flexible enough to let any organization use the code scheme they want, without programming. When your organization initially installs Oracle Applications, you and your organizations implementation team customize the key flexfields to incorporate code segments that are meaningful to your business. You decide what each segment means, what values each segment can have, and what the segment values mean. Your organization can define rules to specify which segment values can be combined to make a valid complete code (also called a combination). You can also define relationships among the segments. The result is that you and your organization can use the codes you want rather than changing your codes to meet Oracle Applications requirements. For example, consider the codes your organization uses to identify general ledger accounts. Oracle Applications represent these codes using a particular key flexfield called the Accounting Flexfield. One organization might choose to customize the Accounting Flexfield to include five segments: company, division, department, account, and project. Another organization, however, might structure their general ledger account segments differently, perhaps using twelve segments instead of five. The Accounting Flexfield lets your Oracle General Ledger application accommodate the needs of different organizations by allowing them to customize that key flexfield to their particular business usage. See: the Oracle General Ledger Users Guide.
Attention: Throughout this guide we use the Part Number Key Flexfield in our examples and graphics. We use this example because it helps to illustrate the uses and behaviors of key flexfields without requiring any specialized accounting, human resources, or manufacturing knowledge. However, there is no actual Part Number Key Flexfield in the Oracle
Flexfield Concepts
13
Applications, and you should not confuse it with the System Items Flexfield (Item Flexfield) used by many Oracle Applications products such as Oracle Inventory.
Descriptive Flexfields
Descriptive flexfields provide customizable expansion space on your forms. You can use descriptive flexfields to track additional information, important and unique to your business, that would not otherwise be captured by the form. Descriptive flexfields can be context sensitive, where the information your application stores depends on other values your users enter in other parts of the form. A descriptive flexfield appears on a form as a singlecharacter, unnamed field enclosed in brackets. Just like in a key flexfield, a popup window appears when you move your cursor into a customized descriptive flexfield. And like a key flexfield, the popup window has as many fields as your organization needs. Each field or segment in a descriptive flexfield has a prompt, just like ordinary fields, and can have a set of valid values. Your organization can define dependencies among the segments or customize a descriptive flexfield to display contextsensitive segments, so that different segments or additional popup windows appear depending on the values you enter in other fields or segments. For example, consider the Additions form you use to define an asset in your Oracle Assets application. This form contains fields to capture the normal information about an asset, such as the type of asset and an asset number. However, the form does not contain specific fields for each detail about a given asset, such as amount of memory in a computer or lifting capacity of a forklift. In this case, having all the potentiallyneeded fields actually built into the form is not only difficult, it is undesirable. Because while one organization may have computers and forklifts as assets, another organization may have only computers and luxury automobiles (and no forklifts) as assets. If the form contained builtin fields for each attribute of a forklift, for example, an organization with no forklifts would find those fields to be both unnecessary and a nuisance because a user must skip them to enter information about another type of asset. In fact, fields for forklift information would be cumbersome whenever a user in any organization tries to enter any asset that is not a forklift. Instead of trying to contain all possible fields for assets information, the Additions form has a descriptive flexfield that you can customize to
14
capture just the information your organization needs about your assets. The flexfield structure can depend on the value of the Asset Category field and display only those fields (segments) that apply to the particular type of asset. For example, if the asset category were desk, wood, your descriptive flexfield could prompt for style, size and wood type. If the asset category were computer, hardware, your flexfield could prompt for CPU chip and memory size. You can even add to the descriptive flexfield later as you acquire new categories of assets. See: Additions (Oracle Assets Users Guide) The Enter Journals window in the Oracle General Ledger applications is another example of a form that includes descriptive flexfields to allow organizations to capture additional information of their own choosing. Each block contains a descriptive flexfield as its last field. You might use these to store additional information about each journal entry, such as a source document number or the name of the person who prepared the entry. See: Entering Journals (Oracle General Ledger Users Guide)
Benefits of Flexfields
Flexfields provide you with the features you need to satisfy the following business needs: Customize your applications to conform to your current business practice for accounting codes, product codes, and other codes. Customize your applications to capture data that would not otherwise be tracked by your application. Have intelligent fields that are fields comprised of one or more segments, where each segment has both a value and a meaning. Rely upon your application to validate the values and the combination of values that you enter in intelligent fields. Have the structure of an intelligent field change depending on data in your form or application data. Customize data fields to your meet your business needs without programming.
Flexfield Concepts
15
Query intelligent fields for very specific information. What is the distinction between flexfields and application features? Flexfields, while they are a major feature of the Oracle Applications as a whole, are merely a mechanism to provide many application features. Key flexfields provide a flexible way for the Oracle Applications to represent objects such as accounting codes, part numbers, job descriptions, and more. For example, the Accounting Flexfield is a feature that uses a key flexfield to represent accounting codes throughout most of the Oracle Applications. Similarly, descriptive flexfields provide a flexible way for the Oracle Applications to provide customizable expansion space in forms, as well as a way to implement contextsensitive fields that appear only when needed. Both types of flexfield let you customize Oracle Applications features without programming.
16
Figure 1 2
Descriptive Flexfield
Type Sales Rep COM Computer
Jane Reed
Segment
COM Computer MACH Machinery FURN Furniture
Value Set
Value
Value Description
Segment A segment is a single subfield within a flexfield. You define the appearance and meaning of individual segments when customizing a flexfield. A segment is represented in your database as a single table column.
Flexfield Concepts
17
For a key flexfield, a segment usually describes a particular characteristic of the entity identified by the flexfield. For example, you can have a key flexfield that stores part numbers. The key flexfield can contain the part number PADYELNR8 1/2x14, which represents a yellow, narrow ruled, 8 1/2 x 14 note pad. Each section in the part number, separated by a hyphen, describes a characteristic of the part. The first segment describes the object, a note pad, the second segment describes the color of the object, yellow, and so on. Note that we also refer to the fields in a descriptive flexfield popup window as segments even though they do not necessarily make up meaningful codes like the segments in key flexfields. However, they do often describe a particular characteristic of the entity identified elsewhere on the form you are using. Values, Validation and Value Sets Your end user enters a segment value into a segment while using an application. Generally, the flexfield validates each segment against a set of valid values (a value set) that are usually predefined. To validate a segment means that the flexfield compares the value a user enters in the segment against the values in the value set for that segment. You can set up your flexfield so that it automatically validates segment values your end user enters against a table of valid values. If your end user enters an invalid segment value, a list of valid values appears automatically so that the user can choose a valid value. You can think of a value set as a container for your values. You choose what types of values can fit into your value set: their length, format, and so on. A segment is usually validated, and usually each segment in a given flexfield uses a different value set. You can assign a single value set to more than one segment, and you can even share value sets among different flexfields. For most value sets, when you enter values into a flexfield segment, you can enter only values that already exist in the value set assigned to the segment. Structure A flexfield structure is a specific configuration of segments. If you add or remove segments, or rearrange the order of segments in a flexfield, you get a different structure.
18
You can define multiple segment structures for the same flexfield (if that flexfield has been built to support more than one structure). Your flexfield can display different prompts and fields for different end users based on a data condition in your form or application data. Both key and descriptive flexfields may allow more than one structure. In some applications, different users may need a different arrangement of the segments in a flexfield (key or descriptive). Or, you might want different segments in a flexfield depending on, for example, the value of another form or database field. Your Oracle General Ledger application, for example, provides different Accounting Flexfield (Chart of Accounts) structures for users of different sets of books. The Oracle General Ledger application determines which flexfield structure to use based on the value of the GL Set of Books Name user profile option. See: Oracle [Public Sector] General Ledger Users Guide
Flexfield Concepts
19
1 10
Figure 1 3
Planning
Client Part
Description
Item Color
Flexfield Concepts
1 11
Planning
Just as for implementing any new application, planning is by far the most important (and probably the most timeconsuming) phase of implementing flexfields, so you should give it careful thought. The planning phase can be broken into smaller, though still interrelated, steps: Decide which flexfields to implement Learning about a specific flexfield Planning the structure Planning the segments Planning the segment validation Planning to use additional features Documenting your plan Suggestion: We recommend that you plan your flexfields as completely as possible, including your potential segment values, before you even begin to define them using Oracle Applications forms. Once you begin using your flexfields to acquire data, you cannot change them easily. Changing a flexfield for which you already have data may require a complex conversion process. Decide which flexfields to implement Oracle Applications products rely on some key flexfields as central parts of the applications, so you must set up these key flexfields. For example, while the Oracle General Ledger products use only the Accounting Flexfield key flexfield, almost every Oracle Applications product uses the Accounting Flexfield for some part of its processing. So, you must almost always set up the Accounting Flexfield, especially if you have more than one of the Oracle Applications at your site. In addition, many Oracle Applications products such as Oracle Inventory and Oracle Purchasing use the System Items Flexfield (Item Flexfield). Other Oracle Applications use various key flexfields for various purposes, and defining those flexfields is usually mandatory for a particular application. See: Overview of Setting Up (Oracle [Product] Users Guide)
1 12
While most Oracle Applications products require that you set up particular key flexfields, many descriptive flexfields are optional. You need only set up optional descriptive flexfields for forms where you want to capture business data not otherwise captured by the form fields. Learning about a specific flexfield Because each key and descriptive flexfield has a different purpose, you should be sure to understand the purpose and requirements for the flexfield you want to define. Some flexfields, particularly the Accounting Flexfield, have restrictions on how you can define them. Most descriptive flexfields simply provide a certain number of segment columns you can use for whatever you need to fill your organizations needs. See: Key Flexfields in Oracle Applications: page 6 2 Planning the structure For each flexfield you want to implement, plan your segment structure(s). You can completely customize the appearance of your flexfield popup window for each structure, including its title and the number, order, length, and prompts of its segments. Though you can always change the cosmetic aspects of your flexfield popup window, such as the title and prompts, you should never change the number, order, and maximum length of your segments once you have acquired flexfield data. So, you should plan your structures carefully and allow for future needs. See: Planning Your Key Flexfield: page 2 14 Planning Your Descriptive Flexfield: page 3 17 Planning the segments You must choose two lengths for each segment, the displayed length and the maximum length. The maximum length is the length of the longest value a user can enter into a segment. The largest maximum length you can choose must be less than or equal to the length of the underlying column that corresponds to the segment. Because these
Flexfield Concepts
1 13
column sizes vary among flexfields, you need to know what column lengths are available for your flexfield. The displayed length is the segment length a user sees in the popup window. If the displayed length is less than the maximum length, the user must scroll through the segment to see its entire contents. See: Key Flexfields in Oracle Applications: page 6 2 Planning the segment validation For each segment, plan your validation. Consider what types of values you will be using in your flexfield segments. These decisions affect how you set up your value sets and values. Do you want to provide a list of values for each segment? A list of values on a segment can make data entry faster and easier for your users and ensure that they enter valid values. Do you want to share values among segments in different structures or among different flexfields? Do you want the available values in a segment to depend upon what value a user entered in a prior segment? Do you not want to validate a segment at all (that is, do you want to allow a user to enter any value in the segment, such as a license number that would not be predefined)? Keep in mind that your values will change over time. Usually, an organization adds more values as the organization grows or reorganizes to use new values. For example, you might have a twocharacter long segment that holds a department number. Initially, a twocharacter department number (such as 01, 02, 15, and so on) may be sufficient. However, if you later need a department number larger than 99, such as 100, your segment cannot contain the larger values, and you would need to change the segment length and then convert any existing data. For example, your threecharacter department numbers may become 001, 002, 015, and so on instead of 01, 02, 15, and so on. You want to avoid such conversions if possible, so you should plan your values to allow for future needs. You should also consider how you plan to acquire your values: Do you plan to predefine each segment value manually using an Oracle Applications form?
1 14
Do you already have application tables that contain appropriate values you can use? Do you plan to use nonvalidated segments (with no predefined values) where a user can enter any value in a segment? If you have legacy systems, do you plan to derive flexfield values from those systems in some automated fashion? See: Values and Value Sets: page 4 2 Planning to use additional features Flexfields have several additional features that make flexfields easier to use or that provide extra capabilities such as restricting users from using certain values. For a full discussion of these features, see the Using Additional Flexfields Features chapter. These features include: Flexfield value security Crossvalidation (for key flexfields) Shorthand entry (for key flexfields) Certain features that affect the enduser behavior of flexfields, such as AutoSkip and querybyexample, are discussed in the Oracle Applications Users Guide. See: Overview of Flexfields, Oracle Applications Users Guide. See: Overview of Shorthand Flexfield Entry: page 5 2 Cross Validation Rules: page 5 21 Overview of Flexfield Value Security: page 5 9 Documenting your plans You should fully document your flexfield plans before you sit down to define your flexfields using your Oracle Applications setup forms. We provide worksheets and templates throughout the book and in appendices that you can use to aid your decision and documentation process.
Flexfield Concepts
1 15
Defining
Defining your flexfield is easy once you have completed and documented your planning stage. You use Oracle Applications setup forms to define your flexfield. Define your value sets Depending on exactly how you want to validate your segments, you may spend 1030 minutes defining each value set (roughly one value set per segment, or fewer if you plan to share value sets or do not plan to use value sets for certain segments). Note that you do not define your actual values at this point; rather, you are simply defining the containers for your values. See: Value Set Windows: page 4 44. Define your segment structures This is the main part of defining a flexfield, and includes defining structure titles, segment prompts, segment order, and segment display sizes. Depending on the number of structures and segments you have, you may spend 2090 minutes per flexfield. See: Key Flexfield Segments: page 2 17, Descriptive Flexfield Segments: page 3 23. Define your values, if necessary Depending on exactly how you want to validate your segments, you may spend anywhere from 13 minutes defining each independent or dependent value in an Oracle Applications form. If you have legacy systems, you may need to build a program to import your legacy values into Oracle Applications tables. See: Define Segment Window: page 4 56, Values and Value Sets: page 4 2. Define additional features, if necessary If you plan to use additional features such as crossvalidation rules or flexfield value security, you define those additional features at this point.
1 16
codes (combinations of segment values) you want to allow your users to enter. See: Defining Accounts (Oracle General Ledger Users Guide) As your organizations needs change, you will need to perform ongoing maintenance of your flexfields. For example, you may need to define new flexfield structures or disable old structures. You may also need to add new values or crossvalidation rules or value security rules. See: Key Flexfield Segments: page 2 17 CrossValidation Rules: page 5 33 Defining Accounts (Oracle General Ledger Users Guide)
Reporting
Oracle Applications provides many predefined reports you can use to retrieve your organizations data, and many of these include flexfields data. You can also build custom reports for your organization using the flexfields routines and views we provide. See: Reporting on Flexfields Data: page 8 1.
Flexfield Concepts
1 17
CHAPTER
21
Figure 2 1
PC486
President
VP, Sales
$ $
Accounts Parts
22
Intelligent Key
An intelligent key is a code made up of sections, where one or more parts may have meaning. An intelligent key code uniquely identifies an object such as an account or a part or a job. Intelligent keys are useful in applications because they are usually easier for a user to remember and use than a unique number. For example, a part number of PADYEL11x14 is much easier to remember than a unique part number of 57494. However, unique ID numbers are easier to maintain in a relational database application because only one column is required for the ID number, while multiple columns would be required for an intelligent key (one for each section or segment of the code). The Oracle Applications use key flexfields to represent intelligent keys with unique ID numbers. That is, an end user sees and works with an easytoremember intelligent key code, while the Oracle Applications only need to store a hidden unique ID number in most tables.
Attention: Throughout this guide we use the Part Number Key Flexfield in our examples and graphics. We use this example because it helps to illustrate the uses and behaviors of key flexfields without requiring any specialized accounting, human resources, or manufacturing knowledge. However, there is no actual Part Number Key Flexfield in the Oracle Applications, and you should not confuse it with the System Items Flexfield (Item Flexfield) used by many Oracle Applications products such as Oracle Inventory.
Combination
A combination is a particular complete code, or combination of segment values that makes up the code, that uniquely identifies an object. For example, each part number would be a single combination, and if you had ten parts you would define ten combinations. A valid combination is simply a combination that may currently be used (that is, it is not out of date or disabled). Note that many of the Oracle Applications products (and their documentation) do not necessarily refer to key flexfield combinations as combinations. They may refer to combinations using the name of the entity or the key flexfield itself. For example, Oracle Assets uses a key flexfield called the Asset Key Flexfield and refers to one of its combinations as an asset key or an asset key flexfield. In another example, Oracle General Ledger and other Oracle Applications products generally use the term account or GL account to refer to combinations of the Accounting Flexfield.
23
Figure 2 2
(or)
Valid Combinations
Combinations Table
Each key flexfield has one corresponding table, known as the combinations table, where the flexfield stores a list of the complete codes, with one column for each segment of the code, together with the corresponding unique ID number (a code combination ID number or
24
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 PADYEL11x14, 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 PADYEL11x14.
Qualifiers
Flexfield Qualifier A flexfield qualifier identifies a particular segment of a key flexfield. Usually an application needs some method of identifying a particular segment for some application purpose such as security or computations. However, since the a key flexfield can be customized so that segments appear in any order with any prompts, the application needs a mechanism other than the segment name or segment order to use for segment identification. Flexfield qualifiers serve this purpose. You can think of a flexfield qualifier as an identification tag for a segment.
25
Figure 2 3
Balancing Segment
Accounting Structure 2
Organization Group Department Account SubAccount 01 320 876 784 082 Computer Co. Hardware Marketing Expense Travel
For example, your Oracle General Ledger product needs to be able to identify which segment in the Accounting Flexfield contains balancing information and which segment contains natural account information. Since you can customize the Accounting Flexfield so that segments appear in any order with any prompts, Oracle General Ledger needs the flexfield qualifier to determine which segment you are using for natural account information. When you define your Accounting Flexfield, you must specify which flexfield qualifiers apply to which segments. Other applications, such as Oracle Human Resources, also use flexfield qualifiers. Oracle Human Resources uses flexfield qualifiers to control who has access to confidential information in flexfield segments. A segment qualifier identifies a particular type of value in a single segment of a key flexfield. In the Oracle Applications, only the Accounting Flexfield uses segment qualifiers. You can think of a segment qualifier as an identification tag for a value. In the Accounting Flexfield, segment qualifiers can identify the account type
26
for a natural account segment value, and determine whether detail posting or budgeting are allowed for a particular value. It is easy to confuse the two types of qualifiers. You should think of a flexfield qualifier as something the whole flexfield uses to tag its pieces, and you can think of a segment qualifier as something the segment uses to tag its values.
27
fields (and columns) that the entity requires. A combinations form is sometimes also called a maintenance form.
Figure 2 4
Combinations Table
28
Figure 2 5
PK2
FK to PK1
Foreign key form A foreign key form is a form whose underlying base table contains only one or two columns that contain key flexfield information. The purpose of a foreign key form often has very little to do with the key flexfield itself, and that the key flexfield appears on the form is essentially incidental. For example, if you have a key flexfield that represents a part number, you would use the combinations form to define new parts and maintain existing part numbers. You would then
29
have many foreign key forms that you use to manipulate your parts. You might have a form where you take orders for parts, another form where you receive parts, and yet another form where you ship parts. The fact that your part number happens to be a key flexfield is not important to your taking orders for your parts, for example.
Figure 2 6
Structure ID
Range Table
Range form A range form displays a range flexfield, which is a special popup window that contains two complete sets of key flexfield segments. A
2 10
range flexfield supports low and high values for each key segment rather than just single values. Ordinarily, a key flexfield range appears on your form as two adjacent flexfields, where the leftmost flexfield contains the low values for a range, and the rightmost flexfield contains the high values. A user would specify a range of low and high values in this popup window. For example, you might choose a range of part numbers for which you want to run a report. The range form uses a special table as its base table. This table contains one or more (usually two) columns for each segment column that appears in the combinations table. However, these columns do not necessarily contain actual segment values, and a row in the table does not necessarily contain actual valid combinations. Usually this table contains two columns for each segment, called SEGMENTn_LOW and SEGMENTn_HIGH (where n is the segment column number), that store the range of values for each segment. In Oracle Applications, we use a key flexfield range to help you specify crossvalidation rules for key flexfield combinations. Some forms use a variation of a range flexfield to capture information for each key flexfield segment that is not necessarily a segment value. For example, the form might capture a Yes or No value for each segment (the Assign Function Parameters form displays a popup flexfield window where you choose Yes or No to specify whether you want to assign a value to each particular segment).
2 11
Dynamic Insertion
Figure 2 7
Parts Table PK1 Other Structure Segment n Flexfield ID Columns Unique Columns ID
New combination (new record) created from a form with a foreign key reference Combinations Table
Dynamic insertion is the insertion of a new valid combination into a combinations table from a form other than the combinations form. If you allow dynamic inserts when you set up your key flexfield, a user can enter a new combination of segment values using the flexfield window from a foreign key form. Assuming that the new combination satisfies any existing crossvalidation rules, the flexfield inserts the new combination into the combinations table, even though the combinations table is not the underlying table for the foreign key form.
2 12
For some key flexfields, dynamic inserts may not be allowed. Sometimes it may not make sense for an application to allow a user to be able to create a new combination from any form other than the combinations form. For example, a user should not be able to create a new part while taking an order for parts using an Enter Orders form; the application should restrict the creation of new part numbers to authorized users using a Create Parts form. Dynamic inserts may not be technically possible for some key flexfields. If the combinations table contains mandatory columns that are not maintained by the flexfield, dynamic inserts would not be possible. If the combinations table contains mandatory nonflexfield columns, such as a unit of measure column, the flexfield would not be able to complete the entire row in the combinations table from the foreign key form (because the base table of the foreign key form is not the combinations table). The flexfield does maintain the CCID column. Generally there is only one, if any, combinations form for a given key flexfield. In some applications, there may not be a combinations form. In these cases, you would use dynamic inserts to create new combinations.
2 13
u How often does your organization change? This would affect how
you set up your values. For example, if you disable old cost centers and enable new ones frequently, you would use up cost center values quickly. You would therefore want to use a larger maximum size for your cost center value set so that you can have more available values (for example, you have 1000 available values for a 3character value set instead of 100 available values for a 2character value set).
2 14
2 15
Figure 2 8
(Structure Title)
(Segment Prompt) (Sample Segment Value) (Sample Value Description)
2 16
Use this window to define the your key flexfield structure. See: Defining Key Flexfields: page 2 18
2 17
Tasks
Defining Key Flexfield Structures: page 2 19 Defining Segments: page 2 22
2 18
existing structures may also adversely affect the behavior of to start taking changes again. does any of that make senseany crossvalidation rules or shorthand aliases you have set for your structures, so you should be sure to manually disable or redefine any crossvalidation rules (using the CrossValidation Rules window) and shorthand aliases (using the Shorthand Aliases window) to reflect your changed structures.
u Use the Value Sets window to define any value sets you need. See:
Value Sets: page 4 44. 1. 2. Navigate to the Key Flexfield Segments window. Select the application name and title of the key flexfield you want to define. You cannot create a new flexfield or change the name of an existing flexfield using this window. For those application flexfields that support more than one structure (such as the multiple charts of accounts in the Accounting Flexfield), you can create a new structure for your flexfield by inserting a row. If you are defining the first structure for your flexfield, select the default flexfield structure that appears automatically. If you are modifying an existing structure, use your cursor keys to select the title of the flexfield structure you want. You can change the title of an existing flexfield structure by typing in a new title over the old title. You see this name when you choose a flexfield structure and as the window title in your key flexfield (unless the flexfield is used for a specific purpose such as Consolidation Account, in which case the structure title does not appear in the flexfield window). 4. If you want to generate a database view for this structure, enter a view name. Your view name should begin with a letter and must not contain any characters other than letters, numbers, or underscores ( _ ). Your view name must not contain any spaces. See: Overview of Flexfield Views: page 8 3. Check the Enabled check box so that this structure may be used in your key flexfield. You cannot delete structures from this window because they are referenced elsewhere in the system, but you can
3.
5.
2 19
disable them at any time. A structure must be enabled before it can be used. You should enable at least one structure for each key flexfield. If you disable a structure that already contains data, you cannot use that structure to create new combinations or query up your old information. 6. Select the character you want to use to separate your flexfield segment values or descriptions whenever your application forms display concatenated segment values or descriptions. You should choose your separator character carefully so that it does not conflict with your flexfield data. For example, if your data frequently contains periods ( . ) in monetary or numeric values, you should not use a period as your segment separator. If you enter a segment value that contains the segment separator character, you see the character in your value as a caret (^) so you can differentiate it from the segment separator in your concatenated value fields. This change is for concatenated display purposes only and does not affect your value. To avoid confusion, you should never use a caret (^) as your segment separator. Warning: Some Oracle Applications tables store the segment separator as part of your flexfield values. Changing your separator once you have data in such tables may invalidate that data and cause application errors. 7. Select the CrossValidate Segments check box if you want to crossvalidate multiple segments using crossvalidation rules. You can define crossvalidation rules to describe valid combinations using the CrossValidation Rules form. Uncheck the box if you want to disable any existing crossvalidation rules. See: CrossValidation Rules: page 5 33. Indicate whether you want to freeze your rollup group definitions. If you do, you prevent users from modifying rollup groups using the Segment Values form. You can freeze rollup groups before or after you define your flexfield structure. See: Segment Values: page 4 56. 9. If you want to allow dynamic inserts, check the Allow Dynamic Inserts check box. You would allow dynamic inserts of new valid combinations into your generic combinations table if you want users to create new combinations from windows that do not use your combinations table. You should prevent dynamic inserts if you want to enter new valid combinations only from a single
8.
2 20
application window you create to maintain your specific combinations table. You can update this field only if your application flexfield has been built to allow dynamic inserts. Otherwise this field is display only. 10. Choose the Segments button to open the Segments Summary window, and define your flexfield segments. See: Defining Segments: page 2 22. 11. Freeze your flexfield structure by checking the Freeze Flexfield Definition check box. Do not freeze your flexfield if you want to set up or modify your flexfield segments or change the appearance of your key flexfield window. You cannot make most changes while your flexfield is frozen. 12. Compile your frozen flexfield by choosing the Compile button. Your changes are saved automatically when you compile. You must freeze and compile your flexfield definition before you can use your flexfield. If you have more than one flexfield structure, you must freeze, save, and compile each structure separately. If you decide to make changes to your flexfield definition, make sure that you freeze and save your flexfield definition again after making your changes. Warning: Do not modify a frozen flexfield definition if existing data could be invalidated. An alteration of the flexfield structure once you have any flexfield data can create serious data inconsistencies. Changing your existing structures may also adversely affect the behavior of any crossvalidation rules or shorthand aliases you have for your structures, so you should be sure to manually disable or redefine any crossvalidation rules and shorthand aliases to reflect your changed structures.
2 21
Defining Segments
Use the Segments window to define segments for your flexfield. The window title includes the current flexfields name. If your flexfield definition is frozen (that is, the Freeze Flexfield Definition check box is checked), this window prevents you from invalidating your existing flexfield data by not allowing you to enter the Enabled field or the Value Set field. You can define as many segments as there are defined segment columns in your flexfield table. You can create a new segment for your flexfield by inserting a row. Prerequisites
To define segments: 1. Enter a name for the segment that you want to define. Your segment name should begin with a letter and use only letters, numbers, spaces or underscores ( _ ). The segment prompts get their default values from this field. The flexfield view generator will use your segment name as a column name and change all spaces and special characters to underscores ( _ ). See: Segment Naming Conventions: page 8 7.
2 22
2.
Indicate that you can use this flexfield segment by checking the Enabled check box. Your flexfield does not display disabled segments. You can define as many segments as there are defined segment columns in your key flexfield combinations table. Suggestion: To protect the integrity of your data, you should not disable a segment if you have already used it to enter data.
3.
Select the name of the column you want to use for your flexfield segment. Suggestion: If you are defining more than one segment in the same structure at one time, ensure that you use unique columns for each segment. If you attempt to use a single column for more than one segment in the same structure, you cannot save your changes or compile your structure. Columns you choose for your segments do not disappear from your list of values until you save your work.
4.
Enter the segment number for this segment. This number indicates the relative position in which this segment appears in a flexfield window. A segment with a lower segment number appears before a segment with a higher segment number. Dependent segments should occur after the segment they depend upon in the flexfield window. You receive a warning message if you enter a segment number that is already defined for your flexfield. This warning is only a reminder that the segment number is in use. If you attempt to freeze a flexfield in which two segments share the same segment number, the flexfield does not compile. Suggestion: For most flexfields, if you give your segments widely spaced numbers (such as 10, 20, 30...) to indicate their relative positions, you can add segments to your structure more easily. Adding segments still disables all your existing crossvalidation rules and shorthand aliases for this flexfield structure, however. Note that the Accounting Flexfield requires consecutive segment numbers beginning with 1 (such as 1, 2, 3, ...). Warning: Changing the order of your segments invalidates all existing crossvalidation rules and shorthand aliases for this flexfield structure.
5.
Indicate whether you want this segment to appear in the flexfield window. If your segment is not displayed, you should provide a
2 23
default type and value so that the user does not need to enter a value for this segment. If you do not display a segment but also do not provide a default value for it, your users may see error messages when using this flexfield. Warning: If you are defining the Accounting Flexfield, you must display all segments. Hiding segments will adversely affect your application features such as Mass Allocations. 6. If you are defining the Accounting Flexfield, decide whether you should check the Indexed check box. For details on the Accounting Flexfield, see the Oracle General Ledger Users Guide. If you are defining any other Oracle Applications (key) flexfield, you can skip the Indexed check box. The Oracle General Ledger applications use the Indexed field for the Optimization feature. What you enter here does not affect Oracle Applications key flexfields other than the Accounting Flexfield, but the value may or may not affect key flexfields in custom applications (depending on whether those applications have logic that uses the value of this field). Indicate whether you want the database column in the combinations table used to store this key segment to have a singlecolumn index. You should create indexes on segments you expect to have many distinct values (instead of just a few distinct values). The Oracle General Ledger products Optimizer does not drop existing indexes. If you set up a new structure of the same flexfield, this value defaults to the value in the first structure you set up. See: Running the Optimizer Program (Oracle General Ledger Users Guide) 7. 8. Enter the name of the value set you want your flexfield to use to validate this segment. See: Choosing Your Value Set: page 2 25. Indicate whether you want to require a value for this segment. If you do, users must enter a value before leaving the flexfield window. If not, the segment is optional. Attention: All segments in your Accounting Flexfield must be required.
If this segment is required but depends on an optional segment, then this segment will become optional if a user leaves the dependedupon segment blank.
2 24
9.
Indicate whether to allow security rules to be used for this segment. Otherwise any defined security rules are disabled. If the value set for this segment does not allow security rules, then this field is display only.
10. If you want your flexfield to validate your segment value against the value of another segment in this structure, then choose either Low or High in the Range field. Segments with a range type of Low must appear before segments with a range type of High (the low segment must have a lower number than the high segment). For example, if you plan two segments named Start Date and End Date, you may want to require users to enter an end date later than the start date. You could have Start Date be Low and End Date be High. In this example, the segment you name Start Date must appear before the segment you name End Date, or you cannot compile your flexfield. If you choose Low for one segment, you must also choose High for another segment in that structure (and vice versa). Otherwise you cannot compile your flexfield. If your value set is of the type Pair, this field is display only, and the value defaults to Pair. 11. Enter the display size and prompt information for the segment. See: Segment Prompts and Display Lengths: page 2 28.
2 25
in this field. Then save your changes before you start to define your dependent segment. Once you save your independent segment, you can also select from the dependent value sets that depend on your chosen independent value set. This field prevents you from choosing a value set whose maximum size is greater than the size of your flexfields underlying table columns. Value sets whose maximum sizes are too large for your flexfield do not appear in the list of values, and you cannot use them for your flexfield segment. If your key flexfield does not allow hidden ID tablevalidated value sets (most Oracle Applications key flexfields), those value sets do not appear in the list of values, and you cannot use them for your flexfield segment. You should ensure that the total of the value set maximum sizes for all of the segments in a given structure, plus the number of segment separators you need (number of segments in your structure minus one), does not add up to more than 240. If your structures concatenated length exceeds 240, you may experience truncation of your flexfield data in some forms. See: Value Set Windows: page 4 44, Defaulting Segment Values: page 2 26.
To set a default segment value: 1. If you want to set a default value for this segment, identify the type of value you need. Your list contains only the default types that have formats that match your value set format type. Valid types include: Constant Current Date The default value can be any literal value. The default value is the current date in the format DDMONYY or DDMONYYYY, depending on the length of the segment. Maximum Size 9 11 Date Format DDMONYY DDMONYYYY
2 26
Current Time
The default value is the current time or the current date and time, depending on the length of the segment. Maximum Size 5 8 15 17 18 20 Time Format HH24:MI HH24:MI:SS DDMONYY HH24:MI DDMONYYYY HH24:MI DDMONYY HH24:MI:SS DDMONYYYY HH24:MI:SS
Field
The default value is the current value in the field you designate in the Default Value field. The field must be in the same form as the flexfield. The default value is the current value of the user profile option defined in the Default Value field. The default value is the value entered in a prior segment of the same flexfield window. The default value is determined by the SQL statement you define in the Default Value field.
If you choose Current Date or Current Time, you skip the next field.
See:
Attention: If you are using flexfields serverside validation, you cannot use form field references (:block.field). You must either remove your field references or turn off flexfields serverside validation using the profile option Flexfields:Validate on Server.
Flexfields:Validate on Server: page 4 27 2. Enter a default value for the segment. Your flexfield automatically displays this default value in your segment when you enter your key flexfield window. You determine whether the default value is a constant or a contextdependent value by choosing the default type. Your default value should be a valid value for your value set. Otherwise, when you use your flexfield for data entry, your flexfield displays an error message and does not use your invalid default value in your flexfield segment.
2 27
For each default type chosen in the Default Type field, the valid values for the Default Value field are: Constant Field Enter any literal value for the default value. The default value is the current value in the field you specify here. The field must be in the same form as the flexfield. Use the format :block.field. The default value is the current value of the user profile option you specify here. Enter the profile option name, not the enduser name. The default value is the value entered in a prior segment of the same flexfield window. Enter the name of the segment whose value you want to copy. The default value is determined by the SQL statement you enter here. Your SQL statement must return exactly one row and one column in all cases.
Profile
Segment
SQL Statement
See:
Attention: If you are using flexfields serverside validation, you cannot use form field references (:block.field). You must either remove your field references or turn off flexfields serverside validation using the profile option Flexfields:Validate on Server.
2 28
segment value of the maximum size since the segment field in the window can scroll. The default for the display size of a segment when you first enable the segment is the maximum size of the segment based on the size of the underlying column, or 50, whichever is less. Once you choose a value set for your segment, the default for Display Size is the maximum size of the value set. See: Value Set Windows: page 4 44. Description Sizes for Segment Value Descriptions Your application uses Description Size when displaying the segment value description in the flexfield window. Concatenated Description Size specifies the number of characters long a segment value description should be when a window displays it as part of a concatenated description for the concatenated flexfield values. Your flexfield may show fewer characters of your description than you specify if there is not enough room for it in your flexfield window. However, your flexfield does not display more characters of the description than you specify. The value you specify for Description Size also affects the length of a value description that appears in a list of segment values for the segment (if the segment uses a validated value set). However, the width of the description column in a list will not be less than 11 for Englishlanguage versions of the Oracle Applications (the length of the word Description in English). This width may vary for otherlanguage versions of the Oracle Applications. Some flexfields, particularly the Accounting Flexfield, display a special multicolumn format in some forms (for example, the Define MassBudgets window in the Oracle General Ledger products). In these forms, your flexfield window may scroll horizontally if the longest description size (plus the longest prompt and display sizes) is large. Suggestion: For ease of use, we recommend that you set the Description Size for each of your Accounting Flexfield segments to 30 or less so that your flexfield window does not scroll horizontally. Segment Prompts and List of Values Enter prompts for the segment (as it should appear in the flexfield window) and its list of values (if this segment uses a validated value set) and in reports your application generates. Do not use special characters such as +, , ., !, @, , or # in your prompts.
2 29
If your List of Values prompt is longer than the segment length, you see a warning displayed after you leave this field. This warning is for cosmetic considerations only; your flexfield will still compile normally. Suggestion: Keep your segments prompts short and fairly uniform in length wherever possible.
Flexfield Qualifiers
Use this window to apply flexfield qualifiers to your key flexfield segments. The window title includes the current flexfield and segment names. For each qualifier, indicate whether it is enabled for your key flexfield segment. Since you can set up your key flexfields in any way you prefer, Oracle Applications products use flexfield qualifiers to identify certain segments used for specific purposes. You should consult the help for your key flexfield to determine whether your key flexfield uses qualifiers and what purposes they serve. Some qualifiers must be unique, and you cannot compile your flexfield if you apply that qualifier to two or more segments. Other qualifiers are required, and you cannot compile your flexfield until you apply that qualifier to at least one segment.
Reporting Attributes
If you are using Oracle Public Sector General Ledger, you may have access to the Reporting Attributes block.
2 30
CHAPTER
31
32
Figure 3 1
Descriptive Flexfield
Type Sales Rep Contact Telephone Country Telex Carrier COM Computer
Descriptive Flexfield
Type Sales Rep COM Computer
Context Field
Contextsensitive segments If you have contextsensitive segments, your descriptive flexfield needs context information (a context value) to determine which contextsensitive segments to show. A descriptive flexfield can get context information from either a field somewhere on the form, or from a special field (a context field) inside the descriptive flexfield popup
33
window. If the descriptive flexfield derives the context information from a form field (either displayed or hidden from users), that field is called a reference field for the descriptive flexfield. A context field appears to an end user to be just another segment, complete with its own prompt. However, a context field behaves differently from a normal flexfield segment (either global or contextsensitive). When a user enters a context value into the context field, the user then sees different contextsensitive segments depending on which context value the user entered. You define a context field differently as well. You use a context field instead of a reference field if there is no form field that is a suitable reference field, or if you want your user to directly control which contextsensitive segments appear. A contextsensitive segment appears once the appropriate context information is chosen. The contextsensitive segments may appear immediately if the appropriate context information is derived from a form field before the user enters the descriptive flexfield. For a descriptive flexfield with contextsensitive segments, a single structure consists of both the global segments plus the contextsensitive segments for a particular context field value. That is, a structure consists of all the segments that would appear in the popup window at one time (after the structure has been chosen).
34
Reference field
AttributeN Columns
A descriptive flexfield uses columns that are added on to a database table. The table contains any columns that its entity requires, such as a primary key column and other information columns. For example, a Vendors table would probably contain columns for standard vendor information such as Vendor Name, Address, and Vendor Number. The descriptive flexfield columns provide blank columns that you can use to store information that is not already stored in another column of that table. A descriptive flexfield requires one column for each possible segment and one additional column in which to store structure
35
information (that is, the context value). You can define only as many segments in a single structure as you have descriptive flexfield segment columns in your table. The descriptive flexfield columns are usually named ATTRIBUTEn where n is a number.
Figure 3 3
Descriptive Flexfield
Type Sales Rep Contact Telephone Country Telex Carrier COM Computer
Descriptive Flexfield
Type Sales Rep Contact COM Computer
USA Structure France Structure Reference field column Descriptive flexfield segment columns Structure column (context field) Orders Table
Other columns Country Structure Attribute1 Attribute2 Attribute3 Attribute4 Attribute5 Attribute6
France USA
France USA
COM COM
331476220 (213)1234567
Air Intl HQ
France Structure
USA Structure
36
A global segment uses the same column for all rows in the table. A contextsensitive segment for one structure uses a given column, but a contextsensitive segment in a different structure can reuse that same column. When you define your descriptive flexfield, you should always define your global segments first to ensure that your global segment can reserve that column for all structures. Then, you define your contextsensitive segments using the remaining columns. Note that when you use a descriptive flexfield that has contextsensitive segments, and you change an existing context value to a new context value, the flexfield automatically clears out all the contextsensitive segment columns, and redefaults any segments that have default values.
Reference Fields
Using a field as a reference field has no effect on the field itself. That is, the reference field is simply a normal form field that has nothing to do with the flexfield unless you define the flexfield to use it as a reference field. Typically, an application developer specifies one or more fields on the form as potential reference fields while building the descriptive flexfield into the form, and then you decide which, if any, reference field you want to use. Reference fields provide a way for you to tie the contextsensitivity of descriptive flexfield information you capture to existing conditions in your business data. If you use a reference field, the value of that field populates its own column. For example, if the reference field on your form is the Country field, it populates the country column in the table (remember that the reference field is just an ordinary field on the form before you choose to use it as a reference field). However, that reference field value also populates the structure (context) column in the table, since that value specifies which structure the flexfield displays. If you provide a context field in the flexfield popup window, in addition to using the reference field, the reference field essentially provides a default value for the context field, and the user can choose a different context value. In this case, the reference field column and the structure column might contain different values. If you use the reference field without a displayed context field, the values in the two columns would be the same. The form also contains a hidden context field that holds the structure choice, regardless of whether you choose to display a context field in the popup window. The field you choose must exist in the same block as the descriptive flexfield. In addition, if the descriptive flexfield appears in several
37
different windows or blocks, the same field must exist in all blocks that contain this descriptive flexfield. You can specify your field using either the field name by itself or using the :block.field notation. Suggestion: Choose your reference fields carefully. A reference field should only allow previously defined values so that you can anticipate all possible context field values when you define your structures using the Context Field Values zone. For example, the descriptive flexfield in an application window may be used to capture different information based on which country is specified in a field on that window. In this case, the country field could be used as a reference field. Typically, you would define different structures of descriptive flexfield segments for each value that the reference field would contain. Though you do not necessarily define a structure for all the values the reference field could contain, a field that has thousands of possible values may not be a good reference field. In general, you should only use fields that will contain a relatively short, static list of possible values, such as a field that offers only the choices of Yes and No or perhaps a list of countries. You should not use fields that could contain an infinite number of unique values, such as a PO Number field or a date field (unless that date field has a list of a few particular dates, such as quarter end dates, that would never change). Often the business uses of the particular window dictate which fields, if any, are acceptable reference fields. Suggestion: A descriptive flexfield can use only one field as a reference field. You may derive the context field value for a descriptive flexfield based on more than one field by concatenating values in multiple fields into one form field and using this concatenated form field as the reference field (this may require a customization to the form if the form does not already include such a concatenated field).
38
Figure 3 4
Global Segments Contextsensitive Segments Override Allowed Reference Field Default Context Value
No Yes No Yes OK
Note that the option Override Allowed controls whether your user sees a context field in the flexfield popup window. You set Override Allowed to Yes if you want a context field to appear in the descriptive flexfield popup window. You set Override Allowed to No if you do not want users to choose a structure from within the popup window. In these diagrams, OK means that whether you specify Yes or No for an option does not matter (another option may have an overriding effect). For example, if you have a default context field value (structure choice), but you have a context field as well, your default value will appear in the context field but the user can choose a different value instead. One structure The simplest way to define a flexfield is to have one structure that contains only global segments. However, this arrangement does not allow much future flexibility, since if you use all your available columns for global segments, you do not have any remaining columns for contextsensitive segments.
39
Figure 3 5
Yes No No No OK
Descriptive Flexfield
Global Segment 1 Global Segment 2 Global Segment 3
Another way to achieve a similar effect is to define a single structure that contains only contextsensitive segments. You also define a default context value, and you do not provide a context field or a reference field. The effect of this setup is that the user always sees the same segment structure, so it behaves as if it were a structure of global segments. However, if later you needed to add more structures of contextsensitive segments, you could do so by enabling the context field or a reference field, disabling the default context field value, and defining your new contextsensitive segment structure. Note that if you had already used all the available segment columns in your first contextsensitive structure, you would not be able to add more segments to that structure; you would only be able to define additional structures. One drawback to using the contextsensitive segments only strategy is that if you have certain segments that should appear for all contexts (all structures), you would have to define those segments separately for each contextsensitive structure.
3 10
Figure 3 6
No Yes No No Yes
Descriptive Flexfield
Contextsensitive Segment 1 Contextsensitive Segment 2 Contextsensitive Segment 3
Of course, you could initially define a hybrid structure that contains some global segments and some contextsensitive segments but has only one contextsensitive structure with a default context field value (but no context field or reference field).
3 11
Figure 3 7
Hybrid Structure
Global Segments Contextsensitive Segments Override Allowed Reference Field Default Context Value
Descriptive Flexfield
Global Segment 1 Global Segment 2 Contextsensitive Segment 1
More than one structure Once youve established that you need more than one (contextsensitive) structure, you have a number of options for how you want to arrange various combinations of global and/or contextsensitive segments, reference field or no reference field, context field or no context field, and so on. The following diagrams show these various arrangements (for a setup that uses two contextsensitive structures).
3 12
Figure 3 8 Global Segments Contextsensitive Segments Override Allowed Reference Field Default Context Value
No Yes No Yes OK
Descriptive Flexfield
Contextsensitive Segment 1 Contextsensitive Segment 2 Contextsensitive Segment 3
Descriptive Flexfield
Contextsensitive Segment 1
3 13
Figure 3 9
Global Segments Contextsensitive Segments Override Allowed Reference Field Default Context Value
Descriptive Flexfield
Global Segment 1 Global Segment 2 Contextsensitive Segment 1 Contextsensitive Segment 2 Contextsensitive Segment 3
Descriptive Flexfield
Global Segment 1 Global Segment 2 Contextsensitive Segment 1
3 14
Figure 3 10
Global Segments Contextsensitive Segments Override Allowed Reference Field Default Context Value
No Yes No Yes OK
Descriptive Flexfield
Context Prompt Contextsensitive Segment 1 Contextsensitive Segment 2 Contextsensitive Segment 3 Field Value 1
Descriptive Flexfield
Context Prompt Contextsensitive Segment 1 Field Value 2
3 15
Figure 3 11 Global Segments Contextsensitive Segments Override Allowed Reference Field Default Context Value
Descriptive Flexfield
Global Segment 1 Global Segment 2 Context Prompt Contextsensitive Segment 1 Contextsensitive Segment 2 Contextsensitive Segment 3 Field Value 1
Descriptive Flexfield
Global Segment 1 Global Segment 2 Context Prompt Contextsensitive Segment 1 Field Value 2
3 16
u How often does your organization change? This would affect how
you set up your values. For example, if you disable old cost centers and enable new ones frequently, you would use up cost center values quickly. You would therefore want to use a larger maximum size for your cost center value set so that you can have more available values (for example, you have 999 available values for a 3character value set instead of 100 available values for a 2character value set).
3 17
See: Overview of Setting Up (Oracle [Product] Users Guide) Flexfields Planning Worksheets: page 0 1 Overview of Setting Up Flexfields: page 1 10 You should decide on the number, order and length of your segments for each structure. You must also choose how to validate each segment. See: Overview of Values and Value Sets: page 4 2 Descriptive Flexfield Structure Planning Diagrams: page 3 18
3 18
Figure 3 12
(Title)
(Global Segment Prompt) (Segment Value) (Value Description)
Global and ContextSensitive Segments Use the following two diagrams for a descriptive flexfield that has more than one structure that contains both contextsensitive segments and global segments and may use a context field and/or a reference field.
3 19
Figure 3 13
(Title)
(Global Segment Prompt) (Segment Value) (Value Description)
(Value Description)
(This group of contextsensitive segments appears if the context field value is_____________________________________________ )
(Segment Prompt) (Segment Value) (Value Description)
3 20
Figure 3 14
(Same Title)
(Same Global Segment Prompt) (Segment Value) (Value Description)
(Value Description)
(This group of contextsensitive segments appears if the context field value is_____________________________________________ )
(Segment Prompt) (Segment Value) (Value Description)
3 21
ContextSensitive Segments Only Use multiple copies of the following diagram for a descriptive flexfield that has more than one structure and contains only contextsensitive segments. Your structures may use a context field and/or a reference field.
Figure 3 15
(Title)
(Context Field Prompt) (Context Field Value) (Value Description)
(This group of contextsensitive segments appears if the context field value is_____________________________________________ )
(Segment Prompt) (Segment Value) (Value Description)
3 22
Use this window to define the your descriptive flexfield structures. Planning Your Descriptive Flexfield: page 3 17
Tasks
Defining Descriptive Flexfield Structures: page 3 25 Defining Segments: page 2 22 Identifying Descriptive Flexfields in Oracle Applications: page 3 31
3 23
To take advantage of the flexibility and power of descriptive flexfields in your application, you must define your flexfield structure. If you do not define any descriptive flexfield segments, you cannot use descriptive flexfields within your windows, but there is no other loss of functionality. Once you define or change your flexfield, you must freeze your flexfield definition and save your changes. When you do, Oracle Applications automatically compiles your flexfield to improve online performance. Once you freeze your flexfield definition and save your changes, Oracle Applications submits a concurrent request to generate a database view of the table that contains your flexfield segment columns. You can use these views for custom reporting at your site. See: Overview of Flexfield Views: page 8 3. You can see your flexfield changes immediately after you freeze and recompile your flexfield. However, your changes do not affect other users until they change responsibilities or exit the application they are using and sign back on. Suggestion: Plan your descriptive flexfield structures carefully, including all your segment information such as segment order and field lengths, before you set up your segments using this window. You can define your descriptive flexfields any way you want, but changing your structures once you acquire flexfield data may create data inconsistencies that could have a significant impact on the performance of your application or require a complex conversion program. Identifying Descriptive Flexfields in Oracle Applications: page 3 31
3 24
Prerequisites
u Use the Value Sets window to define any value sets you need. See:
Value Sets: page 4 44.
"
To define a descriptive flexfield: 1. 2. Navigate to the Descriptive Flexfield Segments window. Select the title and application name of the descriptive flexfield you want to define. You cannot create a new flexfield using this window. See: Identifying Descriptive Flexfields in Oracle Applications: page 3 31. You can change the flexfield title by typing in a new name over the old name. You see this name whenever you select a descriptive flexfield and as the window title whenever a user enters your descriptive flexfield. Do not freeze your flexfield if you want to define new structures, set up or modify your flexfield segments, or change the appearance of your descriptive flexfield window. You cannot make most changes while the flexfield is frozen. Freeze your flexfield after you set it up. Then save your changes. When you do, this window automatically compiles your flexfield.
3.
3 25
You must freeze and compile your flexfield definition before you can use your flexfield. If you decide to make changes to your flexfield definition, make sure that you freeze and save your flexfield definition again once you have made your changes. The default value for this field is No. Warning: Do not modify a frozen flexfield definition if existing data could be invalidated. An alteration of the flexfield structure can create data inconsistencies. 4. Enter the character you want to use to separate your segments in a concatenated description field. You should choose your separator character carefully so that it does not conflict with your flexfield data. For example, if your data frequently contains periods ( . ) in monetary or numeric values, you should not use a period as your segment separator. If you enter a segment value that contains the segment separator character, your flexfield displays the character in your value as a caret (^) in your concatenated value fields to differentiate it from the segment separator. This change is for concatenated display purposes only and does not affect your value. To avoid confusion, you should never use a caret (^) as your segment separator. Warning: Some Oracle Applications tables store the segment separator as part of your flexfield values. Changing your separator once you have data in such tables may invalidate that data and cause application errors. The context field automatically displays any existing context window prompt for this flexfield. You can change this prompt by typing a new prompt over the current prompt. Your flexfield displays this prompt in a flexfield window if you can choose the contextsensitive flexfield structure you want to see when you enter the flexfield (that is, if you have permitted Override). When you choose a prompt, you should keep in mind that the context field in the flexfield window appears as just a normal field or segment to a user. For example, if you have a Client Type descriptive flexfield with two different segment structures called Customer (for external clients) and Employee (for internal clients), you might define your prompt as Client Type. 5. Enter a default context field value for your flexfield to use to determine which descriptive flexfield structure to display. You must define the default context field value as a structure in the Context Field Values zone before you can compile your flexfield.
3 26
Your flexfield automatically uses this default context field value if you do not define a reference field. If you do not have any contextsensitive segments, or you want the context field to remain blank unless filled in by a reference field, you should leave this field blank. 6. Indicate whether a context field value is required. If a context field value is required, your flexfield does not allow you to leave the flexfield window without entering a valid value. Otherwise, you do not have to choose a value for your context field. In this case, you leave the flexfield window without seeing any contextdependent structures. Enter the name of the reference field from which your flexfield can automatically derive the context field value. You can select from a list of potential reference fields that have been predefined. Some descriptive flexfields may not have any reference fields predefined. See: Reference Fields: page 3 7. Indicate whether you can override the context field value that your flexfield derives from a reference field or obtains as a default value. If you can change the value, your flexfield displays your context window prompt in the flexfield window. You should always allow overrides if you do not specify either a default value or a reference field, unless you have only global segments. Without allowing override, your flexfield must determine its value from the reference field or your default value. Suggestion: You should specify No only if the context field value derives from a reference field or a default value that you specify using this zone. If you do derive your context field value from a reference field, however, we recommend that you do not allow your user to override that value.
7.
8.
3 27
For example, suppose you have a Client Type flexfield. You have two contextsensitive structures, Employee (internal client), and Customer (external client), for which you want to have different segments to capture different information. However, you also want to capture certain information for both structures. You define global segments for the common information, using the Global Data Elements value. You also define contextsensitive segments for each of your two structures, Employee and Customer, to capture the two sets of different information. See: Planning Your Descriptive Flexfields: page 3 17. 1. Enter a unique context field value (also known as the flexfield structure name) under the Code column. Your flexfield uses this value, either derived from a reference field or entered by your user in an initial descriptive flexfield window, to determine which flexfield structure to display. This value is written out to the structure column of the underlying table. If you are using a reference field, the values you enter here must exactly match the values you expect your reference field to provide, including uppercase and lowercase letters. For example, your reference field may be a displayed field that provides the values Item and Tax, so you would specify those. However, those would not be valid if you were using a corresponding hidden field as your reference field and that field provides the values I and T. Once you save your context field value, you cannot delete or change your context field value because it is referenced elsewhere in the system. You can disable a value, however. Suggestion: Choose and type your context field values carefully, since once you save them you cannot change or delete them later.
2.
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 customers chosen language. The context code is not translatable.
Enter a name for this descriptive flexfield context value. The context code will default in. For a descriptive flexfield that is set up so that the context field is displayed, the context name should be entered in the context field. The LOV on the context field will show the context name and description.
3.
Enter a description for this descriptive flexfield context field value. You can use this description to provide a better explanation of the
3 28
content or purpose of this descriptive flexfield structure. You see this description along with the context name whenever you pick a descriptive flexfield context from inside the flexfield window. When you navigate to the next zone, this window automatically saves your pending changes.
Attention: The width of your descriptive flexfield window depends on the length of the longest description you enter in this field, if this description is longer than the longest description size you choose for any of your segments in a given structure.
You cannot enable new structures if your flexfield definition is frozen. 4. Choose the Segments button to open the Segments window, and define your flexfield segments. See: Defining Segments: page 2 22.
3 29
3 30
To identify the descriptive flexfield present in a window (Oracle Applications Release 11): 1. 2. Navigate to the window and block for which you want to set up the descriptive flexfield. Use the Help menu to choose Tools Examine. If Examine is disabled or requires a password on your system, contact your system administrator for help. 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. Note the block name displayed to help you select the correct flexfield in a later step. Use the list on the Block field to choose $DESCRIPTIVE_FLEXFIELD$. 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). 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 flexfield is visible, that those conditions are met, and that your cursor is in the same block as the flexfield. Try using Examine again. 6. The flexfield title that appears in the Value field is the title you should choose in the Descriptive Flexfield Segments form. See: Defining Descriptive Flexfield Structures: page 3 25.
3.
4. 5.
3 31
3 32
CHAPTER
41
42
To plan values and value sets: 1. 2. 3. 4. Choose a format for your values. See: Choosing Value Formats: page 4 3. Decide whether your segment should have a list of values. See: Decide What Your User Needs: page 4 14. Choose an appropriate validation type for your segment. See: Choosing a Validation Type for Your Value Set: page 4 15. Consider using values that group neatly into ranges so that using rangebased features (value security, value hierarchies, and so on) will be easier. See: Plan Values to Use Range Features: page 4 19. Plan both values and descriptions as appropriate. Plan any value hierarchies, crossvalidation rules, value security rules, and so on as appropriate.
5. 6.
43
You want to specify a maximum size for your values that fits the way your organization works. Generally, if you use values with descriptions, your values tend to be short and have longer descriptions. For example, you might have a value of 02 that has a description of New Orleans Region. If you plan to have Oracle Applications right justify and zerofill your values (so a threecharacter value set value of 7 automatically comes 007), you want your maximum size to be short enough so that your users are not overwhelmed by zeros, but long enough so that your organization has room to add more values later. Values never change; descriptions can. For example, a department code of 340 cannot change, but its description may change from Sales to Corporate Accounts. Disable values and create new ones as needed. The following diagram shows how some of these formatting options interact.
44
Figure 4 1
Alphabetic Allowed
Mach
Uppercase Only
190
MACH
190
Becomes
0190
01 90
You have several other options from which to choose. See: Value Formats: page 4 6.
45
Format Options
Validation Type
Format Type Maximum Length Precision Numbers Only? Uppercase Only? Rightjustify and Zerofill Numbers? Minimum Value Maximum Value
Table 4 1 (Page 1 of 1)
Value Formats
The format type you specify in the Format Type field is the format for the segment or parameter value. If you use a validation table for this value set, this format type corresponds to the format type of the value column you specify in the Validation Table Information region, regardless of whether you also specify a hidden ID column. Because your changes affect all flexfields and report parameters that use the same value set, you cannot change the format type of an existing value set. All of these format options affect both the values you can enter in the Segment Values windows and the values you can enter in flexfield segments and report parameters.
Format Types
Char Char lets you enter any character values, including letters, numbers, and special characters such as # $ % ( ) . / , & and *. If you choose
46
this format type but enter values that appear to be numbers, such as 100 or 20, you should be aware that these values will still behave as character values. For example, the value 20 will be larger than the value 100. If you want such values to behave (and be sorted) more like numeric values, you should check the Rightjustify and Zerofill Numbers check box. If you choose this format type but enter values that appear to be dates, such as DDMONYY or DDMONYYYY, you should be aware that these values will still behave as character values. For example, the value 01SEP1993 will be larger than the value 01DEC1993. If you want such values to behave (and be sorted) like date values, you should use the Date format type. If you use the Char format type, you can also specify character formatting options. See: Character Formatting Options: page 4 11. Date Date enforces a date format such as DDMONYY or DDMONYYYY, depending on the maximum size for this value set. These are the supported date formats and value set maximum sizes you can use: Maximum Size 9 11 Date Format DDMONYY DDMONYYYY
You can use corresponding default values for segments whose value sets use one of the above sizes. You define these defaults when you define your segments or report parameters. These values are treated and sorted as date values, so 01DEC1993 is larger than 01SEP1993. Warning: Date and DateTime are provided for backward compatibility only. For new value sets, use the the format types Standard Date and Standard DateTime. DateTime DateTime enforces a date format such as DDMONYY HH24:MI, depending on the maximum size for this value set. These are the supported datetime formats and value set maximum sizes you can use for DateTime:
47
Maximum Size 15 17 18 20
Date Format DDMONYY HH24:MI DDMONYYYY HH24:MI DDMONYY HH24:MI:SS DDMONYYYY HH24:MI:SS
You can use corresponding default values for segments whose value sets use one of the above sizes. You define these defaults when you define your segments or report parameters. These values are treated and sorted as datetime values, so 01DEC1993 is larger than 01SEP1993. Warning: Date and DateTime are provided for backward compatibility only. For new value sets, use the the format types Standard Date and Standard DateTime. Number Number lets you ensure that users enter a numeric value. The numeric format allows a decimal point and a plus or minus sign (although the plus sign is not displayed in the segment). All leading zeros and plus signs are suppressed, and entered data behaves as in a NUMBER field in Oracle Forms or a NUMBER column in the database. Note that this format behaves differently than a Numbers Only format, which is actually a character format. Once you have chosen a Number format, you can enter a value in the Precision field. Precision indicates the number of places that should appear after the decimal point in a number value. For example, to display 18.758, you choose a precision of 3. Similarly, to display 1098.5, you choose a precision of 1. To display an integer such as 7, you choose a precision of 0. Standard Date Standard Date enforces the current NLS date format, depending on the NLS date format setting for your installation. Users see the dates in the current NLS format while entering data, querying data and using the List of Values. For flexfield segments using value sets with these format types, the date values are stored in the application tables in the format YYYY/MM/DD HH24:MI:SS if the columns where the values are
48
stored are of type VARCHAR2. For report parameters using these value sets the concurrent manager will pass dates in this format to the report. Value sets with the Standard Date and Standard DateTime formats can have validation types of None, Table, Independent or Dependent in Release 11. You can specify minimum and maximum boundary values for these value sets in the current NLS date format while defining the value set. Table validated value sets using the Standard Date or Standard DateTime formats cannot use the ID column. The VALUE column should be a DATE column or a VARCHAR2 column (which should have the date values in the canonical format YYYY/MM/DD HH24:MI:SS). If the existing values in the table are not in the canonical format you should create a view that will do the conversion to the canonical format or to a date column and the value set should be defined on this view. These values are treated and sorted as date values, so 01DEC1993 is larger than 01SEP1993. Standard DateTime Standard DateTime enforces the current NLS date format, depending on the NLS date format setting for your installation. Users see the dates in the current NLS format while entering data, querying data and using the List of Values. For flexfield segments using value sets with these format types, the date values are stored in the application tables in the format YYYY/MM/DD HH24:MI:SS if the columns where the values are stored are of type VARCHAR2. For report parameters using these value sets the concurrent manager will pass dates in this format to the report. Value sets with the Standard Date and Standard DateTime formats can have validation types of None, Table, Independent or Dependent in Release 11. You can specify minimum and maximum boundary values for these value sets in the current NLS date format while defining the value set. Table validated value sets using the Standard Date or Standard DateTime formats cannot use the ID column. The VALUE column should be a DATE column or a VARCHAR2 column (which should have the date values in the canonical format YYYY/MM/DD HH24:MI:SS). If the existing values in the table are not in the canonical
49
format you should create a view that will do the conversion to the canonical format or to a date column and the value set should be defined on this view. These values are treated and sorted as datetime values, so 01DEC1993 is larger than 01SEP1993. Time Time enforces a time format such as HH24:MI, depending on the maximum size for this value set. These are the supported time formats and value set maximum sizes you can use: Maximum Size 5 8 Date Format HH24:MI HH24:MI:SS
You can use corresponding default values for segments whose value sets use one of the above sizes. You define these defaults when you define your segments or report parameters. These values are treated and sorted as time values.
4 10
If you are defining a value set that uses a validation table, your maximum size should reflect the size of the column you specify as your value column. The maximum size must also be equal to or less than the width of the destination segment column. Therefore, after you choose your value column size, you may get a message instructing you to modify the value set maximum size to match your value column width. However, if you also specify a hidden ID column for your value set, the flexfield determines if the hidden ID value will fit into the underlying column rather than the value column. For example, if you specify your maximum size as 60, which is also the size of your value column, but you also specify a hidden ID column whose size is 15, you could still use that value set for a flexfield whose underlying segment column size is only 20. Such value sets do appear in the value set list of values you see when you define your flexfield segments or report parameters.
Attention: If you want to restrict users from entering a negative sign for a value set where you do not allow alphabetic characters, you should enter zero (0) as this value sets minimum value. However, you cannot prevent users from entering a value that contains a period.
If you are defining a value set that uses a validation table, you should set the value in this field to reflect the characteristics of the values in the value column you specify for your validation table.
4 11
Uppercase Only Indicate whether any alphabetic characters you enter as values for a segment using this value set should automatically change to uppercase. If you are defining a value set that uses a validation table, you should set the value in this field to reflect the characteristics of the values in the value column you specify for your validation table. Rightjustify and Zerofill Numbers Indicate whether your flexfield should automatically rightjustify and zerofill numbers when you enter values for this value set. This option affects values that include only the characters 09, regardless of whether you select the Numbers Only option. This option has no effect on values that contain alphabetic characters or special characters such as a period or a hyphen. For example, if you have a fivecharacter value set, and you define a value of 7, your flexfield stores and displays your value as 00007. If you define your flexfield segment to have a display size less than the maximum size and you have want to Rightjustify and Zerofill Numbers, your flexfield segment may often display only zeroes (your flexfield segment displays only the number of characters specified by the display size). In these cases, your users need to scroll through the flexfield segment to see a meaningful value, thus slowing data entry or inquiries. Usually you use this option to ensure that character values that appear to be numbers will be sorted and appear in order as if they were actually number values (for crossvalidation rules, value security rules, and reporting, for example). You may also use this option to ensure that numericlooking values all have the same number of characters so they line up nicely in reports. Suggestion: We recommend that you set Rightjustify and Zerofill Numbers to Yes for value sets you use with the Accounting Flexfield and to No for most other value sets. If you are defining a value set that uses a validation table, you should set the value in this field to reflect the characteristics of the values in your validation table.
4 12
4 13
Max Value Enter the maximum value a user can enter in a segment that uses this value set. Your maximum value may not be longer than the maximum size you specify for this value set. If you leave this field blank, the maximum value for this value set is automatically the largest value possible for your value set. For example, if the value set maximum size is 3 and Alphabetic Characters is set to No, the maximum value is 999. However, if the value set maximum size is 5, and Alphabetic Characters is set to No, the maximum value is 99999.
4 14
List of Values
Values Stored
Attention: The Accounting Flexfield only supports Independent, Dependent, and Table validation.
You cannot change the validation type of an existing value set, since your changes affect all flexfields and report parameters that use the same value set.
4 15
Figure 4 2
Descriptive Flexfield
Type Sales Rep COM Computer
Jane Reed
(or)
Independent Value Set TableValidated Value Set
List
List
COM Computer
(or)
None You use a None type value set when you want to allow users to enter any value so long as that value meets the value set formatting rules. That is, the value must not exceed the maximum length you define for your value set, and it must meet any format requirements for that value set. For example, if the value set does not allow alphabetic characters, your user could not enter the value ABC, but could enter the value 456 (for a value set with maximum length of three). The
4 16
values of the segment using this value set are not otherwise validated, and they do not have descriptions. Because a None value set is not validated, a segment that uses this value set does not provide a list of values for your users. A segment that uses this value set (that is, a nonvalidated segment) cannot use flexfield value security rules to restrict the values a user can enter. Independent An Independent value set provides a predefined list of values for a segment. These values can have an associated description. For example, the value 01 could have a description of Company 01. The meaning of a value in this value set does not depend on the value of any other segment. Independent values are stored in an Oracle Application Object Library table. You define independent values using an Oracle Applications window, Segment Values. Table A tablevalidated value set provides a predefined list of values like an independent set, but its values are stored in an application table. You define which table you want to use, along with a WHERE cause to limit the values you want to use for your set. Typically, you use a tablevalidated set when you have a table whose values are already maintained in an application table (for example, a table of vendor names maintained by a Define Vendors form). Table validation also provides some advanced features such as allowing a segment to depend upon multiple prior segments in the same structure. Dependent A dependent value set is similar to an independent value set, except that the available values in the list and the meaning of a given value depend on which independent value was selected in a prior segment of the flexfield structure. You can think of a dependent value set as a collection of little value sets, with one little set for each independent value in the corresponding independent value set. You must define your independent value set before you define the dependent value set that depends on it. You define dependent values in the Segment Values windows, and your values are stored in an Oracle Application Object Library table. See: Relationship Between Independent and Dependent Values: page 4 22.
4 17
Figure 4 3
List
Special and Pair Value Sets Special and pair value sets provide a mechanism to allow a flexfieldwithinaflexfield. These value sets are primarily used for Standard Request Submission parameters. You do not generally use these value sets for normal flexfield segments.
4 18
Figure 4 4
Run Reports
Report Parameters
Report Parameters
Type Part Number COM Computer
COM876LTN
Special and Pair value sets use special validation routines you define. For example, you can define validation routines to provide another flexfield as a value set for a single segment or to provide a range flexfield as a value set for a pair of segments.
4 19
that if you use the Character format for your value set, your values and ranges are sorted by characters. So, 001 < 099 < 1 < 100 < 1000 <12 < 120 < 1200, which is different from what you expect if these were really numbers (using a Number format value set).
4 20
uses a value set associated with a Standard Request Submission report parameter, any changes you make to its value set also affect any reports that use the same value set. Also, your changes to Oracle Applications value sets may be overwritten by a future upgrade. For backwards compatibility, Oracle Applications provides some predefined value sets, FND_DATE and FND_DATE4 that you can choose for your date segments. These special value sets ensure that you enter a properlyformatted date, instead of any set of characters, in your flexfield segment. FND_DATE provides a date format of DDMONYY, and FND_DATE4 provides a date format of DDMONYYYY. Both of these value sets have a validation type of None, so they accept any date value in the correct format. If your flexfield segment or report parameter uses FND_DATE or FND_DATE4, it must have a length of 9 or 11 characters (respectively) to avoid truncation of the dates. However, we recommend that you create your own date value sets for any new flexfield segments. For backwards compatibility, Oracle Applications provides another predefined value set, NUMBER15, that you can choose for your numeric segments. This special value set ensures that you enter a positive or negative number, instead of any set of characters, in your flexfield segment. This value set has a validation type of None, so it accepts any positive or negative number value up to fifteen characters long (including the minus sign). If you use this value set, your flexfield strips any leading zeros from the values you enter and ensures that your numbers have only one decimal point ( . ). However, we recommend that you create your own number value sets for any new flexfield segments.
u Plan your flexfield structures and segments. u Thoroughly plan your values and value sets. See: Planning Values
and Value Sets: page 4 3.
"
To define values and value sets: 1. 2. Navigate to the Value Sets window. Define your value set. See: Defining Value Sets: page 4 45.
4 21
3.
Table 4 3 (Page 1 of 1)
You must set up your independentdependent value sets carefully using the following sequence: Create your independent value set first Create your dependent value set, specifying a default value Define your independent values Define your dependent values
4 22
When you define each of your independent values, Oracle Applications automatically creates a default dependent value that goes with your independent value. For example, the previous diagram shows a default value of zero (0). If for some reason you create a dependent value set after your independent value set has values, you must manually create a default value in your dependent set for each of your independent values, since each independent value must have a default dependent value. If necessary, create your default dependent values manually using the Segment Values form (you also use this form to create all dependent values other than the default value). You must create at least one dependent value for each independent value, or else your user will be unable to enter segment value combinations in the flexfield. However, we recommend that you carefully follow the above order for creating your value sets so that you never have to create default dependent values manually, since manually creating default dependent values is both tedious and errorprone. Dependent Values with Table Validation Flexfields uses a special mechanism to support tablevalidated segments whose values depend on the value in a prior segment (a different mechanism from that used for independent value sets with dependent value sets). You can use flexfield validation tables with a special WHERE clause (and the $FLEX$ argument) to create value sets where your segments depend on prior segments. You can make your segments depend on more than one segment (cascading dependencies). However, you cannot use parent value/child value features with these value sets, nor can you use this mechanism with the Accounting Flexfield. See: WHERE Clauses and Bind Variables for Validation Tables: page 4 31 Example of $FLEX$ Syntax: page 4 37
4 23
4 24
Use this window to define rollup groups to which you can assign key flexfield values. You can use a rollup group to identify a group of parent values for reporting or other application purposes. You assign key flexfield segment values to rollup groups using the Segment Values window. In Oracle Applications, only the Accounting Flexfield uses rollup groups. Rollup groups are used to create summary accounts for reporting purposes. See:
u Use the Value Set window to define your independent value sets,
any dependent value sets that depend on them, and any tablevalidated value sets your flexfield needs. See: Value Set Windows: page 4 44.
4 25
To define rollup groups: 1. 2. 3. Enter a name and description for your rollup group. Save your changes. Apply your rollup group name to particular values using the Segment Values window. See: Defining Segment Values: page 4 59.
4 26
4 27
To implement a validation table: 1. Create or select a validation table in your database. You can use any existing application table, view, or synonym as a validation table. See: Defining Your Validation Table: page 4 30. Register your table with Oracle Application Object Library (as a table). You may use a nonregistered table for your value set, however. If your table has not been registered, you must then enter all your validation table information in this region without using defaults. Create the necessary grants and synonyms. See: Creating Grants and Synonyms for Your Table: page 4 31. Define a value set that uses your validation table. See: Defining Value Sets: page 4 45. Define your flexfield structure to use that value set for a segment.
2.
3. 4. 5.
You can use the same table for more than one value set, using different SQL WHERE clauses to limit which values are used for flexfield and report parameter validation. For example, if you wish to validate different segments against different rows of the same table, you would use the same table twice but select different rows of the table for each value set by using different SQL WHERE clauses. 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. In general, you may use a WHERE clause and/or an ORDER BY clause for validation tables you intend to use with key flexfields other than the Accounting Flexfield.
Attention: If you need a complex SQL clause to select your values from a table, you should instead first define a view over the table which selects the rows you need, and then define the value set over the view.
See: WHERE Clauses and Bind Variables for Validation Tables: page 4 31 for detailed information on using WHERE clauses with special bind variables.
4 28
Using hidden ID columns with value sets If you specify a hidden ID column in addition to your value column, the flexfield saves your hidden ID value, instead of the value from the value column, in the segment column (in your ATTRIBUTEnn column or SEGMENTnn column) of the underlying flexfield table. Generally, you use value sets with hidden ID columns only for report parameters. You would not normally use them for most key flexfields. In fact, most key flexfields prevent you from using a value set with a hidden ID column by not displaying those value sets in the list of values you use to assign a value set to a segment.
Attention: You should not specify a hidden ID column for value sets you use with your Accounting Flexfield or most other key flexfields.
If you specify a hidden ID column in addition to your value column, the report parameter window passes your hidden ID value, instead of the value from the value column, to your report. Table validated value sets using the Standard Date or Standard DateTime formats cannot use the ID column. Using multiple tables in a single value set For value sets that use multiple tables, you should always include the table aliases with your all your column names. You must enter the column name directly, since your list of values cannot retrieve any column names for a table name that is not a registered single table. For example, you might enter:
f.column_name
For value sets that use multiple tables, you can and should leave the Table Application field blank, since it is effectively ignored in this case. You enter the table names and aliases you want in the Table Name field. Then, you enter the Value Column and Description Column column names directly, with table aliases, since your list of values cannot retrieve any column names for a table name that is not a registered single table. Displaying additional columns in your list of values You can design your value set to display several columns in the segment value or report parameter value list of values, and these columns may be in different tables. If all your columns exist in the same table, you simply list the additional columns in the Additional
4 29
Columns field. If your columns exist in different tables, you must specify more than one table name in the Table Name field. You should always use table names or aliases with your column names for your Additional Columns and WHERE clause. Finally, you can enter the names of the extra columns you want, with their table aliases, in the Additional Columns field. You can specify column widths to display. In some cases you may want to use a SQL expression instead of specifying a single column name. For example, you may want to use a DECODE statement instead of a simple column name, such as:
DECODE(FORM.FORM_NAME, OEDEOR, Enter Orders, Not available)
or
DECODE(FORM.FORM_ID, 1234, 1234, NULL)
You can also use message names as alias names; this functionality allows for ease of translation of column titles. The syntax for using a message name as an alias name is:
E_FLAG APPL=<Application Short Name>;NAME=<Message Name>(width)
4 30
of the flexfield validation information. If you add the ENABLED_FLAG column to an existing table, you must populate the column (with Y or N) for all rows. Normally, you should use the values form Oracle Application Object Library provides, Define Segment Values, to contain parent values and rollup group information (together with child values contained in your validation table as described in the previous section). If you have certain special columns, such as SUMMARY_FLAG, START_DATE_ACTIVE, END_DATE_ACTIVE, STRUCTURED_HIERARCHY_LEVEL, COMPILED_VALUE_ATTRIBUTES or ENABLED_FLAG, in your registered table, your value set uses those columns automatically once you set up your table as a validation table. If you do not want your value set to use those columns automatically, you should use an alias with your table name in the Table Name field.
Attention: If you need to use SQL functions or very complex WHERE clasuses with your table, you should instead first define a view over the table and then use the view.
4 31
Figure 4 5
Descriptive Flexfield
Type Sales Rep COM Computer
Jane Reed
Application Table
List
List
Application Table Rep ID 11 12 14 15 16 17 19 21 Sales Rep George Budaski Amy Campana Jane Reed Ashutosh Gupta Vicki Nakamura Bob Smith Al Chang Karen Schwartz Specialty BLDG BLDG COM COM COM FURN AUTO TRK
4 32
WHERE/ORDER BY clause. However, you may not use them in the Value Column or Hidden ID Column fields (where you would normally specify a column name), even if you do specify a SQL fragment instead of specifying a single column name. You may use bind variables in the Description Column and Additional Columns fields.
See:
Attention: If you are using flexfields serverside validation, you cannot use form field references (:block.field). You must either remove your field references or turn off flexfields serverside validation using the profile option Flexfields:Validate on Server.
Attention: You may not use a DISTINCT clause in any of the column fields or in your WHERE/ORDER BY clause (you should use a view with a GROUP BY clause instead of your actual table).
If you are using a validation table with special arguments such as :$FLEX$.Value_Set_Name for your value set, you should specify No in the Enable Security field, since any security rules you have for your value set would ignore the values of these special arguments, and your rules could have effects other than what you intend. See: Overview of Implementing TableValidated Value Sets: page 4 27 Overview of Values and Value Sets: page 4 2. Bind Variables: page 4 33
Bind Variables
You can put special arguments (bind variables) in your WHERE clause that allow you to base your values on other values. These bind variables include :block.field, :$PROFILES$.Option_name, or :$FLEX$.Value_set_name, You may not use bind variables in the Value Column or Hidden ID Column fields (where you would normally specify a column name). You may use bind variables in the Description Column and Additional Columns fields.
4 33
Note that a bind variable, by default, is required; that is, it must have a value for the statement, expression, or user exit which uses it to have meaning.A bind variable can be made optional by using the :NULL suffix; so that if the bind variable is NULL, the segment/parameter using it will be disabled, and its required property (if enabled) will be ignored. The :NULL suffix is discussed at the end of this section. :$FLEX$.Value_ Set_Name Value_Set_Name is the name of either the value set for a prior segment, or the segment name of a prior segment in the same flexfield or parameter window that you want your validation tablebased values to depend on. When you define your flexfield structure or report parameter window, you define the segment or parameter that uses value set Value_Set_Name to have a lower sequence number than the segment that uses your validation tablebased value set. The $FLEX$ mechanism uses the closest prior segment with either a matching value set name or segment name (it looks for the value set name first, and uses the segment name second if there are no matching value set names). Value_Set_Name is casesensitive, so you must ensure that the name you specify here exactly matches the value set name you define in the Define Value Set form. Note that you can only use letters, numbers, and underscores (_) in your value set names if you want to use them with a :$FLEX$.Value_Set_Name clause. You cannot use quotes, spaces, or other special characters in these value set names, so you should be careful to define your value sets with names that do not contain spaces, quotes, or other special characters. You can specify more than one :$FLEX$.Value_Set_Name in a single WHERE clause, thereby creating a segment whose list of possible values depends upon more than one previous segment. When you specify :$FLEX$.Value_Set_Name, your flexfield segment or report parameter defaults to always use the hidden ID column (of the previous value set) to compare with your WHERE clause. The end user would never see the hidden ID value, however. If you do not specify a hidden ID column, your segment defaults to use the value in the value column instead. When you specify :$FLEX$.Value_Set_Name, you can also explicitly choose which column for which you want :$FLEX$.Value_Set_Name to return a value. You do this by specifying :$FLEX$.Value_Set_Name.OUTPUT, where OUTPUT can be ID, VALUE, or MEANING (to return the value of the description column).
4 34
When you specify your validation table value sets, you can also use an INTO clause in the Additional Columns field (after your entire list of columns and aliases) to put the value into a variable you use with :$FLEX$.segment_name.OUTPUT, where OUTPUT is a name you choose. You can then retrieve that value using :$FLEX$.segment_name.OUTPUT (where OUTPUT is the same name) from another segments value set WHERE clause. You cannot use OUTPUT to put a value directly into a field, but a value that a flexfield segment retrieves may be put into a hidden form field that the segment corresponds to once the popup window closes. If you do not specify an INTO clause in your Additional Columns field, your value is not placed anywhere other than being displayed in the list of values (it goes INTO NULL).
See:
Attention: If you are using flexfields serverside validation, you cannot use the INTO clause for your value set. You must either remove your INTO clauses or turn off flexfields serverside validation using the profile option Flexfields:Validate on Server.
Flexfields:Validate on Server: page 4 27 :block.field :block.field is the SQL*Forms/Oracle Forms name of a field on the form where your descriptive flexfield appears. You can use this argument to make your value set contextsensitive to a field on a form. While this is somewhat similar to using a reference field with a descriptive flexfield, using a reference field with a descriptive flexfield provides a choice between different structures of contextsensitive segments (and indirectly, their value sets). Using this :block.field argument, however, gives you the same segments that would normally appear, but changes the contents of the value set attached to the segment depending on what appears in your :block.field. In some cases, you may wish to use a :block.field value set instead of a descriptive flexfield reference field with many different contextsensitive structures. Note that if you use this argument, you must have the same :block.field on every form where a value set based on this validation table could be used. For example, if the same flexfield appears on seven forms, then all seven forms must have this block.field. Similarly, if you share your value set among more than one flexfield, then all forms that use any of those flexfields must have this block.field. Though it is possible to use this argument for a key flexfield segment or report parameter, the same
4 35
restriction applies; that is, you must have the same block.field wherever the value set can be used. Warning: The :block.field mechanism is present for backward compatibility only. Value sets that use this mechanism will not be compatible with a future release of Oracle Applications. If you are using flexfields serverside validation, you cannot use form field references (:block.field). You must either remove your field references or turn off flexfields serverside validation using the profile option Flexfields:Validate on Server. See: Flexfields:Validate on Server: page 4 27 :$PROFILES$. profile_option_ name Profile_option_name is the internal option name of a user profile option such as CONC_COPIES (for Concurrent:Report Copies) or GL_SET_OF_BKS_ID. For example, you could define your WHERE clause as:
WHERE SET_OF_BOOKS_ID = :$PROFILES$.GL_SET_OF_BKS_ID
See: Overview of User Profiles (Oracle Applications System Administrators Guide) :NULL suffix Use the :NULL suffix to make your bind variable optional, that is, allow null values. Instead of :block.field, :$PROFILES$.Option_name, or :$FLEX$.Value_set_name, you would use :block.field:NULL, $PROFILES$.Option_name:NULL, or :$Flex$.Value_set_name:NULL, respectively. For example, if your value set name is Car_Maker_Name_Value_Set, you would use :$FLEX$.Car_Maker_Name_Value_Set:NULL. See also: Example of $FLEX$ Syntax: page 4 37 Special Treatment for WHERE Clauses Behind the scenes, the flexfield adds an AND... clause to the WHERE clause you define for your table validated value set. If your WHERE clause contains an OR, then the appended AND clause might not apply to your whole WHERE clause (without the parentheses), and might not
4 36
produce the correct results. So, flexfields implicitly put parentheses around your WHERE clause.
Segment Name Value Set Name Validation Table Value Column Description Column Hidden ID Column SQL Where Clause
4 37
In this example, MANUFACTURER_ID is the hidden ID column and MANUFACTURER_NAME is the value column of the Car_Maker_Name_Value_Set value set. The Model segment uses the hidden ID column of the previous value set, Car_Maker_Name_Value_Set, to compare against its WHERE clause. The end user never sees the hidden ID value for this example.
4 38
Precedence of Default Values, Shorthand Entry Values, and COPY Values in Key Flexfields
There are four ways you can put a value into a key flexfield segment (in order of precedence, where the first overrides the second, which overrides the third, which in turn overrides the fourth): 1. 2. 3. 4. Enter a value manually into the segment once the flexfield window has popped open. Insert a value using a shorthand flexfield entry alias Copy a value into the segment from a form field using the COPY parameter to POPID (Implementing Key Flexfields) Define a default value for the segment using the Key Flexfield Segments form
The value you copy using the COPY parameter in POPID overrides any default value you set for your segment(s) using the Key Flexfield Segments form. COPY does not copy a NULL value over an existing (default) value. However, if the value you copy is not a valid value for that segment, it gives the appearance of overriding a default value with a NULL value: the invalid value overrides the default value, but the flexfield then erases the copied value because it is invalid. You should ensure that the field you copy from contains valid values. However, shorthand flexfield entry values override COPY values. If your key or descriptive flexfield has required segments (where a value set requires values and, for a key flexfield, the REQUIRED parameter in POPID is set to Yes), the flexfield uses your default values in certain cases. If you try to save a record without ever entering the flexfield popup window, then the flexfield (in the VALID or VALDESC routine) attempts to fill in all the required segments with your default values. If you have not specified valid default values for all your required segments, the flexfield generates an error message and requires your user to enter any missing values before saving the row. The default values never override a value your user enters manually.
4 39
4 40
assign it to a key or descriptive flexfield segment assign one or more values to it (even if it is not assigned to a segment) assign a security rule to it (through the segment to which your value set is attached) Changing to a Nonvalidating (None) Value Set When you replace an old value set with a new nonvalidating (None type) value set, these types of changes do not cause a problem with existing flexfield data so long as the format conditions are not violated (character, number, date, alphabetic characters allowed, uppercase only, and so on). Note that the values in the new value set do not have descriptions (meanings) at all, and that any value is now valid: Independent to None (do not make this change if you have an associated dependent value set or if you need segment qualifier information for those values) Table to None Dependent to None You may need to convert any existing application data that uses value descriptions, since you will no longer have descriptions or segment qualifiers for your segment values. Changing from a None Value Set to Independent or Table Value Sets When you replace an old value set with a new value set, you can make these types of changes as long as you ensure that your new value set contains every single value that you ever used for that segment and that is now in the combinations table as parts of your code combinations. If you are missing any values that had been in the original value set, your users will get error messages upon querying up any old records whose values are now missing. None to Independent None to Table Changing Between Independent and Table Value Sets You can make these types of changes as long as you ensure that the new value set contains every single value that the old value set contained. If you are missing any values that had been in the original
4 41
value set, your users will get error messages upon querying up old code combinations whose values are now missing. Independent to Table Table to Independent Changes You Should Never Make You should never make these types of changes (old value set to new value set) because you will corrupt your existing key flexfield combinations data: Independent to Dependent Dependent to Independent None to Dependent Dependent to Table Table to Dependent Changing the Maximum Size of Your Value Set Oracle Applications prevents you from invalidating your existing flexfields data by preventing you from decreasing the maximum size of an existing value set. You should never attach a new value set to your segment where the maximum size of the new value set is smaller than the maximum size of the old value set. You will cause data corruption because your existing segment values will be truncated. In general, increasing the maximum size of an existing value set (or replacing your value set with a bigger one instead) does not cause any problem with your existing flexfields data so long as your new maximum size is still small enough to fit in the underlying flexfield tables segment columns. However, you should never change to a value set with a larger (or smaller) maximum size if your value set is Rightjustify Zerofill, since 001 is not the same as 0000001, and all of your existing values would become invalid. Oracle Applications products prevent you from invalidating your existing flexfields data by preventing you from changing the maximum size of an existing value set at all if the value set is Rightjustify Zerofill.
4 42
4 43
Tasks
Defining Value Sets: page 4 45
Reference
Value Formats: page 4 6
4 44
unpredictably affect the behavior of your application features such as reporting. This window prevents you from changing the validation type or format type of an existing value set because your changes affect other flexfields that use the same value set. In addition, other changes may affect the values in your value set in ways other than you expect. You cannot delete a value set that a flexfield or parameter currently uses. If you make any changes to your value set after you have used your flexfield or concurrent program that uses this value set, you must either change responsibilities or exit to the operating system and log back in before you can see your changes take effect.
2. 3.
Enter a unique name for this value set. See: Value Set Naming Conventions: page 4 20. If you plan to use flexfield value security with any segments that use this value set, check the Security Available check box. Security does not apply to value sets of validation type None, Special, or Pair. See: Defining Security Rules: page 5 16. Check the Enable Longlist check box if your value set should provide the Longlist feature, where a user must enter a partial
4.
4 45
segment value before the list of values retrieves all available values. You may not enable Longlist for a value set that has a validation type of None. 5. 6. Enter the type of format you want to use for your segment values. Valid choices include: Char, Date, DateTime, Number, and Time. Enter formatting information appropriate to your format type, including information such as whether your values should include numbers only and whether they must fall within a certain range. Select your validation type: Independent, Dependent, Table, None (nonvalidated), Special, or Pair. See: Choosing a Validation Type for Your Value Set: page 4 15. If you are creating a Dependent, Table, Special, or Pair value set, choose the Edit Information button to open the appropriate window. Enter any further information required for your validation type. See: Dependent Value Set Information Window: page 4 46, Validation Table Information Window: page 4 48, Special Validation Routines Window: page 4 55. Save your changes.
7.
8.
9.
Prerequisites
4 46
To define dependent value set information: 1. Enter a default value for your dependent value set. This value is the default for any segments that use this dependent value set. Usually, you enter zero. You must make sure that the value you enter here fits the value set information you enter. For example, if this dependent value set does not allow alphabetic characters, your default value may not contain any alphabetic characters. All the values in the independent set must have at least one dependent value. So, whenever a user creates a new value in the independent value set (using the Segment Values form), it must have at least one dependent value. The Segment Values window automatically creates the required dependent value by using the default value you enter here. See: Segment Values Window: page 4 56. For example, suppose you have an independent value set called Account with a dependent value set called SubAccount. You may wish to create a new independent value, 99, for Account with description Receivables without creating any associated subaccount values. Since your flexfield requires a dependent value of some sort to go with the independent value, it uses the default value you enter here, such as 00 with description No SubAccount. 2. Enter the name of an independent value set on which this dependent value set depends. You can only enter the name of a value set you have already defined. You must save the value set definition of your independent value set before you can select it in this field. An independent value set may have more than one dependent value set depending upon it, but a dependent set cannot depend on another dependent set. The Segment Values window automatically creates your dependent default values at the time you create your independent values. To ensure that the Segment Values window creates a dependent default value for each of your independent values, you should create the values in your independent value set only after you create all of the dependent value sets that depend on that independent set. If you create a new dependent set for an
4 47
independent set that already contains values, you must manually enter the dependent default value for each existing independent value using the Segment Values window. Suggestion: First define all of the independent value sets your application needs, then define all of your dependent value sets. Create all of your value sets before you create any of your values. See: Segment Values Window: page 4 56 3. Enter a description for your dependent value set. The Segment Values window creates this description with the dependent default value it creates whenever you create a new independent value. For example, suppose you have an independent value set called Account with a dependent value set called SubAccount. You may wish the SubAccount default value 00 to have the description No SubAccount. See: Segment Values Window: page 4 56.
4 48
Prerequisites
u Create a database table or view that holds valid values and value
descriptions in CHAR, VARCHAR2, NUMBER, or DATE type columns.
u Use the Register Tables window to register your table with Oracle
Application Object Library, or use Zoom from the Validation Table field. This step is recommended but not required.
u Define your value set name and formatting options. See: Defining
Value Sets: page 4 45.
"
To define validation table information: 1. Enter the name of the application with which your validation table is registered. Application name and table name uniquely identify your table. If you plan to display columns from more than one table in your list of values, you should leave this field blank, since it is effectively ignored in this case. 2. Enter the name of an application table, view or synonym you want to use as a validation table. If your table is not registered with Oracle Applications, you should type in the entire name of the table you wish to use. You can define your value set to display several columns, and these columns may be in different tables. If your columns exist in different tables, you must specify more than one table name, separated by commas, in this field. You may use table aliases if desired. For example, you might enter the following information in this field (using two tables):
fnd_form f, fnd_application a
Then, in the Value Column, Description Column, Hidden ID Column, WHERE / ORDER BY, and Additional Columns fields, you would use the corresponding table aliases (for a WHERE clause):
4 49
3.
Enter the name of the column in your validation table that contains values you want to use to validate a value a user enters for a flexfield segment or a report parameter. Your selection of available columns depends on the Format Type you specify, and doesnt necessarily match your Format Type. For example, if you specify a Format Type of Date, you select from those columns that have been registered as Date or Char type columns. Similarly, if you specify a Format Type of Number, you select from only those columns that have been registered as Number or Char type columns. If you specify a format type of Character, however, you see only columns of type Char. The format type you specify in the Format Type field is the format for the segment or parameter value. You may use a SQL expression in place of a column name, but you may not use any special bind variables.
4.
Enter the name of the column in your validation table that contains descriptions for the values in the Value Column. If you leave this field blank, your value set automatically uses the value column as the description column (but does not display it twice). Your flexfield or report parameter window displays a meaning from this column when you enter the corresponding value for a flexfield segment or report parameter.
5.
Enter the name of the column in your validation table that contains values you want to use to validate a value a user enters for a flexfield segment or a report parameter, but that you do not want to display for the user. If you specify a hidden ID column in addition to your value column, the flexfield saves your hidden ID value, instead of the value from the value column, in the segment column (in your ATTRIBUTEnn column or SEGMENTnn column) of the underlying flexfield table.
6.
Attention: Do not specify a hidden ID column for value sets you use with your Accounting Flexfield or most other key flexfields.
If you specify a hidden ID column in addition to your value column, the report parameter window passes your hidden ID value, instead of the value from the value column, to your report. Enter a SQL WHERE clause or an ORDER BY clause, or both.
4 50
7.
Enter any additional columns you want to display for a segment that uses this value set. These are columns other than the columns you specify for Value Column, Description Column, or Hidden ID Column. Indicate whether to allow parent values to be stored in the Oracle Application Object Library FND_FLEX_VALUES table and displayed in the list for a segment that uses this value set.
8.
4 51
column in the lookups table can actually contain 30 characters. You can then use this value set for a flexfield whose underlying segment column size is between 2 and 30. You may only change the displayed size for a column if you know that the maximum size of the values in that column will always be equal to or shorter than the length you specify in this field. You should not attempt to trick Oracle Applications by specifying a size that is smaller than your actual potential value size, since you may cause data truncation errors, value not defined errors, or other errors. If you specify a SQL expression (or a column in a nonregistered table) in a Column field instead of specifying a registered single column name, you must specify the length of the value (size) you expect your expression to return. You must specify the size because this window cannot retrieve this information automatically for a column name that is not a registered single column.
4 52
intend to use with key flexfields other than the Accounting Flexfield. If you use a WHERE clause you must have the word WHERE as the first word of the clause. If you use ORDER BY, you must have the words ORDER BY in the clause. You may not use HAVING or GROUP BY in your clause. You may not use UNION, INTERSECT, MINUS, PLUS, or other set operators in your clause, unless they are within a subquery. You should always include the table names or aliases in your clause when you refer to a column, even if you are using only one validation table and have not used an alias for that table in the Table Name field. For example, you might enter:
where f.application_id = a.application_id
or
where form_table_name.application_id = application_table_name.application_id
You can use special variables in your WHERE clause that allow you to base your values on other values. The special variables you can use include :$FLEX$.Value_Set_Name :block.field :$PROFILES$.profile_option_ name Warning: The :block.field mechanism is present for backward compatibility only. Value sets that use this mechanism will not be compatible with a future release of Oracle Applications. See the section WHERE Clauses and Bind Variables for Validation Tables: page 4 31 for detailed information on using these special bind variables.
where either the column title alias or the width is optional. If you specify only the SQL fragment but no alias or width, your column does not show up. You can specify several such expressions, separated by commas, as follows:
4 53
You can also use message names as alias names, this functionality allows for ease of translation of column titles. The syntax for using a message name as an alias name is:
sql_expression_such_as_message name APPL=<Application Short Name>;NAME=<Message Name>(width)
You should specify the column widths you want to display. You can use (*) to specify a column whose display width depends on the values it contains. You should always use an alias for any SQL expression that is not a simple column name. For value sets that use multiple tables, you should always include the table aliases in your column names. For example:
f.user_form_name Form Title(30), a.application_name Application Name(*)
If the segment or parameter is displayed, the Value Column appears with the parameter or segment prompt as the column title. You can include more complex SQL fragments, such as concatenated column names and constants. For example:
f.user_form_name Form Title(30), Uses table: || t.user_table_name Table Used(30)
4 54
have a SUMMARY_FLAG column in your validation table, you must specify No in this field. See: Segment Values Window: page 4 56
Warning: You should never change or delete a predefined value set that Oracle Applications supply. Such changes may unpredictably affect the behavior of your application features such as reporting. See Special Validation Value Sets: page 9 23 for information on using this region. The section contains information on the various types of events and flexfield routine arguments and syntax you use with special validation. It also contains a worked example of using special validation for the Accounting Flexfield.
4 55
Use this window to define valid values for a key or descriptive flexfield segment or report parameter. You must define at least one valid value for each validated segment before you can use a flexfield. These validated segments provide users with a list of predefined valid segment values, and have a validation type of Independent, Dependent, or Table. You should use this window to define values that belong to independent or dependent value sets. You can define new segment values, specify value descriptions for your values and to enable or disable existing values as well. The values you define for a given flexfield segment automatically become valid values for any other flexfield segment that uses the same value set. Many Oracle Applications reports use predefined value sets that you may also use with your flexfield segments. If your flexfield segment uses a value set associated with a Standard Request Submission report parameter, creating or modifying values also affects that parameter. If you use the same value set for parameter values, the values you define here also become valid values for your report parameter. You also specify segment value qualifiers, rollup groups, and child value ranges.
4 56
You can also view and maintain segment value hierarchies for the Accounting Flexfield or for any custom application flexfields that use the value hierarchies feature.
Attention: Because the Accounting Flexfield is the only Oracle Applications key flexfield that uses the parent, rollup group, hierarchy level and segment qualifier information, you need only enter this information for values that are associated with your Accounting Flexfield.
When you make changes to your value hierarchies, you automatically submit a concurrent request to rebuild your value hierarchies. One request per value set that the change affects (the value set attached to the segment for which you are defining or maintaining values) is submitted. For example, if you make hierarchy structure changes for five different key flexfield segments, all of which use different value sets, this window submits five concurrent requests. Suggestion: For ease of maintenance, you should carefully plan your value hierarchy structures before you define your values, so that your structures follow a logical pattern you can expand later as you need more values. To prevent invalidation of any existing data, you cannot update segment qualifier information for existing values unless you first unfreeze any key flexfield structure that use this value set. You unfreeze your key flexfield using the Define Key Flexfield Segments form.
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.
If your value set is based on a flexfield validation table (validation type Table) and you have defined your value set to allow parent values, then you can use this window to define parent values for the values in your table. This window stores your parent values and rollup groups for you and does not add them to your validation table. You can define child value ranges for the parent values you define, and you can assign your parent values to rollup groups. The values in your validation table can be child values, but they cannot be parent values, and you cannot assign them to rollup groups. You cannot create new values in your validation table using this window. See:
4 57
Value Set: page 4 44 Key Flexfield Segments: page 2 17 Descriptive Flexfield Segments: page 3 23 Prerequisites
u Use the Value Set window to define your independent value sets,
any dependent value sets that depend on them, and any tablevalidated value sets your flexfield needs
4 58
You cannot define values that would violate any flexfield security rules that are enabled for your responsibility.
To define segment values: 1. 2. Navigate to the Segment Values window. Query the value set to which your values (will) belong. You can locate values either by their value set or by the flexfield segment or concurrent program parameter that uses their value set for validation. Enter a segment value that is valid for your application. A valid value can be a word, phrase, abbreviation, or numeric code. Users can enter this value in a flexfield segment or a report parameter that uses this value set. Users also see this value whenever they select a value in a flexfield segment that uses this value set. Any value you define must conform to the criteria you defined for your value set. For example, if your value set can only accept values one character long with no alphabetic or special characters allowed, you can only enter the values 0 through 9 in this field. If you enter a value that contains the segment separator character defined for the flexfield that uses this value set, application windows display the character in your value as a ^ in your concatenated value fields to differentiate it from the segment separator. This change is for concatenated display purposes only and does not affect your value. Since individual values can be referenced from many places in your applications, you cannot delete valid values that have already been defined, nor can you change those values. You can, however, change the description of a valid value in the Description field after you query up the value. You cannot define values that would violate any flexfield security rules that are enabled for your responsibility.
3.
4 59
4.
Enter a description for your value. Users see this description along with your value whenever they use select a value in a flexfield segment that uses this value set. Check the Enabled check box to make your value effective. If you want to have the value effective for a limited time, you can enter a start date and/or an end date for it. The value is valid for the time including the From and To dates. You cannot delete values from this window because they are referenced elsewhere in the system, but you can disable them at any time. You should not disable or have effective dates for a segment value that you use as a segment default or a default dependent value.
5. 6.
7.
If you are defining values whose value set will be used with the Accounting Flexfield, define hierarchy and qualifiers information. See: Defining Hierarchy and Qualifiers Information: page 4 60. Save your changes.
8.
To define hierarchy and qualifiers information: 1. Determine whether this value is a parent value. If so, you can define and move child value ranges for this value, and you can assign this value to a rollup group. If not, you cannot define and move child value ranges for this value, and you cannot assign this value to a rollup group. Enter the name of a rollup group to which you want to assign this flexfield segment value. You can use a rollup group to identify a group of parents for reporting or other application purposes. You can enter a rollup group name only if this flexfield segment value is a parent value and Freeze Rollup Groups in the Key Segments window is set to No. You can enter a range of child values for this
2.
4 60
flexfield segment value in the Define Child Ranges zone. You create rollup groups using the Rollup Groups window. See: Rollup Groups Window: page 4 25. 3. Enter the level for this value. This can be a description of this values relative level in your hierarchy structure. This level description is for your purposes only. If you are defining values for a value set used with the Accounting Flexfield, you must define segment qualifier information for each value. See: Qualifiers: page 4 61.
4.
Qualifiers
Some key flexfields use segment qualifiers to hold extra information about individual key segment values. For example, the Accounting Flexfield uses segment qualifiers to determine the account type of an account value or whether detail budgeting and detail posting are allowed for an Accounting Flexfield combination containing a given value. If you are defining values for any value set that is used by a key flexfield that uses segment qualifiers, you see the Segment Qualifiers popup window prompting you for this information. If you share this same value set with additional flexfields, such as a descriptive flexfield, you see the Segment Qualifiers popup window regardless of how you identified your value set in this window. Segment qualifiers contain information about a value rather than the segment that uses the value. This window prohibits you from invalidating any existing data by not allowing you to update this field for existing values unless you first unfreeze all key flexfield structures that use this values value set. The Allow Budgeting, Allow Posting, and Account Type fields are segment qualifiers for the Accounting Flexfield. Allow Budgeting Indicate whether to allow detailed budgeting to GL accounts with this segment value. When you accept this value, you can perform detailed budgeting to GL accounts with this segment value. When you enter No, you can neither assign GL accounts with this segment value to budget organizations nor define budget formulas for GL accounts with this segment value.
4 61
When you are defining a parent segment value, enter No here, since you cannot budget amounts to a segment value which references other segment values where detail budgeting is already allowed. You cannot change this field for segment values that you already defined unless you first unfreeze your Accounting Flexfield structures that use this value set. When you change this field for a segment value that you have already defined, you should also make a corresponding change to all GL accounts which include that value. Use the GL Account Combinations window to allow or disallow detail budgeting to your flexfield combinations. Allow Posting Enter Yes or No to indicate whether Oracle Applications should allow detailed posting to GL accounts with this segment value. The default value for this field is Yes. When you accept this value, you can post directly to GL accounts with this segment value. When you enter No, you can neither use this segment value in GL accounts on the Enter Journals window, nor define formula journal entries that affect GL accounts with this segment value. When you are defining a parent segment value, enter No here. You cannot change this field for segment values that you already defined unless you first unfreeze your Accounting Flexfield structures that use this value set. When you change this field for a segment value that you have already defined, you should also make a corresponding change to all GL accounts which include that value. Use the GL Account Combinations window to allow or disallow detail posting to your flexfield combinations. Account Type You see this qualifier, which requires a value, for the natural account segment only. Enter the type of your proprietary account (Asset, Liability, Owners Equity, Revenue or Expense) or the type of your budgetary account (Budgetary Dr or Budgetary Cr) your segment value represents. Choose any proprietary balance sheet account type if you are defining a statistical account segment value. If you choose a proprietary income statement account type for a statistical account segment value, your statistical balance will zeroout at the end of the fiscal year.
4 62
Your GL account combinations have the same account type as the account segment which they include. You cannot change this field unless you first unfreeze all Accounting Flexfield structures that reference your account segment. Changing the account type only affects new GL accounts created with the reclassified account segment. Changing the account type does not change the account type of existing GL accounts. To change the account type of existing Accounting Flexfields, refer to the Misclassified Account Types topical essay and/or call Oracle customer support for assistance.
See Also
See: Correcting Misclassified Account Types (Oracle [Public Sector] General Ledger Users Guide) Defining Accounts (Oracle [Public Sector] General Ledger Users Guide)
View Hierarchies
4 63
structure (it is either a parent value or a child value of another parent value).
Use this window to define child values for the value you defined in the Segment Values zone. Oracle Applications use child values to sum families of data or report on groups of data. You specify child values by entering a set of ranges. If you want to specify a single child value, set the low and high ends of the range equal to that value. You cannot open this window if the value belongs to a rollup group and rollup groups are frozen. You freeze rollup groups using the Key Flexfield Segments window. You can create networked hierarchies; that is, you can create hierarchy structures where a particular value may be a child that belongs to more than one parent. You should plan your value hierarchy structures carefully to avoid unwanted duplication of information caused by reporting or counting the same value more than once. For example, suppose you want to define a hierarchy structure like this:
1000 _________|___________ 100 200 300 ____|______ 301 302 303
4 64
For the parent value 300, you could specify the child value range 301 (Low) to 303 (High). Since all three values 301, 302 and 303 are not parent values, you give this range a range type of Child. For the parent value 1000, you need to specify two ranges so that you include both nonparent values (100 and 200) and parent values (300). First, you specify the child value range 100 (Low) to 200 (High) and give this range a range type of Child to include the values 100 and 200 as well as all the values between them (alternatively, you could specify these two values individually by specifying the same value for both Low and High). Then, to include the parent value 300, you specify the child value range 300 (Low) to 300 (High) and give this range a range type of Parent. 5. Enter the low and high ends of your child value range. You can enter any value that meets the validation criteria you define for this value set using the Define Value Set window. The high end of your child value range must be greater than or equal to the low end. Your ranges behave differently depending on your value set format type. For example, in a value set with a Character format type, 100 is less than 99 (even though they appear to be numbers). Similarly, a range that includes values from 100 to 200 would also include the value 1000. Attention: The Accounting Flexfield uses value sets that have a format type of Character, so you should specify your child ranges carefully for those value sets. For example, 100 is less than 99 (even though they appear to be numbers).
To specify a range that contains only a single value, enter the same value for both Low and High. Range Type If you select Child, any child values that fall in your specified range are considered to be children of your parent value. If you select Parent, any parent values that fall in your specified range are considered to be children of your parent value. Specifying Parent lets you create treestructured hierarchies. If you have existing child ranges from a previous version of Oracle Applications, those ranges automatically receive a range type of Child and they behave exactly as they did with your previous version.
4 65
View Hierarchies
Use this window only for values you use in segments of the Accounting Flexfield in Oracle General Ledger. You cannot make changes to your hierarchy structures in this zone. The Value field displays the value that is a child of the parent value displayed in the Parent Value field. The Parent field displays whether the child value is itself a parent value. If so, you can choose the Down button in the Navigate to view any values that are children of this value.
Navigate Buttons
Up/Down Choose Up to view the values at the level just above your current value. If this value is a parent value, you can choose Down to view the child values that belong to the current value. If this value has more than one parent, you see a list of the parent values to which you can navigate. If you choose Up after navigating down a networked
4 66
hierarchy, you move up to the parent you navigated down from most recently. If you move up or down in the hierarchy structure, this window automatically changes the parent value displayed in the Parent Value field to show you the parent value in the level immediately above the level of the values you are viewing. For example, suppose you have a hierarchy structure (in this case a networked structure) like this:
1000 _________|___________ 00003 100 200 300 __|_________ ____|____ ____|______ / 403 503 101 102 301 302 303 < _______|______ 303A 303B 303C __|__ 303BB
where 303 is a child of both 300 and 00003. Suppose you want to look at the structure starting with the value 1000 in the Segment Values zone. When you open the View Hierarchies window, you see:
Parent 1000 _____________ 100 200 Down 300
You choose Down with your cursor on 300, as shown above (Down is your only choice for this value). Once you choose Down, you then see (immediately):
Parent 300 ____________ 301 302 Down 303
You choose Down with your cursor on 303, as shown above (you can choose from Up or Down for this value). Once you choose Down, you then see:
4 67
You choose Down with your cursor on 303B, as shown above (you can choose from Up, Down, or Network for this value). Once you choose Down, you then see:
Parent 303B _____________ Up 303BB
You choose Up, as shown above (you can only choose Up for this value). Once you choose Up, you then see:
Parent 303 _____________ 303A Network 303B 303C
At this point, your cursor is next to the value 303B and the parent displayed in the Parent Value zone is 303. When you choose up, you can either go back up to your original parent value (303, which has the parent value 300), or you can go over to the other hierarchy path that leads to the parent value 00003. Once you choose 303B, you see a window offering you the two choices 300 and 00003 (these choices indicate the values that would appear in the Parent Value field. You will see 303 in the Children block if you make either choice), and 300 is highlighted. You choose 00003 this time, and then you see:
Parent 00003 ____________ 303 403 503
4 68
Use this window to move a range of child values from one parent value (the source value) to another parent value (the destination value). When you move a range of child values from one parent value to another, you also move any child values that belong to the child values in the range you move. In other words, when you move a child to a different parent, you also move any grandchild values with it. Use this window only for values you use in segments of the Accounting Flexfield. For example, suppose you have defined a hierarchy structure like this:
1000 _________|___________ 100 200 300 ____|______ 301 302 303 003 _|_ (none)
If you move the parent value 300 from the parent value 1000 to the parent value 003, you also move the child value range 301 (Low) to 303 (High). All three values 301, 302 and 303 are now grandchild values of 003 instead of 1000. 1. Enter the value from which you want to move a child range. This field defaults to display the selected parent value from the Segment Values window.
4 69
2.
Choose which child ranges you want to move to the destination values child ranges. The Type field displays the type of values this child range includes. If the field contains Child, any child values that fall in the specified range are considered to be children of your parent value. If the field contains Parent, any parent values that fall in the specified range are considered to be children of your parent value. The Destination block displays the child value ranges that currently belong to the destination parent value.
3.
Enter the parent value to which you want to move child value ranges. You can only choose a value that is already a parent value. The Type field displays the type of values this child range includes. If the field contains Child, any child values that fall in the specified range are considered to be children of your parent value. If the field contains Parent, any parent values that fall in the specified range are considered to be children of your parent value.
4.
Choose the Move button to move the child ranges you selected in the Source block to the destination parent value you specified in the Destination block.
4 70
CHAPTER
51
Figure 5 1
Alias Window
Prompt Tan Monitor
List of Aliases
Shorthand flexfield entry helps you satisfy the following data entry needs:
52
Enter key flexfield data quickly by associating shorthand aliases with frequentlyused sets of valid key flexfield segment values. Associate either complete or partial flexfield combinations with shorthand aliases. You can define a shorthand flexfield entry popup window (the shorthand window) for any key flexfield. You specify a name and size for each shorthand window. You define the complete or partial set of key flexfield segment values (the template) that each shorthand alias represents. These values can be valid flexfield combinations or different patterns of valid segment values. For example, if the flexfield consists of six segments, you can define a shorthand alias to represent a partial combination where four of the six segments contain valid values for those segments. The other two segments remain blank. When you enter this alias at the shorthand window prompt, you only need to enter values for two segments manually, and shorthand flexfield entry enters the other four for you automatically. Or, you can define an alias to represent a valid flexfield combination, where all six segments contain valid values and meet any appropriate flexfield crossvalidation rules. For this shorthand alias, you would not have to enter any segment values manually. For each key flexfield structure, you can define as many shorthand aliases as you need. If you make changes to your shorthand aliases, your changes take effect immediately for both you and other users. If Shorthand Flexfield Entry is enabled and the Flexfields:Shorthand Entry profile option is set to an appropriate value, the shorthand window allows you to enter an alias before the flexfield window opens. The combination or partial combination you defined for your alias is entered into your flexfield window. Validation of alias values 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 crossvalidation rules when you use your alias to enter data in your flexfield window.
53
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 CrossValidation Rules window. See: CrossValidation Rules Window: page 5 33. Changing your key flexfield structure after defining aliases 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: changing the order of segments adding a new segment disabling a segment changing segment lengths
To enable shorthand entry: 1. 2. 3. 4. 5. 6. Navigate to the Shorthand Aliases window. Select the name and structure of the key flexfield for which you want to enable shorthand entry. Check the Enabled check box in the Shorthand region. Enter a prompt for the shorthand window. Enter the maximum alias size, which determines the maximum length of your shorthand aliases. Save your changes.
54
Whenever you enable or disable shorthand entry, you must also recompile your key flexfield using the Key Flexfield Segments window. See: Key Flexfield Segments Window: page 2 17. On a userbyuser basis, you can enable or disable shorthand flexfield entry for yourself (for all key flexfields that use it) by setting your user profile option Flexfield: Shorthand Entry to an appropriate value. Your System Administrator can set this profile option at other levels (such as for a responsibility). However, in some forms, such as forms where you define new key flexfield combinations (combinations forms), you do not see the shorthand window even if shorthand entry is enabled. For example, you cannot use shorthand entry in the Oracle General Ledger Define Accounting Flexfield Combinations form. See: Disabling or Enabling a Shorthand Alias: page 5 6.
"
To define shorthand aliases: 1. 2. Navigate to the Shorthand Aliases window. Select the name and structure of the key flexfield for which you want to define shorthand aliases.
55
3.
Enter an alias, which serves as a name for a combination or partial combination. A shorthand alias can be any combination of characters. In the Template field, enter either an entire flexfield combination or the pattern of segment values that your alias represents. Your flexfield validates each segment value you enter but does not check whether the combination is a valid combination (if you enter an entire combination). If you want to enter a value for a segment that depends on another segment, you must first enter a value into the corresponding independent segment.
4.
5. 6.
Enter an alias description. This field is required. If you want to have the alias effective for a limited time, you can enter a start date and/or an end date for the alias. The alias is valid for the time including the From and To dates. Save your changes.
7. See:
Overview of Shorthand Flexfield Entry: page 5 2 Disabling or Enabling a Shorthand Alias: page 5 6
To disable a shorthand alias: 1. 2. 3. 4. Navigate to the Shorthand Aliases window. Select the name and structure of the key flexfield for which you want to disable shorthand aliases. Select the alias you want to disable. In the Effective alternative region, uncheck the Enabled check box, or set either From to a date later than today or To to the date of the last day the alias should be valid. If the Enabled check box is unchecked, the alias is disabled regardless of the effective dates given. 5. Save your changes.
56
"
To reenable a disabled shorthand alias: 1. 2. 3. 4. Navigate to the Shorthand Aliases window. Select the name and structure of the key flexfield for which you want to enable shorthand aliases. Select the alias you want to enable. In the Effective alternative region, check the Enabled check box if it is not already checked. Also, set either From to a date no later than today or To to the date of the new last day the alias should be valid. Alternatively, you can blank out the effective dates as appropriate to make your alias valid. If the Enabled check box is unchecked, the alias is disabled regardless of the start and end dates given. 5. Save your changes.
57
Tasks
Enabling Shorthand Entry: page 5 4 Defining Shorthand Aliases: page 5 5 Disabling or Enabling a Shorthand Alias: page 5 6
See Also
Overview of Shorthand Flexfield Entry: page 5 2
58
Figure 5 2
Descriptive Flexfield
Type Sales Rep COM Computer
Jane Reed
Without Security
List
List
(or)
Flexfield Value Security provides you with the features you need to satisfy the following basic security needs:
59
Specify ranges of segment values particular users are allowed to enter. Prevent users from entering segment values they are not allowed to use.
5 10
using, that value disappears immediately and you must enter a different value in that segment. Defining Values If Flexfield Value Security is available for your value set and you are using a responsibility that has enabled security rules, you cannot define or update excluded values using the Segment Values window. See: Segment Values Window: page 4 56.
5 11
Dependent, or Table. You cannot use security rules for segments that use value sets with a validation type of None, Special, or Pair. Interaction of Security Rules It is important for you to understand how the rules interact before you define them. You can define many security rules for a segment. Each security rule is composed of one or more rule elements. A rule element specifies a range of values to include or exclude. If you create rule elements that have overlapping ranges, the result is that all values included in either range are included by the rule. However, if you define two different rules that have overlapping ranges and assign both rules to the same responsibility, the effect is that only the values included in the overlap of both rules are available to users of the responsibility. More rules restrict more, not less. All values must pass all security rules for it to appear in a segment or parameter list of values. The following diagram illustrates how your rules interact:
Figure 5 3
10 50
40 80
10 80
Multiple Rules
Rule 1 Rule 2
10 50 40 80
Result: (Intersection)
40 50
Include
5 12
If you have multiple separate rules whose included values do not overlap, then no values will be allowed at all, because values must be included by all active security rules for that segment to be valid.
Figure 5 4
10 50
60 80
10 50
60 80
Multiple Rules
Rule 1 Rule 2
10 50 60 80
Result: (Intersection)
Include
Assign Your Security Rules Once you define your security rules, you can assign them to responsibilities. The rules are active for every user in that responsibility. You can assign different rules to different responsibilities, and you can share rules across responsibilities. So, you can create some responsibilities with access to all segment values, and others with limited access. You are free to change the assignments of your security rules or create new ones at any time. See: Assign Security Rules: page 5 16.
5 13
5 14
Value Set Windows: page 4 44 Once you define your rule, you must assign your rule to a responsibility before the rule can be enforced. You assign your rule to a responsibility using the Assign Security Rules window. You may define rules for a segment that does not have security enabled, but your rule has no effect until you enable security for that segment and assign your rule to a responsibility. After you define or make changes to your security rules, you and your users must either change responsibilities or exit from your application and sign on again in order for your changes to take effect. See: Overview of Flexfield Value Security: page 5 9 Segment Values Window: page 4 56 Assign Security Rules: page 5 16
5 15
Tasks
Defining Security Rules: page 5 16 Defining Security Rule Elements: page 5 17 Assigning Security Rules: page 5 19
5 16
1.
In the Segment Values block, identify the value set to which your values belong. You can identify your value set or by the flexfield segment or concurrent program parameter that uses the value set. In the Security Rule region, enter a name and description for your security rule. Enter a message for this security rule. This message appears automatically whenever a user enters a segment value that violates your security rule. Define the security rule elements that make up your rule. See: Defining Security Rule Elements: page 5 17. Save your changes.
2. 3.
4. 5.
5 17
one Include rule element, since a rule automatically excludes all values unless you specifically include them. Exclude rule elements override Include rule elements. You should always include any default values you use in your segments or dependent value sets. If the default value is secured, the flexfield window erases it from the segment as the window opens, and the user must enter a value manually. If you want to specify a single value to include or exclude, enter the same value in both the Low and High fields. Minimum and maximum possible values The lowest and highest possible values in a range depend on the format type of your value set. For example, you might create a value set with format type of Number where the user can enter only the values between 0 and 100. Or, you might create a value set with format type of Date where the user can enter only dates for the current year (a range of 01JAN93 to 31DEC93, for example). For example, if your format type is Char, then 1000 is less than 110, but if your format type is Number, 110 is less than 1000. The lowest and highest possible values in a range are also operating system dependent. When you use a Char format type for most platforms (ASCII platforms), numeric characters are less than alphabetic characters (that is, 9 is less than A), but for some platforms (EBCDIC platforms) numeric characters are greater than alphabetic characters (that is, Z is less than 0). The window gives you an error message if you specify a larger minimum value than your maximum value for your platform. If you leave the low segment blank, the minimum value for this range is automatically the smallest value possible for your segments value set. For example, if the value set maximum size is 3 and Rightjustify and Zerofill Numbers is checked, the minimum value is 000. However, if the value set has a maximum size of 3, has Numbers Only checked and Rightjustify and Zerofill Numbers unchecked, the minimum value is 0. If you leave the high segment blank, the maximum value for this range is automatically the largest value possible for your segments value set. For example, if the value set maximum size is 3 and Numbers Only is checked, the maximum value is 999. However, if the value set maximum size is 5, and Numbers Only is checked, the maximum value is 99999.
5 18
Suggestion: Use blank segments to specify the minimum or maximum possible values for a range to avoid having operating system dependent rules. Note that security rules do not check or affect a blank segment value (null value).
"
To define security rule elements: 1. In the Security Rule Elements block, select the type of security rule element. Valid types are: Your user can enter any segment value that falls in the following range. Your user cannot enter any segment value that falls in the following range.
Include Exclude 2.
Enter the low (From) and high (To) ends of this value range. Your value does not have to be a valid segment value.
5 19
2.
In the Assign Security Rules block, identify the value set to which your values belong. You can identify your value set or by the flexfield segment or concurrent program parameter that uses the value set. In the Security Rules block, enter the application and responsibility name that uniquely identifies the responsibility to which you want to assign security rules. Enter the name of a security rule you want to assign to this responsibility. Save your changes.
3.
4. 5.
5 20
CrossValidation Rules
A key flexfield can perform automatic crossvalidation of segment values according to rules your organization defines when you customize the key flexfield. You can use crossvalidation to closely control the creation of new key flexfield combinations, and you can maintain a consistent and logical set of key flexfield combinations that you need to run your organization. What is CrossValidation? Crossvalidation (also known as crosssegment validation) controls the combinations of values you can create when you enter values for key flexfields. A crossvalidation rule defines whether a value of a particular segment can be combined with specific values of other segments. Crossvalidation is different from segment validation, which controls the values you can enter for a particular segment. You use crossvalidation rules to prevent the creation of combinations that should never exist (combinations with values that should not coexist in the same combination). For example, if your organization manufactures both computer equipment and vehicles such as trucks, you might want to prevent the creation of hybrid part numbers for objects such as truck keyboards or CPU headlights.
5 21
Figure 5 5
Part Numbers
Part Description COM 876 LTN ComputerMonitorLight Tan
(or)
COM 621LTN
As another example, if you use the Accounting Flexfield, you may decide that all revenue accounts must have a department. Therefore, all your revenue account values (such as all values between 4000 and 5999) must have a corresponding department value other than 000 (which means nonspecific). For example, suppose you have an Accounting Flexfield where you have a Company or Organization segment with two possible values, 01 and 02. You also have a Natural Account segment, with many possible values, but your company policy requires that Company or Organization 01 uses the natural account values 001 to 499 and Company or Organization 02 uses the natural account values 500 to
5 22
999. You can create crossvalidation rules to ensure that users cannot create a GL account with combinations of values such as 02342 or 01750, for example.
5 23
If you want greater control, you can disallow dynamic inserts. You can thus restrict the creation of new combinations to certain authorized people who have access to the combinations form on their menu. You simply turn dynamic insertion off using the Define Key Flexfield Segments form. Depending on the key flexfield you use, you can still create new combinations using one of your product setup forms (the combinations form). For example, if you use the Accounting Flexfield, you can enter new combinations using the Define Accounting Flexfield Combination form. In either case, however, there is no inherent protection against a user creating an invalid new combination. Crossvalidation rules ensure that nobody can create invalid new combinations from either foreign key forms or the combinations form, regardless of whether you allow dynamic inserts. As you consider the controls you want over your key flexfield combinations, determine whether you need crossvalidation rules at all. To provide an extra level of security, use crossvalidation rules even if you turn dynamic insertion off. This allows you to doublecheck new combinations that even your authorized personnel enter using the combinations form. See: Defining Accounts Oracle [Public Sector] General Ledger Users Guide Key Flexfield Segments Window: page 2 17 CrossValidation Rules Window: page 5 33 Changing your key flexfield structure after defining rules Changing an existing key flexfield structure may adversely affect the behavior of any crossvalidation rules you have for that structure, so you should be sure to manually disable or redefine any crossvalidation rules to reflect your changed structure. Flexfield structure changes that make your existing rules invalid include: changing the order of segments adding a new segment disabling a segment changing segment lengths
5 24
For example, if you change a sixsegment structure to contain only five segments, you would not be able to use any new fivesegment code combinations since any rules existing for the old sixsegment structure would be violated. See: CrossValidation Rules: page 5 21, Key Flexfield Segments Window: page 2 17.
5 25
If you expect that most of the time the account will be wrong, define an error message such as, Enter only balance sheet accounts with department 000. If you expect that most of the time the department will be wrong, define an error message such as, Enter departments other than 000 with revenue accounts. If you expect that either segment is just as likely to be incorrect, define an error message that does not imply a particular segment is in error. For example, You have entered an incompatible department/account combination. Please reenter. Determine Your Error Segment Determine in which segment you want to place the cursor when a key flexfield combination fails a validation rule. Choose the segment you feel will most likely be in error. If you have defined a good error message, the message and the segment to which the cursor returns should correspond. For example, if your account segment is most likely to be in error, define your error message to be, Please enter only balance sheet accounts with department 000, and specify the cursor to return to the account segment. If either segment is as likely to be in error, specify the cursor to return to the first of the two segments. If the second segment is actually the one in error, it is more intuitive to move down to a subsequent segment than it is to move back to a previous segment. Define Simple Rules Avoid rules that control crossvalidation across more than two segments, where possible. For example, if you use the Accounting Flexfield, you may want to prevent using department 000 with accounts greater than 3999 for all balancing segment values except 99. While you can define crossvalidation rules that span two or more segments, keep in mind that it becomes more difficult to interpret crossvalidation error messages and correct invalid key flexfield combinations as your rules encompass more segments. Using Include and Exclude Ranges Consider the following basics of crossvalidation rules: Combinations must pass all crossvalidation rules.
5 26
Within each rule, combinations must be in at least one include range. Within each rule, combinations cannot be in any exclude ranges. In summary, a key flexfield value must fall within at least one include range and outside all exclude ranges to pass your validation rule. Using Include Ranges 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. For example, if you use the Accounting Flexfield and want to allow users to enter only certain balancing segment values with certain products or projects, you can enumerate the possibilities:
Include:
From To
Include:
From To
Include:
From To
Using Exclude Ranges 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. For example, if you use the Accounting Flexfield and want to prevent users from entering balancing segment values 01 and 02 with departments greater than 899, you can specify this exception:
5 27
Include:
From To
Exclude:
From To
Minimum and maximum possible values The lowest and highest possible values in a range depend on the format type of your value set. For example, you might create a value set with format type of Number where the user can enter only the values between 0 and 100. Or, you might create a value set with format type of Date where the user can enter only dates for the current year (a range of 01JAN93 to 31DEC93, for example). For example, if your format type is Char, then 1000 is less than 110, but if your format type is Number, 110 is less than 1000. The lowest and highest possible values in a range are also operating system dependent. When you use a Char format type for most platforms (ASCII platforms), numeric characters are less than alphabetic characters (that is, 9 is less than A), but for some platforms (EBCDIC platforms) numeric characters are greater than alphabetic characters (that is, Z is less than 0). The window gives you an error message if you specify a larger minimum value than your maximum value for your platform. As discussed below, you can use blank segment values in your rules to make 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). Suggestion: Use blank segments to specify the minimum or maximum possible values for a range to avoid having operating system dependent rules. Using Blank Segment Values 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). If you leave a low segment blank, the minimum value for your Include or Exclude range is automatically the smallest value possible for your segments value set. For example, if the value set maximum size is 3 and Rightjustify Zerofill Numbers is set to Yes, the minimum value is 000. However, if the value set maximum size is 3, Alphabetic
5 28
Characters is set to No, and Rightjustify Zerofill Numbers is set to No, the minimum value is 0. If you leave the high segment blank, the maximum value for your Include or Exclude range is automatically the largest value possible for your segments value set. For example, if the value set maximum size is 3 and Alphabetic Characters is set to No, the maximum value is 999. However, if the value set maximum size is 5, and Alphabetic Characters is set to No, the maximum value is 99999. Note that a blank segment value (null value) is considered to fall within a range that has one or both ends specified as a blank. However, if each of your segments require a value, you would not be able to create a combination with a blank segment anyhow. You may use blank minimum or maximum segment values to create crossvalidation rules that can test for blank segments (that are not already required to have a value). For example, if you allow a null value for your last optional segment but not the secondtolast optional segment, you would use a blank minimum or maximum value for the last segment but fill in a value (such as 000 or 999) for both the minimum and maximums for the secondtolast optional segment. Using Blank Values in Your Ranges You may create crossvalidation rules for flexfield structures where you allow users to leave some segments blank (that is, where you set the Required field to No for one or more segments in a flexfield structure using the Define Key Flexfield Segments window). You may also create crossvalidation rules for flexfield structures where you do not allow users to leave any segments blank. Often you want to control the values in just one or two segments, and any valid segment values may be used in the remaining segments. For example, if you have a sixsegment Accounting Flexfield of the form 0000000000000000000, you may want to allow (include) all possible combinations where the first segment contains 01 and the second segment contains values between 200 and 299, inclusive. You can specify the minimum and maximum values for each segment as follows (assuming that only numeric characters are allowed for these segments):
Include:
From To
0120000000000000000 0129999999999999999
5 29
Or, you could use blank values as both the minimum and maximum values for each of the unrestricted segments (the last four segments): Include: From To 01200______________ 01299______________
Since the blank values clearly signify the ends of the ranges, you may find them easier to use than explicitly specifying the range ending values. Of course, you can always specify only one blank value in a range if the range has one fixed value: Include: From To 012002000__________ 01299_______299____
Define Multiple Rules 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. For example, if you use the Accounting Flexfield, you might want users to enter departments 100 to 199 and asset accounts 2000 to 2999 only for balancing segment value 01. While you can accomplish this objective with one rule, you can see that it is more cumbersome: Include: From To Exclude: From To Error message: Error segment: 0000000000000000000 9999999999999999999 0210020000000000000 9919929999999999999
Incorrect department or account with this balancing segment value. Department? Account?
Heres how to express your control objective more clearly using two rules: Rule #1
5 30
Include:
From To
Exclude:
From To
Please use departments 100199 only with balancing segment value 01. Department
Rule #2 Include: From To Exclude: From To Error message: Error segment: 0000000000000000000 9999999999999999999 0200020000000000000 9999929999999999999
Please use accounts 20002999 only with balancing segment value 01. Account
5 31
If you want to prevent users from using previouslyexisting combinations that are no longer valid according to your crossvalidation rules, you can always disable those combinations using the combinations form.
Reports
Oracle Applications Release 11 contains two reports you can use to help maintain a consistent and logical set of rules and key flexfield combinations. The two new flexfield crossvalidation reports appear in the System Administration responsibility. CrossValidation Rule Violation Report This report provides a listing of all the previouslycreated flexfield combinations that violate your crossvalidation rules for a given flexfield structure. You can also choose to have the report program actually disable the existing combinations that violate your new rules. CrossValidation Rules Listing Report This report lists all the crossvalidation rules that exist for a particular flexfield structure. This is the information you define using the Define CrossValidation Rules form, presented in a multiplerule format you can review and keep for your records.
5 32
Your flexfield checks crossvalidation rules while attempting to create a new combination of flexfield values (for example, a new Accounting Flexfield combination). Your crossvalidation rules have no effect on flexfield combinations that already exist. If you want to disable an existing combination, you must disable that combination specifically using the appropriate window. For example, you can disable an existing Accounting Flexfield combination using the Define Accounting Flexfield Combinations window. Suggestion: We recommend that you define many rules that each have few rule elements rather than a few rules that each have many rule elements. The more rules you provide, the more specific you can make your error message text. Your flexfield checks crossvalidation rules only if you set CrossValidate Multiple Segments to Yes using the Define Key Flexfield Segments window. If you make changes to your crossvalidation rules, you need to either change responsibilities or exit from your application and sign on again in order for the changes to take effect.
Tasks
Defining Crossvalidation Rules: page 5 34
5 33
To define crossvalidation rules: 1. Select the name and structure of your key flexfield for which you wish to define crossvalidation rules. Your list only contains structures with the field CrossValidate Multiple Segments set to Yes on the Key Flexfield Segments window. Enter a unique name and a description for your crossvalidation rule. Enter your error message text for this crossvalidation rule. Your flexfield automatically displays this error message on the message line whenever a new combination of segment values violates your crossvalidation rule. You should make your error messages as specific as possible so that your users can correct any errors easily. 4. Enter the name of the segment most likely to have caused this crossvalidation rule to fail. Your flexfield leaves the cursor in this segment whenever a new segment combination violates this crossvalidation rule to indicate where your user can probably correct the error. If you do not specify an error segment name, your flexfield leaves the cursor in the first segment of the flexfield window following a violation of this rule. If you want to have the rule effective for a limited time, you can enter a start date and/or an end date for the rule. The rule is valid for the time including the From and To dates. Define the crossvalidation rule elements that make up your rule. See: Defining Crossvalidation Rule Elements: page 5 35. Save your changes.
2. 3.
5.
6. 7.
5 34
When you enter the From (low) field, this window automatically displays a window that contains a prompt for each segment in your flexfield structure. You enter both the low and high ends of your value range in this window. After you finish entering your ranges, this zone displays your low segment values in concatenated window in the Low field and displays your high segment values similarly in the High field. Enter the low end and the high end of your segment combination range. Neither the low nor the high combination has to be a valid key flexfield combination, nor do they need to be made up of valid segment values. Note that a blank segment value (null value) is considered to fall within a range that has one or both ends specified as a blank. However, if all of your segments require a value, you would not be able to create a combination with a blank segment anyhow. You may use blank minimum or maximum segment values to create crossvalidation rules that can test for blank segments (that are not already required to have a value). For example, if you allow a null value for your last optional segment but not the secondtolast optional segment, you would use a blank minimum or maximum value
5 35
for the last segment but fill in a value (such as 000 or 999) for both the minimum and maximums for the secondtolast optional segment. If you want to specify a single combination to include or exclude, enter the same combination in both the Low and High fields. Disabled rules are ignored when your key flexfield validates a combination of segment values. Deleting the rule has the same effect, but you can reenable a disabled rule.
5 36
CHAPTER
61
Account Aliases Accounting Flexfield Asset Key Flexfield Bank Details KeyFlexField Category Flexfield Cost Allocation Flexfield Grade Flexfield Item Catalogs Item Categories Job Flexfield Location Flexfield Oracle Service Item Flexfield People Group Flexfield Personal Analysis Flexfield Position Flexfield Sales Tax Location Flexfield SalesOrders Soft Coded KeyFlexfield Stock Locators System Items Territory Flexfield Training Resources Table 6 1 (Page 1 of 1)
MDSP GL# KEY# BANK CAT# COST GRD MICG MCAT JOB LOC# SERV GRP PEA POS MKTS RLOC SCL MTLL MSTK CT# RES
Oracle Inventory Oracle General Ledger Oracle Assets Oracle Payroll Oracle Assets Oracle Payroll Oracle Human Resources Oracle Inventory Oracle Inventory Oracle Human Resources Oracle Assets Oracle Service Oracle Payroll Oracle Human Resources Oracle Human Resources Oracle Receivables Oracle Inventory Oracle Human Resources Oracle Inventory Oracle Inventory Oracle Receivables Oracle Training Administration
You use the flexfield code and the owning application to identify a flexfield when you call it from a custom form.
62
Oracle Assets Oracle Assets Oracle Assets Oracle General Ledger Oracle Human Resources Oracle Human Resources Oracle Human Resources Oracle Human Resources Oracle Human Resources Oracle Inventory Oracle Inventory Oracle Inventory Oracle Inventory Oracle Inventory Oracle Inventory Oracle Payroll Oracle Payroll Oracle Payroll Oracle Receivables Oracle Receivables Oracle Service Oracle Training Administration Table 6 2 (Page 1 of 1)
Asset Key Flexfield Category Flexfield Location Flexfield Accounting Flexfield Grade Flexfield Job Flexfield Personal Analysis Flexfield Position Flexfield Soft Coded KeyFlexfield Account Aliases Item Catalogs Item Categories SalesOrders Stock Locators System Items Bank Details KeyFlexField Cost Allocation Flexfield People Group Flexfield Sales Tax Location Flexfield Territory Flexfield Oracle Service Item Flexfield Training Resources
KEY# CAT# LOC# GL# GRD JOB PEA POS SCL MDSP MICG MCAT RLOC MTLL MSTK BANK COST GRP MKTS CT# SERV RES
63
64
Account Aliases
Account Aliases
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 3 (Page 1 of 1) Oracle Inventory MDSP MTL_GENERIC_DISPOSITIONS 20 40 No DISPOSITION_ID ORGANIZATION_ID
65
Accounting Flexfield
Accounting Flexfield
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 4 (Page 1 of 1) Oracle General Ledger GL# GL_CODE_COMBINATIONS 30 25 Yes CODE_COMBINATION_ID CHART_OF_ACCOUNTS_ID
The Accounting Flexfield is fully described in the Oracle General Ledger Users Guide.
66
Oracle Assets uses the asset key flexfield to group your assets by nonfinancial information. You design your asset key flexfield to record the information you want. Then you group your assets by asset key so you can find them without an asset number. Warning: Plan your flexfield carefully. Once you have started entering assets using the flexfield, you cannot change it.
67
The Bank Details KeyFlexfield [sic] holds legislation specific bank account information. The Bank Details structure that you see is determined by the legislation of your Business Group. Localization teams determine the data that is held in this flexfield. Each localization team defines a flexfield structure that allows you to record the bank account information relevant to each legislation. If you are using a legislation for which a Bank KeyFlexfield structure has been defined you should not modify the predefined structure. Warning: You should not attempt to alter the definitions of the Bank Details Flexfield which are supplied. These definitions are a fundamental part of the package. Any change to these definitions may lead to errors in the operating of the system. It is possible that Oracle Human Resources will use the other segments of this flexfield in the future. Therefore, you should not try to add other segments to this Flexfield. This may affect your ability to upgrade the system in the future. Consult your Oracle Human Resources National Supplement for the full definition of your Bank Details Flexfield.
68
Category Flexfield
Category Flexfield
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 7 (Page 1 of 1) Oracle Assets CAT# FA_CATEGORIES 7 30 No CATEGORY_ID None
Oracle Assets uses the category flexfield to group your assets by financial information. You design your category flexfield to record the information you want. Then you group your assets by category and provide default information that is usually the same for assets in that category. Warning: Plan your flexfield carefully. Once you have started entering assets using the flexfield, you cannot change it.
69
You must be able to get information on labor costs from your payrolls, and send this information to other systems. Payroll costs must of course go to the general ledger. Additionally, you may need to send them to labor distribution or project management systems. The Cost Allocation Flexfield lets you record, accumulate and report your payroll costs in a way which meets the needs of your enterprise.
6 10
Grade Flexfield
Grade Flexfield
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 9 (Page 1 of 1) Oracle Human Resources GRD PER_GRADE_DEFINITIONS 30 60 Yes GRADE_DEFINITION_ID ID_FLEX_NUM
Grades are used to represent relative status of employees within an enterprise, or work group. They are also used as the basis of many Compensation and Benefit policies.
6 11
Item Catalogs
Item Catalogs
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 10 (Page 1 of 1) Oracle Inventory
MICG
MTL_ITEM_CATALOG_GROUPS 15 40 No ITEM_CATALOG_GROUP_ID None
6 12
Item Categories
Item Categories
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 11 (Page 1 of 1) Oracle Inventory MCAT MTL_CATEGORIES 20 40 No CATEGORY_ID STRUCTURE_ID
You must design and configure your Item Categories Flexfield before you can start defining items since all items must be assigned to categories. You can define multiple structures for your Item Categories Flexfield, each structure corresponding to a different category grouping scheme. You can then associate these structures with the categories and category sets you define.
6 13
Job Flexfield
Job Flexfield
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 12 (Page 1 of 1) Oracle Human Resources JOB PER_JOB_DEFINITIONS 30 60 Yes JOB_DEFINITION_ID ID_FLEX_NUM
The Job is one possible component of the Employee Assignment in Oracle Human Resources. The Job is used to define the working roles which are performed by your employees. Jobs are independent of Organizations. With Organizations and Jobs you can manage employee assignments in which employees commonly move between Organizations but keep the same Job. You use the Job Key Flexfield to create Job Names which are a unique combination of segments. You can identify employee groups using the individual segments of the Job whenever you run a report or define a QuickPaint.
6 14
Location Flexfield
Location Flexfield
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 13 (Page 1 of 1) Oracle Assets LOC# FA_LOCATIONS 7 30 Yes LOCATION_ID None
Oracle Assets uses the location flexfield to group your assets by physical location. You design your location flexfield to record the information you want. Then you can report on your assets by location. You can also transfer assets that share location information as a group, such as when you move an office to a new location. Warning: Plan your flexfield carefully. Once you have started entering assets using the flexfield, you cannot change it.
6 15
The People Group flexfield lets you add your own key information to the Employee Assignment. You use each segment to define the different groups of employees which exist within your own enterprise. These may be groups which are not identified by your definitions of other Work Structures.
6 16
The Personal Analysis Key Flexfield lets you add any number of Special Information Types for people. Each Special Information Type is defined as a separate flexfield structure for the Personal Analysis Flexfield. Some common types of information you might want to hold are: Qualifications Language Skills Medical Details Performance Reviews Training Records Each structure can have up to 30 different segments of information. See: Personal Information (Oracle HRMS Users Guide)
6 17
Position Flexfield
Position Flexfield
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 16 (Page 1 of 1) Oracle Human Resources POS PER_POSITION_DEFINITIONS 30 60 Yes POSITION_DEFINITION_ID ID_FLEX_NUM
Positions, like Jobs, are used to define employee roles within Oracle Human Resources. Like Jobs, a Position is an optional component of the Employee Assignment. However, unlike Jobs, a Position is defined within a single Organization and belongs to it. Positions are independent of the employees who are assigned to those position. You can record and report on information which is directly related to a specific position rather than to the employee. See: Work Structures (Oracle HRMS Users Guide)
6 18
Sales Orders
Sales Orders
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 17 (Page 1 of 1) Oracle Inventory MKTS MTL_SALES_ORDERS 20 40 Yes SALES_ORDER_ID None
The Sales Order Flexfield is a key flexfield used by Oracle Inventory to uniquely identify sales order transactions Oracle Order Entry interfaces to Oracle Inventory. Your Sales Order Flexfield should be defined as Order Number, Order Type, and Order Source. This combination guarantees each transaction to Inventory is unique. You must define this flexfield before placing demand or making reservations in Oracle Order Entry.
6 19
The Sales Tax Location Flexfield is used to callculate tax based on different components of your customers shipping addresses for all addresses in your home country.
6 20
The Service Item flexfield uses the same table as the System Item Flexfield. However, you can set up your segments differently with the Service Item Flexfield.
6 21
The Soft Coded Legislation Flexfield holds legislation specific information. The Soft Coded Legislation Flexfield structure that a user will see is determined by the legislation of the Business Group. Localization teams determine the data that is held in this flexfield. Each localization team defines a flexfield structure and uses qualifiers to define the level at which each segment is visible. Segments can be seen at business group, payroll or assignment level. The type of information that is held in this key flexfield varies from legislation to legislation. If you are using a legislation for which a Soft Coded Legislation Flexfield structure has been defined you should not modify the predefined structure.
6 22
Stock Locators
Stock Locators
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 21 (Page 1 of 1) Oracle Inventory MTLL MTL_ITEM_LOCATIONS 20 40 Yes INVENTORY_LOCATION_ID ORGANIZATION_ID
You can use the Stock Locators Flexfield to capture more information about stock locators in inventory. If you do not have Oracle Inventory installed, or none of your items have locator control, it is not necessary to set up this flexfield. If you keep track of specific locators such as aisle, row, bin indicators for your items, you need to configure your Stock Locators Flexfield and implement locator control in your organization. This key flexfield supports only one structure.
6 23
System Items
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 22 (Page 1 of 1) Oracle Inventory MSTK MTL_SYSTEM_ITEMS 20 40 No INVENTORY_ITEM_ID ORGANIZATION_ID
You can use the System Items Flexfield (also called the Item Flexfield) for recording and reporting your item information. You must design and configure your Item Flexfield before you can start defining items. All Oracle Applications products that reference items share the Item Flexfield and support multiplesegment implementations. However, this flexfield supports only one structure.
6 24
Territory Flexfield
Territory Flexfield
Owner Flexfield Code Table Name Number of Columns Width of Columns Dynamic Inserts Possible Unique ID Column Structure Column Table 6 23 (Page 1 of 1) Oracle Receivables CT# RA_TERRITORIES 20 25 Yes TERRITORY_ID None
You can use the Territory Flexfield for recording and customized reporting on your territory information. Territory Flexfields are also displayed in the Transaction Detail and Customer Detail reports in Oracle Receivables.
6 25
CHAPTER
71
Attention: Since report parameters are a special type of descriptive flexfield segment, we use the terms report parameters and segments somewhat interchangeably, especially in descriptions of flexfield setup forms.
While many of the setup steps are similar, such as defining value sets, the Standard Request Submission descriptive flexfield differs from a normal descriptive flexfield in some important ways. The main difference is that you use the Concurrent Programs window to define your segments instead of using the Descriptive Flexfield Segments window. The other differences appear in the ways you define and use value sets, which are often more complex for Standard Request Submission report parameters than they would be for a normal descriptive flexfield. See: Concurrent Programs (Oracle Applications System Administrators Guide) Descriptive Flexfield Segments: page 3 23 Warning: You should never change or delete a predefined value set that Oracle Applications supply. Such changes may unpredictably affect the behavior of your application features such as reporting. This section discusses how you set up report parameter segments to pass values to your report using the Submit Requests form. For a discussion of how you should write your actual report program once you have planned your report parameter popup window, see the Oracle Applications Developers Guide.
72
73
Limit Value Choices Based on Prior Segments Another way you can simplify users report submission is by making your parameter values depend on the values of previous parameters. You use the special bind variable $FLEX$ in a value set WHERE clause to make a report parameter depend on a prior report parameter. By carefully planning and defining your value sets, you can make your reports easier to use by presenting only a limited number of appropriate values from which your user can choose. See: Value Set Windows: page 4 44.
74
Figure 7 1
Submit Requests
Report Parameters
Report Parameters
Type Part Number COM Computer
COM876LTN
Using a flexfield popup window as a report parameter requires several steps: Design your report and report parameter window Determine your flexfield routine calls Define your special value set Build your report program Register your concurrent program and define report parameters You can also use a flexfield range in your report parameters (Pair validation instead of Special validation). All the steps are the same except that you define your flexfield call arguments and your value set slightly differently.
75
Design Your Report and Report Parameter Window First you design your report and your report parameter window. You must decide what your report requires as parameters from your user, and how those correlate to the way your user submits your report. For example, if you are writing a report that provides information related to a specific Accounting Flexfield combination or group of Accounting Flexfield combinations, your report probably requires a code combination ID or a concatenated group of segment values. On the other hand, your user doesnt know the CCID number, and instead would prefer to fill in the usual Accounting Flexfield popup window. Since you can use value set mechanisms to translate between displayed end useroriented values and hidden ID values, as well as to translate between flexfield popup windows your user sees and the CCID or concatenated values your report requires, you can design your report and its submission interface to satisfy both needs. Determine Your Flexfield Routine Calls Determine the flexfield routine calls you need to pop open and validate the appropriate flexfield. These calls are variations of the flexfield calls you code into a custom application form (POPID(R), VALID(R), and so on). You use special arguments to these routines so that they work within your report parameter window. See: Syntax for Key Flexfield Routines: page 9 2, Special Validation Value Sets: page 9 23. Define Your Special Value Set Define your special value set. Note that you define only one value set for your entire flexfield, though that single value set may have more than one flexfield routine call. For example, you might need both a POPID and a VALID call for your flexfield value set. Type in your special flexfield routine calls as functions for the appropriate events in the Special Validation region (same for Pair Validation) of the Define Value Set form. Be sure to type carefully, because it is often difficult to find errors later in the flexfield routine syntax if your report parameter doesnt behave as you expect. See: Value Set Windows: page 4 44. Build Your Report Program Build your report program to accept the resulting values that it will receive when a user submits your report. Follow the guidelines for building concurrent programs given in the Oracle Applications Developers Guide and the Oracle Applications System Administrators Guide.
76
Register Your Concurrent Program and Define Report Parameters Register your concurrent program with Oracle Applications using the Concurrent Programs and Concurrent Program Executable windows, and define your report parameter to use your special value set. Note that you use only one value set per report parameter; one special value set contains the entire flexfield. See: Concurrent Programs (Oracle Applications System Administrators Guide)
77
(Report Title)
(Report Parameter Prompt) (Segment Value) (Value Description)
78
You can use copies of the following diagram to help you plan more complex report parameter setups.
Figure 7 3
(Report Title)
No. Visible 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 (Prompt) (Segment Value) (Value Description) (Value Set) Hidden Depends ID on Nos.
79
CHAPTER
81
82
83
combinations for different structures. There exist no columns for individual segments. The view also contains a column called PADDED_ CONCATENATED_SEGMENTS, which is similar to the CONCATENATED_SEGMENTS column except that all numeric segment values are rightjustified and all other segments values are left justified (that is, the numeric segment values are left padded with blanks and the other values right padded with blanks to the maximum size specified in the value set definition). You can use this column to order by the concatenated segment values. For example, if you have a 5segment code combination where the maximum sizes of the segments are 2, 4, 4, 1 and 4, the values in the two columns would look something like this:
CONCATENATED_SEGMENTS 2.20.ABCD.4.5000 32.150.ST.4.300 2.1230.1000.6.300 32.20.TGW.4.300 2.30.10.6.300 PADDED_CONCATENATED_SEGMENTS 2. 20.ABCD.4.5000 32. 150.ST .4.3000 2.1230.1000.6. 300 32. 20.TGW .4.3000 2. 30.10 .6. 300
In this example, the third segment uses character format, so the 10 in the last row is left justified like the alphabetic values for that segment.
84
If the code combinations table contains columns for segment qualifiers, the segment qualifier columns will use the segment qualifier names as view column names, for example GL_ACCOUNT_TYPE. In addition to the segment and qualifier columns, the view also contains the code combination ID column, START_DATE_ACTIVE, END_DATE_ACTIVE, SUMMARY_FLAG, ENABLED_FLAG, ROW_ID (not ROWID), and all other columns in the code combination table that are not enabled as flexfield columns. The Structure view does not have the structure defining column as all the information in this view pertains to one structure of the flexfield.
85
any are enabled), the context value, and any contextsensitive segments, in that order. The view does not contain any other columns from the underlying table except a ROW_ID (not ROWID) column, the context column and the columns that are used by enabled segments. The ROW_ID column in the view corresponds to ROWID in the actual table.
86
If you plan to use many segments (over all structures, both global and contextsensitive) for your descriptive flexfield, you should plan to use duplicate segment names. For example, if you define the Asset Category descriptive flexfield in Oracle Assets, you may have many structures (one for each category of asset, such as vehicles) that each have several segments. For this flexfield, you could easily exceed 253 uniquelynamed segments. However, you can intentionally share segment names among contextsensitive structures, and thus stay below 253 uniquelynamed segments. For example, you might have a segment in a VEHICLE structure for vehicle type, and you might have a segment in a FURNITURE structure for furniture type. You could name both segments Type, and they would share a column in the view. Since the context (structure) column appears in the view, you can easily differentiate between the two uses of the column. Also, since the view uses the segment name, instead of the segment prompt, you can use different prompts for these segments and avoid confusing users. Be sure that none of the segment names for your contextsensitive segments duplicate the names for any global segments you have, however. You should always verify that your view generation concurrent request completes successfully. If the concurrent request fails for some reason, such as duplicate column names, the view generator attempts to create a null view so that any grants and synonyms from a previouslyexisting view are preserved. In these cases, you should identify and fix the problem and then regenerate your view. The report file for your concurrent request contains a description of your view. Updating a Flexfield View If you want to recreate a flexfield view, you refreeze and recompile your flexfield structure.
87
none of the segment names in your flexfield result in the same names as other column names in the code combinations table for the flexfield. For example, the name DESCRIPTION often appears as a column name, so you should avoid naming your segment Description (it is not casesensitive). You should not use a nonalphabetic character as the first character of your segment name, since the first character of a database object name (that is, your view column name) must be a letter. For example, a segment name of # of dependents becomes __of_dependents, which is an illegal column name. If two or more segment names map to identical view column names, the flexfield view generator will not be able to create your view (it will fail with a Duplicate Column error), except in the case of segments belonging to different contexts in a descriptive flexfield. The view generator uses underscores ( _ ) to replace all characters in the segment name that are other than alphanumeric characters and underscores. The segment names in a structure should not be identical after correction for nonalphanumeric characters. For example, the names Segment 1s Name and Segment_1_s_Name would be the same once the space and apostrophe become underscores ( _ ). You should avoid using segment names that become SQL reserved words such as NUMBER or DEFAULT. For descriptive flexfields, the context prompt is used as the view column name for the context column, so you should not create a segment name that results in the same name as the context prompt. Keep these conventions in mind while naming flexfield segments using the (Key or Descriptive) Flexfield Segments windows. See: Key Flexfield Segments: page 2 17, Descriptive Flexfield Segments: page 3 23. Key Flexfields The segment names in a structure and any qualifier names in the flexfield should not be identical after correction for nonalphanumeric characters. Since the key flexfield view includes nonflexfield columns, your segment names should not match any other nonflexfield column in the code combination table. For example, a segment named DESCRIPTION and a nonflexfield column by the same name in the code combination table will conflict in the view. If there is a column named CONCATENATED_SEGMENTS or ROW_ID in the code combination table, the table column by this name would not be
88
included in the view since these names would conflict (the view generator creates the view columns as usual). Descriptive Flexfields The context prompt is used as the view column name for the context column, so the context prompt should not appear as a segment name. The global segment names should be unique. That is, other global segments and context sensitive segments should not have identical view column names.
89
SELECT O.ORDER_ID ORDER, O.CLIENT_ID CLIENT, O.ORDER_DATE, L.ORDER_LINE_ID LINE, QUANTITY, PN.CONCATENATED_SEGMENTS PART_NO FROM ORDERS O, ORDER_LINES L, PART_ COMBINATIONS_KFV PN WHERE O.ORDER_ID = L.ORDER_ID AND O.ORDER_DATE BETWEEN 28FEB1994 AND 01APR1994 AND L.PART_ID = PN.PART_ID
Writing a Report for a Descriptive Flexfield For a descriptive flexfield, you typically want to report on the information already contained in the descriptive flexfield table, but you want to include concatenated descriptive flexfield segment values in your report instead of individual values, or you want to include information from particular named segments (as opposed to ATTRIBUTEn columns). For these reports, you would use the ROW_ID column in the view to join with the ROWID of the descriptive flexfield base table.
SELECT T.VARIOUS_COLUMNS, V.CONTEXT_VALUE, V.CONCATENATED_SEGMENTS FROM BASE_TABLE T, BASE_TABLE_DFV V WHERE V.ROW_ID = T.ROWID
8 10
8 11
8 12
8 13
8 14
to the flexfield itself. You should note the differences between the boldfaced columns in the underlying table and those in its view. The descriptive flexfield columns in this table include the ATTRIBUTEn columns and the CONTEXT column (structure column). Original Underlying Descriptive Flexfield Table
SQL> describe FA_ADDITIONS Name Null? Type ASSET_ID NOT NULL NUMBER(15) ASSET_NUMBER NOT NULL VARCHAR2(15) ASSET_KEY_CCID NUMBER(15) CURRENT_UNITS NOT NULL NUMBER(4) ASSET_TYPE NOT NULL VARCHAR2(11) TAG_NUMBER VARCHAR2(15) DESCRIPTION NOT NULL VARCHAR2(80) ASSET_CATEGORY_ID NOT NULL NUMBER(15) PARENT_ASSET_ID NUMBER(15) MANUFACTURER_NAME VARCHAR2(30) SERIAL_NUMBER VARCHAR2(35) MODEL_NUMBER VARCHAR2(40) PROPERTY_TYPE_CODE VARCHAR2(10) PROPERTY_1245_1250_CODE VARCHAR2(4) IN_USE_FLAG NOT NULL VARCHAR2(3) OWNED_LEASED NOT NULL VARCHAR2(6) NEW_USED NOT NULL VARCHAR2(4) UNIT_ADJUSTMENT_FLAG NOT NULL VARCHAR2(3) ADD_COST_JE_FLAG NOT NULL VARCHAR2(3) ATTRIBUTE1 VARCHAR2(150) ATTRIBUTE2 VARCHAR2(150) . . . . . . ATTRIBUTE29 VARCHAR2(150) ATTRIBUTE30 VARCHAR2(150) ATTRIBUTE_CATEGORY_CODE NOT NULL VARCHAR2(210) CONTEXT VARCHAR2(210) LEASE_ID NUMBER(15) LAST_UPDATE_DATE NOT NULL DATE LAST_UPDATED_BY NOT NULL NUMBER(15) CREATED_BY NUMBER(15) CREATION_DATE DATE LAST_UPDATE_LOGIN NUMBER(15)
This descriptive flexfield has three contextsensitive structures: VEHICLE.OWNSTD, VEHICLE.HEAVY, and BUILDING.OFFICE. The BUILDING.OFFICE structure has two segments, square footage and insurer. The VEHICLE.OWNSTD structure has five segments, as
8 15
shown. The VEHICLE.HEAVY structure has five segments as well, square footage cargo, number of axles, transmission type, insurance company, and insurance policy number. The two VEHICLE structures share the same segment name for the insurance company segment. The resulting view contains a total of eleven segment columns, rather than twelve, for the three structures. The column CONTEXT_VALUE in the view corresponds to the column CONTEXT in the table (the context field prompt defined in the Descriptive Flexfield Segments window is Context Value). See: Descriptive Flexfield Segments: page 3 23. Descriptive Flexfield View
SQL> describe FA_ADDITIONS_DFV Name Null? Type ROW_ID ROWID CONTEXT_VALUE VARCHAR2(210) SQUARE_FOOTAGE NUMBER INSURER VARCHAR2(150) LICENSE_NUMBER VARCHAR2(150) INSURANCE_COMPANY VARCHAR2(150) INSURANCE_POLICY_NUMBER VARCHAR2(150) SQ_FOOTAGE_CARGO NUMBER NUMBER_OF_AXLES NUMBER TRANSMISSION_TYPE VARCHAR2(150) LICENSE_RENEWAL_DATE DATE POLICY_RENEWAL_DATE DATE POLICY_NUMBER VARCHAR2(150) CONCATENATED_SEGMENTS VARCHAR2(1116)
Example of Reporting from a Descriptive Flexfield View Here is a simple example of selecting some data from the table and its corresponding view.
SQL> select ADD.ASSET_NUMBER ASSET, ADD.DESCRIPTION, CONTEXT_VALUE, CONCATENATED_SEGMENTS from FA_ADDITIONS ADD, FA_ADDITIONS_DFV where ADD.rowid = ROW_ID;
Note that in this simple report, the structure name (BUILDING.OFFICE, VEHICLE.HEAVY, and VEHICLE.OWNSTD) appears in two columns: CONTEXT_VALUE (the structure column) and in the CONCATENATED_SEGMENTS column as the first
8 16
segment value (the context value appears first because there are no enabled global segments). Some context values do not have any enabled segments, so the CONCATENATED_SEGMENTS column is empty for those assets. Some assets, such as asset number 363, while they belong to structures with enabled segments, do not have values filled in for the descriptive flexfield. For those assets, the CONCATENATED_ SEGMENTS column contains the structure name and several periods (segment separators) that designate empty segment values.
ASSET 334 363 760 325 343 346 352 315 340 365 369 348 351 338 339 332 333 335 347 310 311 312 292 298 283 276 157 69 21 43 46 47 58 59 DESCRIPTION Sales Vehicles Management Vehicles STANDARD VEHICLE Mahogany Desk Paris Sales Building Paris Storage Building Desk Phone 486 PC w/20MB Memory 9600 Baud Modem 4 Drawer File Cabinet Management Vehicles Stuttgart Sales Building Stuttgart Storage Building Laptop Computer Color Monitor Sales Vehicles Management Vehicles Management Vehicles Stuttgart Sales Building 4 Drawer File Cabinet Highback Office Chair Conference Room Desk Management Vehicles Management Vehicles Flat Bed Trucks Covered Trailers Scramento Open Space Conference Room Phone Austin Manufacturing Building New York Sales Building Sacramento HQ Building Austin Office Building Austin Storage Building Sacramento Storage Building CONTEXT_VALUE VEHICLE.LEASESTD VEHICLE.OWNSTD VEHICLE.OWNSTD FURNITURE.DESKS BUILDING.OFFICE BUILDING.STORAGE COMM.PHONE COMPUTER.COMPUTER COMPUTER.NETWORK FURNITURE.CABINETS VEHICLE.OWNSTD BUILDING.OFFICE BUILDING.STORAGE COMPUTER.COMPUTER COMPUTER.COMPUTER VEHICLE.LEASESTD VEHICLE.OWNSTD VEHICLE.OWNSTD BUILDING.OFFICE FURNITURE.CABINETS FURNITURE.CHAIRS FURNITURE.DESKS VEHICLE.OWNLUXURY VEHICLE.OWNSTD VEHICLE.HEAVY VEHICLE.HEAVY LAND.OPEN COMM.PHONE BUILDING.MFG BUILDING.OFFICE BUILDING.OFFICE BUILDING.OFFICE BUILDING.STORAGE BUILDING.STORAGE CONCATENATED_SEGMENTS VEHICLE.LEASESTD..... VEHICLE.OWNSTD..... VEHICLE.OWNSTD.2FKA334.10MAR94. ALLSTATE.C34879.21SEP93 BUILDING.OFFICE.39200.Prudential BUILDING.STORAGE..
VEHICLE.OWNLUXURY..... VEHICLE.OWNSTD..... VEHICLE.HEAVY.2FOB837.ALLSTATE. C34065.200.5Speed Manual VEHICLE.HEAVY.2FOX537.ALLSTATE. C34465.100. BUILDING.MFG.60000.Prudential BUILDING.OFFICE.. BUILDING.OFFICE.78300.Fidelity Mutual BUILDING.OFFICE.90000.Prudential BUILDING.STORAGE.. BUILDING.STORAGE.85000.Fidelity Mutual
8 17
General Methodology
You use a two step method to report on flexfield values. The first step creates the appropriate SQL statement dynamically based upon the users 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 runtimespecific flexfield information. For example, suppose you have the following query:
8 18
SELECT &LEXICAL1 alias, column FROM table WHERE &LEXICAL2 The preliminary calls to FND FLEXSQL replace values of LEXICAL1 and LEXICAL2 at execution time with the SQL fragments. For example, LEXICAL1 becomes SEGMENT1||\n||SEGMENT2 and LEXICAL2 becomes SEGMENT1 < 2 (assuming the users flexfield is made up of two segments and the user requested that the segment value of SEGMENT1 be less than 2). The actual executed SQL query might be: SELECT SEGMENT1||\n||SEGMENT2 alias, column FROM table WHERE SEGMENT1 < 2 The SQL statement for a user with a different flexfield structure might be: SELECT SEGMENT5||\n||SEGMENT3||\n||SEGMENT8 alias, column FROM table WHERE SEGMENT3 < 2 With this step you can alter the SELECT, ORDER BY, GROUP BY, or WHERE clause. You use this step to retrieve all the concatenated flexfield segment values to use as input to the user exit FND FLEXIDVAL in step 2 (described below). You call this user exit once for each lexical parameter you use, and you always call it at least once to get all segments. This raw flexfield information is in an internal format and should never be displayed (especially if the segment uses a hidden ID value set). Step 2 (Display): The second step requires you to call another user exit, FND FLEXIDVAL, on a postrecord 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 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.
8 19
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.
8 20
SELECT &LEXICAL alias, column becomes, for example, SELECT SEGMENT1||\n||SEGMENT2 alias, column Note: Oracle Reports needs the column alias to keep the name of column fixed for the lexicals in SELECT clauses. Without the alias, Oracle Reports assigns the name of the column as the initial value of the lexical and a discrepancy occurs when the value of the lexical changes at run time. Step 4 Restrict report data based upon flexfield values You call the user exit FND FLEXSQL with MODE=WHERE from the Before Report Trigger. This user exit populates a lexical parameter that you specify with the appropriate SQL fragment at run time. You include this lexical parameter in the WHERE clause of your report query. You call this user exit once for each lexical to be changed. If your report query uses table joins, you can have this user exit prepend your code combination table name alias to the column names it returns. WHERE tax_flag = Y and &LEXICAL < &reportinput becomes, for example, WHERE tax_flag = Y and T1.segment3 < 200 The same procedure can be applied for a HAVING clause. Step 5 Order by flexfield columns You call the user exit FND FLEXSQL with MODE=ORDER BY from the Before Report Trigger. This user exit populates the lexical parameter that you specify with the appropriate SQL fragment at run time. You include this lexical parameter in the ORDER BY clause of your report query. You call this user exit once for each lexical to be changed. If your report query uses table joins, you can have this user exit prepend your code combination table name alias to the column names it returns. ORDER BY column1, &LEXICAL becomes, for example, ORDER BY column1, segment1, segment3 Step 6 Display flexfield segment values, descriptions, and prompts Create a Formula Column (an Oracle Reports 2.5 data construct that enables you to call a user exit). Call the user exit FND FLEXIDVAL as
8 21
the Formula for this column. This user exit automatically fetches more complicated information such as descriptions and prompts so that you do not have to use complicated table joins to the flexfield tables. Then you create a new field (an Oracle Reports 2.5 construct used to format and display Columns), assign the Formula Column as its source, and add this field to your report using the screen painter. You need to include this field on the same Repeating Frame (an Oracle Reports 2.5 construct found in the screen painter that defines the frequency of data retrieved) as the rest of your data, where data could be actual report data, boilerplate, column headings, etc. The user exit is called and flexfield information retrieved at the frequency of the Repeating Frame that contains your field. In the report data case, the user exit is called and flexfield information retrieved once for every row retrieved with your query. All flexfield segment values and descriptions are displayed left justified. Segment values are not truncated, that is, the Display Size defined in Define Key Segments screen is ignored. Segment value descriptions are truncated to the description size (if one is displayed) or the concatenated description size (for concatenated segments) defined in the form.
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.
Syntax:
FND FLEXSQL CODE=flexfield code APPL_SHORT_NAME=application short name OUTPUT=:output lexical parameter name MODE={ SELECT | WHERE | HAVING | ORDER BY} [DISPLAY={ALL | flexfield qualifier | segment number}]
8 22
[SHOWDEPSEG={Y | N}] [NUM=:structure defining lexical | MULTINUM={Y | N}] [TABLEALIAS=code combination table alias] [OPERATOR={ = | < | > | <= | >= | != | || | BETWEEN | QBE}] [OPERAND1=:input parameter or value] [OPERAND2=:input parameter or value]
Options:
CODE Specify the flexfield code for this report (for example, GL#). You call FLEXSQL multiple times to set up SQL fragments when reporting on multiple flexfields in one report. APPL_SHORT_NAME Specify the short name of the application that owns this flexfield (for example, SQLGL). OUTPUT Specify the name of the lexical parameter to store the SQL fragment. You use this lexical later in your report when defining the SQL statement that selects your flexfield values. The datatype of this parameter should be character. MODE Specify the mode to use to generate the SQL fragment. Valid modes are: SELECT Retrieves all segments values in an internal (nondisplayable) format. If you SELECT a flexfield qualifier, and that flexfield segment is a dependent segment, then flexfields automatically selects both the parent segment and the dependent segment. For example, if the qualifier references the Subaccount segment, then both the Account (the parent) and the Subaccount segment columns are retrieved.
8 23
Note: You reuse the lexicals you use in the SELECT clause in the GROUP BY clause. WHERE Restrict the query by specifying constraints on flexfield columns. The fragment returned includes the correct decode statement if you specify MULTINUM. You should also specify an OPERATOR and OPERANDS. You can prepend a table alias to the column names using the TABLEALIAS token. HAVING ORDER BY Same calling procedure and functionality as WHERE. Order queried information by flexfield columns. The fragment orders your flexfield columns and separates them with a comma. The fragment returned includes the correct decode statement if you specify MULTINUM.
You use the MODE token with the DISPLAY token. The DISPLAY token specifies which segments are included in your SQL fragment in your lexical parameter. For example, if your MODE is SELECT, and you specify DISPLAY=ALL, then your SELECT statement includes all segments of the flexfield. Similarly, if your MODE is WHERE, and you specify DISPLAY=ALL, then your WHERE clause includes all segments. Frequently you would not want all segments in your WHERE clause, since the condition you specify for the WHERE clause in your actual query would then apply to all your segments (for example, if your condition is = 3, then SEGMENT1, SEGMENT2, ... , SEGMENTn would each have to be equal to 3). DISPLAY You use the DISPLAY token with the MODE token. The DISPLAY parameter allows you to specify which segments you want to use. You can specify segments that represent specified flexfield qualifiers or specified segment numbers, where segment numbers are the order in that the segments appear in the flexfield window, not the segment number specified in the Define Key Segments form. Application developers normally use only flexfield qualifiers in the DISPLAY token, whereas users may customize the report and use a DISPLAY token that references a segment number once the flexfield is set up.
8 24
The default is ALL, which displays all segments. Alternatively, you can specify a flexfield qualifier name or a segment number. If you specify a nonunique flexfield qualifier, then the routine returns the first segment with this qualifier that appears in the users window, not all segments with this qualifier. Only unique segment qualifiers are supported for the WHERE clause. You can use these parameters as toggle switches by specifying them more than once. For example, if you want to use all but the account segment, you specify: DISPLAY=ALL DISPLAY=GL_ACCOUNT Or, if you want to use all but the first two segments, you specify: DISPLAY=ALL DISPLAY=1 DISPLAY=2 Note that the order in that flexfield column values are used depends on the order in which they appear in the users window, not the order in which you specify them in the report, nor the order in that they appear in the database table. SHOWDEPSEG SHOWDEPSEG=N disables automatic addition of depended upon segments to the order criteria. The default value is Y. This token is valid only for MODE=ORDER BY in FLEXSQL. NUM or MULTINUM Specify the name of the lexical or source column that contains the flexfield structure information. If your flexfield uses just one structure, specify NUM only and use a lexical parameter to hold the value. If your flexfield uses multiple structures, specify MULTINUM only and use a source column to hold the value. In this case the user exit builds a decode statement to handle the possible changing of structures midreport. The default is NUM=101. TABLEALIAS Specify the table alias you would like prepended to the column names. You use TABLEALIAS if your SELECT joins to other flexfield tables or uses a selfjoin.
8 25
OPERATOR Specify an operator to use in the WHERE clause. The operators = | < | > | <= | >= | != | QBE | BETWEEN perform lexical comparisons, not numeric comparisons. With QBE (Query By Example) and BETWEEN operators, the user can specify partial flexfield values to match for one or more segments. For example, if OPERAND1 is 01CA% (assuming a foursegment flexfield with a delimiter of ), the first segment must match 01 and the third segment is like CA%. The resulting SQL fragment is: SEGMENT1=01 AND SEGMENT3 LIKE CA% For the BETWEEN operator, if OPERAND1 is 01CA and OPERAND2 is 05MA then the resulting SQL fragment is: (SEGMENT1 BETWEEN 01 AND 05) AND BETWEEN CA AND MA) OPERAND1 Specify an operand to use in the WHERE clause. OPERAND2 Specify a second operand to use with OPERATOR=BETWEEN. (SEGMENT3
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).
Syntax:
FND FLEXIDVAL CODE=flexfield code APPL_SHORT_NAME=application short name DATA=:source column name [NUM=:structure defining source column/lexical] [DISPLAY={ALL|flexfield qualifier|segment number}]
8 26
[IDISPLAY={ALL|flexfield qualifier|segment number}] [SHOWDEPSEG={Y | N}] [VALUE=:output column name] [DESCRIPTION=:output column name] [APROMPT=:output column name] [LPROMPT=:output column name] [PADDED_VALUE=:output column name] [SECURITY=:column name]
Options:
CODE Specify the flexfield code for this report (for example, GL#). You call FLEXIDVAL multiple times, using a different CODE, to display information for multiple flexfields in one report. APPL_SHORT_NAME Specify the short name of the application that owns this flexfield (for example, SQLGL). DATA Specify the name of the field that contains the concatenated flexfield segment values retrieved by your query. NUM Specify the name of the source column or parameter that contains the flexfield structure information. DISPLAY The DISPLAY parameter allows you to display segments that represent specified flexfield qualifiers or specified segment numbers, where segment numbers are the order in that the segments appear in the flexfield window, not the segment number specified in the Define Key Segments form. The default is ALL, which displays all segments. Alternatively, you can specify a flexfield qualifier name or a segment number. You can use
8 27
these parameters as toggle switches by specifying them more than once. For example, if you to display all but the first segment, you would specify: DISPLAY=ALL DISPLAY=1 IDISPLAY You use this parameter to tell FLEXIDVAL what segments you used in your SELECT clause in the corresponding FLEXSQL call. FLEXIDVAL needs this information to determine the format of raw data retrieved by FLEXSQL. You set IDISPLAY to the same value as your DISPLAY parameter in your FLEXSQL call. The default value is ALL, so if you used DISPLAY=ALL in FLEXSQL, you do not need to use IDISPLAY here. SHOWDEPSEG SHOWDEPSEG=N disables automatic display of depended upon segments. The default value is Y. VALUE Specify the name of the column in which you want to display flexfield values. DESCRIPTION Specify the name of the column in which you want to display flexfield descriptions. APROMPT Specify the name of the column in which you want to display flexfield above prompts. LPROMPT Specify the name of the column in which you want to display flexfield left prompts.
8 28
PADDED_VALUE Specify the name of the column in which you want to display padded flexfield values. The segment values are padded to the segment size with blanks. SECURITY Specify the name of the column into which flag S will be placed if the segment values are secured. You then write logic to hide or display values based on this flag. This token is applicable only for segment values and does not apply to description, left prompt or above prompt. Note: The datatype of the column as specified by VALUE, DESCRIPTION, APROMPT and LPROMPT is CHARACTER.
8 29
8 30
Lexical Parameters Name P_CONC_REQUEST_ID P_FLEXDATA Data Type Number Width 15 Initial Value 0 Notes Always create Cumulative width more than expected width required to hold data
Character approximate- Long ly 600 (single string structure) to 6000 (roughly ten structures)
Table 8 1 (Page 1 of 1)
You must always create the P_CONC_REQUEST_ID lexical parameter. FND SRWINIT uses this parameter to retrieve information about the concurrent request that started this report. The P_FLEXDATA parameter holds the SELECT fragment of the SQL query. The initial value is used to check the validity of a query containing this parameter and to determine the width of the column as specified by the column alias. Its initial value is some string that contains columns with a cumulative width more than the expected width required to hold the data. Make sure the width of this column is sufficient. If there are total 30 segments in the table then the safest initial value will be: (SEGMENT1||\n||SEGMENT2||\n||SEGMENT3 SEGMENT30) ...
You determine the width by determining the length of that string. That length is roughly the number of characters in the table alias plus the length of the column name, times the number of segments your code combinations table contains, times the number of structures you expect, plus more for delimiter characters as shown in the string above. Step 4 Define your other parameters You define the rest of the parameters your report needs by using the Data Model Painter. You use these parameters in the user exit calls and SQL statements.
8 31
Other parameters
Table 8 2 (Page 1 of 1)
Step 5
Call FND FLEXSQL from your Before Report Trigger to populate P_FLEXDATA Next, given that you want to display flexfield information like concatenated values and descriptions, and arrange them in order, you make one call to FND FLEXSQL from the Before Report Trigger specifying the lexical parameters. This call changes the value of the lexical parameter P_FLEXDATA at runtime to the SQL fragment that selects all flexfields value data. For example, the parameter changes to (SEGMENT1||\n||SEGMENT2||\n||SEGMENT3||\n||SEGM ENT4). When you incorporate this lexical parameter into the SELECT clause of a query, it enables the query to return the concatenated segment values that are needed as input to other AOL user exits. These exits then retrieve the actual flexfield information for display purposes. Here is an example FND FLEXSQL call. Notice that the arguments are very similar to other flexfield routine calls; CODE= and NUM= designate the key flexfield and its structure, respectively. For a report on a different key flexfield (such as the System Items flexfield), you would use a different CODE and NUM. SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL OUTPUT=:P_FLEXDATA MODE=SELECT DISPLAY=ALL); You should always reference any source column/parameter that is used as a source for data retrieval in the user exit. This guarantees that
8 32
this column/parameter will contain the latest value and is achieved by SRW.REFERENCE call as shown above. Step 6 Call FND FLEXSQL from your Before Report Trigger to populate other parameters You call FND FLEXSQL once for every lexical parameter such as P_WHERE or P_ORDERBY. Step 7 Define your report query or queries Define your report query Q_1: SELECT &P_FLEXDATA C_FLEXDATA FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = &P_STRUCT_NUM The query fetches the data required to be used as input for the FLEXIDVAL user exit later. Note: Always provide a column alias (C_FLEXDATA in this example) in the SELECT clause that is the name of column. This name of the column is required in FND FLEXIDVAL. When the report runs, the call to FND FLEXSQL fills in the lexical parameters. As a result the second query would look something like: SELECT (SEGMENT1||||SEGMENT2||||SEGMENT3|||| SEGMENT4) C_FLEXDATA FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = 101 Step 8 Create formula columns Now create columns C_FLEXFIELD and C_DESC_ALL (and any others your report uses) corresponding to the values and descriptions displayed in the report. They all are in group G_1. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters). Step 9 Populate segment values formula column To retrieve the concatenated flexfield segment values and description, you incorporate the flexfields user exits in these columns. In the
8 33
column definition of C_FLEXFIELD, you incorporate the FND FLEXIDVAL user exit call in the formula field. You pass the concatenated segments along with other information to the user exit, and the user exit populates the concatenated values in this column as specified by the VALUE token. A typical call to populate segment values in this column looks as follows: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA VALUE=:C_FLEXFIELD DISPLAY=ALL); RETURN(:C_FLEXFIELD); Step 10 Populate segment descriptions To populate the segment description use DESCRIPTION=C_DESC_ALL instead of VALUE=C_FLEXFIELD as in the previous call. The user exit call becomes: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA DESCRIPTION=:C_DESC_ALL DISPLAY=ALL); RETURN(:C_DESC_ALL); You have created parameters and columns that are containers of all the values to be displayed. Now, in the following steps, you create the layout to display these values on the report. Step 11 Create your default report layout First choose Default Layout to generate the default layout. Deselect C_FLEXDATA. Specify a Label and a reasonable Width for the columns you want to display.
8 34
Default Layout Column Settings Column C_FLEXFIELD C_DESC_ALL Table 8 3 (Page 1 of 1) Label Accounting Flexfield Flexfield Description Width 30 50
Oracle Reports takes you to the layout painter. Generate and run the report. Step 12 Finish your report Adjust your report layout as needed.
8 35
Attention: The previous section, Oracle Reports and Flexfields ReportWriting Steps, provides additional explanatory detail for each step.
8 36
1 2 3 4 5 6 7 8 9 10 11 12
Accounting Flexfield 01000000000 01000000000 01000000000 01000000002 01100000100 01300000300 01400000400 01500000500
Flexfield Description WidgetUnited StatesUSDPaid WidgetUnited StatesUSDPaid WidgetUnited StatesUSDPaid WidgetUnited StatesUSDUnder Negotiation WidgetIraqIQDPaid WidgetAustraliaAUDPaid WidgetCanadaCNDPaid WidgetMexicoMXPPaid
Note: Line numbers listed above are for explanation purposes only and do not appear in report output. Report Writing Steps Step 1 Define your Before Report Trigger SRW.USER_EXIT(FND SRWINIT); Step 2 Define your After Report Trigger SRW.USER_EXIT(FND SRWEXIT); Step 3 Define your parameters Define the following parameters using the Data Model Painter. You use these parameters in the user exit calls and SQL statements.
8 37
Lexical Parameters Name P_CONC_REQUEST_ID P_FLEXDATA Data Type Number Character Width 15 600 Initial Value 0 Long string Notes Always create Cumulative width more than expected width required to hold data Contains structure number
P_STRUCT_NUM
Character
15
101
Table 8 4 (Page 1 of 1)
Step 4
Call FND FLEXSQL from your Before Report Trigger to populate P_FLEXDATA SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL OUTPUT=:P_FLEXDATA MODE=SELECT DISPLAY=ALL);
Step 5
Define your report query Define your report query Q_1: SELECT &P_FLEXDATA C_FLEXDATA FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = &P_STRUCT_NUM When the report runs, the call to FND FLEXSQL fills in the lexical parameters. As a result the second query would look something like: SELECT (SEGMENT1||||SEGMENT2||||SEGMENT3|||| SEGMENT4) C_FLEXDATA FROM CODE_COMBINATIONS_TABLE
8 38
WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = 101 Step 6 Create formula columns Now create columns C_FLEXFIELD and C_DESC_ALL (and any others your report uses) corresponding to the values and descriptions displayed in the report. They all are in group G_1. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters). Step 7 Populate segment values formula column To retrieve the concatenated flexfield segment values and descriptions, you incorporate the AOL user exits in these columns. In the column definition of C_FLEXFIELD, you incorporate the FND FLEXIDVAL user exit call in the formula field. SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA VALUE=:C_FLEXFIELD DISPLAY=ALL); RETURN(:C_FLEXFIELD); Step 8 Populate segment descriptions To populate the concatenated segment descriptions use DESCRIPTION=C_DESC_ALL instead of VALUE=C_FLEXFIELD as in the previous step. The user exit call becomes: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA DESCRIPTION=:C_DESC_ALL
8 39
DISPLAY=ALL); RETURN(:C_DESC_ALL); You have created parameters and columns that are containers of all the values to be displayed. Now, in the following steps, you create the layout to display these values on the report. Step 9 Create your default report layout First choose Default Layout to generate the default layout. Deselect C_FLEXDATA. Specify a Label and a reasonable Width for the columns you want to display.
Default Layout Column Settings Column C_FLEXFIELD C_DESC_ALL Table 8 5 (Page 1 of 1) Label Accounting Flexfield Flexfield Description Width 30 50
Oracle Reports takes you to the layout painter. Generate and run the report.
Report Summary
Lexical Parameters
P_CONC_REQUEST_ID P_FLEXDATA P_STRUCT_NUM
FND User Exits FND FLEXIDVAL FND FLEXSQL FND SRWINIT FND SRWEXIT
Table 8 6 (Page 1 of 1)
8 40
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Accounting Flexfield 01000000000 01000000000 01000000002 01300000300 01400000400 01500000500 02000000000 02000000000 02100000100 02300000300 02400000400 02500000500
Flexfield Description WidgetUnited StatesUSDPaid WidgetUnited StatesUSDPaid WidgetUnited StatesUSDUnder Negotiation WidgetAustraliaAUDPaid WidgetCanadaCNDPaid WidgetMexicoMXPPaid MegabuUnited StatesUSDPaid MegabuUnited StatesUSDPaid MegabuIraqIQDPaid MegabuAustraliaAUDPaid MegabuCanadaCNDPaid MegabuMexicoMXPPaid
Note: Line numbers listed above are for explanation purposes only and do not appear in report output. Report Writing Steps Step 1 Define your Before Report Trigger SRW.USER_EXIT(FND SRWINIT);
8 41
Step 2
Step 3
Define your parameters Define the following parameters using the Data Model Painter. You use these parameters in the user exit calls and SQL statements.
Lexical Parameters Name P_CONC_REQUEST_ID P_FLEXDATA Data Type Number Character Width 15 600 Initial Value 0 Long string Notes Always create Cumulative width more than expected width required to hold data Contains structure number
P_STRUCT_NUM
Character
15
101
Table 8 7 (Page 1 of 1)
Step 4
Call FND FLEXSQL from your Before Report Trigger to populate P_FLEXDATA SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL OUTPUT=:P_FLEXDATA MODE=SELECT DISPLAY=ALL);
Step 5
8 42
SELECT &P_FLEXDATA C_FLEXDATA, CHART_OF_ACCOUNTS_ID C_NUM FROM CODE_COMBINATIONS_TABLE Please note the difference in the query from the queries earlier. This query contains one extra column C_NUM. You use this column to supply the structure number in the user exit FND FLEXIDVAL. When the report runs, the call to FND FLEXSQL fill in the lexical parameters. As a result the second query would look something like: SELECT (SEGMENT1||||SEGMENT2||||SEGMENT3|||| SEGMENT4) C_FLEXDATA, CHART_OF_ACCOUNTS_ID C_NUM FROM CODE_COMBINATIONS_TABLE Step 6 Create formula columns Now create columns C_FLEXFIELD and C_DESC_ALL (and any others your report uses) corresponding to the values and descriptions displayed in the report. They all are in group G_1. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters). Step 7 Populate segment values formula column To retrieve the concatenated flexfield segment values and description, you incorporate the AOL user exits in these columns. In the column definition of C_FLEXFIELD you incorporate the FND FLEXIDVAL call in the formula field. SRW.REFERENCE(:C_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:C_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA VALUE=:C_FLEXFIELD DISPLAY=ALL); RETURN(:C_FLEXFIELD); Step 8 Populate segment descriptions
8 43
To populate segment description use DESCRIPTION=C_DESC_ALL instead of VALUE=C_FLEXFIELD as in the previous step. The user exit call becomes: SRW.REFERENCE(:C_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:C_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA DESCRIPTION=:C_DESC_ALL DISPLAY=ALL); RETURN(:C_DESC_ALL); You have created parameters and columns that are containers of all the values to be displayed. Now, in the following steps, you create the layout to display these values on the report. Step 9 Create your default report layout First choose Default Layout to generate the default layout. Deselect C_FLEXDATA and C_NUM. Specify Label and reasonable Width for these columns.
Default Layout Column Settings Column C_FLEXFIELD C_DESC_ALL Table 8 8 (Page 1 of 1) Label Accounting Flexfield Flexfield Description Width 30 50
Oracle Reports takes you to the layout painter. Generate and run the report.
8 44
Report Summary
Lexical Parameters
P_CONC_REQUEST_ID P_FLEXDATA
FND User Exits FND FLEXIDVAL FND FLEXSQL FND SRWINIT FND SRWEXIT
Table 8 9 (Page 1 of 1)
8 45
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
< Foreign Currency General Ledger Date: 14AUG1991 | Period: DEC90 Page: 1 Region 1 | < | Company: 01 Widget Corporation Region 2 | Accounting Flexfield CompanyCountryCurrencyStatus | < 01000000000 WidgetUnited StatesUSDPaid | 01000000000 WidgetUnited StatesUSDPaid Region 3 01000000000 WidgetUnited StatesUSDPaid | 01000000002 WidgetUnited StatesUSDUnder | Negotiation | 01100000100 WidgetIraqIQDPaid | 01300000300 WidgetAustraliaAUDPaid | 01400000400 WidgetCanadaCNDPaid | 01500000500 WidgetMexicoMXPPaid | <
Note: Line numbers listed above are for explanation purposes only and do not appear in report output.
8 46
Sample Layout
Figure 8 4
< | ******************** Foreign Currency General Ledger Date: ********* Report Currency: **** Period: ******** Page: ** Group | < < *: * * | Group 1 | | Accounting Flexfield ********************************** | < **************************** ********************************** <Group 2
Note: *s indicate displayed fields. Report Writing Steps Step 1 Define your Before Report Trigger SRW.USER_EXIT(FND SRWINIT); Step 2 Define your After Report Trigger SRW.USER_EXIT(FND SRWEXIT); Step 3 Define your parameters Define the following parameters using the Data Model Painter. You use these parameters in the user exit calls and SQL statements.
8 47
Lexical Parameters Name P_CONC_REQUEST_ID P_FLEXDATA Data Type Number Character Width 15 600 Initial Value 0 Long string Notes Always create Cumulative width more than expected width required to hold the data Contains structure number (4)
P_STRUCT_NUM P_WHERE
Character Character
15 200
P_ORDERBY
Character
298
(5)
P_OPERAND1
Character
15
Used to construct the P_WHERE parameter Use in the report header Use in the report header Use in the report header
P_SET_OF_BOOKS
Character
P_CURRENCY P_PERIOD
Character Character
Table 8 10
(Page 1 of 1)
Note (4): This parameter contains the WHERE clause in the SELECT statement to enforce condition(s) on the data retrieved from the database. The initial value is used to check the validity of query containing this parameter. Note (5): This parameter contains the ORDER BY clause for the SELECT statement that orders the display of flexfield data. The initial value is used to check the validity of query containing this parameter.
8 48
Step 4
Call FND FLEXSQL from your Before Report Trigger to populate P_FLEXDATA SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL OUTPUT=:P_FLEXDATA MODE=SELECT DISPLAY=ALL);
Step 5
Call FND FLEXSQL from your Before Report Trigger to populate P_WHERE The second call populates the value of lexical P_WHERE to the restriction you wish to apply at run time. You wish this parameter to contain the value (SEGMENT1 = 01) if GL_BALANCING segment is segment 1 and value of P_OPERAND1 is 01. SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL OUTPUT=:P_WHERE MODE=WHERE DISPLAY=GL_BALANCING OPERATOR== OPERAND1=:P_OPERAND1);
Step 6
Call FND FLEXSQL from your Before Report Trigger to populate P_ORDERBY The third call changes the value of lexical P_ORDERBY to the SQL fragment (for example to SEGMENT3, SEGMENT2, SEGMENT4, SEGMENT1) at run time. When this lexical parameter is incorporated into the ORDER BY clause of a query, it enables the query to order by flexfield segments. The user exit call is same as first one except for MODE=ORDER BY as follows: SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL#
8 49
NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL OUTPUT=P_ORDER_FLEX MODE=ORDER BY DISPLAY=ALL); Step 7 Define your report queries Define your report queries Q_1 and Q_2: SELECT &P_FLEXDATA C_FLEXDATA_H [, NORMALCOLUMNS...] FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = &P_STRUCT_NUM AND ROWNUM < 2 SELECT &P_FLEXDATA C_FLEXDATA [, NORMALCOLUMNS...] FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = &P_STRUCT_NUM ORDER BY &P_ORDERBY The first query fetches the data required for region 2 and the second one for region 3. Note: ROWNUM < 2 because we want only one record in that region. When the report runs, the three calls to FND FLEXSQL fill in the lexical parameters. As a result the second query would look something like: SELECT (SEGMENT1||||SEGMENT2||||SEGMENT3|||| SEGMENT4) C_FLEXDATA, NORMALCOLUMNS... FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = 101 ORDER BY SEGMENT3, SEGMENT2, SEGMENT4, SEGMENT1
8 50
Step 8
Create formula columns Now create columns corresponding to the values displayed in Region 2. They all are in group G_1. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters). First create column C_BAL_LPROMPT (for columns corresponding to Company in the sample output). In this column incorporate FND FLEXIDVAL calls in the formula field. You pass the concatenated segments along with other information to the user exit: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA_H); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_H LPROMPT=:C_BAL_PROMPT DISPLAY=GL_BALANCING); RETURN(:C_BAL_LPROMPT); The user exit populates Company in the column C_BAL_LPROMPT. Similarly create columns C_BAL_VAL and C_BAL_DESC (displaying 01 and Widget Corporation) with the following calls. C_BAL_VAL: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA_H); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_H VALUE=:C_BAL_VAL DISPLAY=GL_BALANCING); RETURN(:C_BAL_VAL); C_BAL_DESC: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA_H); SRW.USER_EXIT(FND FLEXIDVAL
8 51
CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_H DESCRIPTION=:C_BAL_VAL DISPLAY=GL_BALANCING); RETURN(:C_BAL_DESC); Create the above prompt (displaying CompanyCountryCurrencyStatus) in the sample output by the following call. SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA_H); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_H APROMPT=:C_APROMPT DISPLAY=GL_BALANCING); RETURN(:C_APROMPT); Step 9 Create formula columns Now you construct columns corresponding to the region 3 of the report. All columns now correspond to G_2. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters). You create formula columns C_FLEXFIELD and C_DESC_ALL to display concatenated segment values and description respectively. Step 10 Populate segment values formula column To retrieve the concatenated flexfield segment values and description, you incorporate the AOL user exits in these columns. In the column definition of C_FLEXFIELD, you call the user exit FND FLEXIDVAL in the formula field. SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL
8 52
DATA=:C_FLEXDATA VALUE=:C_FLEXFIELD DISPLAY=ALL); RETURN(:C_FLEXFIELD); Step 11 Populate segment descriptions To populate segment description use DESCRIPTION=C_DESC_ALL instead of VALUE=C_FLEXFIELD as in the previous step. The user exit call becomes: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA DESCRIPTION=:C_DESC_ALL DISPLAY=ALL); RETURN(:C_DESC_ALL); You have created parameters and columns that are containers of all the values to be displayed. Now, in the following steps, you create the layout to display these values on the report. Step 12 Create your default report layout First choose Default Layout to generate the default layout. Deselect C_FLEXDATA, C_FLEXDATA_H. Specify reasonable widths for these columns.
Default Layout Column Settings Column C_FLEXFIELD C_DESC_ALL C_APROMPT C_BAL_DESC Table 8 11 (Page 1 of 2) Label Accounting Flexfield Flexfield Description Width 30 50 100 40
8 53
Oracle Reports takes you to the layout painter. Before modifying the default layout in the painter, you may want to generate and run the report with the current layout to test the previous steps. Step 13 Finish your report Now you modify the default locations of the fields and create new fields in the layout painter. First [SELECT ALL] and move all the fields to the desired location as shown in the Region 2 & 3. You modify fields to display Company, 01 and Widget Corporation in the Group 1 (region 2). As shown in the Sample Layout, modify F_BAL_LPROMPT, F_BAL_VAL and F_BAL_DESC fields so that they are side by side with the unit length. Specify Horizontal Sizing as Variable. This ensures that the fields always be apart by fixed amount and adjust due to their variable sizing. Sources of these fields are C_BAL_LPROMPT, C_BAL_VAL and C_BAL_DESC respectively. Resize and move the field F_APROMPT as shown in the sample layout to display above prompt as displayed in the sample output. Add all the boilerplate text Accounting Flexfield, underline below and above the above prompt. In this step you build the layout for Region 1. At the top of report, Foreign Currency General Ledger is a boiler plate that can be added using layout painter. Currency: and Period: are also Boiler plates and the corresponding fields (CND and DEC90) are filled by lexical input parameters P_CURRENCY, P_PERIOD. Set of Books 2 is filled by input lexical parameter P_SET_OF_BOOKS. Similarly, the Date and Page fields are filled by system parameters Current Date and Logical Page Number. Enter in the Field Definition property sheet of F_FLEXFIELD and specify Vertical Sizing as Variable. This ensures that when the data is larger than the field width, the value wraps and it is not truncated. This can be seen in the descriptions of flexfield values in lines 15 and 16 of the sample output.
8 54
Report Summary
Lexical Parameters
P_CONC_REQUEST_ID P_FLEXDATA P_CURRENCY P_OPERAND1 P_ORDERBY P_PERIOD P_SET_OF_BOOKS P_STRUCT_NUM P_WHERE Table 8 12 (Page 1 of 1)
FND User Exits FND FLEXIDVAL FND FLEXSQL FND SRWINIT FND SRWEXIT
8 55
8 56
Sample Output
Figure 8 5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
< Foreign Currency General Ledger Date: 14AUG1991 | Period: DEC90 Page: 1 Region 1 | < | Company: 01 Widget Corporation Region 2 | Accounting Flexfield CompanyCountryCurrencyStatus | < 01000000000 WidgetUnited StatesUSDPaid | 01000000000 WidgetUnited StatesUSDPaid Region 3 01000000000 WidgetUnited StatesUSDPaid | 01000000002 WidgetUnited StatesUSDUnder | Negotiation | 01100000100 WidgetIraqIQDPaid | 01300000300 WidgetAustraliaAUDPaid | 01400000400 WidgetCanadaCNDPaid | 01500000500 WidgetMexicoMXPPaid | | | | < Company: 02 Megabucks Chase Region 2 | Accounting Flexfield CompanyCountryCurrencyStatus | < 02000000000 MegabuUnited StatesUSDPaid | 02000000000 MegabuUnited StatesUSDPaid Region 3 02100000100 MegabuIraqIQDPaid | 02300000300 MegabuAustraliaAUDPaid | 02400000400 MegabuCanadaCNDPaid | 02500000500 MegabuMexicoMXPPaid | <
Note: Line numbers listed above are for explanation purposes only and do not appear in report output.
8 57
Sample Layout Same as sample layout in the Tabular Report Report Writing Steps Step 1 Define your Before Report Trigger SRW.USER_EXIT(FND SRWINIT); Step 2 Define your After Report Trigger SRW.USER_EXIT(FND SRWEXIT); Step 3 Define your parameters Define the following parameters using the Data Model Painter. You use these parameters in the user exit calls and SQL statements.
Lexical Parameters Name P_CONC_REQUEST_ID P_FLEXDATA Data Type Number Character Width 15 600 Initial Value 0 Long string Notes Always create Initial value is some string that contains columns with cumulative width more than expected width required to hold the data Contains structure number Used to construct WHERE clause Used to construct ORDER BY clause
P_STRUCT_NUM P_WHERE
Character Character
15 200
P_ORDERBY
Character
298
P_OPERAND1
Character
15
8 58
Lexical Parameters P_COMPANY P_SET_OF_BOOKS Character Character 300 Obtain from GL 15 Obtain from GL Long string Use to construct SELECT clause Use in the report header Use in the report header Use in the report header
P_CURRENCY P_PERIOD
Character Character
Step 4
Build query parameters Now you build parameters for three queries. The first query Q_COMPANY retrieves all the companies. The second query Q_MASTER fetches one record of flexfield data for each company to build company left prompt, above prompts, etc. Thus the first two queries are used to build the master record. The third query fetches all the flexfield data for each company. First you populate all the parameters to be used in the first query for getting all the companies (Q_COMPANY). Call FND FLEXSQL to populate P_COMPANY. Use this parameter to retrieve all the master records. SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL OUTPUT=:P_COMPANY MODE=SELECT DISPLAY=GL_BALANCING); The second call populates the value of lexical P_WHERE with the restriction you want to apply at run time. You want this parameter to contain the value (SEGMENT1 < 04) if GL_BALANCING segment is segment 1 and the value of P_OPERAND1 is 04. You call the user exit as follows:
8 59
SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL OUTPUT=:P_WHERE MODE=WHERE DISPLAY=GL_BALANCING OPERATOR=< OPERAND1=:P_OPERAND1); Step 5 Call FND FLEXSQL from your Before Report Trigger Next, you build all the parameters of the next two queries for obtaining flexfield data. You make two calls to FND FLEXSQL from the Before Report Trigger to specify the lexical parameters. Step 6 Call FND FLEXSQL from your Before Report Trigger to populate P_FLEXDATA SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL OUTPUT=:P_FLEXDATA MODE=SELECT DISPLAY=ALL); Step 7 Call FND FLEXSQL from your Before Report Trigger to populate P_ORDERBY The second call changes the value of lexical P_ORDERBY to the SQL fragment (for example to SEGMENT3, SEGMENT2, SEGMENT4, SEGMENT1) at run time. When this lexical parameter is incorporated into the ORDER BY clause of a query, it enables the query to order by flexfield segments. The FLEXSQL call is the same as the first one except for MODE=ORDER BY as follows: SRW.REFERENCE(:P_STRUCT_NUM); SRW.USER_EXIT(FND FLEXSQL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL
8 60
OUTPUT=:P_ORDERBY MODE=ORDER BY DISPLAY=ALL); Step 8 Define your report queries Then you define your reports first master query (Q_COMPANY) to fetch all the different companies. SELECT DISTINCT &P_COMPANY C_MASTER FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = &P_STRUCT_NUM AND &P_WHERE When the report runs, the two calls to FND FLEXSQL fill in the lexical parameters to look something like: SELECT DISTINCT (SEGMENT1) C_MASTER FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = 101 AND SEGMENT1 < 04 The second master query (Q_MASTER) fetches one record of flexfield data for each company to build company left prompt and description. It is also used for constructing the above prompt for displaying concatenated flexfield value descriptions retrieved in the detail query. SELECT &P_COMPANY C_MASTER2, &P_FLEXDATA C_FLEXDATA_MASTER FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = &P_STRUCT_NUM AND &P_COMPANY = :C_MASTER AND ROWNUM < 2 This query has G_COMPANY as its parent group. You use ROWNUM < 2 because you want only one record in that region. You use the parentchild relationship AND &P_COMPANY = :C_MASTER within your query, instead of using link, so that Oracle Reports can recognize that the columns specified by your parameters
8 61
are related. You create an empty link to G_COMPANY to make G_COMPANY the parent group. Now you define your reports detail query (Q_FLEX): SELECT &P_COMPANY C_DETAIL, &P_FLEXDATA C_FLEXDATA [, NORMALCOLUMNS...] FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = &P_STRUCT_NUM AND &P_COMPANY = :C_MASTER ORDER BY &P_ORDERBY When the report runs, the two calls to FND FLEXSQL fill in the lexical parameters to look something like: SELECT (SEGMENT1) C_DETAIL, (SEGMENT1||||SEGMENT2||||SEGMENT3|||| SEGMENT4) C_FLEXDATA [, NORMALCOLUMNS...] FROM CODE_COMBINATIONS_TABLE WHERE CODE_COMBINATIONS_TABLE.STRUCTURE_DEFINING_COLUMN = 101 AND (SEGMENT1) = :C_MASTER ORDER BY SEGMENT3, SEGMENT2, SEGMENT4, SEGMENT1 This query has G_MASTER as its parent group. Step 9 Create Region 2 formula columns Now create columns corresponding to the values displayed in Region 2. They all are in Q_MASTER group. To retrieve the flexfield segment value, left prompt and description, you incorporate FLEXIDVAL in the corresponding columns. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters). First create column C_BAL_LPROMPT (for columns corresponding to Company in the sample output). In this column incorporate FND FLEXIDVAL calls in the formula field. SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA_MASTER); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL#
8 62
NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_MASTER LPROMPT=:C_BAL_LPROMPT DISPLAY=GL_BALANCING); RETURN(:C_BAL_LPROMPT); The user exit populates Company in the column C_BAL_LPROMPT. Similarly, you create columns C_BAL_DESC (displaying Widget Corporation) with the following call: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA_MASTER); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_MASTER DESCRIPTION=:C_BAL_DESC DISPLAY=GL_BALANCING); RETURN(:C_BAL_DESC); Create the above prompt (CompanyCountryCurrencyStatus) in the sample output by the following call: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA_MASTER); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_MASTER APROMPT=:C_APROMPT DISPLAY=GL_BALANCING); RETURN(:C_APROMPT); You construct columns corresponding to the region 3 of the report in the next few steps. Step 10 Create formula columns You create formula columns C_FLEXFIELD and C_DESC_ALL to display concatenated segment values and description respectively.
8 63
These columns have same group as C_FLEXDATA. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters). Step 11 Populate segment values formula column To retrieve the concatenated flexfield segment values and description, you incorporate the AOL user exits in these columns. In the column definition of C_FLEXFIELD incorporate AOL user exit (FND FLEXIDVAL) call in the formula field. SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA VALUE=:C_FLEXFIELD DISPLAY=ALL); RETURN(:C_FLEXFIELD); Step 12 Populate segment descriptions To populate segment descriptions use DESCRIPTION=C_DESC_ALL instead of VALUE=C_FLEXFIELD as in the previous step. The user exit call becomes: SRW.REFERENCE(:P_STRUCT_NUM); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:P_STRUCT_NUM APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA DESCRIPTION=:C_DESC_ALL DISPLAY=ALL); RETURN(:C_DESC_ALL); You have created parameters and columns that are containers of all the values to be displayed. Now, in the following steps, you create the layout to display these values on the report. Step 13 Create your default report layout
8 64
First choose Default Layout to generate the default layout. Deselect group G_COMPANY and columns C_FLEXDATA_MASTER, C_DETAIL, C_FLEXDATA. Delete all the labels of C_BAL_LPROMPT, C_MASTER2, C_BAL_DESC, C_APROMPT as these labels are not required. Specify reasonable widths for these columns.
Default Layout Column Settings Column C_FLEXFIELD C_DESC_ALL C_APROMPT C_BAL_DESC C_BAL_LPROMPT C_MASTER2 Table 8 13 (Page 1 of 1) Label Accounting Flexfield Flexfield Description Width 30 50 100 40 20 4
Oracle Reports takes you to the layout painter. Before modifying the default layout in the painter, you may want to generate and run the report with the current layout to test the previous steps. Step 14 Finish your report Now you modify the default locations of the fields and create new fields in the layout painter. First [SELECT ALL] and move all fields to the desired location as shown in the sample layout of Regions 2 and 3. Remove M_MASTER_HDR. Enlarge M_MASTER_GRPFR (that is the header and group frames for Master) by three lines so that it can contain boiler plate text Accounting Flexfield and the underline. Resize and move the field F_APROMPT as shown in the sample layout to display above prompt as displayed in the sample output. Add all the boiler plate text Accounting Flexfield, underline below and underling below the above prompt. You modify fields to display Company, 01 and Widget Corporation in the Group 1 (region 2). As shown in the Sample Layout, modify F_BAL_LPROMPT, F_MASTER2 and F_BAL_DESC fields so that they are side by side with the unit length. Specify Horizontal Sizing as Variable. This ensures that the fields always
8 65
be apart by fixed amount and adjust due to their variable sizing. Sources of these fields are C_BAL_LPROMPT, C_MASTER2 and C_BAL_DESC respectively. In this step you build the layout for Region 1. At the top of report, Foreign Currency General Ledger is a boiler plate that can be added using layout painter. Currency: and Period: are also Boiler plate and the corresponding fields (CND and DEC90) are filled by lexical input parameters P_CURRENCY, P_PERIOD. Set of Books 2 is filled by input lexical parameter P_SET_OF_BOOKS. Similarly, the Date and Page fields are filled by system parameters Current Date and Logical Page Number. Enter the Field Definition property sheet of F_FLEXFIELD and specify Vertical Sizing as Variable. This ensures that when the data is larger than the field width, the value wraps and it is not truncated. This can be seen in the description of flexfield value in line 15 of the sample output.
Report Summary
Lexical Parameters
P_CONC_REQUEST_ID P_FLEXDATA P_CURRENCY P_OPERAND1 P_ORDERBY P_PERIOD P_SET_OF_BOOKS P_COMPANY P_STRUCT_NUM P_WHERE
Columns C_APROMPT C_BAL_DESC C_BAL_LPROMPT C_BAL_VAL C_DESC_ALL C_FLEXDATA C_FLEXDATA_MASTER C_DETAIL C_FLEXFIELD C_MASTER C_MASTER2
FND User Exits FND FLEXIDVAL FND FLEXSQL FND SRWINIT FND SRWEXIT
Table 8 14 (Page 1 of 1)
8 66
Lexical Parameters Name P_CONC_REQUEST_ID P_FLEXDATA Data Type Number Character Width 15 6000 Initial Value 0 Very long string Notes Always create Cumulative width more than expected width required to hold the data Contains structure number Used to construct WHERE clause
P_STRUCT_NUM P_WHERE
Character Character
15 200
8 67
Lexical Parameters P_ORDERBY Character 16000 Valid ORDER BY clause Used to construct ORDER BY clause
P_OPERAND1
Character
15
Used to construct the P_WHERE parameter Very long string Use in the report header Use in the report header Use in the report header
P_COMPANY
Character
16000
P_SET_OF_BOOKS
Character
P_CURRENCY P_PERIOD
Character Character
P_ORDERBY and P_COMPANY are very long strings because they contain long DECODE statements for multiple structures. Step 4 Build query parameters Now you build parameters for three queries. First query Q_COMPANY retrieves all the companies, The second query Q_MASTER fetches one record of flexfield data for each company to build company left prompt, above prompts etc. Thus the first two queries are used to build the master record. The third query (Q_DETAIL) fetches all the flexfield data for each company. First you populate all the parameters to be used in the first query for getting all the companies (Q_COMPANY) . Call FND FLEXSQL to populate P_COMPANY. Use this parameter to retrieve all the master records. Call this user exit as follows SRW.USER_EXIT(FND FLEXSQL CODE=GL# MULTINUM=YES APPL_SHORT_NAME=SQLGL OUTPUT=:P_COMPANY
8 68
MODE=SELECT DISPLAY=GL_BALANCING);
Step 5
Call FND FLEXSQL from your Before Report Trigger Next, you build all the parameters of the next two queries for obtaining flexfield data. You make two calls to FND FLEXSQL from the Before Report Trigger specifying the lexical parameters.
Step 6
Call FND FLEXSQL from your Before Report Trigger to populate P_FLEXDATA SRW.USER_EXIT(FND FLEXSQL CODE=GL# MULTINUM=YES APPL_SHORT_NAME=SQLGL OUTPUT=:P_FLEXDATA MODE=SELECT DISPLAY=ALL);
Step 7
Call FND FLEXSQL from your Before Report Trigger to populate P_ORDERBY The second call changes the value of lexical P_ORDERBY to the SQL fragment (for example to SEGMENT3, SEGMENT2, SEGMENT4, SEGMENT1) at run time. When this lexical parameter is incorporated into the ORDER BY clause of a query, it enables the query to order by flexfield segments. The AOL call is same as first one except for MODE=ORDER BY as follows: SRW.USER_EXIT(FND FLEXSQL CODE=GL# MULTINUM=YES APPL_SHORT_NAME=SQLGL OUTPUT=:P_ORDERBY MODE=ORDER BY DISPLAY=ALL);
Step 8
Define your report queries Define your reports first query (Q_COMPANY) to fetch all the different companies and flexfield structure numbers.
8 69
SELECT DISTINCT &P_COMPANY C_MASTER, CHART_OF_ACCOUNTS_ID C_NUM_C FROM CODE_COMBINATIONS_TABLE Please note the difference in the query from the queries earlier. This query contains one extra column C_NUM_C. You use this column to supply the structure number in the user exit FND FLEXIDVAL. When the report runs, the call to FND FLEXSQL fills in the lexical parameter to look something like: SELECT DISTINCT (SEGMENT1) C_MASTER, CHART_OF_ACCOUNTS_ID C_NUM_C FROM CODE_COMBINATIONS_TABLE The second query (Q_MASTER) fetches one record of flexfield data for each company to build the company left prompt and description. It is also used for constructing the above prompt for displaying concatenated flexfield value descriptions retrieved in the detail query. SELECT &P_COMPANY C_MASTER2, STRUCTURE_DEFINING_COLUMN C_NUM_M, &P_FLEXDATA C_FLEXDATA_MASTER FROM CODE_COMBINATIONS_TABLE WHERE ROWNUM < 2 AND &P_COMPANY = :C_MASTER AND STRUCTURE_DEFINING_COLUMN = :C_NUM_C This query has Q_COMPANY as its parent group. You use ROWNUM < 2 because you want only one record in that region. You use the parentchild relationship AND &P_COMPANY = :C_MASTER within your query, instead of using link, so that Oracle Reports can recognize that the columns specified by your parameters are related. You create an empty link to G_COMPANY to make G_COMPANY the parent group. Now you define your report detail query (Q_FLEX): SELECT &P_COMPANY C_DETAIL, CHART_OF_ACCOUNTS_ID C_NUM_D, &P_FLEXDATA C_FLEXDATA [, NORMALCOLUMNS...] FROM CODE_COMBINATIONS_TABLE WHERE &P_COMPANY = :C_MASTER AND STRUCTURE_DEFINING_COLUMN = :C_NUM_C ORDER BY &P_ORDERBY
8 70
When the report runs, the four calls to FND FLEXSQL fill in the lexical parameters to look something like: SELECT (SEGMENT1) C_DETAIL, CHART_OF_ACCOUNTS_ID C_NUM_D (SEGMENT1||||SEGMENT2||||SEGMENT3|||| SEGMENT4) C_FLEXDATA [, NORMALCOLUMNS...] FROM CODE_COMBINATIONS_TABLE WHERE (SEGMENT1) = :C_MASTER AND STRUCTURE_DEFINING_COLUMN = :C_NUM_C ORDER BY SEGMENT3, SEGMENT2, SEGMENT4, SEGMENT1 This query has G_MASTER as its parent group. Step 9 Create Region 2 formula columns Now create columns corresponding to the values displayed in Region 2. They all are in Q_MASTER group. To retrieve the flexfield segment value, left prompt and description, you incorporate the AOL user exits in the corresponding columns. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters). First create column C_BAL_LPROMPT (for columns corresponding to Company in the sample output). In this column incorporate FND FLEXIDVAL calls in the formula field. You pass the concatenated segments along with other information to the user exit: SRW.REFERENCE(:C_NUM_M); SRW.REFERENCE(:C_FLEXDATA_MASTER); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:C_NUM_M APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_MASTER LPROMPT=:C_BAL_LPROMPT DISPLAY=GL_BALANCING); RETURN(:C_BAL_LPROMPT); The user exit populates Company in the column C_BAL_LPROMPT. Similarly create columns C_BAL_DESC (displaying Widget Corporation) with the following calls:
8 71
SRW.REFERENCE(:C_NUM_M); SRW.REFERENCE(:C_FLEXDATA_MASTER); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:C_NUM_M APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_MASTER DESCRIPTION=:C_BAL_DESC DISPLAY=GL_BALANCING); RETURN(:C_BAL_DESC); Create the above prompt (CompanyCountryCurrencyStatus) in the sample output by the following call: SRW.REFERENCE(:C_NUM_M); SRW.REFERENCE(:C_FLEXDATA_MASTER); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:C_NUM_M APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA_MASTER APROMPT=:C_APROMPT DISPLAY=GL_BALANCING); RETURN(:C_APROMPT); You construct columns corresponding to the region 3 of the report in the following steps. Step 10 Create formula columns Create formula columns C_FLEXFIELD and C_DESC_ALL to display concatenated segment values and description respectively. These columns have same group (G_DETAIL) as C_FLEXDATA. Be sure to adjust the column width as appropriate for the value the column holds (such as a prompt, which might be as long as 30 characters). Step 11 Populate segment values formula column To retrieve the concatenated flexfield segment values and description, you incorporate the AOL user exits in these columns. In the column definition of C_FLEXFIELD incorporate AOL user exit (FND FLEXIDVAL) call in the formula field. SRW.REFERENCE(:C_NUM_D); SRW.REFERENCE(:C_FLEXDATA);
8 72
SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:C_NUM_D APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA VALUE=:C_FLEXFIELD DISPLAY=ALL); RETURN(:C_FLEXFIELD); Step 12 Populate segment descriptions To populate segment descriptions use DESCRIPTION=C_DESC_ALL instead of VALUE=C_FLEXFIELD as in the previous step. The user exit call becomes: SRW.REFERENCE(:C_NUM_D); SRW.REFERENCE(:C_FLEXDATA); SRW.USER_EXIT(FND FLEXIDVAL CODE=GL# NUM=:C_NUM_D APPL_SHORT_NAME=SQLGL DATA=:C_FLEXDATA DESCRIPTION=:C_DESC_ALL DISPLAY=ALL); RETURN(:C_DESC_ALL); You have created parameters and columns that are containers of all the values to be displayed. Now, in the following steps, you create the layout to display these values on the report. Step 13 Create your default report layout First choose Default Layout to generate the default layout. Deselect group G_COMPANY and columns C_FLEXDATA_MASTER, C_DETAIL, C_FLEXDATA. Delete all the labels of C_BAL_LPROMPT, C_MASTER2, C_BAL_DESC, C_APROMPT as these labels are not required. Specify reasonable widths for these columns.
Default Layout Column Settings Column C_FLEXFIELD Label Accounting Flexfield Width 30
8 73
Default Layout Column Settings C_DESC_ALL C_APROMPT C_BAL_DESC C_BAL_LPROMPT C_MASTER2 Table 8 15 (Page 2 of 2) Flexfield Description 50 100 40 20 4
Oracle Reports takes you to the layout painter. Before modifying the default layout in the painter, you may want to generate and run the report with the current layout to test the previous steps. Step 14 Finish your report Now you modify the default locations of the fields and create new fields in the layout painter. First [SELECT ALL] and move all fields to the desired location as shown in the sample layout of Regions 2 and 3. Remove M_MASTER_HDR. Enlarge M_MASTER_GRPFR (that is the header and group frames for Master) by three lines so that it can contain boiler plate text Accounting Flexfield and the underline. Resize and move the field F_APROMPT as shown in the sample layout to display above prompt as displayed in the sample output. Add all the boiler plate text Accounting Flexfield, underline below and underling below the above prompt. You modify fields to display Company, 01 and Widget Corporation in the Group 1 (region 2). As shown in the Sample Layout, modify F_BAL_LPROMPT, F_MASTER2 and F_BAL_DESC fields so that they are side by side with the unit length. Specify Horizontal Sizing as Variable. This ensures that the fields always be apart by a fixed amount and adjust due to their variable sizing. Sources of these fields are C_BAL_LPROMPT, C_MASTER2 and C_BAL_DESC respectively. In this step you build the layout for Region 1. At the top of report, Foreign Currency General Ledger is boilerplate that can be added using the layout painter. Currency: and Period: are also Boiler plates and the corresponding fields (CND and DEC90) are filled by lexical input parameters P_CURRENCY, P_PERIOD. Set of Books 2 is filled by input lexical parameter P_SET_OF_BOOKS. Similarly, the Date
8 74
and Page fields are filled by system parameters Current Date and Logical Page Number. Use the Field Definition property sheet of F_FLEXFIELD to specify Vertical Sizing as Variable. This ensures that when the data is larger than the field width, the value wraps and it is not truncated. This can be seen in the description of flexfield values in line 15 of the sample output.
Report Summary
Lexical Parameters
P_CONC_REQUEST_ID P_FLEXDATA P_CURRENCY P_OPERAND1 P_ORDERBY P_PERIOD P_SET_OF_BOOKS P_COMPANY P_STRUCT_NUM P_WHERE
Columns C_APROMPT C_BAL_DESC C_BAL_LPROMPT C_BAL_VAL C_DESC_ALL C_FLEXDATA C_FLEXDATA_MASTER C_DETAIL C_FLEXFIELD C_MASTER C_MASTER2 C_NUM_C C_NUM_M C_NUM_D
FND User Exits FND FLEXIDVAL FND FLEXSQL FND SRWINIT FND SRWEXIT
Table 8 16 (Page 1 of 1)
8 75
CHAPTER
91
92
segment number}] [INSERT={ALL | flexfield qualifier | segment number}] [DATA_FIELD=concatenated hidden IDs field] [DESC=block.concatenated description field name] [TITLE=window title] [VDATE=date] [NAVIGATE={Y|N}] [AUTOPICK={Y|N}] [NUM=:structure defining field] [COPY=:block.field\n{ALL | flexfield qualifier}] [VRULE=flexfield qualifier\n segment qualifier\n {I[nclude]|E[xclude]}\n APPL=shortname; NAME=Message Dictionary message name\n validation value1\n validation value2...] [VALATT=:block.field\n flexfield qualifier\n segment qualifier] [USEDBFLDS={Y|N}] [COLUMN={column1(n) | column1 alias(n) [, column2(n), ...]}] [WHERE=where clause] [SET=set number] [ALLOWNULLS={Y|N}] [QUERY_SECURITY={Y|N}] [QBE_IN={Y|N}] [LONGLIST={Y|N}] [NO_COMBMSG=MESG_NAME]
CODE
The flexfield code you specify when you set up this flexfield using the Register Key Flexfield form. This code must match the code you registered. The application short name with which your flexfield is registered. Use a validation type of FULL to validate all segment values and generate a new code combination and dynamically insert it into the combinations table when necessary. If you specify FULL, Oracle Application Object Library checks the values your user enters against the existing code combinations in the code combinations. If the
93
combination exists, Oracle Application Object Library retrieves the code combination ID. If the combination does not exist, Oracle Application Object Library creates the code combination ID and inserts the combination into the combinations table. If you (or an installer) define the flexfield structure with Dynamic Inserts Allowed set to No, then Oracle Application Object Library issues an error message when a user enters a combination that does not already exist. In this case, Oracle Application Object Library does not create the new code combination. FULL is the usual argument for a form with a foreign key reference. Use PARTIAL to validate each individual segment value but not create a new valid combination or check the combinations table for an existing combination. You would use PARTIAL when you want to have application logic that requires flexfield segment values but does not require an actual code combination. For example, Oracle Application Object Librarys Define Shorthand Aliases form requires that a user enters valid values for each segment, but does not require (or check) that the actual code combination already exists in the combinations table. The Define Shorthand Aliases form does not create the combination, either. Use NONE if you wish no validation. Use QUERY (not QUERY_BASE) for POPID in a FND_PRE_QUERY trigger. The default value is FULL. Use the same value in your LOADID and VALID as you use in your POPID in your KEY_PREFIELD trigger. Do not use FOR_INSERT for a form with a foreign key reference. If you wish to implement shorthand flexfield entry for your form with a foreign key reference, you must use FULL for POPID in your KEY_PREFIELD trigger (as well as LOADID and VALID). SEG block.concatenated values field name is a displayed, nondatabase form field that contains your concatenated segment values plus delimiters.
94
DERIVED
Use DERIVED to get the derived value of segment qualifiers for a combination that someone types in. Use block.field to specify the block and field you want Oracle Application Object Library to load the derived value into. Use Segment qualifier to specify the segment qualifier name you want. Note: do not put spaces around \n, and \n must be lowercase. Oracle Application Object Library uses the following rules to get the derived qualifier value from the individual segment qualifier values: if the segment qualifier is unique, the derived value is the segment qualifier value; for nonunique segment qualifiers, if any segments qualifier value = N, then the derived value is N, otherwise, the derived value is Y. The only exception to this rule is for the internal SUMMARY_FLAG segment qualifier; the rule for this is if any segment value is a parent, then the derived value of SUMMARY_FLAG is Y. Oracle Application Object Library loads derived values into the combinations table qualifier column that you specify when you define your qualifier. You do not need the three DERIVED=:block.SUMMARY_FLAG\n SUMMARY_FLAG, DERIVED=:block.START_DATE_ACTIVE\n START_DATE_ACTIVE, and DERIVED=:block. END_DATE_ACTIVE\nEND_DATE_ACTIVE parameters for a form with a foreign key reference.
READ_ONLY
This parameter prevents any updating of your flexfield, whether from shorthand alias, copy, or any other method. The DINSERT parameter turns dynamic inserts off or on for this form. You must set this parameter to N for flexfields within flexfields such as flexfields in a Special validation value set. Specify N if your flexfield contains only a single display segment and you want your users to type directly into the field, instead of into an invisible popup window.
DINSERT
WINDOW
95
ID
Specify the block.field that contains the unique ID for this flexfield. The default value is block.ID column name where block is the current block and ID column name is the Unique ID Column Name specified for this flexfield using the Register Key Flexfield form. Specify whether your user can exit the flexfield window without entering segment values. You should specify the same value for REQUIRED in your POPID, LOADID, and VALID triggers. You do not need the REQUIRED parameter for POPID in an FND_PRE_QUERY trigger. The default value is Y. If you specify Y, then Oracle Application Object Library prevents your user from leaving any required segment (a segment whose value set has Value Required set to Yes) without entering a valid value for that segment. Also, if your user tries to save a row without ever entering the flexfield popup window, VALID attempts to use default values to fill in any required segments and issues an error message if not all required segments can be filled. If you specify Y and VALIDATE=FULL, then when your user queries up a row with no associated flexfield (the foreign key flexfield ID column contains NULL), Oracle Application Object Library issues an error message to warn the user that a NULL ID has been returned for a required flexfield. The LOADID routine also returns failure. If you specify N, Oracle Application Object Library allows your user to save a row without ever entering the flexfield popup window. If you specify N, Oracle Application Object Library also lets your user navigate (without stopping) through a flexfield window without entering or changing any values. However, if a user enters or changes any segment value in the flexfield, Oracle Application Object Library prevents the user from leaving the flexfield window until all required segments contain valid values. If you specify N and a user does not open or enter values in the
REQUIRED
96
window, VALID allows the user to save the row whether the flexfield has required segments. In this case, VALID does not save default values as segment values for the required segments, and it does not issue an error message. If you specify N and VALIDATE=FULL, then when your user queries up a row with no associated flexfield (the foreign key flexfield ID column contains NULL), Oracle Application Object Library validates the individual segment values returned by the query. Specify N if you want to query up nonrequired flexfields without getting an error message. Note that even if REQUIRED=N, a user who starts entering segment values for this flexfield must either fill out the flexfield in full, or abandon the flexfield. DISPLAY The DISPLAY parameter allows you to display segments that represent specified flexfield qualifiers or specified segment numbers, where segment numbers are the order in which the segments appear in the flexfield window, not the segment number specified in the Define Key Segments form. For example, if you specify that you want to display only segment number 1, your flexfield displays only the first segment that would normally appear in the popup window (for the structure you specify in NUM). If you include the DISPLAY parameter in your POPID, you must include the DISPLAY parameter with the exact same argument in your LOADID and VALID calls. The default value for DISPLAY is ALL, which makes your flexfield display all segments. Alternatively, you can specify a flexfield qualifier name or a segment number. You can use DISPLAY as a toggle switch by specifying it more than once. For example, if you want your flexfield to display all but the first segment, you would specify:
97
DISPLAY=ALL DISPLAY=1
If you do not display all your segments, but you use default values to fill in your nondisplayed segments, you must also have hidden SEGMENT1 through SEGMENTn fields in your form. You need these hidden fields because Oracle Application Object Library writes the values for all displayed fields to the concatenated values field, but does not write the values for the nondisplayed defaulted fields. Since Oracle Application Object Library normally uses the values in the concatenated values field to update and insert to the database, the default values for the nondisplayed fields are not committed. However, if you have the extra hidden fields (similar to a combinations form), Oracle Application Object Library writes flexfield values to those fields as well as to the concatenated segment values field. The nondisplayed values are written only to the hidden fields, but are used to update and insert to the database. UPDATE INSERT The UPDATE / INSERT parameters determine whether your users can update or insert segments that represent specified unique flexfield qualifiers or segment numbers, where segment numbers are the order in which the segments appear in the flexfield window, not the segment number specified in the Define Key Segments form. You do not need the UPDATE and INSERT parameters for LOADID or VALID. The default value for each is ALL, which allows your user to update/insert all segments. Alternatively, you can specify a flexfield qualifier name or a segment number. You can enter UPDATE= or INSERT= to prevent your user from updating or inserting values for any segments. You can use these parameters as toggle switches by specifying them more than once. For example, if you want your user to be able to update all but the first segment, you would specify:
98
UPDATE=ALL UPDATE=1
If you use INSERT= to prevent your user from inserting values for any segments, Shorthand Flexfield Entry is disabled for that form. DATA_FIELD The concatenated hidden IDs field is a nondisplayed form field that contains the concatenated segment hidden IDs. block.concatenated description field name is a displayed, nondatabase, nonenterable field that contains concatenated descriptions of your segment values. If you do not specify the DESC parameter, Oracle Application Object Library does not display concatenated segment descriptions. window title appears at the top of the popup window. The default value is the Flexfield Name you specify when you set up this flexfield using the Define Key Segments form. date is the validation date against which the Start Date and End Date of individual segment values is checked. You enter a Start Date and End Date for each segment value you define using the Define Key Segment Values form. See: Define Segment Values: page 4 56. For example, if you want to check values against a date that has already passed (say, the closing date of an accounting period), you might specify that date as VDATE using a field reference (VDATE=:block.field) and compare your segment values against that date. The default value is the current date. NAVIGATE Specify Y if flexfields should automatically determine the navigation out of the flexfield popup window (that is, if your user exits the window by pressing [Next Field], then the cursor appears in the field after flexfield. Alternatively, if your user exits the flexfield by pressing [Previous Field], then the cursor appears in the field before the flexfield).
DESC
TITLE
VDATE
99
This value should be Y for POPID in a KEY_PREFIELD trigger, but is not needed for LOADID or VALID. Omit this argument for a POPID in an FND_PRE_QUERY trigger. The default value is N for backward compatibility. AUTOPICK Specify N if flexfields should not pop up a list of values window when a user enters an invalid value. You do not need the AUTOPICK parameter for LOADID or VALID. The default value is Y. NUM The nondisplayed database :block.field that holds the identification number of your flexfield structure. You may also specify :$PROFILES$.your_profile_option_name to retrieve a value you set in a user profile option. You can hardcode a structure number, such as 101, into this parameter instead of providing a field reference, but such a number prevents you from using multiple structures for your flexfield. You must use this option if you are using multiple structures. You can use the following SQL statement to retrieve the structure identification numbers for your flexfield:
SELECT ID_FLEX_NUM, ID_FLEX_STRUCTURE_NAME FROM FND_ID_FLEX_STRUCTURES WHERE ID_FLEX_CODE = flexfield code;
where flexfield code is the code you specify when you register your flexfield. The default value for NUM is 101. COPY Copies a nonnull value from :block.field into the segment representing the specified flexfield qualifier or segment number before the flexfield window pops up. Alternatively, if you specify ALL, COPY copies a set of nonnull, concatenated set of segment values (and their segment separators) that you have in :block.field into all of your segments. For example, if you have a threesegment flexfield, and your :block.field contains 001.ABC.05, COPY puts 001 into the first segment, ABC into the second segment, and 05 into the third segment.
9 10
The value you COPY into a segment must be a valid value for that segment. The value you COPY overrides any default value you set for your segment(s) using the Define Key Segments form. However, shorthand flexfield entry values override COPY values. COPY does not copy a NULL value over an existing (default) value. However, if the value you copy is not a valid value for that segment, it gives the appearance of overriding a default value with a NULL value: the invalid value overrides the default value, but Oracle Application Object Library then erases the copied value because it is invalid. You should ensure that the field you copy from contains valid values. When the flexfield window closes, Oracle Application Object Library automatically copies the value in the segment representing the specified flexfield qualifier or segment number into :block.field. Alternatively, if you specify ALL, Oracle Application Object Library automatically copies the concatenated values of all your segments into :block.field. You can specify one or more COPY parameters. Later COPY parameters override earlier COPY parameters. For example, assume you have a field that holds concatenated flexfield values, called Concatenated_field, and it holds the string 01ABC680. You also have a field, Value_field, that holds a single value that you want to copy into your second segment, and it holds the value XYZ. You specify:
COPY=block.Concatenated_field\nALL COPY=block.Value_field\n2
When your user opens the flexfield window, Oracle Application Object Library executes the two COPY parameters in order, and your user sees the values in the window as:
01 XYZ 680
After the flexfield window closes, Oracle Application Object Library copies the values back
9 11
into the two fields as 01XYZ680 and XYZ respectively. Note that XYZ overrides ABC in this case. You do not need the COPY parameter for LOADID or VALID, or in POPID in an FND_PRE_QUERY. The delimiter \n must be lowercase. VRULE Use VRULE to put extra restrictions on what values a user can enter in a flexfield segment based on the values of segment qualifiers (which are attached to individual segment values). You can specify the name of a flexfield qualifier and a segment qualifier, whether to Include or Exclude the validation values, and the Message Dictionary message name for the message Oracle Application Object Library displays if the user enters an improper value. The delimiter \n must be lowercase. For example, suppose you build a form where you want to prevent your users from entering segment values for which detail posting is not allowed into all segments of Oracle General Ledgers Accounting Flexfield. DETAIL_POSTING_ALLOWED is the segment qualifier, based on the global flexfield qualifier GL_GLOBAL, that you want to use in your rule. You want to exclude all values where the value of DETAIL_POSTING_ALLOWED is N (No). Your message name is GL Detail Posting Not Allowed, and it corresponds to a message that says you cannot use values for which detail posting is not allowed. You would specify your rule as:
VRULE=GL_GLOBAL\nDETAIL_POSTING_ALLOWED\nE \nNAME=GL Detail Posting Not Allowed\nN
When your user enters an excluded value in one of the segments affected by this qualifier, your user gets the message you specify. In addition, the excluded values do not appear in the Lists of Values on your segments. All other values, not being specifically excluded, are included. You can specify one or more VRULE parameters. Oracle Application Object Library checks multiple VRULE parameters bottomup relative to the order
9 12
you list them. You should order your rules carefully so that your user sees the most useful error message first. VALATT VALATT copies the segment qualifier value of the segment representing the unique flexfield qualifier into :block.field when the flexfield window closes. The delimiter \n must be lowercase. Include the same value for the VALATT parameter in your POPID (KEY_PREFIELD), LOADID, and VALID. You do not need this parameter in POPID in FND_PRE_QUERY. USEDBFLDS Specify this parameter if your form is based on a table that has foreign key references to two or more flexfields, and if you have nondatabase SEGMENT1 through N fields on your form (where N is the number of segments in your combinations table). If such fields exist, Oracle Application Object Library by default will load values into them that correspond to the combination of segment values in the current flexfield. If you set this parameter to N, Oracle Application Object Library will not load the segment fields for the current flexfield. If you have more than one flexfield on your form, use this parameter to specify which one should use the segment fields (specify Y for one flexfields routine calls, and specify N for other flexfields routine calls). The default value is Y. Use COLUMN to display other columns from the combinations table in addition to the current segment columns, where n is the display width of the column. You can place the values of the other columns into fields on the current form. The value is automatically copied into the field when the user selects an existing flexfield. For example, to display a description column called SEG_DESC and an error message from E_FLAG with the column headings DESCRIPTION and ERROR FLAG, you could set COLUMN=SEG_DESC DESCRIPTION(15), E_FLAG \ERROR FLAG \(*). The (*) sets a dynamic column width, with the size determined
COLUMN
9 13
by the value selected. If you wanted to place the description into the field block_1.field_1 and the error message into block_1.field_2, you would set COLUMN=SEG_DESC DESCRIPTION(15) INTO BLOCK_1.FIELD_1, E_FLAG \ ERROR FLAG \(*) into BLOCK1_FIELD_2 You may only use 32 distinct INTO columns in your COLUMN= clause. Your maximum width for additional columns is 240 characters. WHERE Specify a WHERE clause to customize which code combinations to display in the combinationlevel List of Values popup window. Normally, the List of Values displays a combinationlevel List of Values of all current valid combinations, instead of a singlesegment List of Values, when the validation type of the segments value set is NONE. This argument also prevents a user from selecting a combination that does not fit the WHERE clause. In the case of a singlesegment flexfield where the segment uses a validated value set, this may have the effect that a user will initially see all values in the List of Values (the segmentlevel List of Values), but then will get an error message if the value chosen is not already an existing combination (as well as being a valid individual segment value) if dynamic inserts are not allowed. You should use this token with flexfields that do not allow dynamic inserts, either using DINSERTS=N or preventing dynamic inserts at the structure level. Do not specify the word WHERE in this where clause argument. SET Specify the :block.field that holds the set identifier for your flexfield. SET specifies which set of code combinations to use for this flexfield. For each flexfield structure, you can divide code combinations in your combinations table into sets (for example, parts with high prices, medium prices, and low prices). You can only use SET if you implement a structure defining column (that is, you must specify NUM). The default for SET is your structure number (as specified in NUM). If
9 14
you use SET, your application must maintain a separate table that contains the correspondences between sets and key flexfield structures. For example, your correspondences table could contain values such as: If you use SET, Oracle Application Object Library stores the set number in the structure defining column instead of the structure number. Note that you cannot have duplicate set numbers in your correspondences table, though you can have more than one set number for a given structure number. You must derive SET and NUM from different :block.fields (or profile options, or hardcoded numbers) since they are distinctly different numbers. Structure 101 101 101 102 102 103 103 Set 1 2 3 4 5 6 7 Set Description Low priced truck parts Medium priced truck parts High priced truck parts Low priced car parts High priced car parts Low priced motorcycle parts High priced motorcycle parts
If you have a flexfield querybyexample POPID in a FND_PRE_QUERY trigger, you should add an extra step to copy the set number (SET) in addition to the step that copies the structure number (NUM). Specify the same value for SET in POPID, LOADID, and VALID. ALLOWNULLS Determines whether NULLs should be allowed into any segment. ALLOWNULLS overrides the value set definition (Value Required is Yes) for each segment only if you specify PARTIAL or NONE for the VALIDATE parameter. Determines whether flexfield value security applies to queries as well as inserts and updates. If you specify Y, your users cannot query up existing code combinations that contain restricted values. If you specify N, your users can query and look at code combinations containing restricted values. Users
QUERY_ SECURITY
9 15
can update the restricted values to nonrestricted values, but they cannot enter restricted values or update values to restricted values. The default value is N. This option has no effect unless your users have enabled and defined flexfield value security for your flexfields value sets (using the Define Value Sets form, the Define Flexfield Security Rule form, and the Assign Flexfield Security Rules form). Put this option in your LOADID call only. You do not need QUERY_SECURITY in POPID or VALID. QBE_IN Controls the type of subquery Oracle Application Object Library uses to select the desired rows in flexfield querybyexample. Use this option only in a POPID in an FND_PRE_QUERY trigger. Do not use in POPID in your KEY_PREFIELD trigger or in LOADID or VALID. The default value is N. If you specify N, Oracle Application Object Library generates a correlated subquery. This query is effectively processed once for each row returned by the main query (generated by the rest of the form), and it uses the code combination ID as a unique index. Choose N if you expect your main query to return a small number of rows and you expect your flexfield querybyexample to return many rows. If you specify Y, Oracle Application Object Library generates a noncorrelated subquery using the IN SQL clause. Oracle Application Object Library processes the query only once, but returns all the rows in your combinations table that match your flexfield querybyexample criteria. Choose Y when you expect your main query to return many rows and you expect your flexfield querybyexample to return a small number of rows (less than about 100). Such a condition usually corresponds to a small number of rows in the combinations table and many rows in the application table. For example, assume you have a Part Flexfield, where your company handles only a limited number of parts (say, 75), but you have
9 16
thousands of orders for your parts (and a correspondingly large Orders table). For this case, choosing Y would greatly improve your application performance on flexfield queriesbyexample. LONGLIST Specify Y or N to allow using LongList with this flexfield. LongList allows users to specify a partial value when querying a flexfield combination. If you wish to display your own message when a user enters an invalid combination, specify the message name here. Otherwise flexfields uses the standard Application Object Library Message.
NO_COMBMSG
9 17
CODE
The flexfield code you specify when you set up this flexfield using the Register Key Flexfield form. This code must match the code you registered. The application short name with which your flexfield is registered. Use a validation type of PARTIAL to validate each individual segment value a user enters. PARTIAL validation does not create a new valid combination or check the combinations table to determine if a code combination already exists. Use NONE if you wish no validation (this is the usual argument for a range flexfield). Do not use FULL or FOR_INSERT for a range flexfield. Use the same value in your LOADIDR and VALIDR as you use in your POPIDR.
REQUIRED
Specify whether your user can exit the flexfield window without entering a value. You should specify the same value for REQUIRED in both your POPIDR and VALIDR triggers. You do not need the REQUIRED parameter for LOADIDR. The default value is Y. Note: Even if REQUIRED=N, a user who starts entering segment values for this flexfield must either: a) fill out the flexfield in full, or b) abandon the flexfield.
DISPLAY
The DISPLAY parameter allows you to display segments that represent specified flexfield qualifiers or specified segment numbers, where segment numbers are the order in which the segments appear in the flexfield window, not the segment number specified in the Define Key Segments form. For example, if you specify that you want to display only segment number 1, your flexfield displays only the first segment that would normally appear in the popup window (for the structure you specify in NUM). If you include the DISPLAY parameter in your POPIDR, you must include the DISPLAY parameter with the exact same argument in your LOADIDR and VALIDR calls.
9 18
The default value for DISPLAY is ALL, which makes your flexfield display all segments. Alternatively, you can specify a flexfield qualifier name or a segment number. You can use DISPLAY as a toggle switch by specifying it more than once. For example, if you want your flexfield to display all but the first segment, you would specify:
DISPLAY=ALL DISPLAY=1
UPDATE INSERT
The UPDATE / INSERT parameters determine whether your users can update or insert segments that represent specified unique flexfield qualifiers or segment numbers, where segment numbers are the order in which the segments appear in the flexfield window, not the segment number specified in the Define Key Segments form. You do not need the UPDATE and INSERT parameters for LOADIDR or VALIDR. The default value for each is ALL, which allows your user to update/insert all segments. Alternatively, you can specify a flexfield qualifier name or a segment number. You can enter UPDATE= or INSERT= to prevent your user from updating or inserting values for any segments. You can use these parameters as toggle switches by specifying them more than once. For example, if you want your user to be able to update all but the first segment, you would specify:
UPDATE=ALL UPDATE=1
SEG
:block.concatenated values field name is a displayed, nondatabase form field that contains your concatenated segment values plus delimiters. If you do not specify the SEG parameter, Oracle Application Object Library does not display concatenated segment values. You do not need to specify _LOW and _HIGH, however, since Oracle Application Object Library adds the suffixes for you.
9 19
DESC
:block.concatenated description field name is a displayed, nondatabase, nonenterable field that contains concatenated descriptions of your segment values. If you do not specify the DESC parameter, Oracle Application Object Library does not display concatenated segment descriptions. You do not need to specify _LOW and _HIGH, however, since Oracle Application Object Library adds the suffixes for you. window title appears at the top of the popup window. The default value is the Flexfield Name you specify when you set up this flexfield using the Define Key Segments form. date is the date against which the Start Date and End Date of individual segment values is checked. You enter a Start Date and End Date for each segment value you define using the Define Key Segment Values form. For example, if you want to check values against a date that has already passed (say, the closing date of an accounting period), you might specify that date as VDATE using a field reference (VDATE=:block.field) and compare your segment values against that date. The default value is the current date.
TITLE
VDATE
NAVIGATE
Specify Y if flexfields should automatically determine the navigation out of the flexfield popup window (that is, if your user exits the window by pressing [Next Field], then the cursor appears in the field after the flexfield. Alternatively, if your user exits the flexfield by pressing [Previous Field], then the cursor appears in the field before the flexfield). This value should be Y for POPID, but is not needed for LOADID or VALID. The default value is N for backward compatibility.
AUTOPICK
Specify N if flexfields should not pop up a list of values window when a user enters an invalid value. You do not need the AUTOPICK parameter for LOADIDR or VALIDR. The default value is Y.
9 20
NUM
The nondisplayed database :block.field that holds the identification number of your flexfield structure. You may also specify :$PROFILES$.your_profile_option_name to retrieve a value you set in a user profile option. You can hardcode a structure number, such as 101, into this parameter instead of providing a field reference, but such a number prevents you from using multiple structures for your flexfield. You must use this option if you are using multiple structures. You can use the following SQL statement to retrieve the structure identification numbers for your flexfield:
SELECT ID_FLEX_NUM, ID_FLEX_STRUCTURE_NAME FROM FND_ID_FLEX_STRUCTURES WHERE ID_FLEX_CODE = flexfield code;
where flexfield code is the code you specify when you register your flexfield. The default value for NUM is 101. VRULE Use VRULE to put extra restrictions on what values a user can enter in a flexfield segment based on the values of segment qualifiers (which are attached to individual segment values). You can specify the name of a flexfield qualifier and a segment qualifier, whether to Include or Exclude the validation values, and the Message Dictionary message name for the message Oracle Application Object Library displays if the user enters an improper value. The delimiter \n must be lowercase. For example, suppose you build a form where you want to prevent your users from entering segment values for which detail posting is not allowed into all segments of Oracle General Ledgers Accounting Flexfield. DETAIL_POSTING_ALLOWED is the segment qualifier, based on the global flexfield qualifier GL_GLOBAL, that you want to use in your rule. You want to exclude all values where the value of DETAIL_POSTING_ALLOWED is N (No). Your message name is GL Detail Posting Not Allowed, and it corresponds to a message that
9 21
says you cannot use values for which detail posting is not allowed. You would specify your rule as:
VRULE=GL_GLOBAL\nDETAIL_POSTING_ALLOWED\nE \nNAME=GL Detail Posting Not Allowed\nN
When your user enters an excluded value in one of the segments affected by this qualifier, your user gets the message you specify. In addition, the excluded values do not appear in the Lists of Values on your segments. All other values, not being specifically excluded, are included. You can specify one or more VRULE parameters. Oracle Application Object Library checks multiple VRULE parameters bottomup relative to the order you list them. You should order your rules carefully so that your user sees the most useful error message first. ALLOWNULLS Determines whether NULLs should be allowed into any segment. ALLOWNULLS overrides the value set definition (Value Required is Yes) for each segment only if you specify PARTIAL or NONE for the VALIDATE parameter.
9 22
Figure 9 1
Run Reports
Report Parameters
Report Parameters
Type Part Number COM Computer
COM876LTN
Warning: You should never change or delete a predefined value set that Oracle Applications supply. Such changes may unpredictably affect the behavior of your application features such as reporting. You use the Special Validation Routines window of the Value Set form to define special user exit validation for a Special value set. You also use that region to define validation routines for a Pair value set.
9 23
When you define a special validation value set, you specify two things: an event and a function. The event is the time when your function occurs, and your function is your call to a key flexfield user exit. For example, the Validate event occurs once a user enters a value, and your function would validate that value. You can use a special validation value set to let your users enter an entire key flexfield combination within a single segment of a descriptive flexfield or report parameter. For example, you may want to pass concatenated key flexfield segments as a parameter to a report. With this type of value set, a user can enter the descriptive flexfield segment or report parameter and then see the normal behavior of a key flexfield, such as the key flexfield popup window and segment Lists of Values associated with that key flexfield. You can use Oracle Application Object Library flexfield routines to perform flexfield data entry and validation functions on segment values or report parameters. 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 popup 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. See: Value Set Windows: page 4 44 Key Flexfield Segments: page 2 17
9 24
9 25
ID field (a field that contains the code combination ID number) or data field (a field that contains the hidden ID numbers corresponding to the values of a value set that uses a hidden ID column). If you have a Load event, you must use :!ID (described below) with either an ID field or data field. Your user exit passes the contents of :!ID to your report or flexfield instead of the contents of :!VALUE (described below). Validate Calls your special validation routine whenever the users cursor leaves the segment or closes the popup window, or whenever a default value is copied into the segment or report parameter. The Validate event also fires after a query to generate value descriptions for queried values. You usually use VALID(R) for your Validate event. You must have a Validate event.
9 26
:!ID contains the actual value from the value column of your value set. For a foreign key flexfield where you are using the VALIDATE=FULL argument, you should use the ID=:!ID argument, and you should not use the DATA_FIELD=:!ID argument. If you are coding a foreign key flexfield where you are using the VALIDATE=PARTIAL (or NONE) argument, you should use the DATA_FIELD=:!ID argument and you must not use the ID=:!ID argument. Note that if you use the DATA_FIELD=:!ID argument for a key flexfield, you must ensure that the total length of the concatenated segments and their separators is less than 240 characters. You cannot use ID=:!ID with the #FND POPIDR, LOADIDR, or VALIDR routines for range flexfields, but you may use the DATA_FIELD=:!ID argument. If you have a Load event, you must use :!ID with either an ID field or data field. Your user exit passes the contents of :!ID to your report or flexfield instead of the contents of :!VALUE. :!VALUE You use :!VALUE to access the users input. :!VALUE refers to the displayed values that appear in the flexfield window and in the concatenated values field. :!VALUE contains the concatenated values for the flexfield your value set uses. If you do not specify a value for :!ID, then :!VALUE is passed to your report or stored in your segment column. If you have a Load event, you must use :!ID with either an ID field or data field. Your user exit passes the contents of :!ID to your report or flexfield instead of the contents of :!VALUE. :!MEANING You use :!MEANING to pass the concatenated descriptions of your flexfield values. The value description appears as usual next to the flexfield segment value and in the concatenated description field. If you are writing your own function, you should code your user exit to write the value description into :!MEANING. !DIR Use !DIR for the NAVIGATE argument of key and descriptive flexfields routines. !DIR allows the flexfields routines to determine the proper navigation direction when you use a flexfield as a segment value set.
9 27
Do not use a colon when you specify !DIR for POPID or other flexfield routines. Additional Arguments for Pair Value Sets If you are defining validation for a Pair type value set but you are not using the flexfield routines #FND POPIDR, LOADIDR, or VALIDR for range flexfields, you may use special forms of these arguments: :!ID_LOW and :!ID_HIGH, :!VALUE_LOW and :!VALUE_HIGH, and :!MEANING_LOW and :!MEANING_HIGH. However, usually you should use the key flexfield routines for a range flexfield (POPIDR, LOADIDR, and VALIDR), and these routines add the _LOW and _HIGH suffixes to :!ID, :!VALUE and :!MEANING for you automatically. DINSERT and Dynamic Inserts When you use a key flexfield user exit for special validation, you must include the token DINSERT=N in your Edit, Load, and Validate events. You cannot perform dynamic inserts from a flexfield within a flexfield, even if the flexfield has dynamic inserts allowed. Using Hidden IDs Though you must use the ID=:!ID argument when you want to pass a key flexfield combination ID number, you could use either the DATA_FIELD=:!ID argument or the SEG=:!VALUE argument to pass concatenated key segment values. Even if the value sets your flexfield uses do not use hidden ID columns and values, you may want to write explicitly to the :!ID field (and define a Load event) so that it is clear which values you are storing in the database or passing to your report. If your value sets do not use hidden ID columns, :!ID contains the actual values from the value columns of your value sets. You can have a mixture of displayed values and hidden ID values (depending on which value sets your flexfield segments use) concatenated in :!ID. If you are passing information to an Oracle Reports report that uses flexfield routines, you must have a data field and use the DATA_FIELD=:!ID argument. Hints for Using Special Validation If your special (or pair) value set does not behave the way you expect, you should check your value set definition to be sure that you typed your function correctly. Common errors include misplaced exclamation marks ( ! ) and colons ( : ). You should check that these
9 28
punctuation marks are not missing or in the wrong order or present when they should not be. Other common problems include misspelling token names, missing or extra apostrophes ( ), and missing or extra quotation marks ( ).
9 29
9 30
9 31
not need a Load event. This example uses structure 101 of the Accounting Flexfield. You define your Events and Functions in this field as follows: For data entry validation (Event = Edit), you would enter:
FND POPIDR APPL_SHORT_NAME=SQLGL CODE=GL# NUM=101 VALIDATE=PARTIAL SEG=:!VALUE DESC=:!MEANING NAVIGATE=!DIR
9 32
:block.field
Gets the current value in a field. You must ensure that this value set is only used for forms that have the same block.field.
For example, the following user exit on a Validate event obtains the Structure (NUM) of the key flexfield from a profile option:
FND VALID APPL_SHORT_NAME=SQLGL CODE=GL# NUM=:$PROFILES$.MY_STRUCTURE_ID REQUIRED=Y VALIDATE=FULL ID=:!ID SEG=:!VALUE DESC=:!MEANING DINSERT=N
9 33
CHAPTER
10
Account Generator
This chapter contains information on using the Oracle Applications Account Generator feature, including: An overview of the Account Generator Account Generator terminology An explanation of how Oracle Applications products use the Account Generator How you can customize an Account Generator process for your site This chapter also contains a description of the window you use to choose which Account Generator process to use for your flexfield. Account Generator Process Window
Account Generator
10 1
See:
Attention: Before using or customizing the Account Generator, you should familiarize yourself with the basic concepts of Oracle Workflow. For more information, see the Oracle Workflow Guide. Attention: The Account Generator replaces the Release 10 FlexBuilder feature. Information on upgrading from FlexBuilder is covered later in this chapter.
Terms
The following are some of the Oracle Workflow terms for objects used in the Account Generator feature, along with descriptions of how they relate to the Account Generator. You should read about these terms in the Oracle Workflow Guide first. See: Overview of the Oracle Workflow Builder, Oracle Workflow Guide.
10 2
Item Type An item type represents a grouping of a particular set of processes and components. Within an item type there can be up to six types of components: Attributes, Processes, Notifications, Functions, Messages, and Lookup Types. In an Account Generator, the most relevant components are Attributes, Processes, and Functions. If you are upgrading from Release 10 FlexBuilder, you can think of an item type as corresponding to a FlexBuilder function. Attribute In general, an attribute is a feature of an item type. For an Account Generator item type, these attributes include features of the Accounting Flexfield structure. For example, one attribute stores the structure number of the flexfield for which the combination is being built. Other attributes may be input values to the Account Generator process. If you are upgrading from FlexBuilder, raw parameters for a flexfield would be included here, and possibly some derived parameters. Function A function is a PL/SQL stored procedure which accepts standard arguments and returns a completion result. For example, a function can retrieve a value for a particular segment for a code combination. Process A process is a set of activities in a specific relationship. In the Account Generator, the process specifies the sequence of activities that are performed to create a code combination. A process activity can be part of a larger process, in which case it is called a subprocess. For example, the Oracle Assets FA Account Generator item type could contain a Generate Default Account process, which in turn contains three subprocesses: Generate Book Level Accounts, Generate Category Level Accounts, and Generate Asset Level Accounts. If you are upgrading from FlexBuilder, the logic in FlexBuilder rules corresponds to the logic in Account Generator processes. 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
Account Generator
10 3
example, an activity can reference a lookup type for its possible result values. See: Oracle Workflow Guide Account Generator Process Diagram : page 10 5
10 4
Each of the three subprocesses has its own diagram. For example, the Generate Category Accounts process diagram is shown below:
Account Generator
10 5
Here, the main process contains the activities Start Generating Code Combination, Validate Code Combination, and End Generating Code Combination. The subprocess contains the activities that actually build the combination. The activities of the subprocess are as follows: Start: every process has to have a Start activity. Check Category Account: this activity checks to see if the combination is a Category account combination. Copy Segment Value from Code Combination: this activity copies a segment value from a given code combination to a segment of the combination being built. Copy Segment Value from Code Combination: this activity copies a different segment value from a given code combination to another segment of the new combination. Assign Value to Segment: this activity assigns a specified value to another segment of the new combination. Copy Values from Code Combination: this activity copies values from a default code combination to any remaining segments of the new combination. This activity has the attribute Replace Existing Value set to False to prevent values assigned elsewhere from being overwritten. End: every process has to have an End activity. Note that after the code combination is created within the subprocess, the flow returns to the main process where the combination is validated by the function Validate Code Combination. Note: A toplevel runnable Account Generator process is represented by an icon called flexproc.ico, which has the image of two gears on a yellow background with a representation of a flexfield combination at the bottom. A subprocess is shown by the process.ico icon, which has two gears in a yellow background. You can differentiate between the two types of processes using these icons.
10 6
See:
Attention: These process diagrams are examples only. To learn about your particular products processes, see your Oracle [Product] Users Guide.
Account Generator
10 7
10 8
Field Values
Accounts
Order Number Charge to Account 1 Organization 001
Sales Rep ID
001 003 6487 01 876 Charge Account 001 003 6487 01 876
Table Values
Expense Account
Order Number Acct. 1 Client Expense Account Big Mfg. Co. 003 007 5000 01 876
003
003007500001876
Constant Values
Account Generator
10 9
Form Fields These are usually predefined by the application. Same Accounting Flexfield Structure You can get values from individual segments of Accounting Flexfield combinations whose structure matches the one you are building. You can specify which segment supplies the value using either the segment name or its flexfield qualifier, if any. You can assign such segment values to your key flexfield structure directly. For example, you can get a segment value from one combination of an Accounting Flexfield structure and use it to build another combination for the same Accounting Flexfield structure. Other Accounting Flexfield Structures You can get values from individual segments of Accounting Flexfield structures other than the one you are building. You can specify which segment supplies the value using either the segment name or its flexfield qualifier, if any. Application Tables You can get values from an application table. Constants You can specify a constant value for a segment of the key flexfield structure you want to build.
10 10
Account Generator
10 11
10 12
Attention: If you have modified the default Account Generator process directly, you should ensure that your customizations are not overwritten when you upgrade to a future release. For more information, see: Overview of Oracle Workflow Protection, Oracle Workflow Guide; and Creating
Account Generator
10 13
Process Definitions in Oracle Workflow Builder, Oracle Workflow Guide. Step 6. Test your Account Generator process, as outlined in your Oracle [Product] Users Guide. Determine if you get the expected resulting Accounting Flexfield combination. Step 7. Assign the appropriate process to your Accounting Flexfield structure in the Account Generator Process window in Oracle Applications.
10 14
Figure 10 2
Field Values
Accounts
Order Number Charge to Account 1 Organization 001
Sales Rep ID
001 003 6487 01 876 Charge Account 001 003 6487 01 876
Table Values
Expense Account
Order Number Acct. 1 Client Expense Account Big Mfg. Co. 003 007 5000 01 876
003
003007500001876
Constant Values
Account Generator
10 15
Attention: If you have modified the default Account Generator process directly, you should ensure that your customizations are not overwritten when you upgrade to a future release. For more information, see: Overview of Oracle Workflow Protection, Oracle Workflow Guide; and Creating Process Definitions in Oracle Workflow Builder, Oracle Workflow Guide. Warning: You should never create a new item type as your Account Generator. Instead, start from the default Account Generator item type or a copy of it.
Attention: You cannot modify the attributes or functions given to you in your default Account Generator item type. That is, you cannot select an attribute or function within the Navigator window and modify it. You can, however, modify the attributes of a function activity that is part of a process. Warning: Do not change the threshold level of the Oracle Workflow Engine. All of your Account Generator functions should have low costs, so you should never need to change the threshold level.
See: Overview of Oracle Workflow Builder Oracle Workflow Guide Create a New Attribute You can create a new attribute for your Account Generator item type, which you can then use in your custom process.
10 16
After you create a new attribute, you need to set its value by adding a function activity to your process. For example, if the value comes from another code combination you could use the Get Value from Code Combination function activity from the Standard Flexfield Workflow. Modify Attributes of a Function Activity You can modify the values passed to a function activity. For example, suppose your default Account Generator process uses the standard function Copy Segment Value from Code Combination to copy a segment value from the default code combination. This function thus has Default CCID as the value for the attribute Code Combination ID. However, suppose you want to use Distribution CCID instead of the Default CCID. You would then change this value within the function activity nodes process detail property page. Add a Function Activity to a Process You can change the logic of the process by adding functions to the process diagram. Predefined standard Account Generator functions are described later in this chapter. Your product may have additional predefined functions that you can use. For information on these, see: Oracle [Product] Users Guide. For example, suppose that you are working within the Oracle Assets Account Generator item type. In your process, you want to check to see if any account is a Category Account. You would then add the Check Category Account function activity in the appropriate place in the process diagram. If a function requires values to be passed in as arguments, you need to ensure the proper values are set for the attributes of the function. Warning: Oracle Workflow provides activities that you should never add to your Account Generator, namely, Notification and Block activities. Both of these activities halt the process, and you should never halt an Account Generator process before completion. Warning: In general, avoid using parallel branches in your Account Generator process diagram. The Oracle Workflow Engine processes activities sequentially. If your process includes parallel branches that converge on a single function, you should ensure that that function is an AND function, so that all required activities are completed before the Engine continues to the next activity in the process.
Account Generator
10 17
Create a New Function Activity You can create a new function activity and add it to your Account Generator. The Oracle Workflow Guide contains information on how to create new function activities and any associated PL/SQL stored procedures. See: To Create a Function Activity, Oracle Workflow Guide. Create a New Process You can create an entirely new Account Generator process in the Workflow Builder. Select the item type that you want to create the process for. For example, for Oracle Assets you would choose the FA Account Generator item type. From the Edit Menu choose New Process. Within the property sheet that appears, specify an internal name, display name and description. The display name will appear in the Navigator window for the process, and it would be the name used in the Account Generator Process window. For the Result Type specify Flexfield Result. If this is the toplevel process that you will actually run, specify Runnable. Suggestion: Examine your products default Account Generator process diagram first to see how a process works. Your start activity for the toplevel process must be the Start Generating Code Combination function activity, which you can copy from the Standard Flexfield Workflow item type. You can then add activities to the process. See the Oracle Workflow Guide for details on how to add activities to a process, as well as details on standard Workflow activities. See the section on the Standard Flexfield Workflow for generic Account Generator function activities you might want to add. For example, the activity Is Code Combination Complete? checks to see if all segments have values. The Validate Code Combination activity is useful for validating your combination after it has been generated. You can add the Abort Generation of Code Combination activity to terminate the process in the case of a fatal error. You should pass in an error message to this activity if you use it. This activity should be marked in the properties page as an End activity with the Result of Failure. In addition, your products Account Generator may also contain function activities particular to your product that you may want to use. See your Oracle [Product] Users Guide for more information on these activities.
10 18
Once the combination has been generated and validated, your process should end with the End Generation of Code Combination standard flexfield workflow activity. This activity should be marked in the properties page as an End activity with the Result of Success. See: Standard Flexfield Workflow: page 10 21 Overview of Oracle Workflow Builder Oracle Workflow Guide Standard Activities Oracle Workflow Guide Process Window Oracle Workflow Guide
Account Generator
10 19
10 20
Account Generator
10 21
10 22
Attribute to assign value: The internal name of the item attribute to which the value should be assigned.
Account Generator
10 23
program. This function should be marked as an End activity and should return a value of Failure. Error message: The error message for the failure condition. The message should be in the Message Dictionary encoded format.
For the functions listed above with the attributes Segment Identifier and Segment, Qualifier refers to the segment qualifier, for example, GL_BALANCING_SEGMENT. The segment Name refers to the Name specified in the Segments window. For information on segments, segment qualifiers, and validation see the following sections: Defining Segments: page 2 22 Qualifiers: page 2 5 Flexfield Qualifiers: page 2 30
10 24
This process contains the logic from FlexBuilder. The process contains a function that retrieves the necessary item attribute values (corresponding to raw parameters in FlexBuilder) and calls PL/SQL functions to create the code combination. Warning: This process is provided for converting an existing FlexBuilder configuration only. You should not modify this process in any way, nor modify the PL/SQL functions. Oracle does not support modifications to this process. If you used FlexBuilder in Release 10 and now would like to add customizations to your Account Generator, you should do so by starting from the default Account Generator process.
Attention: If you used FlexBuilder in Release 10 but did not customize the default configuration, you do not need to use the
Account Generator
10 25
Generate Account Using FlexBuilder Rules process, since the default Account Generator process gives you the same result as the default configuration in FlexBuilder. To use the Generate Account Using FlexBuilder Rules process, you need to associate that process with the appropriate Accounting Flexfield structure in the Account Generator Processes window, explained in the next section. A Note on Terminology For those converting from FlexBuilder, this section explains how the terminology maps between the two features. Raw parameters in FlexBuilder appear as attributes in the Account Generator. These input attributes are set when the Account Generator program is called. Derived parameters in FlexBuilder appear either as attributes or function activities in the Account Generator. A sequence of assignment rules in FlexBuilder corresponds to an Account Generator process. The default Account Generator process for a particular Accounting Flexfield structure corresponds to seeded assignment rules in FlexBuilder. Finally, a FlexBuilder function corresponds to an item type in the Account Generator. See: Choosing the Process for a Flexfield Structure: page 10 27
10 26
Use the Account Generator Processes window to assign Account Generator processes to Accounting Flexfield structures. This window is under the navigation path Application > Flexfield > Accounts in the System Administrator responsibility.
"
To choose your Account Generator process: 1. Select the structure to which you want to assign a process. You can choose the application, flexfield title, structure, and description from the rowlevel List of Values. Specify the Oracle Workflow Item Type containing the process. Specify the process you want to use to generate the accounts.
2. 3.
The default process, as specified in your [Product] Users Guide, will default in. If you want to use a different process, enter the name of the process you wish to use. For example, if you want to use the process derived from FlexBuilder, specify Generate Account Using FlexBuilder Rules instead.
Account Generator
10 27
APPENDIX
A1
Value set worksheets Value Set Worksheet (Independent Validation Type): page A 10 Value Set Worksheet (Dependent Validation Type): page A 11 Value Set Worksheet (None Validation Type): page A 12 Value Set Worksheet (Table Validation Type): page A 13 Value Set Worksheet (Table Validation Type, Continued: worksheet has two pages): page A 14 Value Set Worksheet (Special or Pair Validation Type): page A 15 Value Set Worksheet (Special or Pair Validation Type, Continued: worksheet has two pages): page A 16
A2
Page
of
Flexfield Code
Enbl.
View Name
Seg. Sep.
No. of Segs.
Dyn. Insert
Cross Val.
Page
of
Enbl.
View Name
Seg. Sep.
No. of Segs.
Dyn. Insert
Display Size
No.
Left Prompt
Column Name
Value Set
Max. Size
Display Size
Page
of
No.
Segment Name
Related Segments
Default Value
Required
Enable Security
Display
Flexfield Qualifiers
Page
of
Override Allowed
Reference Field
Segment Separator
Enabled
No. of Segments
Largest number of contextsensitive segments in a single contextsensitive structure Number of global segments Total (should be less than or equal to number of available segments (columns)
No.
Left Prompt
Column Name
Value Set
Max. Size
Display Size
Page
of
No.
Segment Name
Related Segments
Default Value
Required
Enable Security
Display
Page
of
Precision
Security Available
Minimum Value
Uppercase Only
Maximum Value
Value Sets that Depend on this Independent Value Set (if any)
Sample Values
Value Descriptions
Page
of
Description
Format Type
Precision
Security Available
Minimum Value
Maximum Size
Uppercase Only
Maximum Value
Independent Value
Sample Values
Value Descriptions
Page
of
Precision
Minimum Value
Uppercase Only
Maximum Value
Sample Values
Description
Format Type
Precision
Security Available
Minimum Value
Maximum Size
Maximum Value
Column Type
Column Width
Column Type
Column Width
Column Type
Column Width
Additional Columns
Value Sets that this Value Set Depends on by using $FLEX$ syntax (if any)
Value Sets that Depend on this Value Set using $FLEX$ syntax (if any)
WHERE clause
Page
of
Sample Values
Value Descriptions
Hidden Values
Other Information
Description
Format Type
Precision
Security Available
Minimum Value
Not available
Maximum Size Uppercase Only Rightjustify Zerofill Numbers Enable QuickPick LongList Maximum Value
Sample Values
Value Descriptions
Hidden Values
Other Information
Page
of
Event
Function
Other Information
Index
Symbols
:$FLEX$.Value_ Set_Name example, 4 37 using syntax, 4 34 :$PROFILES$. profile_option_ name, using syntax, 4 36 :NULL suffix, using syntax, 4 36 **Empty**, 4 39, 10 16 Asset Key Flexfield, 6 7 Assigning Security Rules, 5 19
B
Bank Details Key FlexField, 6 8 Bind Variables, 4 33 Bind variables, 4 31, 7 4
A
Account Aliases key flexfield, 6 5 Account Generator, 10 1 See also Standard Flexfield Workflow Account Generator Processes window, 10 27 benefits of, 10 2 converting from FlexBuilder, 10 25 customizing, 10 13 Generate Account Using FlexBuilder Rules process, 10 25 implementing, 10 12 in Oracle Applications, 10 11 modifying a process, 10 16 overview of, 10 2 Process Diagram, 10 5 Profile Option: Purge Runtime Data, 10 20 terms, 10 2 testing, 10 20 Accounting Flexfield, 6 6 See also Key flexfields validation rules, 5 22, 5 25 Alias, shorthand, 5 2 defining, 5 2
C
Category flexfield, 6 9 CCID, 2 5 Changing key flexfield structure after defining aliases, 5 4 Changing key flexfield structure after defining rules, 5 24 Character Formatting Options, 4 11 Combination, 2 3 Combination of segment values, 2 3 Combinations form , 2 7 Combinations table, 2 4 Context field, 3 3 Context field value, 3 3 Context sensitive segment, 3 2, 3 3 Context value, 3 3 Cost Allocation Key Flexfield, 6 10 Crossvalidation, 2 20, 5 21 See also Key flexfields; Validation rules CrossValidation Rule Violation Report, 5 32 Crossvalidation rules, defining, 5 22
Index 1
E
Enabling shorthand entry, 5 4
D
Default segment value, 2 26 Default value, 4 39 overriding, 4 39 Default values, overriding, 9 11 Defaulting Flexfield Values, 4 39 Defaulting Values, 4 39 Define Value Set form, 4 44 Defining Crossvalidation Rule Elements, 5 35 Defining Security Rule Elements, 5 17 Defining Security Rules, 5 16 Dependent values, 4 17, 4 22, 4 47 See also Value set Descriptive flexfield view, 8 5 Descriptive flexfields, 1 4 See also Flexfields changing existing, 4 40 columns, 3 5 compiling, 3 23 context, 3 3, 3 26, 3 27 context field, 3 3 context prompt, 3 26 customizing, 3 23 defining, 3 23 freezing, 3 23, 3 25 options, 3 9 planning, 3 17 reference fields, 3 4, 3 27 segments, 3 2, 3 5, 3 23 setting up, 3 23 tables, 3 5 validation, 4 44 validation tables, 4 27, 4 28, 4 49 value sets, 4 27, 4 28, 4 44 Dynamic insertion, 2 12 Accounting Flexfields, 5 24 when not possible, 2 13
F
FlexBuilder, converting to Account Generator, 10 25 Flexfield qualifiers, 2 5 choosing values for, 2 30 Flexfield segment, 1 2 Flexfield views, 8 3 Flexfields See also Descriptive flexfields; Key flexfields benefits of, 1 5 changing existing, 4 40 default values, 2 28 defining, 1 16 implementing, 1 10 planning, 1 12 predefined value sets, 4 21 recompiling, 2 18, 3 24 rules, security, 5 11 security, 5 9, 5 10, 5 11 setting up, 1 10 shorthand entry, 5 2, 5 3 terms, 1 6, 2 2, 3 2 validation, 4 44 validation tables, 4 28 value security, 5 9, 5 10, 5 11 value sets, 4 27, 4 44 views, 8 3 worksheets, A 1 FND FLEXIDVAL, 8 21, 8 26 FND FLEXSQL, 8 20, 8 22 FND SRWEXIT, 8 20 FND SRWINIT, 8 20 FND_DATE value sets, 4 21 Foreign key form, 2 7, 2 9
Index 2
G
Global segment, 3 2 Grade Key Flexfield, 6 11
I
Independent values, 4 17, 4 22, 4 40, 4 47 Intelligent keys, 2 3 See also Key flexfields Interaction of security rules, 5 12 Item Catalogs key flexfield, 6 12 Item Categories key flexfield, 6 13 Item Flexfield, 6 24 Item Flexfield (System Items), 6 24
J
Job Flexfield, 6 14
K
Key flexfield concatenated segment view, 8 3 Key flexfield structure view, 8 4 Key flexfields, 1 3 See also Flexfields alias, shorthand, 5 2 CCID, 2 5 changing existing, 4 40 changing valid values, 4 59 child values, 4 64 choosing qualifiers, 2 30 compiling, 2 17, 3 23 crossvalidation, 2 20, 5 21, 5 25 crossvalidation rules, 5 22 customizing, 2 18, 2 19, 2 23, 3 24 default precedence, 4 39, 9 11 default values, 2 28 defining, 2 17, 3 23 defining shorthand alias, 5 2 dynamic inserts, 2 12, 2 20 enabling segment values, 2 19, 4 60 enabling segments, 2 23
foreign tables, 9 2 freezing, 2 17, 2 21, 3 23 LOADID, 9 2 LOADIDR, 9 17 planning, 2 14, 2 15 POPID, 9 2 POPIDR, 9 17 qualifiers, 2 6, 2 30 ranges of values, 2 10, 5 17, 5 35, 9 17 recompiling, 2 18, 3 24 registering tables, 4 28, 4 49 rollup groups, 2 20, 4 60 rule elements, 5 17, 5 25, 5 35 rules, crossvalidation, 5 25 rules, security, 5 11 security by value, 5 9, 5 10, 5 11, 5 16 security rule elements, 5 17 security rules, 5 11, 5 16 segment qualifiers, 2 6 segment values, 4 56, 5 16 segments, 2 17, 2 22, 3 23 setting up, 2 17, 3 23 shorthand entry, 4 39, 5 2, 9 11 structure, 2 19 user exits, 9 2, 9 17 VALID, 9 2 valid combinations, 5 22, 5 35 validation, 4 28, 4 44, 5 25 validation tables, 4 27, 4 28, 4 49 VALIDR, 9 17 value security, 5 9, 5 10, 5 11, 5 16 value sets, 2 24, 4 27, 4 44 values, 4 56, 5 16 worksheets, A 1 Key flexfields by flexfield name, 6 2 Key flexfields by owning application, 6 3
L
Location Flexfield, 6 15
M
Maximum Size, 4 10 Maximum size, value set, 4 10
Index 3
N
Nonvalidated segments, 4 15 NUMBER value sets, 4 21 Numbers Only (09), 4 11
O
Oracle Reports flexfields and, 8 18, 8 30 reportwriting steps, 8 30 Oracle Service Item key flexfield, 6 21
ReportWriting Steps, 8 30 Rightjustify and Zerofill Numbers, 4 12 Rules, crossvalidation, 5 25 Rules, security assigning, 5 13, 5 16 defining, 5 11, 5 16 enabling, 5 14 interaction, 5 12
S
Sales Orders key lexfield, 6 19 Sales Tax Location Flexfield, 6 20 Security, flexfield value enabling, 5 14 rules, assigning, 5 13 rules, defining, 5 11 rules, interaction, 5 12 using, 5 9, 5 10 Segment qualifiers, 2 6 See also Key flexfields Segment values, defaulting, 2 26 Segments, 1 2, 1 6, 1 7 contextsensitive, 3 2 descriptive flexfield, 3 2 global, 3 2 Shorthand alias, defining, 5 2 Shorthand alias, 5 3 Shorthand entry, 5 2 See also Key flexfields alias, 5 2 setting up, 5 2 Soft Coded Legislation Key Flexfield, 6 22 Special value sets, 4 18, 9 23, 9 29 Standard Flexfield Workflow, 10 21 Abort Generating Code Combination, 10 23 Assign Value to Segment, 10 21 Copy Segment Value from Code Combination, 10 22 Copy Values from Code Combination, 10 22 End Generating Code Combination, 10 24 Get Value from Code Combination, 10 22 Is Code Combination Complete?, 10 23
P
Pair value sets, 4 18, 9 23, 9 29 Parameters, report, 7 2 People Group Key Flexfield, 6 16 Personal Analysis Key Flexfield, 6 17 Planning, 1 12 descriptive flexfield diagrams, 3 18 descriptive flexfields, 3 17 key flexfield diagram, 2 15 key flexfields, 2 14 value sets, 4 2 values, 4 2 worksheets, A 1 Position Key Flexfield, 6 18 Precision, 4 8
Q
Qualifiers, segment, 2 6
R
Range form, 2 10 Reference fields, 3 4 Report parameter See also Standard Report Submission planning, 7 3, 7 8 using flexfields in, 7 4 value sets, 7 6
Index 4
Start Generating Code Combination function, 10 21 Validate Code Combination, 10 23 Standard Report Submission See also Standard Request Submission interaction with flexfields, 7 2 parameters, 7 2, 7 3 planning, 7 3, 7 8 using flexfields in, 7 4 value sets, 7 6 worksheets, 7 8 Standard Request Submission, 7 1 See also Standard Report Submission Stock Locators key flexfield, 6 23 Structures, 1 6, 1 8 descriptive flexfield, 3 4 System Items (Item Flexfield), 6 24 System Items key flexfield, 6 24
T
Table columns, value set size, 4 10 Territory Flexfield, 6 25
U
Uppercase Only, 4 12 User exits, precoded key flexfield, 9 2, 9 17 LOADID, 9 2 LOADIDR, 9 17 POPID, 9 2 POPIDR, 9 17 VALID, 9 2 VALIDR, 9 17
V
Validate, 1 6 Validation, 1 6, 1 8, 4 15 Validation of alias values, 5 3 Validation rules changing, 5 31 definition, 5 21
designing, 5 21 error messages, 5 25 error segment, 5 26 suggestions for design, 5 30 Validation tables changing existing, 4 40 columns, 4 30 grants and synonyms, 4 31 implementing, 4 27 registering, 4 28 when to use, 4 27 WHERE clauses, 4 31 Value set, 1 6, 1 8 dependent, 4 47 enabling security on, 5 14 independent, 4 47 report parameter, 7 6 Value Set Maximum Size, 4 10 Value sets See also Key flexfields changing existing, 4 40 date format, 4 21 defining, 4 2, 4 44 dependent, 4 17, 4 22, 4 40 format type, 4 6 independent, 4 17, 4 22, 4 40 LongList, enabling, 4 45 naming conventions, 4 20 none, 4 16 pair, 4 18, 9 23, 9 29 planning, 4 2 predefined, 4 21 sharing across flexfields, 4 44 size, 4 10 special, 4 18, 9 23, 9 29 table, 4 17, 4 27, 4 28, 4 40 validation types, 4 40, 4 46 Values, 1 6 dependent, 4 17, 4 22 independent, 4 17, 4 22 key flexfield security, 5 9, 5 10, 5 11 Values, default, 4 39 Views creating, 8 6 examples, 8 11, 8 14 flexfield, 8 3 reporting from, 8 9
Index 5
W
WHERE clauses, for validation tables, 4 31 Worksheets descriptive flexfield, A 1
Index 6
Did you find any errors? Is the information clearly presented? Do you need more information? If so, where? Are the examples correct? Do you need more examples? What features did you like most about this manual? What did you like least about it?
If you find any errors or have any other suggestions for improvement, please indicate the topic, chapter, and page number below:
Please send your comments to: Oracle Applications Documentation Manager Oracle Corporation 500 Oracle Parkway Redwood Shores, CA 94065 USA Phone: (650) 5067000 Fax: (650) 5067200 If you would like a reply, please give your name, address, and telephone number below: