Oracle® Retail Merchandising System: Custom Flex Attribute Solution Implementation Guide Release 14.1
Oracle® Retail Merchandising System: Custom Flex Attribute Solution Implementation Guide Release 14.1
Oracle® Retail Merchandising System: Custom Flex Attribute Solution Implementation Guide Release 14.1
December 2014
Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide, Release 14.1
E55111-01
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,
transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it
on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software,
any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users
are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and
agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and
adaptation of the programs, including any operating system, integrated software, any programs installed on
the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to
the programs. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management
applications. It is not developed or intended for use in any inherently dangerous applications, including
applications that may create a risk of personal injury. If you use this software or hardware in dangerous
applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other
measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages
caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of
their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks
are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD,
Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced
Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content,
products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and
expressly disclaim all warranties of any kind with respect to third-party content, products, and services
unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its
affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of
third-party content, products, or services, except as set forth in an applicable agreement between you and
Oracle.
The following restrictions and provisions only apply to the programs referred to in this section and licensed
to you. You acknowledge that the programs may contain third party software (VAR applications) licensed to
Oracle. Depending upon your product and its version number, the VAR applications may include:
(i) the MicroStrategy Components developed and licensed by MicroStrategy Services Corporation
(MicroStrategy) of McLean, Virginia to Oracle and imbedded in the MicroStrategy for Oracle Retail Data
Warehouse and MicroStrategy for Oracle Retail Planning & Optimization applications.
(ii) the Wavelink component developed and licensed by Wavelink Corporation (Wavelink) of Kirkland,
Washington, to Oracle and imbedded in Oracle Retail Mobile Store Inventory Management.
(iii) the software component known as Access Via™ licensed by Access Via of Seattle, Washington, and
imbedded in Oracle Retail Signs and Oracle Retail Labels and Tags.
(iv) the software component known as Adobe Flex™ licensed by Adobe Systems Incorporated of San Jose,
California, and imbedded in Oracle Retail Promotion Planning & Optimization application.
You acknowledge and confirm that Oracle grants you use of only the object code of the VAR Applications.
Oracle will not deliver source code to the VAR Applications to you. Notwithstanding any other term or
condition of the agreement and this ordering document, you shall not cause or permit alteration of any VAR
Applications. For purposes of this section, "alteration" refers to all alterations, translations, upgrades,
enhancements, customizations or modifications of all or any portion of the VAR Applications including all
reconfigurations, reassembly or reverse assembly, re-engineering or reverse engineering and recompilations
or reverse compilations of the VAR Applications or any derivatives of the VAR Applications. You
acknowledge that it shall be a breach of the agreement to utilize the relationship, and/or confidential
information of the VAR Applications for purposes of competitive discovery.
The VAR Applications contain trade secrets of Oracle and Oracle's licensors and Customer shall not attempt,
cause, or permit the alteration, decompilation, reverse engineering, disassembly or other reduction of the
VAR Applications to a human perceivable form. Oracle reserves the right to replace, with functional
equivalent software, any of the VAR Applications in future releases of the applicable program.
Contents
Preface ................................................................................................................................................................. xi
Audience....................................................................................................................................................... xi
Documentation Accessibility ..................................................................................................................... xi
Related Documents ..................................................................................................................................... xi
Customer Support ...................................................................................................................................... xii
Review Patch Documentation .................................................................................................................. xii
Improved Process for Oracle Retail Documentation Corrections ....................................................... xii
Oracle Retail Documentation on the Oracle Technology Network ................................................... xiii
Conventions ............................................................................................................................................... xiii
1 Introduction
Road Map for Implementing CFAS...................................................................................................... 1-1
Getting Started with CFAS..................................................................................................................... 1-2
About CFAS ........................................................................................................................................ 1-2
CFAS Components............................................................................................................................. 1-3
CFAS Data Flow ................................................................................................................................. 1-5
v
Flat File Integration............................................................................................................................ 3-7
Internationalization Considerations .................................................................................................... 3-7
Additional Considerations ..................................................................................................................... 3-7
5 Ongoing Maintenance
Modifying Attributes .............................................................................................................................. 5-1
Deleting Attributes .................................................................................................................................. 5-2
Security Considerations .......................................................................................................................... 5-2
Upgrading CFAS....................................................................................................................................... 5-3
D Debugging CFAS
vi
CFA_EXT_ENTITY_KEY ................................................................................................................. E-4
Sample Data - CFA_EXT_ENTITY_KEY ................................................................................ E-5
CFA_EXT_ENTITY_KEY_LABELS ................................................................................................ E-6
Sample Data - CFA_EXT_ENTITY_KEY_LABELS ............................................................... E-7
Custom Metadata Tables........................................................................................................................ E-7
CFA_ATTRIB_GROUP_SET............................................................................................................ E-8
Sample Data - CFA_ATTRIB _GROUP_SET........................................................................ E-10
CFA_ATTRIB_GROUP_SET_LABELS......................................................................................... E-10
Sample Data - CFA_ATTRIB_GROUP_LABELS................................................................. E-11
CFA_ATTRIB_GROUP................................................................................................................... E-11
Sample Data - CFA_ATTRIB _GROUP................................................................................. E-12
CFA_ATTRIB_GROUP_LABELS.................................................................................................. E-13
Sample Data - CFA_ATTRIB_GROUP_LABELS................................................................. E-14
CFA_ATTRIB ................................................................................................................................... E-15
Sample Data - CFA_ATTRIB .................................................................................................. E-18
Additional Note about Validation......................................................................................... E-19
CFA_ATTRIB_LABELS .................................................................................................................. E-19
Sample Data - CFA_ATTRIB_LABELS ................................................................................. E-19
CFA_REC_GROUP ......................................................................................................................... E-20
Sample Data - CFA_REC_GROUP ........................................................................................ E-22
CFA_REC_GROUP_LABELS ........................................................................................................ E-22
Sample Data - L10N_REC_GROUP_DESCS ........................................................................ E-23
CFA_CODE_HEAD ........................................................................................................................ E-23
Sample Data - CFA_CODE_HEAD ....................................................................................... E-24
CFA_CODE_DETAIL_DESCS....................................................................................................... E-24
Sample Data - CFA_CODE_DETAIL_DESCS ..................................................................... E-25
Entity Specific CFAS Storage.............................................................................................................. E-25
Supporting Custom Objects................................................................................................................ E-29
CFAS Access Views........................................................................................................................ E-29
Additional Consideration ....................................................................................................... E-31
CFAS Staging Table ........................................................................................................................ E-33
Additional Consideration ....................................................................................................... E-33
vii
viii
Send Us Your Comments
ix
x
Preface
This Custom Flex Attribute Solution Implementation Guide describes how you can plan,
create, and maintain additional attributes using CFAS in existing pre-enabled RMS
entities.
Audience
This document is intended for application integrators and implementation personnel
who are familiar with the Oracle Forms based development. Knowledge of Oracle
Retail Merchandising System (RMS) is also required.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle
Accessibility Program website at
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Related Documents
For more information, see the following documents:
■ Oracle Retail Merchandising System Installation Guide
■ Oracle Retail Merchandising System Operations Guide
■ Oracle Retail Merchandising Security Guide
■ Oracle Retail Merchandising System User Guide and Online Help
■ Oracle Retail Merchandising System Reports User Guide
■ Oracle Retail Trade Management User Guide and Online Help
■ Oracle Retail Sales Audit User Guide and Online Help
■ Oracle Retail Merchandising Batch Schedule
■ Oracle Retail Merchandising System Data Model
xi
■ Oracle Retail Merchandising System Release Notes
■ Oracle Retail Merchandising System Data Access Schema Data Model
■ Oracle Retail Merchandising Implementation Guide
■ Oracle Retail Merchandising Data Conversion Operations Guide
■ Oracle Retail POS Suite/Merchandising Operations Management Implementation Guide
■ Oracle Retail Enterprise Integration Guide
Customer Support
To contact Oracle Customer Support, access My Oracle Support at the following URL:
https://support.oracle.com
xii
An updated version of the applicable Oracle Retail document is indicated by Oracle
part number, as well as print date (month and year). An updated version uses the
same part number, with a higher-numbered suffix. For example, part number
E123456-02 is an updated version of a document with part number E123456-01.
If a more recent version of a document is available, that version supersedes all
previous versions.
(Data Model documents are not available through Oracle Technology Network. These
documents are packaged with released code, or you can obtain them through My
Oracle Support.)
Documentation should be available on this Web site within a month after a product
release.
Conventions
The following text conventions are used in this document:
Convention Meaning
boldface Boldface type indicates graphical user interface elements associated
with an action, or terms defined in text or the glossary.
italic Italic type indicates book titles, emphasis, or placeholder variables for
which you supply particular values.
monospace Monospace type indicates commands within a paragraph, URLs, code
in examples, text that appears on the screen, or text that you enter.
xiii
xiv
1
1Introduction
Custom Flex Attribute Solution (CFAS) for Oracle Retail Merchandising System (RMS)
is a metadata driven framework that enables you to set up additional attributes on the
pre-enabled RMS entities without having to change the existing screen or make any
changes in the application code.
This chapter provides an introduction to the Custom Flex Attribute Solution (CFAS)
highlighting the associated components and data flow. It also provides information on
the organization of content in this document and how you can use it. This chapter
includes the following topics:
■ Road Map for Implementing CFAS
■ Getting Started with CFAS
Note: The CFAS framework does not publish new attributes to the
follow up systems, such as Oracle Retail Integration Bus, Oracle Retail
Stores Inventory Management, or Oracle Retail Warehouse
Management System.
Introduction 1-1
Getting Started with CFAS
About CFAS
CFAS is designed in such a manner that certain pre-existing form windows can be
easily customized to include additional fields or attributes. The CFAS framework
enables you to set up additional attributes on existing RMS entities without having to
change the existing screen or make any changes in the application code. The additional
attributes can be new attributes that are needed to support expanded client
functionality or to capture additional information from legacy systems. The CFAS
framework also allows the storage and validation of these attributes.
The additional attributes can be accessed using the Options menu in the relevant form
windows where they have been enabled. This ensures that the additional attributes do
not clutter the existing screen when they have not been implemented or used.
1-2 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Getting Started with CFAS
CFAS Components
The CFAS framework includes the following components:
■ CFAS Maintenance Screens – Available only to the users with the CFAS
Administrator role, these group of screens enable you to set up the attributes for a
relevant functional area in RMS. For more information, see CFAS Maintenance
Screens.
Introduction 1-3
Getting Started with CFAS
■ CFAS Extension User Interface and User Interface (UI) Libraries – The CFAS
framework provides a highly configurable metadata-driven user interface built
using Oracle Forms. It also includes CFAS UI libraries built specifically to handle
metadata. When it is set up, the CFAS UI will be accessible from the Options menu
of the relevant RMS form. Users will be able to view extension attributes, capture,
or store the relevant information in the CFAS user interface. For more information,
see CFAS User Interface Validation Routines.
■ CFAS Database Objects – The CFAS framework is driven by information stored in
the following CFAS-specific database objects:
– Extension Installation Tables – These database tables contain information on
the extended entities in RMS.
– Metadata Tables – These database tables contain all the information required
to display and capture actual data on the extended entities.
– CFAS Extension Storage Tables (Entity-specific) – By default, RMS data model
will include such entity specific CFAS storage database tables for the
pre-enabled entities. Each time you extend a business entity (other than the
pre-enabled ones) for customization, create a relevant entity specific CFAS
storage table by running the cfagen.ksh batch script.
– Supporting Custom Objects – The CFAS framework uses the following
supporting custom objects that are generated based on the definitions in the
Extension Installation and CFAS Metadata tables. These objects are business
representation of the data that is to be stored in the generic CFAS extension
tables:
– CFAS Access Views
– CFAS Staging Tables
1-4 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Getting Started with CFAS
The Extension Installation Tables define the entities and tables that can be customized
using the CFAS framework. By default, only certain entities are enabled for
customization with initial entries already defined out of the box. Data can be added to
these tables using a simple seed data script. In case you want to extend entities other
than the ones already defined, you must use the CFAS Maintenance screens.
The CFAS Metadata Tables define the business extensions for your implementation.
These tables are used to drive the CFAS Extension UI that will be available for end
users and store the data entered. These tables are part of the base RMS data model and
include information defined based on your implementation.
Introduction 1-5
Getting Started with CFAS
Note: The CFAS Access Views and CFAS Staging Tables are
automatically created when you run the CFAS Database Create
Scripts (cfagen.ksh) after setting up the Extension Installation
Objects and CFAS Metadata Tables.
1-6 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
2
Planning Custom Flex Attributes
2
Adding attributes to different entities within RMS is one of the most common
customizations. Some attributes are added just for reporting purposes, and some for
integrating with other systems, and some for driving processing in RMS. This chapter
describes how you can plan and organize the CFAS attributes. It also provides
information on the process for creating attributes during an implementation and
maintaining attributes when they have been implemented. It includes the following
sections:
■ Entities
■ Attribute Group Sets
■ Attribute Groups
■ Attributes
■ Other Setup Data
■ Custom Functions
Before you started adding attributes in the system, you must first set up a plan to
structure the attributes and determine how they will be created. When structuring the
attributes, you must ensure that they are organized in a manner that makes sense from
a business process perspective. For example, combining the attribute groups and
attributes together that will be maintained by the same resources in to the same
attribute group sets. You must also organize it in such a way that allows for future
growth and updates of attributes based on the business changes, especially since there
are limits at the group set and attribute level.
Entities
Entities are the functional areas in RMS with which the CFAS is associated. In the
current release, the following functionalities (entities) are pre-enabled and support
addition of new attributes:
■ Supplier
■ Store
■ Physical Warehouse
■ Virtual Warehouse
■ Department
■ Class
■ Subclass
■ Item (includes access from main Item dialog as well as Quick Item Add)
■ Item/Location
■ Item/Supplier
■ Item/Supplier/Country
■ Item/Supplier/Country/Location
■ Address
■ ELC Components
■ VAT Codes
■ Purchase Order Header
■ RTV Header
■ Deals Header
■ Transfer Header
Users can access the CFAS user interface for these pre-enabled entities using the
Options menu from the relevant form window. A single menu option is included for
each attribute group set associated with the entity. The screens for each of these
pre-enabled entities also includes some validation logic to ensure that the required
information is entered before opening the attribute screens (for example, for orders,
the supplier and dates information must be entered before opening the CFAS user
interface). It will also include another validation logic to check the mode (Edit or View)
in which the CFAS user interface must appear. This is based on the mode from the
relevant form window from where the CFAS user interface is accessed.
When planning the entities, in order to properly validate and display the information
in the screens, you must determine the following for each entity:
■ Validation Function - Validates the information entered before the users save and
close the CFAS screen. A validation function is not mandatory and may be needed
when further validation is required beyond that set at the attribute level. In such a
case, you will need to write a custom package function for the validation function
based on your business need.
■ Labels - Sets the label names for the relevant columns. You must set at least one
label for the default language for each label you create. You can choose to create
labels for more (alternate) languages based on your business need.
■ Description Code - The function that will display the description of the relevant
key. For example, SUPPS_SQL.GET_SUPP_NAME will retrieve the supplier name.
2-2 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Attribute Group Sets
Attribute Groups
Once you determine the attribute group sets needed for each entity, the next step is to
determine how the attributes will be organized within these sets. The attributes
themselves are organized into groups, which is the middle layer of the CFAS hierarchy.
Although you can create as many attribute groups as you want for each group set, you
can only have 22 attributes in each attribute group.
When planning the attribute groups, in order to properly validate and display the
information in the screens, you must determine the following in addition to the
attributes themselves:
■ Display Order - The order in which the attribute group set will appear in the
Options menu of the relevant entity.
■ View Name - The name that will be used for the database view that will be created
for this group. Similar to the view defined at the group set level, this view will
contain all attributes in the group. A view is a required information for each group
and is used to facilitate querying attribute information for the group.
■ Validation Function - Validates the information entered before the users save and
close the CFAS screen. A validation function is not mandatory, but may be needed
when further validation is required beyond that set at the attribute level. In such a
case, you will need to write a custom package function for the validation function
based on your business need.
■ Labels - Sets the business name for the group and will be the name that appears
on the screen. You must set at least one label for the default language for each
group set you create. You can choose to create labels for more (alternate) languages
based on your business need.
Attributes
Attributes are the bottom layer of the CFAS hierarchy. As mentioned above, you can
have only 22 attributes per attribute group. Of those 22 attributes, only 10 are allowed
to be character based attributes, 10 are number based attributes, and 2 are date
attributes. You must consider this set limit when planning the attributes to be included
in each group. Additionally, you must also determine and consider the following
information when planning the attributes:
■ Data Type - Indicates the type of data for the attribute. You can set this as a
Number, Varchar, or Date.
■ Widget Type - Indicates the type of the field that will appear for the attribute. You
can select one of the following options:
– Text Item - You can use this type for both Number and Varchar data types.
When used, the attributes field will appear as a text box on the screen.
2-4 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Attributes
– List of Values (LOV) - You can use this type for the Varchar data types only. A
list of values appears as a text box and an LOV button. If you choose to use
this widget type, you must also specify a record group. For more information,
see Record Groups.
– List Item - You can use this type for the Varchar data type only. When used,
the attributes field will appear as a drop-down list box on the screen. If you
choose to use this widget type, you must also specify a code type. For more
information, see Codes.
– Check box - You can use this type for Varchar data type only. When used, the
attributes field will appear as a check box on the screen.
■ Display Sequence - Indicates the order in which the attributes will appear in the
attribute screen, from top to bottom. Attributes will appear in a single column on
the screen.
■ Enabled - Indicates whether the attribute appear as enabled or disabled (greyed
out); only enabled attributes can be updated in the attribute screen. For attributes
where you want the users to enter information, you must set them as enabled. For
attributes that will display a default value (using a default function) that cannot be
changed, you will need to set them as disabled.
■ Validation Function - Validates the information for the attribute at the field level.
A validation function is not mandatory, but may be needed when further
validation is required beyond that set at the attribute level. In such a case, you will
need to write a custom package function for the validation function based on your
business need.
■ Maximum Length - Indicates the maximum number of digits or characters that are
allowed in the attribute, as well as the width of the attribute on the screen. You
must specify this information for the attributes with Number or Varchar data
types. This may not apply when you choose a List Item or Check box as the widget
type. The maximum length for the List Item widget type is automatically set to 6
and the maximum length for the Check box widget type is automatically set to 1.
For attributes with Number data type, you must enter the full length of the
number. This includes the length to be allowed after the decimal point and
positive/negative sign (if negative numbers are allowed). For example, if a
particular attribute needs to allow for five digits with up to two digits after the
decimal point and allow negative integers, you will need to specify the length as 9
(1 character for positive/negative sign, 5 digits before the decimal point, 1 decimal
point, and 2 digits after the decimal point).
Record Groups
Record groups are needed when you select the List of Values widget type for the
attributes. Record groups need to be set up ahead of time and it requires you to be
familiar with writing PL/SQL queries. Each record group must contain just two data
elements—an ID and a description, in this specific order (for example, supplier and
supplier name). The RMS application already includes set record groups for the
attributes associated with the pre-enabled entities. But, you may need to create
additional record groups to support the attributes you add, based on your business
need. The CFAS maintenance screen for the record groups (Record Groups
Maintenance screen) enables you to create the record groups and build simple or
complex queries for each record group. Although you can use this screen to write and
test the queries, there is no preview feature available for the List of Values (LOV).
Codes
Codes are needed when you select the List Item widget type for the attributes. Codes
for CFAS are similar to the codes that are used in other parts of RMS. They are made
available separately for the CFAS framework for usability purposes. In case you want
to use the codes that are part of the main RMS Codes tables, you can choose to copy
over these tables using scripts. To specify separate codes for CFAS manually, use the
CFAS maintenance screen for the codes (Codes Maintenance screen). This screen
enables you to create the code header and detail records to support the list items for
CFAS.
Custom Functions
There are three types of custom functions that CFAS is designed to support. For all of
these function types, you will need to write a custom package function based on the
CFAS standard in order to perform the functions described below.
Custom functions are not mandatory, but may be required when the custom attributes
need anything other than the standard validation that is done based on the attribute
setup (for example, ensuring that required attributes are entered).
Qualifier Function
Qualifier Functions are at the attribute group set level only and are used to ensure that
all the required information is entered or available before the users open the CFAS
screen from the Options menu. The base validation ensures that the basic information
(usually the primary key) for the entity is entered before launching the CFAS screens.
In case you want to ensure such a validation based on any other information, you can
create a qualifier function. Qualifier functions are not mandatory.
For example, in the Ordering dialog, you may use a qualifier function to ensure that at
least one item is added to the order before accessing one of the CFAS screens from the
Order Header screen.
2-6 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Custom Functions
Default Function
Default Functions are also only at the attribute group set level. These types of
functions are used to set the default values for the attributes in the attribute group set
based on some previously determined criteria. For example, copying information from
the subclass level to the item level when the same attributes are set up for both the
entities.
Default functions are not mandatory. Once implemented, the default function will run
each time the users open the relevant screen. You must ensure that the custom function
is written in such a manner that it only sets the default values when attributes are set
up for the first time in an entity. For example, when the user changes the value to
something other than the default, the value will not be overwritten the next time the
screen is opened.
Validation Function
Validation functions can be defined at the entity, group set, group, and attribute level.
Validation functions are not mandatory. These functions enable you to add additional
validation into the attribute screens above the default validation provided with the
base functionality. The default validation in the screens is based on how the attributes
are created (for example, required attributes are entered; dates do not exceed the
maximum allowable value, and so on).
For more information on the existing validation functions in the CFAS user interface
and setting up your own custom validation functions, see CFAS User Interface
Validation Routines.
Since the validation functions work slightly different based on the level at which it is
set, determining the level for the validation is an important part of the planning
process. Validation at the attribute group set level is executed when users click the OK
button on the attribute group set screen. Validation at the attribute group level is
executed when users switch tabs between attribute groups in the attribute group set
screen. It will also be executed for the attribute group currently being displayed when
users click the OK button. Validation at the attribute level is executed when users
navigate to other attribute fields by pressing the Tab key.
The following examples illustrate some validation scenarios that will help you
determine the validation level based on your business need:
■ Entity - Entity level validation is the highest level and triggered by the pre-enabled
base RMS forms usually via the OK button in the form (to check if there are
missing required attributes).
■ Attribute Group Set - If the validation requires the attributes to be added in more
than one group to perform the validation, set the validation at this level. For
example, consider a scenario where you have set up store attributes with one
group set that includes the alternate address information for a store and another
group set the indicates that the store has an offsite backroom. In case you want to
check and ensure that the store with an offsite backroom also has the alternate
address entered, you may need to set the validation at the attribute group set level.
■ Attribute Group - Set the validation at this level, if you want the function to
validate attributes within a single attribute group. For example, consider an
attribute group that captures the address information. You may need to set the
validation at the attribute group level to ensure that the users enter the State
information when they select the country as USA.
■ Attribute - Set the validation at this level to perform validations at the field level.
For example, consider that you created an item level attribute called Related Item.
To ensure that it is a valid item number in the system, you may need to set a
relevant validation function at the attribute level.
2-8 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
3
Planning Your Implementation
3
Before you proceed with implementing CFAS, you must meet certain pre-requisites,
understand the process flows, and review certain CFAS-specific considerations. This
chapter provides more information that will help you prepare for implementing or
leveraging CFAS based on your business need. It includes the following topics:
■ Prerequisites
■ Process/Business Flows
■ Integration Considerations
■ Internationalization Considerations
■ Additional Considerations
Prerequisites
Before proceeding, ensure you meet the following pre-requisites:
■ Required Skills and Expertise
■ Required Development Kit/Software
■ Associated RMS (Retail Apps) Version
■ CFAS Administration Role
■ Implementation Plan
Implementation Plan
Before you proceed with the implementation, ensure that you are familiar with the
CFAS concepts and have a specific implementation plan based on your business
requirements. The implementation plan must at least (not limited to) address the
following:
■ Appropriate level and entities to be extended.
■ Number of attribute group sets, groups, and attributes.
■ Functions and scripts to be designed and used.
■ Plans for maintenance and future growth or extensions.
Process/Business Flows
This section provides the following process flow that you can follow to plan the
attributes you want to set up and make them available in the RMS production
environment. It also describes the various objects involved in the planning process and
provides key considerations:
■ Phase 1 - Plan Entities and Attribute Group Sets
■ Phase 2 - Plan Attribute Groups and Attributes
■ Phase 3 - Set Up CFAS Objects Using the CFAS Maintenance Screens
■ Phase 4 - Test and Activate the CFAS User Interface
3-2 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Process/Business Flows
Figure 3–3 Set Up CFAS Objects Using the CFAS Maintenance Screens
Integration Considerations
This section describes the two primary ways that other systems use to integrate with RMS and their relevance with the
CFAS framework. It includes the following:
■ Integration with Retail Integration Bus (RIB)
■ Flat File Integration
Internationalization Considerations
In CFAS, the following database tables are used to store the relevant labels in different
languages:
■ CFA_EXT_ENTITY_KEY_LABELS – stores entity key labels.
■ CFA_ATTRIB_GROUP_SET_LABELS – stores attribute group set labels.
■ CFA_ATTRIB_GROUP_LABELS – stores attribute group labels.
■ CFA_ATTRIB_LABELS – stores attribute labels.
■ CFA_REC_GROUP_LABELS – stores record group labels.
■ CFA_CODE_DETAIL_DESCS – stores code labels.
For more information on the database tables mentioned above, see CFAS Table
Definitions.
For more information on the supported languages, refer to the Oracle Retail
Merchandising System Operations Guide, Volume 3 - Back End Configuration and
Operations.
Additional Considerations
Before proceeding with implementing CFAS, review the following considerations:
■ The framework is enabled only on select RMS features. You can use the framework
and patterns to enable customization for other entities. However, such
customizations are not supported by Oracle.
■ The architecture is based on the localization framework and does not adhere to the
Oracle Fusion customization framework. As such, upgrade strategy to the Oracle
Fusion framework is not in scope of this document.
■ Custom defined fields are currently not exposed to other applications, and not in
scope of this document. An additional effort will be involved to expose such fields
to downstream applications using RIB, exports, or other means.
■ CFAS attributes are scalar. This means that only one value of that attribute can be
stored per entity. To set up multi-record attributes, you can use groups as
multi-records.
■ To avoid any data security issues, you must apply relevant security policies on the
extension tables and access views.
■ RMS Entities are extended at the database table level. For example, items may be
extended at the header level - ITEM_MASTER (in the ITEM_MASTER_CFA_EXT
table), item supplier level - ITEM_SUPPLIER (in the ITEM_SUPPLIER_CFA_EXT
table), item location level - ITEM_LOC (in the ITEM_LOC_CFA_EXT table), and so
on. Maintenance screens for these tables will have separate individual access to the
relevant extensions.
■ When an entity record is deleted (order), the related CFAS attributes associated
with that order will also be deleted for all entities that are pre-enabled as part of
the base functionality.
■ Performance within the CFAS solution will be relative to the size of the entity you
are extending. There is a 1 to 1 ratio of CFAS records to entity records (that is
extending the Item/Location table will create a table with an equivalent number of
records). To ensure that you can maintain the performance of the entity in a
production environment, it is recommended that you first perform
proof-of-concepts on the entities.
■ If you plan to enable entities other than those that are pre-enabled as part of the
base installation, it is recommended that you use lower volume transactions, such
as the header of an inventory transaction, in place of the detail record.
3-8 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
4
CFAS Maintenance Screens
4
Once the attribute structure and other relevant details have been planned out, you can
set the attributes up in the system using the CFAS Maintenance screens. The CFAS
Maintenance screens are set of screens that appear under the Custom Flex Attribute
Setup group in the RMS Start Menu. This chapter describes how you can use the CFAS
Maintenance screens to set up the CFAS attributes. It includes the following sections:
■ Setting Up Entities and Entity Labels
■ Setting Up Codes
■ Setting Up Record Groups
■ Setting Up Attribute Group Sets
■ Setting Up Attribute Groups
■ Setting Up Attributes
Additional Considerations
The following considerations apply to all the screens mentioned in this chapter:
3. On the Entity Maintenance screen, select the base RMS table corresponding to the
entity you want. For more information, see Adding an Entity.
4. Click Label.The Entity Labels Maintenance screen appears.
5. On the Entity Labels Maintenance screen, select the relevant language from the
Language list of values, and then click Show Labels.
6. Under the Labels column, enter the labels for the relevant columns, enter a
relevant function name under Description Code. Description Code column must
4-2 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Setting Up Codes
contain the function that will display the description of the relevant key. For
example, SUPPS_SQL.GET_SUPP_NAME will retrieve the supplier name.
7. In case you want to set the selected language as the default, click Set Lang
Default. The Default Language check box appears selected.
8. Click OK+Repeat to set labels for another language.
9. Once the labels are set up, click OK to close the Entity Labels Maintenance screen.
10. Click OK to close the Entity Maintenance screen.
Adding an Entity
To add an entity that is not currently extended, click Add. A new line entry appears on
screen.
1. Under Base RMS Table, enter the relevant base RMS table name using the LOV
button. The List of Base RMS tables window appears.
2. Find and select the table that is not currently extended, and click OK. Notice that
the base RMS table name gets added under the Base RMS Table column and a new
corresponding extension table name (with the _CFA_EXT suffix) gets added under
the Custom Extension Table column.
3. Optional. Under the Validation Function column, you can choose to specify any
validation function you have planned at the entity level.
4. Click Label and follow steps 4 through 10 to set up labels.
Setting Up Codes
The Code Header Maintenance screen enables you to set up codes that will be used as
values in the attributes with the List Item widget type. For more information on codes,
see Codes.
To set up codes:
1. From the main menu, expand Custom Flex Attributes Setup, and then click Code
Setup.
2. From the Contents of Code Setup area, double click Edit. The Code Header
Maintenance screen appears.
3. On the Code Header Maintenance screen, click Add. A new line entry appears on
screen.
4. Enter a valid code type under Code Type, and add a relevant description.
5. Keeping the new code type selected, click Code Detail. The Code Detail
Maintenance screen appears.
6. In the Code Detail Maintenance screen, select the relevant language using the
Language LOV button, and then click Edit Code.
7. Enter relevant code, associated descriptions, and set a display order.
4-4 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Setting Up Record Groups
8. In case you want to set the current language as the default, click Set Lang Default.
9. Click OK+Repeat to set codes in other languages.
10. Click OK to apply and close the Code Detail Maintenance screen.
3. On the Record Group Maintenance screen, click Add. A new line entry appears
on screen.
4. Under Record Group Name, enter a valid name for the record group.
5. Under Query Type, select one of the following query types:
■ For simple queries:
a. Under Query Type, select Simple. The Table Name field gets enabled.
b. Use the Table LOV button and select the relevant database table for the
query. Once you select the table, the other fields get enabled.
c. Select the relevant column and description column for the query in the
Value Column and Description Column fields.
d. Set a condition for the query by specifying values under Where Column,
Operator, and Condition columns.
e. Click Build Query. Notice that the record group query gets added under
the Record Group Query column.
■ For complex queries:
– Under Query Type, select Complex. Unlike simple queries, the user
interface does not provide you the ability to set a query. You must work
with your database administrator to build and record the query for your
record group.
6. Once the query is set up, click Label. The Record Group Labels Maintenance
screen appears.
7. On the Record Group Labels Maintenance screen, select the language using the
Language LOV button.
8. Under LOV Title, set a relevant list of values title.
9. Under Value Column Header and Desc Column Header, set a header name for
the value column and description column.
10. Add more lines to enter similar information for other languages.
11. Under Default, select the check box next to the language you want to set as the
default language.
12. Click OK to apply and close the Record Group Labels Maintenance screen.
4-6 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Setting Up Attribute Group Sets
3. On the Attribute Group Set Maintenance screen, click Add to add a new attribute
group set. A new line entry appears on screen.
4. Enter relevant information in the following columns:
a. Under Entity ID, enter the relevant Entity ID using the list of values button.
This will be the identification code of the entity you set up in the Entity
Maintenance screen.
b. Under Display Order, enter a valid number that indicates the order in which
the attribute group set label will appear in the Options menu of the relevant
RMS base form.
c. Under Group Set View Name, enter a valid group set view name for the
attribute group set. It is recommended that you start the name with V_.
d. Under Staging Table Name, enter a staging table name that you want to create
and associate with this attribute group set. It is recommended that you start
the name with STG_.
e. Under Qualifier Function, Validation Function, and Default Function, enter
the planned functions for the attribute group set. For more information, see
Attribute Group Sets.
6. On the Attribute Group Labels Maintenance screen, under Language, select the
relevant language code using the list of values button.
7. Under Label, enter the name that will appear for the attribute group set in the
Options menu of the base RMS form.
You can define a hot key by putting a & character before any character in the label
you want. This makes the attribute group set label in the Options menu to appear
with a hot key. It can be used as a keyboard shortcut to quickly access the CFAS
user interface.
For example, consider that you want to set up a attribute group set label as Create
Special Order. To set up the letter S as the hot key, enter the & character before the
letter S in the Attribute Group Labels Maintenance screen. The label will then
read as Create &Special Order. Once activated, the label name in the Options
menu will read as Create Special Order. Notice the underline under the letter S
which indicates that it is the designated hot key for the menu option. Ensure that
you maintain a list of assigned hot keys to ensure that they remain unique for each
base RMS form.
8. You can choose to set up the labels for more languages. In case you set up more
languages, ensure that you select the relevant check box under Default for the
default language.
9. Once done, click OK to close the Attribute Group Labels Maintenance screen.
10. Once all attribute group sets are set up, click OK to close the Attribute Group Set
Maintenance screen.
You must now set up attribute groups. To open the Attribute Group Maintenance
screen, you can access the screen from the main menu or click the Group button on the
Attribute Group Set Maintenance screen.
4-8 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Setting Up Attribute Groups
3. On the Attribute Group Maintenance screen, click Add to add a new attribute
group. A new line entry appears on screen.
4. Enter the following information in the columns:
a. Under Group Set ID, enter the relevant group set ID using the list of values
button. This will be the identification code of the attribute group set you set up
in the Attribute Group Set Maintenance screen.
b. Under Display Order, enter a valid number that indicates the order in which
the attribute group label will appear.
c. Under Group View Name, enter a valid group view name for the attribute
group. It is recommended that you start the name with V_.
d. Under Validation Function, enter the planned function for the attribute group
set. For more information, see Attribute Groups.
6. On the Attribute Group Labels Maintenance screen, under Language, select the
relevant language code using the list of values button.
7. Under Label, enter the name that will appear for the attribute group set in the
Options menu of the base RMS form.
8. You can choose to set up the labels for more languages. In case you set up more
languages, ensure that you select the relevant check box under Default for the
default language.
9. Once done, click OK to close the Attribute Group Labels Maintenance screen.
10. Once all attribute group sets are set up, click OK to close the Attribute Group
Maintenance screen.
You must now set up attributes. To open the Attribute Maintenance screen, you can
access the screen from the main menu or click the Attributes button on the Attribute
Group Maintenance screen.
Setting Up Attributes
The Attribute Maintenance screen enables you to set up attributes. For more
information on attributes, see Attributes.
To set up attributes:
1. From the main menu, expand Custom Flex Attributes Setup, and then click
Attribute Setup.
4-10 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Setting Up Attributes
2. From the Contents of Attribute Setup area, double click Edit. The Attribute
Maintenance screen appears.
3. On the Attribute Maintenance screen, select the relevant entity ID, attribute group
set ID, and group ID set up in the Entity Maintenance, Attribute Group Set
Maintenance, and Attribute Group Maintenance screens.
4. Click Add to add a new attribute.
5. Enter information in the following fields:
a. In the View Col Name field, enter a valid column name.
b. In the Data Type drop-down list, select a relevant data type. You can choose
from VARCHAR2, NUMBER, and DATE.
c. In case you selected VARCHAR2 or NUMBER in the Data Type field, the UI
Widget Type drop-down list gets enabled.
d. In the UI Widget Type drop-down list, select a relevant widget type. Based on
the data type you selected, the following options appear in the UI Widget
Type drop-down list:
– For VARCHAR2 data type, the Text Item, List of Values, List Item, and
Check Box widget types appear.
– For NUMBER data type, the Text Item and List of Values widget types
appear.
e. Set a display order in the Display Order field.
f. In case you selected List of Values widget type, the Record Group field gets
enabled. Use the LOV button to select one of the available record groups.
Record groups are set up in the Record Groups Maintenance screen. For more
information, see Setting Up Record Groups.
g. In case you selected List Item widget type, the Code Type field gets enabled.
Use the LOV button to select one of the available code types. Code types are
set up in the Code Type Maintenance screen. For more information, see Setting
Up Codes.
h. In the Validation Function field, enter a valid validation function planned for
the attribute.
i. In case you want to keep this attribute enabled in the CFAS user interface,
keep the Enabled check box selected.
j. In case you selected the Text Item widget type, the Max Length field gets
enabled. Set the maximum number of characters allowed in the field.
k. In case you selected the Number data type, the Lowest Allowed Val and
Highest Allowed Val fields get enabled. Set the lowest and highest allowed
values in the field.
l. In case you want to set this field as mandatory, select the Required check box.
You must also ensure that the Enabled check box is selected.
6. Click Apply. Notice that a new attribute is added.
7. Once the attributes are added, click Label. The Attribute Labels Maintenance
screen appears.
8. In the Attribute Labels Maintenance screen, select the relevant language using the
Language LOV button, and then click Show Labels.
4-12 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Setting Up Attributes
9. Under Label, enter relevant labels for the attributes. Click OK+Repeat to set up
labels for other languages.
10. Click OK to close the Attribute Labels Maintenance screen.
Once you have set up all the information into the system, it is recommended that you
test and review all the attribute group sets for each entity using the View UI button
and View CFAS UI Parameters menu option in the Attribute Maintenance screen.
After verifying that all the screen layouts look correct and work as expected, you can
proceed with running the cfagen.ksh batch script and make the CFAS attributes
available for use in RMS. For more information on the database scripts, see CFAS
Database Scripts.
4-14 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
5
5Ongoing Maintenance
Once you set up the attributes and run the scripts to create the database entities, the
flex attributes are available for viewing by all users in the system. Once these scripts
are run, an indicator appears in the CFAS Maintenance screens displaying the group
sets, groups, or attributes that have been activated.
This chapter describes the considerations for maintaining and upgrading the flex
attributes that are in use. It includes the following sections:
■ Modifying Attributes
■ Deleting Attributes
■ Security Considerations
■ Upgrading CFAS
Modifying Attributes
Once the flex attributes are activated, the changes that you can make at the group set,
group, and attribute level are minimal. After activation, only the following can be
updated using the CFAS Maintenance screens:
■ Label - You can change the labels set at the group sets, groups, and attributes level
at any time.
■ Display Order - You can change the display order in which the group sets, groups,
and attributes appear in the menus or attributes screens after the attributes are
activated.
■ Validation Functions - You can change the qualifier, validation and default
function names at any time, but the functions will only apply to the changes made
next time a user adds new attributes to an entity or updates existing attributes.
Also, changes to the code inside these functions can be updated at anytime.
Additionally, you can continue to add new attributes, groups, and group sets even
after an entity has had others activated. You must follow the same process of planning
the attributes, adding them in the CFAS Maintenance screens, and then the last step
being to run the database activation scripts.
For reasons that require modifying an active attributes' properties or deleting the
attribute, a suggested approach is outlined below:
1. Backup the data in backup tables using the easy access view at the group set level
for each group set defined for the entity.
2. Using a tool like SQL Developer or SQL plus, go to the CFAS metadata table and
set the attribute's ACTIVE_IND to 'N' and commit.
3. Ensure there is a staging table defined at the group set level. If none set the group_
set's active indicator to 'N' where the attribute is linked to.
4. Go to the setup up screen and update the attribute's properties - change the data
type, widget type etc. or click the delete button (if deleting the metadata).
5. When the metadata updates are done, run the cfagen.ksh script to update the
objects. Make sure the view and staging tables are created properly with the
updated attribute.
6. Truncate the CFA custom extension table linked to the base table.
7. Using the backup tables you created earlier, load the staging table with the
corrected data. This needs to be done per group set.
8. Run the CFA load script for each group set/staging table to load the data back to
the extension table.
Deleting Attributes
Once the attributes have been activated, they cannot be deleted at any level using the
CFAS Maintenance screens. This includes entity, group set, group, and attributes.
Although you can delete attributes directly in the database, it is not recommended. To
delete attributes in the database, it is recommended that you follow instructions in this
guide to make the necessary changes.
Security Considerations
The CFAS screens use the same form level security as that exists in other parts of RMS.
You must plan to provide access to a specific group of users who will be responsible
for managing and approving the addition of CFAS attributes beyond the initial
implementation. This group of users will be responsible for developing and enforcing
the standards for how attributes are set up for the organization.
Users with access to the base form records will also have access to the relevant CFAS
records. You can restrict the access to the CFAS records by using the qualifier function
and adding security filtering.
5-2 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Upgrading CFAS
Upgrading CFAS
The CFAS functionality is built in such a way that upgrading to future versions of
RMS or applying base patches should require minimal conversion and retrofitting. At
a high level, the following are the basic steps for porting CFAS to a newer version:
1. For the basic group sets, groups, and attributes, you must port the data that is
used to build the screens over to the updated database. If there are any changes
made to the structure of these tables, a small conversion may need to be done to
the metadata as part of this effort.
2. Once this has occurred, run the cfagen.ksh batch script again to recreate the
database entities in the updated database.
3. Then, port the data from the metadata tables to the updated database tables.
4. If any custom functions were created, you may need to retrofit based on the
changes in the latest release. You will also need retrofit any custom changes that
were made in the RMS functionality to use the flex attributes into the new code.
5-4 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
A
ACFAS Use Cases
Alternate Hierarchies
Alternate hierarchy functionality is something that is available in the RPAS
applications and has often been requested in RMS. You can use the CFAS framework
to support this functionality by creating an attribute group titled Alternate Hierarchy
and then including attributes such as Division, Group, Department, Class, and
Subclass. To set the valid values for each of these attributes, you can choose to use the
base merchandise hierarchy tables or define new ones using the Codes table based on
your business need.
In case you want more than one alternate hierarchy, you can create an attribute group
set called Alternate Hierarchy and then create multiple identical attribute groups for
each alternate hierarchy required. By setting up alternate hierarchies in this manner,
you can then build reporting based on these hierarchies.
A-2 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Difference Between CFAS and User Defined Attributes (UDAs)
A-4 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
B
CFAS Database Scripts
B
This appendix describes the CFAS-specific database scripts. It includes the following:
■ CFAS Database Create Script
■ CFAS Load Scripts
■ CFAS Migration Script
Syntax
cfagen.ksh <connect> <Level E for entity or G for group set> <Entity/Group Set ID>
<Gen synonym Y/N> <Drop existing STG table Y/N>
Where,
■ <connect> – use this argument to specify the relevant user name to connect to
the database.
■ <Level E for entity or G for group set> – the level you want to
generate. Set the argument to E for entities and G for attribute group sets.
■ <Entity/Group Set ID> – the entity or attribute group set ID.
■ <Gen synonym Y/N> – use this argument to indicate whether you want to
generate relevant synonyms.
■ <Drop existing STG table Y/N> – use this argument to indicate whether
you want to drop the existing staging tables.
Syntax
cfastgload.ksh <connect> <input staging table> <delete rec in staging table Y/N>
[input process id]
Where,
■ <connect> – use this argument to specify the relevant user name/wallet to
connect to the database.
■ <input staging table> – the relevant staging table name to load.
■ <delete rec in staging table Y/N> – use this argument to indicate
whether you want to delete the records in the staging table.
■ <input process id> – use this argument to specify the relevant process ID.
B-2 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
CFAS Migration Script
Syntax
cfamigrate.ksh <connect> <level> <ID>
Where,
■ <connect> – Use this argument to specify the relevant user name to connect to
the database.
■ <Level> – Use this argument to indicate the CFAS metadata hierarchy level at
which the changes were made. The following are the valid level values:
– L for all levels. This creates a complete copy of the CFAS metadata.
– E for entity level. This creates a complete copy of the metadata from entity to
attribute, but no codes and record groups.
– S for group set. This gets a snapshot from the group set to attribute.
– G for group. This gets a snapshot from the group to attribute.
– A for attribute. This gets a snapshot of the attribute only.
– C for codes. This gets a snapshot of the code type and detail.
– R for record group. This gets a snapshot of the record group only.
■ <ID> – The CFAS metadata hierarchy ID at which the changes were made. This is
optional in some levels. Specify an ID based on the following:
– When the migration level is L, E, C, or R, no ID is required. All the metadata
will be exported.
– When the migration level is S, G, or A, an ID is required. Enter a specific ID to
export only that metadata. If no value is entered, all records will be exported.
Note: When you run the script, an output file with the level name
and ID is generated. This file includes the merge statements for the
metadata recorded you want to promote.
Considerations
Before you run the CFAS migration script, review the following considerations:
■ If the migrating metadata are not at the All level and the attribute is using a new
Code Detail or Record Group, then those must be migrated first.
■ No delete is migrated.
■ If the migrated metadata is already available in the target/destination
environment, the record will be updated as if it is has been activated regardless of
its current status.
■ Do not promote any backend update in the source environment with this tool.
■ Since the sequence ID for the metadata can be out of sync between environments,
the migration tool relies on other means to ensure record uniqueness:
– For Code Detail, code_type.
– For Rec Group: rec_group_name.
– For Entity: base_rms_table.
– For Group Set: base_rms_table and group_set_view_name.
– For Group: group_set_view_name and group_view_name.
– For Attribute: group_view_name and view_col_name.
■ If the migrated metadata does not match any of the existing records in the
target/destination environment by the above column, then it is considered as new
and will be inserted into the target/destination environment.
For example, consider that an inactive metadata in the source environment was
migrated to another environment. Once migrated, some of the columns were
changed in the source environment. When migrated again, these columns will be
considered as new record in the target/destination environment.
B-4 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
C
CFAS User Interface Validation Routines
C
This chapter describes the validation routines in the CFAS user interface. It also
highlights the simple and complex validations concepts. It includes the following
topics:
■ About Validation Routines
■ Simple Validations
■ Complex Validations
Starting off with the lowest level validation, the attribute validation works as follows:
During startup, the CFAS user interface populates the attribute content (values)
collection with the values fetched from the extension table. The user interface uses this
collection to populate the physical fields in the user interface via the query procedure
of the attribute block.
Once the user updates the field (in case of a field level validation), the
WHEN-VALIDATE-ITEM trigger runs and calls the generic FORM_
VALIDATION.VALIDATE_FIELD passing in the STORAGE_COL name the field
physically maps to in the extension table. This is used as a guide as to determine the
metadata information to be used from the attribute configuration collection. At this
point the new data is not yet stored to the content collection.
C-2 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Complex Validations
Simple Validations
For the simple validations, the input value (coming directly from the user interface) is
validated against the set values from the metadata. Simple validations checks for the
following:
■ Data length for VARCHAR2 and NUMBER data types.
■ Lowest/Highest allowable value for NUMBER and DATE data types.
Once the input data passes the simple validations, it is then saved to the content
collection (but not to the database yet).
Complex Validations
If there is a complex validation defined for the attribute in the metadata, it executes the
function dynamically (EXEC_FUNC). The validation functions have only
O_error_message as the parameter. The input and output values are defined
differently from usual RMS user interface. These rely heavily on the values stored in
the content collection.
The following CFAS functions are used to get and set values from this collection:
■ CFA_SQL.GET_VALUE - this function is used to retrieve the value of a particular
attribute from the content collection. The input to this collection is the VIEW_
COL_NAME and returns the value, description if any and the data type. This is
used as replacement to the usual input function parameters and preferred rather
than using limited generic parameters.
■ CFA_SQL.SET_OUTPUT - this function is used to set the value of a particular
attribute in the content collection. It can also be used to set the corresponding
description fields used by RG type fields. This not only updates the content
collection but also builds the return collection. The return collection signals the
CFAS UI to update the physical fields on the UI with the values from the content
collection. This return collection contains the attributes that were changed by
validation function. Only attributes in any group within the attribute group set
can be set using this function.
BEGIN
-----------------------------------------------------------------------------
-- Get keys and/or attribute value inputs in this section.
-----------------------------------------------------------------------------
if NOT CFA_SQL.GET_VALUE(O_error_message,
C-4 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Complex Validations
L_item,
L_desc, -- initially NULL
L_data_type,
L_field) then
return FALSE;
end if;
-----------------------------------------------------------------------------
-- Validation logic in this section. It can be a call to an RMS package
-- function.
-----------------------------------------------------------------------------
if L_desc is NULL then
if NOT ITEM_ATTRIB_SQL.GET_DESC(O_error_message,
L_desc,
L_item) then
return FALSE;
end if;
end if;
-----------------------------------------------------------------------------
-- If there are outputs set each in this section
-----------------------------------------------------------------------------
if NOT CFA_SQL.SET_OUTPUT(O_error_message,
CFA_SQL.CFA_KEY,
L_field,
L_item,
L_desc) then
return FALSE;
end if;
return TRUE;
EXCEPTION
when OTHERS then
O_error_message := SQL_LIB.CREATE_MSG('PACKAGE_ERROR',
SQLERRM,
L_program,
to_char(SQLCODE));
return FALSE;
END GET_ITEM_DESC;
…
The sample function above gets the description for the item. It uses the CFA_
SQL.GET_VALUE to get the item value from the content collection. If more parameters
are required, several calls to this function are required for each parameter.
The validation logic section can be any business validation written directly in the
section or called from another package.
If the validation needs to output something like a description or update another
attribute field in any group within the group set, a call to CFA_SQL.SET_OUTPUT can
be made. In the above example, the item description is returned by the RMS function
ITEM_ATTRIB_SQL.GET_DESC. The CFA_SQL.SET_OUTPUT takes the description
value and updates the content collection.
The following example illustrates how other attributes fields are set:
FUNCTION CHK_STOCK_SUPPLIER (O_error_message IN OUT RTK_ERRORS.RTK_TEXT%TYPE)
RETURN BOOLEAN AS
L_supplier SUPS.SUPPLIER%TYPE;
BEGIN
-----------------------------------------------------------------------------
-- Get the current attribute value
-----------------------------------------------------------------------------
if NOT CFA_SQL.GET_VALUE(O_error_message,
L_field_value,
L_desc, -- initially NULL
L_data_type,
'STOCK_SUPPLIER') then
return FALSE;
end if;
-----------------------------------------------------------------------------
-- do processing
-----------------------------------------------------------------------------
if L_supplier is NOT NULL then
if NOT SUPP_ATTRIB_SQL.GET_SUPP_DESC(O_error_message,
L_supplier,
L_desc) then
return FALSE;
end if;
end if;
-----------------------------------------------------------------------------
-- set output values
-----------------------------------------------------------------------------
if NOT CFA_SQL.SET_OUTPUT(O_error_message,
CFA_SQL.CFA_EXT,
'STOCK_SUPPLIER',
L_supplier,
L_desc) then
C-6 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
Complex Validations
return FALSE;
end if;
---
if L_sell_qty is NULL then
if NOT CFA_SQL.SET_OUTPUT(O_error_message,
CFA_SQL.CFA_EXT,
'SELL_QTY',
15) then
return FALSE;
end if;
end if;
return TRUE;
EXCEPTION
when OTHERS then
O_error_message := SQL_LIB.CREATE_MSG('PACKAGE_ERROR',
SQLERRM,
L_program,
to_char(SQLCODE));
return FALSE;
END CHK_STOCK_SUPPLIER;
The above example does a couple of things. It sets the description of the stock supplier
and sets the default value of the SELL_QTY attribute to 15, if not populated.
Validation of the data does not end here. It is up to the CFAS user interface to handle
whatever is returned back by these validation functions.
For attribute validation, a return collection is set if there are fields updated (or
defaulted) other than the validated field. This collection is returned to the user
interface. The user interface loops through this, sets the individual fields on the form
with the new value from the content collection, and updates the: GLOBAL variables
related to the set fields.
Higher level validations follow the same pattern as the attribute validation with some
key differences as described below:
■ Group level:
– The validation is triggered when the user changes the attribute group in the
multi-record block.
– Simple validation only checks for required attributes.
– In some RMS user interfaces, when an error is encountered, the focus is set to
the field that failed. CFAS user interface adopts the same functionality. The
validation package function returns the error attribute's STORAGE_COL_
NAME which maps out to a field on the form. A navigational procedure
intended for CFAS (FLEX_UI_WIDGET.GO_ATTRIB_ITEM) is used to set the
focus to the user interface field. The usual error message is displayed. To set
the return field, use the stored function CFA_SQL.SET_RETURN_FIELD.
■ Group set level:
– The validation is triggered when clicking the OK button on the CFAS user
interface.
– Like the group validation, simple validation checks for all required attributes,
but at the group set level (all groups within the group set).
– Unlike the group validation, the group set validation does not set the focus to
the error field. The group validation handles this for the current group.
■ Entity level:
– Validation is triggered when clicking the OK button on the base RMS form
(not the CFAS user interface).
– Since the entity level validation is run outside the CFAS user interface, no data
is loaded to the CFA collection (where all the validation and data
manipulation occurs). Consider the following before running an entity level
validation:
– Any qualifier rules must be run before running the validation rules.
– Since the entity level validation occurs outside the CFAS user interface, the
CFA_SQL.GET_VALUE or CFA_SQL.SET_OUTPUT functions cannot be
run. It is recommended to use the access views to retrieve the CFAS
records.
These higher level validations also support complex business validations. These
stored procedures are written with the same patterns as the attribute level
validation.
C-8 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide
D
DDebugging CFAS
The CFAS framework also includes a built-in tool designed to help you with the
debugging of the code. DBG.MSG (used by the CFAS user interface and libraries) and
DBG_SQL.MSG (used by the database stored procedures) are procedures used to
display and capture debug messages to a log table.
This tool provides the following features:
■ Configurable via the database table (DEBUG_CFG).
■ Debug messages are only displayed/logged to a table for a specific user defined
condition.
■ Target specific program units in the user interface (such as P_FORM_STARTUP,
WHEN-VALIDATE-ITEM, and so on) or database stored procedures.
■ When working with multiple stored procedures or program units, you can switch
the object for which you want to see or log messages.
To set the debugging mode for CFAS:
1. In the relevant procedure, enter the SCHEMA name or user name, OBJECT to
debug, and optionally set whether the messages are displayed online (when
debugging the UI/library) or saved to a log table (DEBUG_LOG). Set at least one
option to Y.
2. If the program unit does not have debug messages, strategically insert the debug
messages using the DBG.MSG for the user interface and DBG_SQL.MSG for the
stored procedures. For DBG.MSG, use as the usual imessage(). Pass in the name of
the program unit to debug and the debug message.
3. Compile the code and run the test.
CFA_EXT_ENTITY
This table holds the business object entities that have been extended in the base RMS code. It provides the mapping
between extendable business objects (base RMS tables) and custom extension tables. By default, this table contains data
that is populated by a seed data script run during the base RMS installation for each entity pre-enabled for
customization. You can still populate this table if you want to customize entities not included during the installation.
However, changes to the base code using the table are not supported by Oracle.
Primary
Column Datatype Key? Required? Description Keys/Notes
EXT_ENTITY_ID NUMBER(10) Y Y This column holds a generated ID that Create a sequence to
distinguishes the model extension point. generate.
BASE_RMS_TABLE VARCHAR2(30) N Y This column holds the base RMS table (for Unique key to ensure
example, ordhead, tsfhead, and so on) which the no duplicates.
extension refers.
CUSTOM_EXT_TABLE VARCHAR2(30) N Y This column holds the name of custom extension Unique key to ensure
table related to this model extension. The custom no duplicates.
extension table must be created when CFAS is
installed for an entity.
It is recommended (but not required) that the
creator of the metadata append '_CFA_EXT' to
the BASE_RMS_TABLE name. This is a
recommendation only because some BASE_
RMS_TABLE names, when appended with the
recommended suffix, may be too long. In those
cases, it is recommended that some abbreviation
be created for the BASE_RMS_TABLE, and the '_
CFA_EXT' suffix is still used.
ACTIVE_IND VARCHAR2(1) N Y Indicates if the entity is activated and ready for Only set via batch.
viewing.
Check constraint
(Y,N).
Primary
Column Datatype Key? Required? Description Keys/Notes
BASE_IND VARCHAR2(1) N Y This indicates that the entity is pre-enabled for Check constraint (Y,
customization and supporting code in the base N).
UI are already setup as part of base install.
VALIDATION_FUNCT VARCHAR2(61) N N This column holds the name (package and –
function) of code that should be called to
validate this entity.
CFA_EXT_ENTITY_KEY
This table holds the key information for the extended base RMS tables. This information can be derived from system
tables, but is instead stored in an application specific table for performance and clarity. This information is used to
ensure that the generic CFAS persistence code can map correctly to the entity specific code and table. Data in this table
will also be used to determine the number of key fields displayed in the CFAS user interface. By default, this table
contains data that is populated by a seed data script run during the base RMS installation for each entity pre-enabled
for customization. The values will be automatically populated when using the CFAS Extended Entity Maintenance
screen.
CFA_EXT_ENTITY_KEY_LABELS
This table holds the description that should be used as the label for the key fields in the CFAS user interface header.
Records must exist in this table to ensure that fields in the user interface are always labeled. By default, this table
contains data that is populated by a seed data script run during the base RMS installation for each entity pre-enabled
for customization (for all RMS supported languages).
Primary
Column Datatype Key? Required? Description Keys/Notes
BASE_RMS_TABLE VARCHAR2(30) Y Y This column holds the base RMS table FK to CFA_EXT_ENTITY_
(for example, ordhead, tsfhead, etc) KEYS. BASE_RMS_TABLE.
which the extension refers.
KEY_COL VARCHAR2(30) Y Y This column holds the name of the CFA_EXT_ENTITY_KEYS.
primary key column on the extended KEY_COL.
BASE_RMS_TABLE.
LANG NUMBER(6) Y Y This column holds the language that FK to LANG.LANG.
the KEY_DESC is in. It will be used to
UK on BASE_RMS_TABLE,
ensure the appropriate language is
KEY_COL, LANG.
shown to any end users accessing the
CFAS user interface.
DEFAULT_LANG_IND VARCHAR2(1) N Y This column indicates that the current Check constraint (Y, N).
records description should be
considered the default and displayed
in the user interface, if a translation for
the end user's language does not exist.
This column should be 'Y' for only one
language for the BASE_RMS_TABLE
and KEY_COL combination.
LABEL VARCHAR2(255) N Y This value will be displayed on the –
header of the CFAS user interface to
label the value passed from the calling
form to the CFAS user interface as the
KEY_COL.
CFA_ATTRIB_GROUP_SET
This table holds the metadata that defines attribute group sets for all entities. Each extended entity can have at most 10
group sets which are accessible from the Options menu of the relevant user interface. Attribute group sets represent a
higher grouping of attributes that are functionally or feature-wise (in case of add-on packs) related.
Access to the group set may be controlled via rules. These rules are executed via function called when the option menu
is activated. Only a function can be defined per group but the function can have any rule. See examples setting up rules
(TBD).
A validation function can be defined to validate combinations of attributes within the group set spanning across
multiple attribute groups.
Primary
Column Datatype Key? Required? Description Notes
GROUP_SET_ID NUMBER(10) Y Y This column holds id of the set where System Generated.
the group belongs to.
EXT_ENTITY_ID NUMBER(10) N Y This column holds the ID of the entity FK to CFA_EXT_
where the set belongs to. ENTITY.EXT_ENTITY_ID.
GROUP_SET_VIEW_ VARCHAR2(30) N Y This column holds the name of the –
NAME database view that will be generated
to make access to user entered data
easier.
DISPLAY_SEQ NUMBER N Y This column holds the order the Check Constraint (1-10).
attribute group set displayed in on the
Unique across an entity.
CFAS user interface when multiple
group sets exist for the entity.
QUALIFIER_FUNC VARCHAR2(61) N N This column holds the name (package –
and function) of code that should be
called to check if required information
is supplied from the base user
interface to access the attributes within
the group set (determines if the group
set is enabled on the user interface).
The inputs and outputs of this
function code are tightly controlled.
Primary
Column Datatype Key? Required? Description Notes
DEFAULT_FUNC VARCHAR2(61) N N This column holds the name (package –
and function) of code that should be
called on startup of the CFAS user
interface to pre-populate attribute
fields with default values (can be in
any group within the set). The inputs
and outputs of this attribute group set
level default code are tightly
controlled.
VALIDATION_FUNC VARCHAR2(61) N N This column holds the name (package –
and function) of code that should be
called to validate this attribute group
set. The inputs and outputs of this
attribute group set level validation
code are tightly controlled.
STAGING_TABLE_ VARCHAR2(30) N N This column holds the name of the –
NAME staging area where data from an
external source can be stored and
exported to the CFA extension table
linked to this group set.
ACTIVE_IND VARCHAR2(1) N Y This column indicates whether the Check Constraint (Y, N).
group set is visible in the base user
interface menu. Used for simulation
purposes.
BASE_IND VARCHAR2(1) N Y This column indicates if the attribute Check Constraint (Y, N).
group set is defined by Oracle. Oracle
defined group sets cannot be further
customized.
Note: Grouping the attribute groups into attribute group sets that are
logical requires local domain knowledge. The examples below are
meant for illustration purposes only.
DISP
LAY ACTI
GROUP_ EXT_ENTITY_ _ VE_ GROUP_SET_VIEW_ DEFAULT_ VALIDATION
SET_ID ID SEQ IND NAME QUALIFIER_FUNC FUNC _FUNC
1000000001 3000000001 1 Y V_CFA_PO_CUSTOM – –
1000000002 3000000001 2 Y V_CFA_PO_TELCO TELCO_SQL.CHK_TELCO_ACCESS – –
1000000003 3000000002 1 Y V_CFA_ISC_TELCO TELCO_SQL.CHK_TELCO_ACCESS – –
CFA_ATTRIB_GROUP_SET_LABELS
This table holds the language specific descriptions that will be used to depict each specific group set in the attribute
group set section of the CFAS UI. At least one record must exist on this table for each attribute group set.
Primary
Column Datatype Key? Required? Description Notes
GROUP_SET_ID NUMBER(10) Y Y This column holds a generated ID that FK to CFA_ATTRIB _
distinguishes the custom attribute group GROUP_SET. GROUP_SET_
set. ID.
LANG NUMBER(6) Y Y This column holds the language the of the FK to LANG.LANG.
user interface description.
DEFAULT_ VARCHAR2(1) N Y This column indicates that the current Check constraint (Y, N).
LANG_IND records description should be considered
the default and displayed in the user
interface, if a translation for the end user's
language does not exist. This column
should be 'Y' for only one language for the
GROUP_ID.
LABEL VARCHAR2(255) N Y This column holds the text that will be used –
to identify the attribute group on the CFAS
UI.
Note: All text in the table below are for illustration purposes only.
CFA_ATTRIB_GROUP
This table holds the metadata that defines attributes groups for group sets for all entities.
Attribute groups define the grouping of attributes in the user interface widget. Each attribute group is limited to 22
possible attributes. 10 of these attributes can be character data, 10 attributes can be numeric data and two attributes can
be date data. If you need to add 12 attributes to an entity, and each attribute is a number, you will need to split the
attributes into two attribute groups.
A validation function can be defined to validate combinations of attributes within the group.
Note: Grouping the attributes into attribute groups that are logical
requires local domain knowledge. The division of these attributes into
attribute groups in the table below is for illustration purposes only; it
does not reflect the local domain knowledge that will be required to
create logical and usable CFAS metadata.
VALIDATION_
GROUP_ID GROUP_SET_ID DISPLAY_SEQ ACTIVE_IND GROUP_VIEW_NAME FUNC
9000000001 1000000001 1 Y V_CFA_PO_IMPORT –
9000000002 1000000001 2 Y V_CFA_PO_SHIPPING –
9000000004 1000000001 3 N V_CFA_PO_BILLING –
9000000006 1000000002 1 Y V_CFA_PO_TELCO_ATTRIB –
VALIDATION_
GROUP_ID GROUP_SET_ID DISPLAY_SEQ ACTIVE_IND GROUP_VIEW_NAME FUNC
9000000007 1000000002 2 Y V_CFA_PO_TELCO_CONTACT –
9000000008 1000000003 1 Y V_CFA_ISC_ITEM_RESTRICT –
9000000009 1000000003 2 Y V_CFA_ISC_INV –
CFA_ATTRIB_GROUP_LABELS
This table holds the language specific descriptions that will be used to show each specific group in the attribute groups
section of the CFAS user interface. At least one record must exist on this table for each attribute group.
Note: All text in the table below are for illustration purposes only.
CFA_ATTRIB
This table holds the metadata that defines custom attributes for all entities. The information stored in this table tells
how each attribute is stored, basic data restrictions, and how the attribute is displayed in the CFAS user interface.
There are check constraints/unique constraints to ensure that each group contains no more than the prescribed 22
attributes, and that no more than 10 of these attributes are numbers, no more than 10 attributes are chars, and no more
than 2 attributes are dates.
HIGHEST_ALLOWED_VALUE
LOWEST_ALLOWED_VALUE
STORAGE_COL_NAME
MAXIMUM_LENGTH
VALIDATION_FUNC
VIEW_COL_NAME
REC_GROUP_ID
DISPLAY_SEQ
ENABLE_IND
CODE_TYPE
VALUE_REQ
ACTIVE_IND
DATA_TYPE
UI_WIDGET
GROUP_ID
ATTRIB_ID
CFA_ATTRIB_LABELS
This table holds descriptions that will be used to label the attribute on the CFAS user interface.
Primary
Column Datatype Key? Required? Description Keys/Notes
ATTRIB_ID NUMBER(10) Y Y This column holds the attribute id of the FK to CFA_
attribute being described. ATTRIB.ATTRIB_ID.
LANG NUMBER(6) Y Y This column holds the language the FK to LANG.LANG.
description is in.
DEFAULT_ VARCHAR2(1) N Y This column indicates that the current Check constraint (Y, N).
LANG_IND records description should be considered the
default and displayed in the user interface, if
a translation for the end user's language does
not exist. This column should be 'Y' for only
one language for the GROUP_ID.
LABEL VARCHAR2(255) N Y This column holds the text that will be used –
to label the attribute on the CFA UI.
Note: All text in the table below are for illustration purposes only.
CFA_REC_GROUP
This table contains the source query for record groups used by LOVs in the CFAS UI.
COL_1_DATA_LENGTH
WHERE_OPERATOR_1
WHERE_OPERATOR_2
REC_GROUP_NAME
COL_1_DATA_TYPE
WHERE_COND_1
WHERE_COND_2
REC_GROUP_ID
WHERE_COL_1
WHERE_COL_2
TABLE_NAME
QUERY_TYPE
COLUMN_1
COLUMN_2
BASE_IND
QUERY
77777 CITYDESC select city_desc, N SIMPLE city city_desc city get_primary_lang = get_user_lang country_id = USA - -
city
from city
where get_primary_lang
= get_user_lang
and country_id = USA;
CFA_REC_GROUP_LABELS
This table holds the column labels that should be displayed to end users when a specific record group list of values is
invoked from the CFAS user interface.
L10N_REC_
GROUP_ID LANG DEFAULT_LANG_IND LOV_TITLE LOV_COL1_HEADER LOV_COL2_HEADER
77777 1 Y List of Cities City Description City
77777 4 N List of Cities (In City Description (In Spanish) City (In Spanish)
Spanish)
CFA_CODE_HEAD
This table holds the code types that will be used as the basis for defining list items in the CFAS UI.
Primary
Column Datatype Key? Required? Description Keys/Notes
CODE_TYPE VARCHAR2(4) Y Y This column holds the distinct code type. –
This code type can be related to a list item on
the CFAS user interface.
Primary
Column Datatype Key? Required? Description Keys/Notes
CODE_TYPE_ VARCHAR2(120) N Y This column holds a description of the code –
DESC type. The code type description is never
displayed to end users, so no translation is
necessary. This data exists only to make it
easier for you to ensure that you have
selected the correct CODE_TYPE when
creating the metadata for a list item CFAS
attribute.
CODE_TYPE CODE_TYPE_DESC
BILT Bill Types
CFA_CODE_DETAIL_DESCS
This table holds the code/descriptions within a code type that will displayed as individual choices within the list items
on the CFA UI.
Primary
Column Datatype Key? Required? Description Keys/Notes
CODE_TYPE VARCHAR2(4) Y Y This column holds the distinct code type. FK to CFA_CODE_HEAD.
This code type can be related to a list item on
CODE_TYPE.
the CFAS user interface.
CODE VARCHAR2(6) Y Y This column holds a code within the code –
type. This code will be an individual item
within the list on the CFAS user interface
widget.
SEQ_NO NUMBER(4) N Y This column determines the order the code Unique within a code_type
values will be displayed within the list. and lang.
LANG NUMBER(6) Y Y This column defines the language of the code FK to LANG.LANG.
description.
Primary
Column Datatype Key? Required? Description Keys/Notes
DEFAULT_ VARCHAR2(1) N Y This column indicates that the current Check constraint (Y, N).
LANG_IND records description should be considered the
default and displayed in the user interface, if
a translation for the end user's language does
not exist. This column should be 'Y' for only
one language for the CODE_TYPE/ CODE
combination.
CODE_DESC VARCHAR2(40) N Y This column holds the text value that will be –
displayed within the list to the end user.
■ 10 columns that can hold attributes of the VARCHAR2 data type, named VARCHAR2_1, VARCHAR2_2,
VARCHAR2_3, through to VARCHAR2_10. These columns must each be VARCHAR2(250).
■ 10 columns that can hold attributes of the NUMBER data type, named NUMBER_11, NUMBER_12, NUMBER_13,
through to NUMBER_20.
■ Two columns that can hold attributes of type DATE, named DATE_21 and DATE_22.
These column names do not have business meaning to the end user, but are generic enough to store data for most
business requirements. Note that most custom specific code will not be written directly against these entity-specific
extension tables, but instead around access views. The access views join to the metadata definition tables to provide a
structure that has far more business meaning.
As an example, if the goal is to add extensions to purchase orders, there should be a record on CFA_EXT_ENTITY.
Primary
Column Datatype Key? Required? Description Keys/Notes
ORDER_NO NUMBER(8) Y Y This column holds the PO this extended FK to ordhead.order_no.
data is associated with.
GROUP_NO NUMBER(10) Y Y This column holds the attribute group id FK to CFA_ATTRIB_
that this extended data is associated GROUP.GROUP_NO.
with. The logical business meaning of the
VARCHAR_ , NUMBER_ and DATE_
columns on this table are determined by
the metadata defined for this attribute.
VARCHAR2_1 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_1 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
VARCHAR2_2 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_2 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
Primary
Column Datatype Key? Required? Description Keys/Notes
VARCHAR2_3 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_3 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
VARCHAR2_4 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_4 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
VARCHAR2_5 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_5 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
VARCHAR2_6 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_6 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
VARCHAR2_7 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_7 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
VARCHAR2_8 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_8 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
VARCHAR2_9 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_9 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
VARCHAR2_10 VARCHAR2(250) N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references VARCHAR2_10 as
it's CFA_ATTRIB.STORAGE_COL_
NAME.
NUMBER_11 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_1 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
Primary
Column Datatype Key? Required? Description Keys/Notes
NUMBER_12 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_2 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
NUMBER_13 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_3 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
NUMBER_14 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_4 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
NUMBER_15 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_5 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
NUMBER_16 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_6 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
NUMBER_17 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_7 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
NUMBER_18 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_8 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
NUMBER_19 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_9 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
NUMBER_20 NUMBER N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references NUMBER_10 as it's
CFA_ATTRIB.STORAGE_COL_NAME.
Primary
Column Datatype Key? Required? Description Keys/Notes
DATE_21 DATE N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references DATE_1 as it's CFA_
ATTRIB.STORAGE_COL_NAME.
DATE_22 DATE N N This column holds data related to the –
attribute defined on the CFA_ATTRIB
table that references DATE_2 as it's CFA_
ATTRIB.STORAGE_COL_NAME.
If more than 10 varchar2 attributes, 10 number attributes, or two date attributes are required, you must define
additional attribute groups.
Attribute groups also determine how the information is grouped on the CFAS user interface. When designing the CFAS
metadata, it is also important to consider the advantages of grouping attributes into multiple functionally related
groups from an entity or group set combination.
From the metadata definition examples earlier, the following tables illustrate the view and column name storage in the
relevant tables.
CFA_ATTRIB_GROUP_SET
CFA_ATTRIB_GROUP
CFA_ATTRIB
The following table displays the subset of columns used in the view definition.
The structure of the sample view at the group view set will be:
V_CFA_PO_CUSTOM
(
ENTRY_METHOD VARCHAR2(250),
PORT NUMBER,
SHIP_TYPE VARCHRA2(250),
SHIP_CAP NUMBER,
BILL_CODE NUMBER
BILL_DATE DATE
);
(
SHIP_TYPE VARCHRA2(250),
SHIP_CAP NUMBER
);
V_CFA_PO_BILLING
(
BILL_CODE NUMBER
BILL_DATE DATE
);
Both levels are optional and you can determine the suitable view level based on your business needs.
Additional Consideration
When group sets, groups, and attributes are defined for CFAS, the information is stored as metadata on a series of base
RMS tables. When the database objects are created based on the metadata set up, they are created as generic tables,
with column names like NUMBER_1 and VARCHAR2_4. Since this makes querying data for the attributes very
difficult, views are created when the activation scripts are run at the group set and group level.
The attribute group set view will contain all the groups and attributes in that group set. The view at the group level
will only contain the attributes for that particular group. Depending on the way you have organized the attributes or
the particular needs of the query, one or the other may be used. For example, if an attribute group (A) is created with 4
attributes for Order, the view will look similar to the following:
■ Order number
■ <Attribute A1>
■ <Attribute A2>
■ <Attribute A3>
■ <Attribute A4>
At the group set level, if there were two attribute groups in the set with group A being one and group B (with 5
attributes) the other, it will look similar to the following:
■ Order number
■ <Attribute A1>
■ <Attribute A2>
■ <Attribute A3>
■ <Attribute A4>
■ <Attribute B1>
■ <Attribute B2>
■ <Attribute B3>
■ <Attribute B4>
■ <Attribute B5>
Note: The group set and group numbers are not part of the views.
The columns of the staging table will be all the values in the CFA_ATTRIB.VIEW_COL_NAME for the extended entity.
Additional Consideration
Staging tables are created for the attribute group set level when the activation scripts are run. The layout of the staging
tables are the same as the layout of the view. Staging tables allow data from external sources to update the flex
attributes. You can use the CFAS Load scripts to take the data into these staging tables and load them into the CFAS
tables.
The data load scripts include only basic validation (for example, data type) for the data to be uploaded. Errors with the
data (for example, invalid store number) will not be caught until the users open the relevant form containing the
attributes. Ensure that you set up the relevant validation before loading the data from the staging table.
E-34 Oracle Retail Merchandising System Custom Flex Attribute Solution Implementation Guide