Merch 1208 Dcog
Merch 1208 Dcog
Merch 1208 Dcog
July 2008
Oracle® Retail Merchandising Data Conversion Operations Guide, Release 12.0.8
ii
Contents
Preface ............................................................................................................................. vii
Audience ............................................................................................................................... vii
Related Documents.............................................................................................................. vii
Customer Support................................................................................................................ vii
Conventions.......................................................................................................................... vii
1 Data Conversion Overview ......................................................................................... 1
Data Conversion Process .......................................................................................................1
Data Conversion Approach ...................................................................................................1
Prerequisites and Assumptions ............................................................................................2
How to Use This Guide..........................................................................................................2
2 Master Script (DC_LOAD_MAIN.KSH) ....................................................................... 5
Configuration File Definition (DC_LOAD.CFG)................................................................5
Directories.........................................................................................................................6
Variables............................................................................................................................7
Sequence File Definition.........................................................................................................7
Library File Description (DC_LOAD.LIB)...........................................................................8
Master Script Technical Flow ................................................................................................9
Running KSH Scripts............................................................................................................10
Preparation .....................................................................................................................10
Running a Script.............................................................................................................10
3 Core............................................................................................................................. 11
Data Flow ...............................................................................................................................12
Prerequisites ..........................................................................................................................12
File Format and External Oracle Tables.............................................................................13
File Format ......................................................................................................................13
External Oracle Table Definition .................................................................................13
Customer—DC_CUSTOMER Table ...................................................................................14
Terms ......................................................................................................................................15
DC_TERMS_HEAD Table ............................................................................................15
DC_TERMS_DETAIL Table .........................................................................................16
Freight.....................................................................................................................................18
DC_FREIGHT_TYPE Table ..........................................................................................18
DC_FREIGHT_TERMS Table.......................................................................................18
DC_FREIGHT_SIZE Table............................................................................................19
VAT.........................................................................................................................................20
DC_VAT_CODES Table................................................................................................20
DC_VAT_CODE_RATES Table ...................................................................................21
DC_VAT_REGION Table .............................................................................................21
UDA ........................................................................................................................................22
DC_UDA Table ..............................................................................................................22
iii
DC_UDA_VALUES Table ............................................................................................23
Ticket Type.............................................................................................................................24
DC_TICKET_TYPE_HEAD Table ...............................................................................24
DC_TICKET_TYPE_DETAIL Table.............................................................................25
Diff IDs—DC_DIFF_IDS Table ...........................................................................................26
DC_LOAD_CORE.KSH Segment Wrapper / Load Script..............................................27
Post-Loading Requirements ................................................................................................31
4 Merchandise Hierarchy ............................................................................................. 33
Data Flow ...............................................................................................................................34
Prerequisites ..........................................................................................................................34
File Format and External Oracle Tables.............................................................................35
File Format ......................................................................................................................35
External Oracle Table Definition .................................................................................35
Department—DC_DEPS Table............................................................................................36
Merchandise Hierarchy Defaults—DC_MERCH_DEFAULTS Table............................44
Class—DC_CLASS Table.....................................................................................................46
Subclass—DC_SUBCLASS Table........................................................................................47
VAT Departments—DC_VAT_DEPS Table ......................................................................48
UDA Item Defaults—DC_UDA_ITEM_DEFAULTS Table.............................................49
DC_LOAD_MERCH.KSH Segment Wrapper / Load Script..........................................50
Post-Loading Requirements ................................................................................................54
5 Organizational Hierarchy .......................................................................................... 55
Prerequisites ..........................................................................................................................55
Warehouse .............................................................................................................................56
Data Flow........................................................................................................................56
File Format and External Oracle Tables......................................................................57
DC_WH_ADDR Table ..................................................................................................58
DC_PWH Table..............................................................................................................60
DC_VWH Table .............................................................................................................65
DC_TRANSIT_TIMES Table ........................................................................................70
DC_LOAD_WH_ORG.KSH Segment Wrapper / Load Script................................72
Store ........................................................................................................................................75
Data Flow........................................................................................................................76
File Format and External Oracle Tables......................................................................76
DC_REGION Table........................................................................................................77
DC_DISTRICT Table .....................................................................................................77
DC_STORE_ADDR Table .............................................................................................79
DC_STORE_ADD Table................................................................................................80
DC_STORE_DEPT_AREA Table .................................................................................86
DC_LOAD_STORE_ORG.KSH Segment Wrapper / Load Script ..........................87
Post-Loading Requirements .........................................................................................88
6 Suppliers..................................................................................................................... 91
iv
Data Flow ...............................................................................................................................91
Prerequisites ..........................................................................................................................92
File Format and External Oracle Tables.............................................................................92
File Format ......................................................................................................................92
External Oracle Table Definition .................................................................................92
Suppliers—DC_SUPS Table ................................................................................................93
Supplier Address—DC_SUP_ADDR Table.....................................................................102
Supplier Import Attributes—DC_SUP_IMPORT_ATTR Table....................................104
DC_LOAD_SUPPLIER.KSH Segment Wrapper / Load Script ....................................107
LOAD_SUPPLIER........................................................................................................107
LOAD_SUP_ADDR .....................................................................................................108
LOAD_ SUP_IMPORT_ATTR....................................................................................108
Post-Loading Requirements ..............................................................................................108
7 Items.......................................................................................................................... 109
Prerequisites ........................................................................................................................109
Fashion Items.......................................................................................................................110
Data Flow......................................................................................................................110
File Format and External Oracle Tables....................................................................111
DC_STYLE Table..........................................................................................................112
DC_FASHION_SKU Table .........................................................................................116
DC_FASHION_XREF Table .......................................................................................119
DC_LOAD_FASHION_ITEM.KSH Segment Wrapper / Load Script .................121
Hardline Items.....................................................................................................................125
Data Flow......................................................................................................................125
File Format and External Oracle Tables....................................................................125
DC_HARDLINES Table..............................................................................................126
DC_HARDLINES_XREF Table ..................................................................................129
DC_LOAD_HARDLINE_ITEM.KSH Segment Wrapper / Load Script ..............131
Grocery Items ......................................................................................................................134
Data Flow......................................................................................................................134
File Format and External Oracle Tables....................................................................134
DC_PRODUCT_LINE Table.......................................................................................135
DC_PRODUCT Table ..................................................................................................139
DC_GROCERY_VARIANT Table .............................................................................145
DC_LOAD_GROCERY_ITEMS.KSH Segment Wrapper / Load Script ..............147
Pack Items ............................................................................................................................151
Data Flow......................................................................................................................151
File Format and External Oracle Tables....................................................................152
DC_ORDERABLE_PACK Table ................................................................................153
DC_SELLABLE_PACK Table.....................................................................................158
DC_PACK_COMPONENT Table..............................................................................161
DC_PACK_XREF Table ..............................................................................................162
v
DC_LOAD_PACKS.KSH Segment Wrapper / Load Script ..................................163
Item Supplier .......................................................................................................................171
Data Flow......................................................................................................................171
Prerequisites .................................................................................................................171
File Format and External Oracle Tables....................................................................172
DC_ITEM_SUPPLIER Table.......................................................................................173
DC_ITEM_SUPP_COUNTRY Table..........................................................................175
DC_PRICE_HIST Table...............................................................................................180
DC_ITEM_SUPP_COUNTRY_DIM Table ...............................................................181
DC_LOAD_ITEM_SUPPLIER.KSH Segment Wrapper / Load Script .................185
Post-Loading Requirements .......................................................................................189
Item Location .......................................................................................................................190
Data Flow......................................................................................................................190
Prerequisites .................................................................................................................191
File Format and External Oracle Tables....................................................................191
DC_ITEM_LOC Table .................................................................................................192
DC_LOAD_ITEM_LOCATION.KSH Segment Wrapper / Load Script ..............197
Others ...................................................................................................................................203
Data Flow......................................................................................................................203
Prerequisites .................................................................................................................204
File Format and External Oracle Tables....................................................................204
DC_UDA_ITEM_LOV Table ......................................................................................205
DC_UDA_ITEM_DATE Table ...................................................................................206
DC_UDA_ITEM_FF Table ..........................................................................................207
DC_VAT_ITEM Table .................................................................................................208
DC_ITEM_SEASONS Table .......................................................................................210
DC_ITEM_TICKET Table ...........................................................................................211
DC_LOAD_ITEM_OTHER.KSH Segment Wrapper / Load Script......................212
8 Optional Data............................................................................................................ 217
Core Tables ..........................................................................................................................217
Merchandise Hierarchy Tables .........................................................................................217
Organizational Hierarchy Tables......................................................................................217
Supplier Tables....................................................................................................................218
Items Tables .........................................................................................................................218
A 219
Appendix: Seed Data Installation ................................................................................ 219
vi
Preface
This guide is a reference for the data conversion operations required to migrate from
legacy retail management systems to the Oracle Retail Merchandising software.
This guide describes the data conversion operations that begin with flat files produced
from the databases of legacy applications. It details the content and format of each flat
file required to perform the data conversion, as well as the tables created and populated
by the conversion scripts.
Audience
This guide is for the members of the implementation team who plan and execute the
migration of data at the retailer’s site. The team includes the retailer’s systems
management, database management, systems analysis, and operations personnel. It also
includes Oracle Retail and consultant support staff who assist in the implementation.
Related Documents
For more information, see the following document in the Oracle Retail Merchandising
Release 12.0.8 documentation set:
Oracle Retail Merchandising Batch Schedule
These documents provide additional information to implement and operate the
Merchandising applications:
Oracle Retail Merchandising System (RMS) documentation
Oracle Retail Price Management (RPM) documentation
Oracle Retail Security Manager (RSM) documentation
Customer Support
https://metalink.oracle.com
When contacting Customer Support, please provide the following:
Product version and program/module name
Functional and technical description of the problem (include business impact)
Detailed step-by-step instructions to re-create
Exact error message received
Screen shots of each step you take
Conventions
Navigate: This is a navigate statement. It tells you how to get to the start of the procedure
and ends with a screen shot of the starting point and the statement “the Window Name
window opens.”
Preface vii
viii
1
Data Conversion Overview
This chapter is a brief introduction to the overall process to convert legacy data to the
tables required by the Oracle Retail Merchandising applications. You perform the
conversion using a data conversion toolset designed specifically for this purpose.
This chapter describes the components of the data conversion toolset and the sequence of
data conversion. It also notes some basic assumptions and prerequisites for performing
the data conversion.
Before actual data conversion can begin, the implementation team must complete
analysis, mapping, preparation, and extraction of the legacy data into the flat files
required for conversion. The Oracle Retail implementation team members perform this
work with the retailer’s systems management, database management, systems analysis,
and operations staff.
The data conversion toolset assumes clean data that conforms to the data structures
detailed in this guide.
Chapter Description
2 Master Script This chapter describes the master script, the main tool used
(DC_LOAD_MAIN.KSH) to run the auto-loading process. It describes configuration
and setup tasks required before you can use the data
conversion toolset. It also details how to customize the
toolset for your specific data conversion needs.
3 Core These chapters describe in detail all the programs and files
4 Merchandise Hierarchy required to load data for each of the functional areas.
5 Organizational Hierarchy Each chapter also contains a Prerequisites section that lists
all tasks that must be completed prior to running the tools
6 Suppliers
for that functional area. Some chapters also have a Post-
7 Items Loading Requirements section that describes tasks that
must be done before data conversion is considered
complete for that functional area.
8 Optional Data This chapter describes additional optional data that you can
load manually for each of the functional areas. Optional
data can be loaded after auto-loading is complete.
Common functions such as error handling and messaging (writing information to log
files) are handled in a separate library file called in the dc_load_main.ksh script. Global
variables, script, data, and other directories are defined in a separate configuration file.
Because most clients will be loading data into the Oracle tables with constraints disabled,
it is advisable to add custom SQL scripts for validation. Calls to these SQL scripts can be
added to the sequence file after the load script. Suggested validation is noted in each
section, to assist in developing and adding validation scripts to ensure a successful
conversion. These validations will be done after the individual load completes and prior
to enabling the constraints. The nature and quantity of load issues indicated by the load
validations will help determine, along with analysis of the log files, whether a reload
should be considered.
Directories
Create a separate set of UNIX directories to hold the data conversion toolset components.
The following directories specific to data conversion should be configured before
running the master script. All data and log directories must have read and write
privileges.
Oracle data directory orclDataDir This is the directory name defined within the
database that points to a system directory that
contains the data files used by the external tables
(dataDir).
Oracle log directory orclLogDir This is the directory name defined within the
database that points to a system directory that
contains the log files generated by the external
tables.
Note: In some instances, an entry in the external
table log may be repeated several times, because the
external table may be used in several inserts.
Data directory dataDir This directory contains the data files (*.dat) used to
load information to the external Oracle tables.
Data completed dataCompDir This directory contains processed data files.
directory
Bad file directory badDir This directory contains files with rejected records
(*.bad files).
Discard file directory dscDir This directory contains discarded files (*.dsc). This
directory can be the same as the bad file directory.
Script directory scriptDir This directory contains all the scripts used in the
conversion process.
Log directory logDir This directory contains the conversion script
execution logs.
Note: This directory is different from the orclLogDir.
The logDir contains the daily logs generated by the
conversion scripts. The orclLogDir contains logs
generated by the external tables.
Status directory statusDir This directory contains the status files created after
each load. This directory can be the same as the log
directory.
RMS bin directory rmsBinDir This is the directory where the RMS batch
executables are installed.
Variables
The following variables are shared across all conversion scripts:
Variable Description
Tag Description
PGM Use this tag to run KSH scripts or other executable scripts or applications. If no
path is defined with the script name, it is assumed that the script resides in the
script directory defined in the configuration file (*.cfg).
SQL Use this tag to run SQL scripts. If no path is included with the script name, it is
assumed that the script resides in the script directory defined in the
configuration file.
RMS Use this tag to run RMS batch programs. Although these are executable, RMS
tables must be referenced to automatically thread the execution. It is assumed
that the batch executable is located in the bin directory unless specified
otherwise (when using customized programs) and has an entry in the restart
control tables (except for prepost).
> Use this tag before text lines to display custom messages to both the log file and
screen.
# Use this tag before text lines to include remarks in the sequence file that are
ignored during execution.
Example:
# This section will load the supplier information to the RMS tables.
> Running LOAD_SUPPLIER.KSH…
PGM load_supplier.ksh
> Loading supplier information completed.
# Now validate if the data is loaded successfully.
SQL dc_validate_supplier.sql
For prepost batch, the function extracts the main batch and the prepost indicator
from the seqData2 information and executes the batch.
For file- or table-based batch programs, the function uses more complex logic to take
advantage of the multi-threading capabilities of the batch. File-based programs are
dependent on input files to load information to the RMS tables. The script checks
whether at least an input file exists. If so, the script loops through the file list,
refreshes the restart_program_status table using the refreshThreads function, and
attempts to get an available thread using the getAvailThread function. If a thread is
found, it moves the input file to a process directory (defined in the *.cfg file),
appends the thread number, and executes the batch. These steps are repeated until
all files in the input file directory (also defined in the *.cfg file) are processed. Only
files with the correct file prefix (for example, POSU for posupld files) are processed.
For table-based batch programs, the function checks whether a driver value is
defined. If none is defined, the batch is not threaded, or it is threaded using its
parameters. In this case, the function checks the seqData2 information passed in to
the function. If seqData2 contains no data, the batch is executed immediately. If the
parameter variable (from the seqData2 value) contains information, the function
builds a parameter list (paramLst array) and loops through the parameter list. If the
parameter list has values, the script starts the processing by obtaining an available
thread through the refreshThreads and getAvailThread functions, and executing the
batch by passing the parameter values required. Table-based batch programs are
handled by obtaining the number of threads from the restart control, refreshing the
threads, and looping through each available thread.
Simultaneous execution of the batch (multithreading) is achieved through a
subprocess (‘&’ appended to the batch execution line).
Preparation
Before running a KSH script, ensure that the file has the proper permissions:
-rwxrwx-r-x
Delete the status (*.status), discard (*.dsc), and bad (*.bad) files.
The environment path variable (PATH) must include the directory where the conversion
scripts will be executed. The UNIX administrator can set this by using a script, or the user
can export the path by doing one of the following (where > represents the UNIX or Linux
command line prompt):
Option 1
> cd $MMHOME/external/scripts (or the actual script directory)
> export PATH=$PATH:.
Option 2
Add the following line to the user .profile file:
export PATH=$PATH:$MMHOME/external/scripts (or the actual script directory)
Running a Script
Run the master script using the following syntax (where > represents the UNIX or Linux
command line prompt):
> dc_load_main.ksh –q <sequence-file-name>
Note the use of ‘ksh’ in the command. This prevents the program from exiting the session
after it has completed execution.
To run individual segment wrapper scripts, the ‘–q <sequence-file-name>’ portion of the
command line is not required. For example:
> dc_load_core.ksh
Note: When the KSH script calls SQL scripts to load external
tables, it is common to encounter the following error. This is
because there may not be an external Oracle table to DROP if
the table does not exist in the database. No additional action
is required.
ERROR at line 1:
ORA-00942: table or view does not exist
The data loading process does not truncate RMS tables; it
only DROPs external Oracle tables. The KSH script can be
used to load data to the same table in multiple phases.
Data Flow
The following diagram shows the data flow for the Core functional area:
Prerequisites
Before you begin using the data conversion toolset for the Core functional area, there are
tables that must be loaded manually, because of data dependencies for auto-loading
within this functional area. Manual data loading can be done online through
Merchandising applications (RMS, RPM), or scripts can be created. Manual data loading
is not included as part of this data conversion toolset. Check with your database
administrator to determine the best approach for your data conversion needs.
The following table lists the tables that require manual data loading and indicates
whether each table is required or optional:
CALENDAR Required
Note: Calendar data is loaded as part of installation; however, the
data provided may not match the calendar that fits your business
operation. Consider revising the calendar data script.
Tip: CALENDAR.MONTH_454 = ‘1’ is January (not fiscal year).
HALF Required
TSF_ENTITY Required when MLE is turned on
BANNER Required when multi-channel is turned on
CHANNELS Required
SEASONS Optional
PHASES Optional
DIFF_TYPE Required
TSFZONE Required
STORE_FORMAT Required
BUYER Optional
MERCHANT Optional
CVB_HEAD Optional
CVB_DETAIL Optional
ELC_COMP Required only if upcharges will be loaded
STATE Required only if using addresses in U.S. locations
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
Customer—DC_CUSTOMER Table
File name: DC_CUSTOMER.DAT
Table create SQL script: DBC_CREATE_CUSTOMER_TAB.SQL
External Oracle table created: DC_CUSTOMER
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that CUSTOMER.CUST_ID is unique.
Ensure that CUSTOMER.CUST_STATE is a valid STATE.STATE.
Ensure that CUSTOMER.CUST_COUNTRY_ID is a valid COUNTRY.COUNTRY_ID.
Capture the count from CUSTOMER and compare to flat file DC_CUSTOMER.DAT
to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
Terms
DC_TERMS_HEAD Table
File name: DC_TERMS_HEAD.DAT
Table create SQL script: DBC_CREATE_TERMS_HEAD_TAB.SQL
External Oracle table created: DC_TERMS_HEAD
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that TERMS_HEAD.TERMS is unique.
Capture the count from TERMS_HEAD and compare to flat file
DC_TERMS_HEAD.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_TERMS_DETAIL Table
File name: DC_TERMS_DETAIL.DAT
Table create SQL script: DBC_CREATE_TERMS_DETAIL_TAB.SQL
External Oracle table created: DC_TERMS_DETAIL
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that TERMS_DETAIL.TERMS is a valid TERMS_HEAD.TERMS.
Ensure that each combination of TERMS_DETAIL.TERMS and
TERMS_DETAIL.TERMS_SEQ is unique.
Capture the count from TERMS_DETAIL and compare to flat file
DC_TERMS_DETAIL.DAT to ensure that all rows are loaded.
Note: Column order for this file does not match the RMS
TERMS_DETAIL table.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
Freight
DC_FREIGHT_TYPE Table
File name: DC_FREIGHT_TYPE.DAT
Table create SQL script: DBC_CREATE_FREIGHT_TYPE_TAB.SQL
External Oracle table created: DC_FREIGHT_TYPE
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that FREIGHT_TYPE.FREIGHT_TYPE is unique.
Capture the count from FREIGHT_TYPE and compare to flat file
DC_FREIGHT_TYPE.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_FREIGHT_TERMS Table
File name: DC_FREIGHT_TERMS.DAT
Table create SQL script: DBC_CREATE_FREIGHT_TERMS_TAB.SQL
External Oracle table created: DC_FREIGHT_TERMS
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that FREIGHT_TERMS.FREIGHT_TERMS is unique.
Capture the count from FREIGHT_TERMS and compare to flat file
DC_FREIGHT_TERMS.DAT to ensure that all rows are loaded.
Field Name Data Max Req’d Description Field Name Data Type
Type Length
DC_FREIGHT_SIZE Table
File name: DC_FREIGHT_SIZE.DAT
Table create SQL script: DBC_CREATE_FREIGHT_SIZE_TAB.SQL
External Oracle table created: DC_FREIGHT_SIZE
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that FREIGHT_SIZE.FREIGHT_SIZE is unique.
Capture count from FREIGHT_SIZE and compare to flat file
DC_FREIGHT_SIZE.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
VAT
DC_VAT_CODES Table
File name: DC_VAT_CODES.DAT
Table create SQL script: DBC_CREATE_VAT_CODES_TAB.SQL
External Oracle table created: DC_VAT_CODES
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that VAT_CODES.VAT_CODE is unique.
Capture the count from VAT_CODES and compare to flat file
DC_VAT_CODES.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_VAT_CODE_RATES Table
File name: DC_VAT_CODE_RATES.DAT
Table create SQL script: DBC_CREATE_VAT_CODE_RATES_TAB.SQL
External Oracle table created: DC_VAT_CODE_RATES
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that VAT_CODE_RATES.VAT_CODE is a valid VAT_CODES.VAT_CODE.
Capture the count from VAT_CODE_RATES and compare to flat file
DC_VAT_CODE_RATES.DAT to ensure that all rows are loaded.
Field Name Data Max Req’d Description Field Name Data Type
Type Length
DC_VAT_REGION Table
File name: DC_VAT_REGION.DAT
Table create SQL script: DBC_CREATE_VAT_REGION_TAB.SQL
External Oracle table created: DC_VAT_REGION
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that VAT_REGION.VAT_REGION is unique.
Capture the count from VAT_REGION and compare to flat file
DC_VAT_REGION.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
UDA
DC_UDA Table
File name: DC_UDA.DAT
Table create SQL script: DBC_CREATE_UDA_TAB.SQL
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that UDA.UDA_ID is unique.
Capture the count from UDA and compare to flat file DC_UDA.DAT to ensure that
all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_UDA_VALUES Table
File name: DC_UDA_VALUES.DAT
Table create SQL script: DBC_CREATE_UDA_VALUES_TAB.SQL
External Oracle table created: DC_UDA_VALUES
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that UDA_VALUES.UDA_ID is a valid UDA.UDA_ID.
Capture the count from UDA_VALUES and compare to flat file
DC_UDA_VALUES.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
Ticket Type
DC_TICKET_TYPE_HEAD Table
File name: DC_TICKET_TYPE_HEAD.DAT
Table create SQL script: DBC_CREATE_TICKET_TYPE_HEAD_TAB.SQL
External Oracle table created: DC_TICKET_TYPE_HEAD
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that TICKET_TYPE_HEAD.TICKET_TYPE_ID is unique.
Capture the count from TICKET_TYPE_HEAD and compare to flat file
DC_TICKET_TYPE_HEAD.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_TICKET_TYPE_DETAIL Table
File name: DC_TICKET_TYPE_DETAIL.DAT
Table create SQL script: DBC_CREATE_TICKET_TYPE_DETAIL_TAB.SQL
External Oracle table created: DC_TICKET_TYPE_DETAIL
Suggested post-loading validation (sequence after dc_load_core.ksh):
Ensure that TICKET_TYPE_DETAIL.TICKET_TYPE_ID is a valid
TICKET_TYPE_HEAD.TICKET_TYPE_ID.
Ensure that TICKET_TYPE_DETAIL.TICKET_ITEM_ID (if not NULL) is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘TCKT’.
Ensure that TICKET_TYPE_DETAIL.UDA_ID (if not NULL) is a valid
UDA.UDA_ID.
Capture the count from TICKET_TYPE_DETAIL and compare to flat file
DC_TICKET_TYPE_DETAIL.DAT to ensure that all rows are loaded.
Field Name Data Max Req’d Description Field Name Data Type
Type Length
Field Name Data Max Req’d Description Field Name Data Type
Type Length
LOAD_CUSTOMER
This function contains a PL/SQL block that selects from the DC_ CUSTOMER external
table and inserts the data to the RMS CUSTOMER table. All the columns from the
external Oracle table defined previously map directly to the RMS table. The fields that
are not required are NULL.
The function returns a Boolean value.
Required file to load: dc_customer.dat
LOAD_TERMS_HEAD
This function contains a PL/SQL block that selects from the DC_ TERMS_HEAD external
table and inserts the data to the RMS TERMS_HEAD table. All the columns from the
external Oracle table defined previously map directly to the RMS table. The fields that
are not required are NULL.
The function returns a Boolean value.
Required file to load: dc_terms_head.dat
LOAD_TERMS_DETAIL
This function contains a PL/SQL block that selects from the DC_ TERMS_DETAIL
external table and inserts the data to the RMS TERMS_DETAIL table. All the columns
from the external Oracle table defined previously map directly to the RMS table. The
fields that are not required are NULL.
The function returns a Boolean value.
Required files to load: dc_terms_head.dat, dc_terms_detail.dat
LOAD_FREIGHT_TYPE
This function contains a PL/SQL block that selects from the DC_FREIGHT_TYPE
external table and inserts the data to the RMS FREIGHT_TYPE table. All the columns
from the external Oracle table defined previously map directly to the RMS table. All are
required.
The function returns a Boolean value.
Required file to load: dc_freight_type.dat
LOAD_FREIGHT_TERMS
This function contains a PL/SQL block that selects from the DC_FREIGHT_TERMS
external table and inserts the data to the RMS FREIGHT_TERMS table. All the columns
from the external Oracle table defined previously map directly to the RMS table.
The function returns a Boolean value.
Required file to load: dc_freight_terms.dat
LOAD_FREIGHT_SIZE
This function contains a PL/SQL block that selects from the DC_FREIGHT_SIZE external
table and inserts the data to the RMS FREIGHT_SIZE table. All the columns from the
external Oracle table defined previously map directly to the RMS table. All are required.
The function returns a Boolean value.
Required file to load: dc_freight_size.dat
LOAD_VAT_CODES
This function contains a PL/SQL block that selects from the DC_VAT_CODE,
DC_VAT_CODE_RATE,S and DC_VAT_REGION external tables and inserts the data to
the RMS VAT_CODE, VAT_CODE_RATES, and VAT_REGION tables. All the columns
from the external Oracle tables defined previously map directly to the RMS tables. All are
required.
The function returns a Boolean value.
Required file to load: dc_vat_codes.dat
LOAD_VAT_CODE_RATES
This function contains a PL/SQL block that selects from the DC_VAT_CODE_RATES
external table and inserts the data to the RMS VAT_CODE_RATES table. All the columns
from the external Oracle table defined previously map directly to the RMS table. The
following table defines the default values in the RMS table if no information is provided
in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_VAT_CODE_RATES to VAT_CODE_RATES Column Defaults
CREATE_DATE SYSDATE Date the record was created in RMS. This defaults
to the system date.
CREATE_ID Oracle User User who created the record in RMS. This defaults
to the Oracle User.
LOAD_VAT_REGION
This function contains a PL/SQL block that selects from the DC_VAT_REGION external
table and inserts the data to the RMS VAT_REGION table. All the columns from the
external Oracle table defined previously map directly to the RMS table. All are required.
The function returns a Boolean value.
Required file to load: dc_vat_region.dat
LOAD_UDA
This function contains a PL/SQL block that selects from the DC_UDA external table and
inserts the data into the RMS UDA table. All the columns from the external Oracle table
defined previously map directly to the RMS table. The following table defines the default
values in the RMS table if no information is provided in the data file (external table field
values are NULL or not defined).
The function returns a Boolean value
DC_UDA to UDA Column Defaults
LOAD_UDA_VALUES
This function contains a PL/SQL block that selects from the DC_UDA_VALUES external
table and inserts the data into the RMS UDA_VALUES table. UDA_VALUES should
contain information if the DATA_TYPE value in the UDA table is LV. All the columns
from the external Oracle table defined previously map directly to the RMS table. The
following table defines the default values in the RMS table if no information is provided
in the data file (external table field values are NULL or not defined).
The function returns a Boolean value
DC_UDA_VALUES to UDA_VALUES Column Defaults
LOAD_TICKET_TYPE_HEAD
This function contains a PL/SQL block that selects from the DC_TICKET_TYPE_HEAD
external table and inserts the data into the RMS TICKET_TYPE_HEAD table. All the
columns from the external Oracle table defined previously map directly to the RMS table.
The function returns a Boolean value.
Required files to load: dc_ticket_type_head.dat
LOAD_TICKET_TYPE_DETAIL
This function contains a PL/SQL block that selects from the DC_TICKET_TYPE_DETAIL
external table and inserts the data into the RMS TICKET_TYPE_DETAIL table. All the
columns from the external Oracle table defined previously map directly to the RMS table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined). There
should be a value in TICKET_ITEM_ID or UDA_ID, but not both.
The function returns a Boolean value.
DC_TICKET_TYPE_DETAIL to TICKET_TYPE_DETAIL Column Defaults
LOAD_DIFF_IDS
This function contains a PL/SQL block that selects from the DC_DIFF_IDS external table
and inserts the data to the RMS DIFF_IDS table. All the columns from the external Oracle
table defined previously map directly to the RMS table. All are required.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined). There
should be a value in TICKET_ITEM_ID or UDA_ID, but not both.
The function returns a Boolean value.
DC_DIFF_IDS to DIFF_IDS Column Defaults
Post-Loading Requirements
After using the data conversion toolset for this functional area, there are additional tables
that must be loaded manually before you proceed with data conversion for subsequent
functional areas, because of data dependencies.
Manual data loading can be performed online through Merchandising applications
(RMS, RPM), or scripts can be created. Manual data loading is not included as part of this
data conversion toolset. Check with your database administrator to determine the best
approach for your data conversion needs.
The following table lists the tables that require manual data loading and indicates
whether each table is required or optional:
DIFF_GROUP_HEAD Required
DIFF_GROUP_DETAIL Required
DIFF_RANGE_HEAD Optional
DIFF_RANGE_DETAIL Optional
Data Flow
The following diagram shows the data flow for the Merchandise Hierarchy functional
area:
Prerequisites
Before you begin using the data conversion toolset for Merchandise Hierarchy, you must
complete data conversion for the Core functional area.
There are tables that must be loaded manually, because of data dependencies for auto-
loading within this functional area. Manual data loading can be done online through
Merchandising applications (RMS, RPM), or scripts can be created. Manual data loading
is not included as part of this data conversion toolset. Check with your database
administrator to determine the best approach for your data conversion needs.
The following required tables must be loaded manually:
COMPHEAD
DIVISION
GROUPS
You must retrieve the assigned data value UDA_VALUES.UDA_VALUE to create the
DC_UDA_ITEM_DEFAULT.DAT flat file (see the section “UDA Item Defaults—
DC_UDA_ITEM_DEFAULTS Table” in this chapter).
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
Department—DC_DEPS Table
File name: DC_DEPS.DAT
Table create SQL script: DBC_CREATE_DEPS_TAB.SQL
External Oracle table created: DC_DEPS
This table is used to load the RMS DEPS and the RPM RPM_DEPT_AGGREGATION
tables.
Suggested post-loading validation (sequence after dc_load_merch.ksh):
Ensure that DEPS.DEPT is unique.
Ensure that DEPS.GROUP_NO is a valid GROUPS.GROUP_NO.
Ensure DEPS.BUYER (if not NULL) is a valid BUYER.BUYER.
Ensure DEPS.MERCH (if not NULL) is a valid MERCHANT.MERCH.
Capture the counts from DEPS and RPM_DEPT_AGGREGATION and compare to
flat file DC_DEPS.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
Field Name Data Type Max Req’d Description Field Name Data Type
Length
MERCH_ Integer 12,4 Y Whether the field specifies the DEPT_MRKUP_ NUMBER
HIER_4_ intake, or markup is determined PCT
MRKUP_ by the value of the DC_DEPS.
PCT MARKUP_CALC_TYPE field.
A value of ‘R’ indicates that this
field specifies the budgeted
intake, which is synonymous
with markup percent of retail.
A value of ‘C’ indicates that this
field specifies the budgeted
markup, which is synonymous
with markup percent of cost.
If no value is specified in the flat
file, the default value is taken
from the MARKUP_PCT field in
the DC_MERCH_DEFAULTS
file.
MERCH_ Alpha- 2 Y Whether the markup calculation DEPT_ VARCHAR2
HIER_4_ numeric type should be ‘C’ost or ‘R’etail MARKUP_
MARKUP_ for MERCH_HIER_4 records. CALC_TYPE
CALC_TYPE Valid values are:
C - Cost
R – Retail
MERCH_ Alpha- 1 Y Whether the open to buy (OTB) DEPT_OTB_ VARCHAR2
HIER_4_OTB_ numeric calculation type should be ‘C’ost CALC_TYPE
CALC_TYPE or ‘R’etail for MERCH_HIER_4
records. Valid values are:
C - Cost
R – Retail
MERCH_ Alpha- 1 Y Whether retail is held with VAT DEPT_VAT_ VARCHAR2(1)
HIER_4_VAT_ numeric in the MERCH_HIER_4 level. If INCL_IND
IN_RETAIL VAT is not turned on in RMS,
this value should be ‘N’.
MERCH_ Alpha- 1 Y Whether retail is held with VAT CLASS_VAT_ VARCHAR2(1)
HIER_5_VAT_ numeric in the MERCH_HIER_5 level. If INCL_IND
IN_RETAIL VAT is not turned on in RMS,
this value should be ‘N’.
Class—DC_CLASS Table
File name: DC_CLASS.DAT
Table create SQL script: DBC_CREATE_CLASS_TAB.SQL
External Oracle table created: DC_CLASS
Suggested post-loading validation (sequence after dc_load_merch.ksh):
Ensure that the CLASS.DEPT/CLASS.CLASS combination is unique.
Ensure that CLASS.DEPT is a valid DEPS.DEPT.
Capture the count from CLASS and compare to flat file DC_CLASS.DAT to ensure
that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
Subclass—DC_SUBCLASS Table
File name: DC_SUBCLASS.DAT
Table create SQL script: DBC_CREATE_SUBCLASS_TAB.SQL
External Oracle table created: DC_SUBCLASS
Suggested post-loading validation (sequence after dc_load_merch.ksh):
Ensure that the SUBCLASS.DEPT/SUBCLASS.CLASS/SUBCLASS.SUBCLASS
combination is unique.
Ensure that the SUBCLASS..DEPT/SUBCLASS.CLASS combination exists in CLASS.
Capture the count from SUBCLASS and compare to flat file DC_SUBCLASS.DAT to
ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
Field Name Data Type Max Req’d Description Field Name Data Type
Length
Field Name Data Max Req’d Description Field Name Data Type
Type Length
LOAD_DEPS
This function contains a PL/SQL block that selects from the DC_DEPS external table and
inserts the data to the RMS DEPS table. The following table defines the default values in
the RMS table if no information is provided in the data file (external table field values are
NULL or not defined).
If the DC_MERCH_DEFAULTS.DEFAULT_CLASS_IND is ‘Y’, only one class and
subclass are inserted for each department. The DC_DEPS and DC_MERCH_DEFAULT
tables are used to insert into the RMS CLASS and SUBCLASS tables. The ID and name
fields are the same as department for all classes and subclasses.
The function returns a Boolean value.
DC_DEPS to DEPS Column Defaults
LOAD_CLASS
This function contains a PL/SQL block that selects from the DC_CLASS external table
and inserts the data to the RMS CLASS and possibly SUBCLASS tables.
Note: This load will not run if the subclasses are defaulted in
the LOAD_DEPS table (that is, no dc_class.dat file exists).
The dc_load_merch.ksh script determines whether to run
this function when the dc_class.dat file does not exist. The
script first gets the indicators from the DC_MERCH_
DEFAULTS table. If the DEFAULT_CLASS indicator is not
set to ‘Y’, the records from DC_CLASS are loaded into the
RMS CLASS table. If the DEFAULT_SUBCLASS indicator is
set to ‘Y’, only one subclass is inserted for each class. The
subclass ID defaults to the class ID value.
The following table defines the default value in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_CLASS to CLASS Column Defaults
LOAD _SUBCLASS
This function contains a PL/SQL block that selects from the DC_SUBCLASS external
table and inserts the data to the RMS SUBCLASS.
LOAD_STOCK_LEDGER_INS
This function creates records in the RMS STOCK_LEDGER_INSERTS table for every new
department and subclass loaded. The function performs an insert/select from the
DC_DEPS and DC_SUBCLASS tables to insert the appropriate information (with
type_code ‘D’ or ‘B’, respectively) into the STOCK_LEDGER_INSERTS table.
The function returns a Boolean value.
Required files to load: dc_deps.dat, dc_subclass.dat
LOAD_VAT_DEPS
This function selects data from the DC_VAT_DEPS table and inserts the records into the
RMS VAT_DEPS table, if the system options vat_ind is set to Y. All the columns from the
external Oracle table defined above map directly to the RMS table.
The function returns a Boolean value.
Required file to load: dc_vat_deps.dat
LOAD_UDA_ITEM_DEF
This function contains a PL/SQL block that selects from the DC_UDA_ITEM_
DEFAULTS external table and inserts the data to the RMS UDA_ITEM_DEFAULTS table.
All the columns from the external Oracle table defined above map directly to the RMS
table. The following table defines the default value in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_UDA_ITEM_DEFAULTS to UDA_ITEM_DEFAULTS Column Defaults
LOAD_RPM_DEPT_AGGREGATION
This function selects data from the DC_DEPS table and inserts the records into the
RPM_DEPT_AGGREGATION table. The following table defines the default values in the
RMS table if no information is provided in the data file (external table field values are
NULL or not defined).
The function returns a Boolean value.
DC_DEPS to RPM_DEPT_AGGREGATION Column Defaults
Post-Loading Requirements
After using the data conversion toolset for this functional area, there are additional tables
that must be loaded manually before you proceed with data conversion for subsequent
functional areas, because of data dependencies.
Manual data loading can be done online through Merchandising applications (RMS,
RPM), or scripts can be created. Manual data loading is not included as part of this data
conversion toolset. Check with your database administrator to determine the best
approach for your data conversion needs.
The following are required tables that require manual data loading:
RPM_MERCH_RETAIL_DEF
HIERARCHY_PERMISSION (Retail Security Manager [RSM] table)
Additionally, all department UDA defaults must be set up manually where
UDA_ITEM_DEFAULTS.REQUIRED_IND = ‘Y’.
Prerequisites
Before you begin using the data conversion toolset for Organizational Hierarchy, you
must complete data conversion for the following functional areas:
Core
Merchandise Hierarchy
There are tables that must be loaded manually, because of data dependencies for auto-
loading within this functional area. Manual data loading can be done online through
Merchandising applications (RMS, RPM), or scripts can be created. Manual data loading
is not included as part of this data conversion toolset. Check with your database
administrator to determine the best approach for your data conversion needs.
The following required tables must be loaded manually:
CHAIN
AREA
Warehouse
This section describes data conversion for the following RMS tables, listed in the order
that they must be loaded:
ADDR
WH
WH_ADD
STOCK_LEDGER_INSERTS
TRANSIT_TIMES (applicable to both store and warehouses)
COST_ZONE
COST_ZONE_GROUP_LOC
The following programs are included in this functional area:
Main wrapper script dc_load_main.ksh
This main script is used across all functional areas to call segment load scripts. Refer
to Chapter 2 for details.
Segment load script dc_load_wh_org.ksh
This wrapper calls the external Oracle table create and load scripts listed below.
External Oracle table create scripts:
– dbc_create_wh_addr_tab.sql
– dbc_create_vwh_tab.sql
– dbc_create_pwh_tab.sql
– dbc_create_transit_times_tab.sql
Data Flow
The following diagram shows the data flow for the Organizational Hierarchy Warehouse
functional area:
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
DC_WH_ADDR Table
File name: DC_WH_ADDR.DAT
Table create SQL script: DBC_CREATE_WH_ADDR_TAB.SQL
External Oracle table created: DC_WH_ADDR
Suggested post-loading validation (sequence after dc_load_wh_org.ksh):
Ensure that ADDR.KEY_VALUE_1 is a valid WH.WH. If
SYSTEM_OPTION.MULTICHANNEL_IND = ‘Y’, ensure that
WH.STOCKHOLDING_IND = ‘N’.
Ensure that ADDR.STATE is a valid STATE.STATE.
Ensure that ADDR.COUNTRY_ID is a valid COUNTRY.COUNTRY_ID.
Capture counts from ADDR where ADDR.MODULE = ‘WH’ and compare to flat file
DC_WH_ADDR.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_PWH Table
File name: DC_PWH.DAT
Table create SQL script: DBC_CREATE_PWH_TAB.SQL
External Oracle table created: DC_PWH
Suggested post-loading validation (sequence after dc_load_wh_org.ksh):
Ensure that WH.WH is unique.
If WH.ORG_HIER_TYPE has a value of 1, ensure that WH.ORG_HIER_VALUE is a
valid COMPHEAD.COMPANY.
If WH.ORG_HIER_TYPE has a value of 10, ensure that WH.ORG_HIER_VALUE is a
valid CHAIN.CHAIN.
If WH.ORG_HIER_TYPE has a value of 20, ensure that WH.ORG_HIER_VALUE is a
valid AREA.AREA.
If WH.ORG_HIER_TYPE has a value of 30, ensure that WH.ORG_HIER_VALUE is a
valid REGION.REGION.
If WH.ORG_HIER_TYPE has a value of 40, ensure that WH.ORG_HIER_VALUE is a
valid DISTRICT.DISTRICT.
If WH.ORG_HIER_TYPE has a value of 50, ensure that WH.ORG_HIER_VALUE is a
valid STORE.STORE (move to after running storeadd.pc).
If SYSTEM_OPTION.MULTICHANNEL_IND = ‘Y’ and
WH.STOCKHOLDING_IND = ‘Y’, ensure that WH.CHANNEL_ID is a valid
CHANNELS.CHANNEL_ID.
Ensure that WH.VAT_REGION is a valid VAT_REGION.VAT_REGION if
SYSTEM_OPTIONS.VAT_IND = ‘Y’ and WH.STOCKHOLIDNG_IND = ‘Y’.
Ensure that WH.CURRENCY_CODE is a valid CURRENCIES.CURRENCY_CODE.
If SYSTEM_OPTION.MULTICHANNEL_IND = ‘Y’ and
WH.STOCKHOLDING_IND = ‘N’, ensure that WH.PRIMARY_VWH is a valid
WH.WH with WH.STOCKHOLDING_IND = ‘Y’.
Ensure that WH.ORG_UNIT_ID (if not NULL) is a valid ORG_UNIT.ORG_UNIT_ID.
Ensure that WH.TSF_ENTITY_ID is a valid TSF_ENTITYT.TSF_ENTITY_ID if
SYSTEM_OPTIONS.INTERCOMPANY_TRANSFER_IND = ‘Y’ and
WH.STOCKHOLIDNG_IND = ‘Y’.
If SYSTEM_OPTION.MULTICHANNEL_IND = ‘Y’, capture counts from WH where
WH.STOCKHOLDING_IND = ‘N’ and compare to flat file DC_PWH.DAT to ensure
that all rows are loaded.
If SYSTEM_OPTION.MULTICHANNEL_IND = ‘N’, capture counts from WH and
compare to flat file DC_PWH.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_VWH Table
File name: DC_VWH.DAT
This VWH.DAT file contains the virtual warehouse locations details for each physical
warehouse. This file is to be created and loaded into RMS only when multi-channel
functionality is enabled (SYSTEM_OPTIONS. MULTICHANNEL_IND = ‘Y’). Otherwise,
this file is not necessary, and only the DC_PWH.DAT file is required.
Table create SQL script: DBC_CREATE_VWH_TAB.SQL
External Oracle table created: DC_VWH
Suggested post-loading validation (sequence after dc_load_wh_org.ksh):
If SYSTEM_OPTION.MULTICHANNEL_IND = ‘Y’, ensure that
WH.PHYSICAL_WH is a valid WH.WH with WH.STOCKHOLDING_IND = ‘N’.
If SYSTEM_OPTION.MULTICHANNEL_IND = ‘Y’, capture counts from WH where
WH.STOCKHOLDING_IND = ‘Y’ and compare to flat file DC_VWH.DAT to ensure
that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_TRANSIT_TIMES Table
File name: DC_TRANSIT_TIMES.DAT
Table create SQL script: DBC_CREATE_TRANSIT_TIMES_TAB.SQL
External Oracle table created: DC_TRANSIT_TIMES
Field Name Data Type Max Req’d Description Field Name Data Type
Length
LOAD_WH_ADDR
This function contains a PL/SQL block that selects from the DC_WH_ADDR external
table and inserts the data to the RMS ADDR table.
The table below defines the default values in the RMS table if no information is provided
in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_WH_ADDR to ADDR Column Defaults
LOAD_WH
This function serves several purposes:
It inserts data into the WH table by selecting all columns from the DC_VWH and
DC_PWH external tables, or both, and uses the defaults specified below for the
columns that are not in the DC_PWH or DC_VWH tables, or that are NULL in the
external tables.
Both DC_VWH and DC_PWH tables are considered for loading data only when
SYSTEM_OPTIONS. MULTICHANNEL_IND = ‘Y’. Otherwise, only data from the
DC_PWH table is loaded.
It inserts data into the WH_ADD table. There are four total columns to be populated.
It populates the WH_ADD pricing location with the warehouse ID (virtual
warehouse ID when multi-channel is on) and the PRICING_LOC_CURR with the
warehouse CURRENCY_CODE.
It inserts data into the STOCK_LEDGER_INSERTS table. If SYSTEM_OPTIONS.
MULTICHANNEL_IND = ‘Y’, it inserts the virtual warehouse number. Otherwise, it
inserts the physical warehouse number.
Note:
When multi-channel is not enabled, there is only one file for DC_PWH data
(DC_PWH.DAT). This function populates the WH, WH_ADD, and
STOCK_LEDGER_INSERTS tables accordingly.
When multi-channel is enabled, there are two files for DC_PWH and DC_VWH data
(DC_PWH.DAT and DC_VWH.DAT). Each physical warehouse (PWH) may have
one or more virtual warehouses (VWH), so there can be one-to-many mappings
between DC_PWH and DC_VWH tables. Data from both the DC_PWH and
DC_VWH tables is used to insert physical warehouse records into the WH table first;
then all related virtual warehouse records are inserted into the WH table. For inserts
into the WH_ADD and STOCK_LEDGER_INSERTS tables, only virtual warehouse
data is used.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_PWH to WH, WH_ADD, STOCK_LEDGER_INSERTS Column Defaults
RESTRICTED_IND N
PROTECTED_IND N
BREAK_PACK_IND Y If NULL
REDIST_WH_IND Y If NULL
FORECAST_WH_IND Y If NULL
REPL_IND If multichannel = Y, then override file
value with ‘N’; otherwise, default to ‘Y’
IB_IND N
STOCKHOLDING_IND N if multi-channel, Y if not multi-channel
AUTO_IB_CLEAR N
FINISHER_IND N This can only be ‘Yes’ for virtual
warehouses in a multi-channel
environment, so always set it to ‘N’
PHYSICAL_WH WAREHOUSE_ID
STOCKHOLDING_IND Y
REDIST_WH_IND N If NULL
PROTECTED_IND N If NULL
FORECAST_WH_IND Y If NULL
REPL_IND N If NULL
IB_IND N If NULL
AUTO_IB_CLEAR N If NULL
FINISHER_IND N WAREHOUSE_ID
VAT_REGION From physical warehouse
CURRENCY_CODE From physical warehouse
ORG_HIER_TYPE From physical warehouse
ORG_HIER_VALUE From physical warehouse
DELIVERY_POLICY From physical warehouse
EMAIL From physical warehouse
DUNS_NUMBER From physical warehouse
DUNS_LOC From physical warehouse
INBOUND_HANDLING_DAYS From physical warehouse
LOAD_TRANSIT_TIMES
This function contains a PL/SQL block that selects from the DC_TRANSIT_TIMES
external table and inserts the data to the RMS TRANSIT_TIMES table.
Required file to load: dc_transit_times.dat
INSERT_COST_ZONE_LOCS
This function inserts data into the COST_ZONE and COST_ZONE_GROUP_LOC tables
for the ‘L’ cost level ZONE_GROUP_ID, by selecting all columns from the DC_PWH
external table. First it retrieves the ZONE_GROUP_ID for the ‘L’ cost_level from the
COST_ZONE_GROUP table; then it uses this ZONE_GROUP_ID to insert records for all
the physical warehouses in the DC_PWH external table into the COST_ZONE and
COST_ZONE_GROUP_LOC tables. The columns in these tables map to the DC_PWH
table as follows:
zone_ID = wh
location = wh
description = wh_name
loc_type = ‘W’
base_cost_ind = ‘N’
The same insert is performed in the COST_ZONE_GROUP_LOC table for virtual
warehouses, if the SYSTEM_OPTIONS multichannel_ind is set to ‘Y’. In this insert , the
values are retrieved from the DC_VWH table, and the zone_id is set to the physical_wh
column value.
Required file to load: dc_pwh.dat, dc_vwh.dat (if multi-channel is active)
Store
This section describes data conversion for the following RMS tables, listed in the order
that they must be loaded:
REGION
DISTRICT
STORE_ADD
STORE_DEPT_AREA
ADDR
Data Flow
The following diagram shows the data flow for the Organizational Hierarchy Store
functional area:
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
DC_REGION Table
File name: DC_REGION.DAT
Table create SQL script: DBC_CREATE_REGION_TAB.SQL
External Oracle table created: DC_REGION
Suggested post-loading validation (sequence after dc_load_store_org.ksh):
Ensure that REGION.REGION is unique.
Ensure that REGION.AREA is a valid AREA.AREA.
Ensure that REGION.CURRENCY_CODE (if not NULL) is a valid
CURRENCIES.CURRENCY_CODE.
Capture the count from REGION and compare to flat file DC_REGION.DAT to
ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_DISTRICT Table
File name: DC_DISTRICT.DAT
Table create SQL script: DBC_CREATE_DISTRICT_TAB.SQL
External Oracle table created: DC_DISTRICT
Suggested post-load validation (sequence after dc_load_store_org.ksh):
Ensure that DISTRICT.DISTRICT is unique.
Ensure that DISTRICT.REGION is a valid REGION.REGION.
Ensure that DISTRICT.CURRENCY_CODE (if not NULL) is a valid
CURRENCIES.CURRENCY_CODE.
Capture the count from DISTRICT and compare to flat file DC_DISTRICT.DAT to
ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_STORE_ADDR Table
File name: DC_STORE_ADDR.DAT
Table create SQL script: DBC_CREATE_STORE_ADDR_TAB.SQL
External Oracle table created: DC_STORE_ADDR
Suggested post-loading validation (sequence after dc_load_store_org.ksh):
Ensure that ADDR.KEY_VALUE_1 is a valid STORE_ADD.STORE.
Ensure that ADDR.STATE is a valid STATE.STATE.
Ensure that ADDR.COUNTRY_ID is a valid COUNTRY.COUNTRY_ID.
Capture the count from ADDR where ADDR.MODULE = ‘ST’ and compare to flat
file DC_STORE_ADDR.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_STORE_ADD Table
File name: DC_STORE_ADD.DAT
Table create SQL script: DBC_CREATE_STORE_ADD_TAB.SQL
External Oracle table created: DC_STORE_ADD
Suggested post-loading validation (sequence after dc_load_store_org.ksh):
Ensure that STORE_ADD.STORE is unique and does not exist on STORE.
If SYSTEM_OPTION.MULTICHANNEL_IND = ‘Y’, ensure that
STORE_ADD.CHANNEL_ID is a valid CHANNELS.CHANNEL_ID.
Ensure that STORE_ADD.VAT_REGION is a valid VAT_REGION.VAT_REGION, if
SYSTEM_OPTIONS.VAT_IND = ‘Y’.
Ensure that STORE_ADD.TSFZONE (if not NULL) is a valid
TSFZONE.TRANSFER_ZONE.
Ensure that STORE_ADD.CURRENCY_CODE is a valid
CURRENCIES.CURRENCY_CODE.
Ensure that STORE_ADD.LANG is a valid LANG..LANG.
Ensure that STORE_ADD.DISTRICT is a valid DISTRICT.DISTRICT.
Ensure that STORE_ADD.DEFAULT_WH (if not NULL) is a valid WH.WH, where
WH.STOCKHOLDING_IND = ‘Y’.
Ensure that STORE_ADD.ORG_UNIT_ID (if not NULL) is a valid
ORG_UNIT.ORG_UNIT_ID.
Ensure that STORE_ADD.TSF_ENTITY_ID is a valid
TSF_ENTITYT.TSF_ENTITY_ID, if
SYSTEM_OPTIONS.INTERCOMPANY_TRANSFER_IND = ‘Y’.
Ensure that STORE_ADD.STORE_FORMAT (if not NULL) is a valid
STORE_FORMAT.STORE_FORMAT.
Ensure that STORE_ADD.SISTER_STORE (if not NULL) is a valid
STORE_ADD.STORE or a valid STORE.STORE.
Capture the count from STORE_ADD and compare to flat file
DC_STORE_ADD.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_STORE_DEPT_AREA Table
File name: DC_STORE_DEPT_AREA.DAT
Table create SQL script: DBC_CREATE_STORE_DEPT_AREA_TAB.SQL
External Oracle table created: DC_STORE_DEPT_AREA
Suggested post-loading validation (sequence after dc_load_store_org.ksh):
Ensure that STORE_DEPT_AREA.STORE is a valid STORE_ADD.STORE or a valid
STORE.STORE.
Ensure that STORE_DEPT_AREA.DEPT is a valid DEPS.DEPT.
Capture the count from STORE_DEPT_AREA and compare to flat file
DC_STORE_DEPT_AREA.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
LOAD_ REGION
This function contains a PL/SQL block that selects from the DC_REGION external table
and inserts the data to the RMS REGION table.
Required file to load: dc_region.dat
LOAD_ DISTRICT
This function contains a PL/SQL block that selects from the DC_DISTRICT external table
and inserts the data to the RMS DISTRICT table.
Required file to load: dc_district.dat
LOAD_STORE_ADDRESS
This function contains a PL/SQL block that selects from the DC_STORE_ADDR external
table and inserts the data to the RMS ADDR table.
The table below defines the default values in the RMS table if no information is provided
in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_STORE_ADDR to ADDR Column Defaults
ADDR_KEY System-generated
MODULE ST
SEQ_NO 1
PUBLISH_IND N
LOAD_ STORE_ADD
This function contains a PL/SQL block that selects from the DC_STORE_ADD external
table and inserts the data to the RMS STORE_ADD table.
The table below defines the default values in the RMS table if no information is provided
in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_STORE_ADD to STORE_ADD Column Defaults
LOAD_ STORE_DEPT_AREA
This function contains a PL/SQL block that selects from the DC_STORE_DEPT_AREA
external table and inserts the data to the RMS STORE_DEPT_AREA table.
Required file to load: dc_store_dept_area.dat
Post-Loading Requirements
After using the data conversion toolset for this functional area, there are additional tables
that must be loaded manually before you proceed with data conversion for subsequent
functional areas, because of data dependencies.
Manual data loading can be done online through Merchandising applications (RMS,
RPM), or scripts can be created. Manual data loading is not included as part of this data
conversion toolset. Check with your database administrator to determine the best
approach for your data conversion needs.
The following are required tables that require manual data loading:
DEPT_CHRG_HEAD
DEPT_CHRG_DETAIL
STORE_HIERARCHY
COST_ZONE_GROUP (zone level pricing)
COST_ZONE
COST_ZONE_GROUP_LOC
RPM requirements:
– RPM_ZONE_GROUP_TYPE
– RPM_ZONE_GROUP
– RPM_ZONE
– RPM_ZONE_LOCATION
STOREADD.PC Batch
Run the storeadd.pc batch program at the end, to load store data from the RMS
STORE_ADD table into RMS. When a store record is added to the RMS STORE_ADD
table, the store data is accessible in the system only after the storeadd.pc batch program
is run. The batch program loops through each record in the STORE_ADD table and
performs all the necessary inserts into the different RMS tables. This program adds all
information necessary for a new store to function properly. For details about storeadd.pc,
please refer to the Oracle Retail Merchandising System Operations Guide.
WHADD.PC Batch
Run the whadd.pc batch program at the end, to load data from the RMS WH_ADD table
into RMS. This batch program inserts pricing/zone information for new warehouses,
virtual warehouses, and internal finishers. It reads from the WH_ADD table and inserts
into the PRICE_ZONE and PRICE_ZONE_GROUP_STORE tables for each retrieved
record. Successfully processed records are deleted from the WH_ADD table. For more
information about the whadd.pc batch program, refer to the Oracle Retail Merchandising
System Operations Guide.
Data Flow
The following diagram shows the data flow for the Suppliers functional area:
Prerequisites
Before you begin using the data conversion toolset for Suppliers, you must complete data
conversion for the following functional areas:
Core
Merchandise Hierarchy
Organizational Hierarchy
There are tables that must be loaded manually, because of data dependencies for auto-
loading within this functional area. Manual data loading can be done online through
Merchandising applications (RMS, RPM), or scripts can be created. Manual data loading
is not included as part of this data conversion toolset. Check with your database
administrator to determine the best approach for your data conversion needs.
The following required tables must be loaded manually:
PARTNER (required types: ‘AG’=agents, ‘BK’=advising or issuing banks,
‘FA’=factory)
OUTLOC (required types: ‘DP’=discharge ports, ‘LP’=lading ports)
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
Suppliers—DC_SUPS Table
File name: DC_SUPS.DAT
Table create SQL script: DBC_CREATE_SUPS_TAB.SQL
External Oracle table created: DC_SUPS
Suggested post-loading validation (sequence after dc_load_supplier.ksh):
Ensure that SUPS.SUPPLIER is unique.
If SYSTEM_OPTION.MULTICHANNEL_IND = ‘Y’, ensure that
SUPS.EDI_CHANNEL_ID (if not NULL) is a valid CHANNELS.CHANNEL_ID.
Ensure that SUPS.CURRENCY_CODE is a valid CURRENCIES.CURRENCY_CODE.
Ensure that SUPS.TERMS is a valid TERMS_HEAD.TERMS.
Ensure that SUPS.FREIGHT_TERMS is a valid FREIGHT_TERMS.FREIGHT_TERMS.
Ensure that SUPS.LANG (if not NULL) is a valid LANG.LANG.
Ensure that SUPS.VAT_REGION is a valid VAT_REGION.VAT_REGION if
SYSTEM_OPTIONS.VAT_IND = ‘Y’.
Capture supplier number from SUPS where SUPS.BRACKET_COSTING_IND = ‘Y’
to ensure that SUP_BRACKET_COST rows are added manually.
Capture supplier number from SUPS where SUPS.RET_ALLOW_IND = ‘Y’ to ensure
that row for the supplier with ADDR_TYPE = ‘03’ exists in ADDR.
Capture the count from SUPS and compare to flat file DC_SUPS.DAT to ensure that
all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
Field Name Data Type Max Req’d Description Field Name Data Type
Length
Field Name Data Type Max Req’d Description Field Name Data Type
Length
LOAD_SUPPLIER
This function selects from the DC_ SUPS external table and inserts the data to the RMS
SUPS table. All the columns from the external Oracle table defined previously map
directly to the RMS table. The following table lists columns that do not exist in the
DC_SUPS table and must be defaulted as described.
The function returns a Boolean value.
DC_SUPS to SUPS Column Defaults
SUP_STATUS A
AUTO_APPR_DBT_MEMO_IND Y If NULL in external table
PREPAY_INVC_IND Y
DELIVERY_POLICY NEXT If NULL in external table
BRACKET_COSTING_IND N If NULL in external table
DSD_IND N If NULL in external table
EDI_INVC_IND Y
DBT_MEMO_CODE Y
INVC_PAY_LOC C
INVC_RECEIVE_LOC C
ADDINVC_GROSS_NET G
VMI_ORDER_STATUS A If NULL in external table
LOAD_SUP_ADDR
This function selects from the DC_ SUP_ADDR external table and inserts the data to the
RMS ADDR table. All the columns from the external Oracle table defined previously
map directly to the RMS table. The following table lists columns that do not exist in the
DC_ SUP_ADDR table and must be defaulted as described.
The function returns a Boolean value.
DC_SUP_ADDRESS to ADDR Column Defaults
LOAD_ SUP_IMPORT_ATTR
This function selects from the DC_ SUP_IMPORT_ATTR external table and inserts the
data to the RMS SUP_IMPORT_ATTR table. All the columns from the external Oracle
table defined above will directly map to the RMS table.
The function returns a Boolean value.
Required file to load: dc_sup_import_attr.dat
Post-Loading Requirements
After using the data conversion toolset for this functional area, the
SUP_BRACKET_COST table must be loaded manually. This table is required for
suppliers that have bracket costing. It must be loaded before you proceed with data
conversion for subsequent functional areas, because of data dependencies.
Manual data loading can be done online through Merchandising applications (RMS,
RPM), or scripts can be created. Manual data loading is not included as part of this data
conversion toolset. Check with your database administrator to determine the best
approach for your data conversion needs.
Prerequisites
Before you begin using the data conversion toolset for Items, you must complete data
conversion for the following functional areas:
Core
Merchandise Hierarchy
Organizational Hierarchy
Suppliers
There are tables that must be loaded manually, because of data dependencies for auto-
loading within this functional area. Manual data loading can be done online through
Merchandising applications (RMS, RPM), or scripts can be created. Manual data loading
is not included as part of this data conversion toolset. Check with your database
administrator to determine the best approach for your data conversion needs.
Fashion Items
This section describes data conversion for the following RMS tables, listed in the order
that they must be loaded:
ITEM_MASTER
VAT_ITEM
UDA_ITEM_LOV
ITEM_CHRG_HEAD
ITEM_CHRG_DETAIL
The following programs are included in this functional area:
Main wrapper script dc_load_main.ksh
This main script is used across all functional areas to call segment load script. Refer
to Chapter 2 for details.
Segment load script dc_load_fashion_item.ksh
This wrapper calls the external Oracle table create and load scripts listed below.
External Oracle table create scripts:
– dbc_create_style_tab.sql
– dbc_create_fashion_sku_tab.sql
– dbc_create_fashion_xref_tab.sql
Data Flow
The following diagram shows the data flow for for the Fashion Items functional area:
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
DC_STYLE Table
File name: DC_STYLE.DAT
Table create SQL script: DBC_CREATE_STYLE_TAB.SQL
External Oracle table created: DC_STYLE
Suggested post-loading validation (sequence after dc_load_fashion_item.ksh:
Capture counts from ITEM_MASTER where ITEM_MASTER.ITEM_LEVEL <
ITEM_MASTER.TRAN_LEVEL and ITEM_MASTER.PACK_IND = ‘N’, and compare
to flat file DC_STYLE.DAT to ensure that all rows are loaded.
Ensure that ITEM_MASTER.DEPT/ITEM_MASTER.CLASS/
ITEM_MASTER.SUBCLASS combination exists in SUBCLASS.
Ensure that ITEM_MASTER.DIFF_1 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.DIFF_2 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.DIFF_3 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.DIFF_4 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
For example, if diffs 1 and 2 contain values, then only diff aggregate 1 and diff
aggregate 2 should be populated with a Y or N. The diff 3 and diff 4 aggregate indicators
should be NULL.
For item aggregation, the item can only aggregate by up to 1 less than the total number of
diff groups specified. For example, if an item has three diff groups associated with it, the
user can aggregate by as many as two of those groups.
DC_FASHION_SKU Table
File name: DC_FASHION_SKU.DAT
Table create SQL script: DBC_CREATE_FASHION_SKU_TAB.SQL
External Oracle table created: DC_FASHION_SKU
Suggested post-loading validation (sequence after dc_load_fashion_item.ksh:
Capture counts from ITEM_MASTER where ITEM_MASTER.ITEM_LEVEL =
ITEM_MASTER.TRAN_LEVEL and ITEM_MASTER.PACK_IND = ‘N’, and compare
to flat file DC_FASHION_SKU.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_FASHION_XREF Table
File name: DC_FASHION_XREF.DAT
Table create SQL script: DBC_CREATE_FASHION_XREF_TAB.SQL
External Oracle table created: DC_FASHION_XREF
Suggested post-loading validation (sequence after dc_load_fashion_item.ksh:
Capture counts from ITEM_MASTER where ITEM_MASTER.ITEM_LEVEL >
ITEM_MASTER.TRAN_LEVEL, and compare to flat file DC_FASHION_XREF.DAT
to ensure that all rows are loaded.
Ensure that ITEM_MASTER.ITEM is unique.
Ensure that ITEM_MASTER.ITEM_PARENT (if not NULL) is a valid
ITEM_MASTER.ITEM with ITEM_MASTER.ITEM_LEVEL = item level of the child
less 1.
Ensure that ITEM_MASTER.ITEM_GRANDPARENT (if not NULL) is a valid
ITEM_MASTER.ITEM with ITEM_MASTER.ITEM_LEVEL = item level of the
grandchild less 2.
Ensure that ITEM_MASTER.COST_ZONE_GROUP_ID is a valid
COST_ZONE_GROUP..ZONE_GROUP_ID if SYSTEM_OPTIONS.ELC_IND = ‘Y’.
Ensure that ITEM_MASTER.STANDARD_UOM is a valid UOM_CLASS.UOM with
UOM_CLASS.UOM_CLASS is not ‘MISC’.
Ensure that ITEM_MASTER.UOM_CONV_FACTOR is not NULL if UOM_CLASS
of ITEM_MASTER.STANDARD_UOM is not ‘QTY’.
Ensure that ITEM_MASTER.RETAIL_ZONE_GROUP_ID is a valid
PRICE_ZONE_GROUP.ZONE_GROUP_ID.
Ensure that ITEM_MASTER.PACKAGE_UOM (if not NULL) is a valid
UOM_CLASS.UOM.
Ensure that ITEM_MASTER.RETAIL_LABEL_TYPE (if not NULL) is a valid
CODE_DETAIL.CODE, where CODE_DETAIL.CODE_TYPE = ‘RTLT’.
Ensure that ITEM_MASTER.HANDLING_TEMP (if not NULL) is a valid
CODE_DETAIL.CODE, where CODE_DETAIL.CODE_TYPE = ‘HTMP’.
Ensure that ITEM_MASTER.HANDLING_SENSITIVITY (if not NULL) is a valid
CODE_DETAIL.CODE, where CODE_DETAIL.CODE_TYPE = ‘HSEN’.
Ensure that ITEM_ITEM_NUMBER_TYPE is a valid CODE_DETAIL.CODE, where
CODE_DETAIL.CODE_TYPE = ‘UPCT’.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
LOAD_ STYLE_SKU
This function contains a PL/SQL block that selects from the DC_STYLE and the
DC_FASHION_SKU external tables and inserts the data to the RMS ITEM_MASTER
table.
Styles
For styles, the following table defines the default values in the RMS table if no
information is provided in the data file (external table field values are NULL or not
defined).
The function returns a Boolean value.
DC_STYLE and DC_FASHION_SKU to ITEM_MASTER Column Defaults
ITEM_NUMBER_TYPE ITEM
ITEM_LEVEL 1
TRAN_LEVEL 2
SHORT_DESC SUBSTR 120 characters from ITEM_DESC If NULL
DESC_UP Upper ITEM_DESC
STATUS A
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
RETAIL_ZONE_GROUP_ID Lookup in PRICE_ZONE_GROUP table
ITEM_AGGREGATE_IND N If NULL
DIFF_1_AGGREGATE_IND N If NULL
DIFF_2_AGGREGATE_IND N If NULL
DIFF_3_AGGREGATE_IND N If NULL
DIFF_4_AGGREGATE_IND N If NULL
PERISHABLE_IND N
SKUs
For SKUs, the following table defines the default values in the RMS table if no
information is provided in the data file (external table field values are NULL or not
defined).
The function returns a Boolean value.
DC_FASHION_SKU to ITEM_MASTER Column Defaults
ITEM_NUMBER_TYPE ITEM
ITEM_LEVEL 2
TRAN_LEVEL 2
SHORT_DESC SUBSTR 120 characters from SKU_DESC
DESC_UP Upper ITEM_DESC
STATUS A
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
RETAIL_ZONE_GROUP_ID Lookup from PRICE_ZONE_GROUP table
ORDERABLE_IND Y
SELLABLE_IND Y
MERCHANDISE_IND Y If NULL
FORECAST_IND Y If NULL
INVENTORY_IND Y
ITEM_AGGREGATE_IND N
DIFF_1_AGGREGATE_IND N
DIFF_2_AGGREGATE_IND N
DIFF_3_AGGREGATE_IND N
DIFF_4_AGGREGATE_IND N
PRIMARY_REF_ITEM_IND N
CONST_DIMEN_IND N
GIFT_WRAP_IND N
SHIP_ALONE_IND N
ITEM_XFORM_IND N
PACK_IND N
SIMPLE_PACK_IND N
CATCH_WEIGHT_IND N
CONTAINS_INNER_IND N
PERISHABLE_IND N
INSERT_ITEM_DEFAULTS
This function inserts item defaults from the merchandise hierarchy specifications for
VAT, UDAs and item charges. Using bulk collect, this function retrieves into a PL/SQL
table the ITEM, DEPT, CLASS, and SUBCLASS values from the DC_STYLE table and
from DC_STYLE joined with DC_FASHION_SKU.
If the VAT indicator is turned on in SYSTEM_OPTIONS, the function retrieves SKU
information and calls the VAT_SQL.DEFAULT_VAT_ITEM to default data into RMS
VAT_ITEM table.
It also retrieves style information and calls UDA_SQL.INSERT_DEFAULTS and
ITEM_CHARGE_SQL.DC_DEFAULT_CHRGS. It retrieves SKU information and calls
UDA_SQL.INSERT_DEFAULTS and ITEM_CHARGE_SQL.DC_DEFAULT_CHRGS.
These functions default data into the RMS UDA_ITEM_LOV, ITEM_CHRG_HEAD, and
ITEM_CHRG_DETAIL tables.
Required files to load: dc_style.dat, dc_fashion_sku.dat
LOAD_XREF
This function contains a PL/SQL block that selects from the DC_FASHION_XREF and
the DC_FASHION_SKU external tables and inserts the data to the RMS ITEM_MASTER
table.
Most of the columns from the external Oracle table defined above directly map to the
RMS table. The following table defines the default values in the RMS table if no
information is provided in the data file (external table field values are NULL or not
defined).
The function returns a Boolean value.
DC_FASHION_XREF and DC_FASHION_SKU to ITEM_MASTER Column Defaults
ITEM_LEVEL 3
TRAN_LEVEL 2
SHORT_DESC SUBSTR 120 characters from ITEM_DESC
DESC_UP Upper ITEM_DESC
PRIMARY_REF_ITEM_IND N If NULL
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
PERISHABLE_IND N
Hardline Items
This section describes data conversion for the following RMS tables, listed in the order
that they must be loaded:
ITEM_MASTER
VAT_ITEM
UDA_ITEM_LOV
ITEM_CHRG_HEAD
ITEM_CHRG_DETAIL
The following programs are included in this functional area.
Main wrapper script dc_load_main.ksh
This main script is used across all functional areas to call segment load scripts. Refer
to Chapter 2 for details.
Segment load script dc_load_hardline_item.ksh. This wrapper calls the external
Oracle table create and load scripts listed below.
External Oracle table create scripts:
– dbc_create_hardlines_tab.sql
– dbc_create_hardlines_xref_tab.sql
Data Flow
The following diagram shows the data flow for the Hardline Items functional area:
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
DC_HARDLINES Table
File name: DC_HARDLINES.DAT
Table create SQL script: DBC_CREATE_HARDLINES_TAB.SQL
External Oracle table created: DC_HARDLINES
Suggested post-loading validation (sequence after dc_load_hardline_item.ksh:
Capture counts from ITEM_MASTER where ITEM_MASTER.ITEM_LEVEL =
ITEM_MASTER.TRAN_LEVEL and ITEM_MASTER.ITEM_PARENT is NULL and
ITEM_MASTER.PACK_IND = ‘N’, and compare to flat file DC_HARDLINES.DAT to
ensure that all rows are loaded.
Ensure that ITEM_MASTER.DEPT/ITEM_MASTER.CLASS/
ITEM_MASTER.SUBCLASS combination exists in SUBCLASS.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_HARDLINES_XREF Table
File name: DC_HARDLINES_XREF.DAT
Table create SQL script: DBC_CREATE_HARDLINES_XREF_TAB.SQL
External Oracle table created: DC_HARDLINES_XREF
Suggested post-loading validation (sequence after dc_load_hardline_item.ksh:
Capture counts from ITEM_MASTER where ITEM_MASTER.ITEM_LEVEL >
ITEM_MASTER.TRAN_LEVEL and ITEM_MASTER.ITEM_GRANDPARENT is
NULL, and compare to flat file DC_HARDLINES_XREF.DAT to ensure that all rows
are loaded.
Ensure that ITEM_MASTER.ITEM is unique.
Ensure that ITEM_MASTER.ITEM_PARENT (if not NULL) is a valid
ITEM_MASTER.ITEM with ITEM_MASTER.ITEM_LEVEL = item level of the child
less 1.
Ensure that ITEM_MASTER.COST_ZONE_GROUP_ID is a valid
COST_ZONE_GROUP..ZONE_GROUP_ID if SYSTEM_OPTIONS.ELC_IND = ‘Y’.
Ensure that ITEM_MASTER.STANDARD_UOM is a valid UOM_CLASS.UOM with
UOM_CLASS.UOM_CLASS is not ‘MISC’.
Ensure that ITEM_MASTER.UOM_CONV_FACTOR is not NULL if UOM_CLASS of
ITEM_MASTER.STANDARD_UOM is not ‘QTY’.
Ensure that ITEM_MASTER.RETAIL_ZONE_GROUP_ID is a valid
PRICE_ZONE_GROUP.ZONE_GROUP_ID.
Ensure that ITEM_ITEM_NUMBER_TYPE is a valid CODE_DETAIL.CODE, where
CODE_DETAIL.CODE_TYPE = ‘UPCT’.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
LOAD_HARDLINES
This function contains a PL/SQL block that selects from the DC_HARDLINES external
table and inserts the data to the RMS ITEM_MASTER table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_HARDLINES to ITEM_MASTER Column Defaults
ITEM_NUMBER_TYPE ITEM
ITEM_LEVEL 1
TRAN_LEVEL 1
SHORT_DESC RTRIM of SUBSTRB 120 characters from If NULL
ITEM_DESC
DESC_UP Upper ITEM_DESC
STATUS A
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
RETAIL_ZONE_GROUP_ID Look up PRICE_ZONE_GROUP table
ORDERABLE_IND Y
SELLABLE_IND Y
INVENTORY_IND Y
MERCHANDISE_IND Y If NULL
FORECAST_IND Y If NULL
ITEM_AGGREGATE_IND N
DIFF_1_AGGREGATE_IND N
DIFF_2_AGGREGATE_IND N
DIFF_3_AGGREGATE_IND N
DIFF_4_AGGREGATE_IND N
PRIMARY_REF_ITEM_IND N
CONST_DIMEN_IND N
GIFT_WRAP_IND N
SHIP_ALONE_IND N
ITEM_XFORM_IND N
PACK_IND N
SIMPLE_PACK_IND N
CATCH_WEIGHT_IND N
CONTAINS_INNER_IND N
PERISHABLE_IND N
INSERT_ITEM_DEFAULTS
This function inserts item defaults from the merchandise hierarchy specifications for
VAT, UDAs, and item charges. Using bulk collect, it retrieves into a PL/SQL table the
ITEM, DEPT, CLASS, and SUBCLASS values from the DC_HARDLINES table.
If the VAT indicator is turned on in SYSTEM_OPTIONS, this function retrieves SKU
information and calls the VAT_SQL.DEFAULT_VAT_ITEM to default data into the RMS
VAT_ITEM table.
It retrieves item information and calls UDA_SQL.INSERT_DEFAULTS and
ITEM_CHARGE_SQL.DC_DEFAULT_CHRGS. These functions default data into the
RMS UDA_ITEM_LOV, ITEM_CHRG_HEAD, and ITEM_CHRG_DETAIL tables.
Required file to load: dc_hardlines.dat
LOAD_HARDLINES_XREF
This function contains a PL/SQL block that selects from the DC_HARDLINES_XREF
external tables and inserts the data to the RMS ITEM_MASTER table.
Most of the columns from the external Oracle table defined above map directly to the
RMS table. The following table defines the default values in the RMS table if no
information is provided in the data file (external table field values are NULL or not
defined).
The function returns a Boolean value.
DC_HARDLINES_XREF to ITEM_MASTER Column Defaults
ITEM_LEVEL 2
TRAN_LEVEL 1
SHORT_DESC RTRIM of SUBSTR b 120 characters from If NULL
ITEM_DESC
DESC_UP Upper ITEM_DESC
STATUS A
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
PRIMARY_REF_ITEM_IND N If NULL
PERISHABLE_IND N
Grocery Items
This section describes data conversion for the following RMS tables, listed in the order
that they must be loaded:
ITEM_MASTER
VAT_ITEM
UDA_ITEM_LOV
ITEM_CHRG_HEAD
ITEM_CHRG_DETAIL
The following programs are included in this functional area:
Main wrapper script dc_load_main.ksh
This main script is used across all functional areas to call segment load scripts. Refer
to Chapter 2 for details.
Segment load script dc_load_grocery_items.ksh.
This wrapper calls the external Oracle table create and load scripts listed below.
External Oracle table create scripts:
– dbc_create_product_line_tab.sql
– dbc_create_product_tab.sql
– dbc_create_grocery_variant_tab.sql
Data Flow
The following diagram shows the data flow for the Grocery Items functional area:
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
DC_PRODUCT_LINE Table
File name: DC_PRODUCT_LINE.DAT
Table create SQL script: DBC_CREATE_PRODUCT_LINE_TAB.SQL
External Oracle table created: DC_PRODUCT_LINE
Suggested post-loading validation (sequence after dc_load_grocery_items.ksh:
Ensure that ITEM_MASTER.DEPT/ITEM_MASTER.CLASS/
ITEM_MASTER.SUBCLASS combination exists in SUBCLASS.
Ensure that ITEM_MASTER.DIFF_1 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.DIFF_2 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.DIFF_3 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.DIFF_4 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
For example, if diffs 1 and 2 contain values, then only diff aggregate 1 and diff
aggregate 2 should be populated with a Y or N. The diff 3 and 4 aggregate indicators
should be NULL.
For item aggregation, the item can only aggregate by up to 1 less than the total number of
diff groups specified. For example, if an item has three diff groups associated with it, the
user can aggregate by as many as two of those groups.
DC_PRODUCT Table
File name: DC_PRODUCT.DAT
Table create SQL script: DBC_CREATE_PRODUCT_TAB.SQL
External Oracle table created: DC_PRODUCT
Separate post-loading validation is not required for the DC_PRODUCT table. The
validations for the DC_GROCERY_VARIANT table (described later in this chapter) also
will validate the rows loaded to the DC_PRODUCT table.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_GROCERY_VARIANT Table
File name: DC_GROCERY_VARIANT.DAT
Table create SQL script: DBC_CREATE_GROCERY_VARIANT_TAB.SQL
External Oracle table created: DC_GROCERY_VARIANT
Suggested post-loading validation (sequence after dc_load_grocery_items.ksh:
Ensure that ITEM_MASTER.ITEM is unique.
Ensure that ITEM_MASTER.ITEM_PARENT (if not NULL) is a valid
ITEM_MASTER.ITEM with ITEM_MASTER.ITEM_LEVEL = item level of the child
less 1.
Ensure that ITEM_MASTER.ITEM_GRANDPARENT (if not NULL) is a valid
ITEM_MASTER.ITEM with ITEM_MASTER.ITEM_LEVEL = item level of the
grandchild less 2.
Ensure that ITEM_MASTER.COST_ZONE_GROUP_ID is a valid
COST_ZONE_GROUP..ZONE_GROUP_ID if SYSTEM_OPTIONS.ELC_IND = ‘Y’.
Ensure that ITEM_MASTER.STANDARD_UOM is a valid UOM_CLASS.UOM with
UOM_CLASS.UOM_CLASS is not ‘MISC’.
Ensure that ITEM_MASTER.UOM_CONV_FACTOR is not NULL if UOM_CLASS
of ITEM_MASTER.STANDARD_UOM is not ‘QTY’.
Ensure that ITEM_MASTER.RETAIL_ZONE_GROUP_ID is a valid
PRICE_ZONE_GROUP.ZONE_GROUP_ID.
Ensure that ITEM_MASTER.PACKAGE_UOM (if not NULL) is a valid
UOM_CLASS.UOM.
Ensure that ITEM_MASTER.RETAIL_LABEL_TYPE (if not NULL) is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘RTLT’.
Ensure that ITEM_MASTER.HANDLING_TEMP (if not NULL) is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘HTMP’.
Ensure that ITEM_MASTER.HANDLING_SENSITIVITY (if not NULL) is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘HSEN’.
Ensure that ITEM_MASTER.ITEM_NUMBER_TYPE is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘UPCT’.
Ensure that ITEM_MASTER.CONTAINER_ITEM is a valid ITEM_MASTER.ITEM if
ITEM_MASTER.DEPOSIT_ITEM_TYPE = ‘E’.
Ensure that ITEM_MASTER.FORMAT_ID and ITEM_MASTER.PREFIX are not
NULL if ITEM_MASTER.ITEM_NUMBER_TYPE = ‘VPLU’.
Ensure that ITEM_MASTER.FORMAT_ID is a valid VAR_UPC_EAN.FORMAT_ID if
ITEM_MASTER.ITEM_NUMBER_TYPE = ‘VPLU’.
Field Name Data Type Max Length Req’d Description Field Name Data Type
LOAD_PRODUCT_LINE
This function contains a PL/SQL block that selects from the DC_PRODUCT_LINE and
DC_PRODUCT external tables and inserts the data to the RMS ITEM_MASTER table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_PRODUCT_LINE and DC_PRODUCT to ITEM_MASTER Column Defaults
ITEM_NUMBER_TYPE ITEM
ITEM_LEVEL 1
TRAN_LEVEL 2
SHORT_DESC RTRIM/SUBSTRB 120 If NULL
characters from ITEM_DESC
DESC_UP Upper ITEM_DESC
STATUS A
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
ITEM_AGGREGATE_IND N If NULL
DIFF_1_AGGREGATE_IND N If NULL
DIFF_2_AGGREGATE_IND N If NULL
DIFF_3_AGGREGATE_IND N If NULL
DIFF_4_AGGREGATE_IND N If NULL
PERISHABLE_IND N Use the PERISHABLE_IND
value set for the primary
product on the DC_PRODUCT
table. If not defined, default to
N.
LOAD_PRODUCT
This function contains a PL/SQL block that selects from the DC_PRODUCT external
table and inserts the data to the RMS ITEM_MASTER table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_PRODUCT_LINE and DC_PRODUCT to ITEM_MASTER Column Defaults
ITEM_NUMBER_TYPE ITEM
ITEM_LEVEL 2
TRAN_LEVEL 2
SHORT_DESC RTRIM/SUBSTRB 120 If NULL
characters from ITEM_DESC
DESC_UP Upper ITEM_DESC
STATUS A
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
RETAIL_ZONE_GROUP_ID Lookup from
PRICE_ZONE_GROUP table
ORDERABLE_IND Y
SELLABLE_IND Y
INVENTORY_IND Y
MERCHANDISE_IND Y If NULL
FORECAST_IND Y If NULL
ITEM_AGGREGATE_IND N
DIFF_1_AGGREGATE_IND N
DIFF_2_AGGREGATE_IND N
DIFF_3_AGGREGATE_IND N
DIFF_4_AGGREGATE_IND N
PRIMARY_REF_ITEM_IND N
CONST_DIMEN_IND N
GIFT_WRAP_IND N
SHIP_ALONE_IND N
ITEM_XFORM_IND N
PACK_IND N
SIMPLE_PACK_IND N
CATCH_WEIGHT_IND N If NULL
CONTAINS_INNER_IND N
PERISHABLE_IND N Use the PERISHABLE_IND
value as set on the
DC_PRODUCT table. If not
defined, default to N.
LOAD_GROCERY_VARIANT
This function contains a PL/SQL block that selects from the DC_GROCERY_VARIANT
external table and inserts the data to the RMS ITEM_MASTER table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_GROCERY_VARIANT and DC_HARDLINES to ITEM_MASTER Column Defaults
ITEM_LEVEL 3
TRAN_LEVEL 2
SHORT_DESC RTRIM/SUBSTRB 120 If NULL
characters from ITEM_DESC
DESC_UP Upper ITEM_DESC
PRIMARY_REF_ITEM_IND N If NULL
PERISHABLE_IND N Use the PERISHABLE_IND
value set for the parent product
on the DC_PRODUCTtable. If
not defined, default to N.
DEFAULT_GROCERY
This function defaults data in the VAT_ITEM, UDA_ITEM_LOV, and
ITEM_CHRG_HEAD/DETAIL tables for newly created products and product lines. It
includes the following logic:
If the VAT indicator is turned on in system_options, it uses bulk collect to retrieve
into a PL/SQL table the item/department values from the DC_PRODUCT table. It
calls the PL/SQL function VAT_SQL.DEFAULT_VAT_ITEM to insert the
department VAT defaults into the RMS VAT_ITEM table, by selecting from the
vat_deps and vat_code_rates for each item in the DC_PRODUCT table.
It also uses bulk collect to retrieve into a PL/SQL table the item/dept/class/subclass
values from the DC_PRODUCT and DC_PRODUCT_LINE tables. It calls
UDA_SQL.INSERT_DEFAULTS to insert the department UDA defaults into the RMS
uda_item_lov table, by selecting from uda_item_defaults and uda for each item in
the DC_PRODUCT and DC_PRODUCT_LINE tables.
It calls ITEM_CHARGE_SQL.DEFAULT_CHRGS to insert the department charge
defaults into the RMS ITEM_CHRG_HEAD and ITEM_CHRG_DETAIL tables, by
selecting from dept_chrg_head and dept_chrg_detail for each item in the
DC_PRODUCT and DC_PRODUCT_LINE tables.
Required file to load: dc_product_line.dat, dc_product.dat
Pack Items
This section describes data conversion for the following RMS tables, listed in the order
that they must be loaded:
ITEM_MASTER
PACKITEM
PACKITEM_BREAKOUT
PRICE_HIST
UDA_ITEM_LOV
RPM_ITEM_ZONE_PRICE
VAT_ITEM
ITEM_CHRG_HEAD
ITEM_CHRG_DETAIL
The following programs are included in the Pack Items functional area:
Main wrapper script dc_load_main.ksh
This main script is used across all functional areas to call segment load scripts. Refer
to Chapter 2 for details.
Segment load script dc_load_packs.ksh
This wrapper calls the external Oracle table create scripts listed below.
External Oracle table create scripts:
– dbc_create_orderable_pack_tab.sql
– dbc_create_sellable_pack_tab.sql
– dbc_create_pack_component_tab.sql
– dbc_create_pack_xref_tab.sql
Data Flow
The following diagram shows the data flow for the Pack Items functional area:
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
DC_ORDERABLE_PACK Table
File name: DC_ORDERABLE_PACK.DAT
This file contains all orderable packs that are either sellable or non-sellable. These packs
can be simple packs or complex packs in RMS.
Table create SQL script: DBC_CREATE_ORDERABLE_PACK_TAB.SQL
External Oracle table created: DC_ORDERABLE_PACK
Suggested post-loading validation (sequence after dc_load_packs.ksh:
Capture counts from ITEM_MASTER where ITEM_MASTER.ITEM_LEVEL =
ITEM_MASTER.TRAN_LEVEL and ITEM_MASTER.PACK_IND = ‘Y’ and
ITEM_MASTER.ORDERABLE_IND = ‘Y’, and compare to flat file
DC_ORDERABLE_PACK.DAT to ensure that all rows are loaded.
Ensure that ITEM_MASTER.COST_ZONE_GROUP_ID is a valid
COST_ZONE_GROUP..ZONE_GROUP_ID if SYSTEM_OPTIONS.ELC_IND = ‘Y’
and ITEM_MASTER.PACK_IND = ‘Y’ and ITEM_MASTER.ORDERABLE_IND = ‘Y’.
Ensure that ITEM_MASTER.DEPT/ITEM_MASTER.CLASS/
ITEM_MASTER.SUBCLASS combination exists in SUBCLASS.
Ensure that ITEM_MASTER.DIFF_1 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.DIFF_2 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.DIFF_3 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.DIFF_4 (if not NULL) is a valid DIFF_IDS.DIFF_ID or
DIFF_GROUP_HEAD.DIFF_GROUP_ID.
Ensure that ITEM_MASTER.PACKAGE_UOM (if not NULL) is a valid
UOM_CLASS.UOM.
Ensure that ITEM_MASTER.RETAIL_LABEL_TYPE (if not NULL) is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘RTLT’.
Ensure that ITEM_MASTER.HANDLING_TEMP (if not NULL) is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘HTMP’.
Ensure that ITEM_MASTER.HANDLING_SENSITIVITY (if not NULL) is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘HSEN’.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_SELLABLE_PACK Table
File name: DC_SELLABLE_PACK.DAT
This file contains all sellable packs that are non-orderable. These packs can only be
complex packs in RMS.
Table create SQL script: DBC_CREATE_SELLABLE_PACK_TAB.SQL
External Oracle table created: DC_SELLABLE_PACK
Suggested post-loading validation (sequence after dc_load_packs.ksh:
Capture counts from ITEM_MASTER where ITEM_MASTER.ITEM_LEVEL =
ITEM_MASTER.TRAN_LEVEL and ITEM_MASTER.PACK_IND = ‘Y’ and
ITEM_MASTER.ORDERABLE_IND = ‘N’, and compare to flat file
DC_SELLABLE_PACK.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
RETAIL_LABEL_ Numeric 20,4 N Value associated with the retail RETAIL_ NUMBER(20,4)
VALUE label type. LABEL_
NULL if SELLABLE_IND = VALUE
‘N’
HANDLING_ Alpha- 6 N Temperature information HANDLING_ VARCHAR2(6)
TEMP numeric associated with the item. Valid TEMP
values for this field are in the
code type HTMP in the
CODE_HEAD and
CODE_DETAIL tables.
HANDLING_ Alpha- 6 N Sensitivity information HANDLING_ VARCHAR2(6)
SENSITIVITY numeric associated with the item. Valid SENSITIVITY
values for this field are in the
code type HSEN in the
CODE_HEAD and
CODE_DETAIL tables.
UNIT_RETAIL Numeric 20,4 Y Item’s current unit retail in the UNIT_ NUMBER(20,4)
system’s primary currency. RETAIL
PACK_ Alpha- 2000 N Comments related to the pack COMMENTS VARCHAR2(2000)
COMMENTS numeric item.
DC_PACK_COMPONENT Table
File name: DC_PACK_COMPONENT.DAT
Table create SQL script: DBC_CREATE_PACK_COMPONENT_TAB.SQL
External Oracle table created: DC_PACK_COMPONENT
Suggested post-loading validation (sequence after dc_load_packs.ksh:
Capture counts from PACK_ITEM and compare to flat file
DC_PACK_COMPONENT.DAT to ensure that all rows are loaded.
Ensure that PACK_ITEM.PACK_NO is a valid ITEM_MASTER.ITEM where
ITEM_MASTER.PACK_IND = ‘Y’.
Ensure that PACK_ITEM.ITEM is a valid ITEM_MASTER.ITEM where
ITEM_MASTER.TRAN_LEVEL = ITEM_MASTER.ITEM_LEVEL.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_PACK_XREF Table
File name: DC_PACK_XREF.DAT
Table create SQL script: DBC_CREATE_PACK_XREF_TAB.SQL
External Oracle table created: DC_PACK_XREF
Suggested post-loading validation (sequence after dc_load_packs.ksh:
Ensure that ITEM_MASTER.ITEM is unique.
Ensure that ITEM_MASTER.ITEM_PARENT (if not NULL) is a valid
ITEM_MASTER.ITEM with ITEM_MASTER.ITEM_LEVEL = item level of the child
less 1.
Ensure that ITEM_MASTER.ITEM_NUMBER_TYPE is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘UPCT’.
Ensure that ITEM_MASTER.FORMAT_ID and ITEM_MASTER.PREFIX are not
NULL if ITEM_MASTER.ITEM_NUMBER_TYPE = ‘VPLU’.
Ensure that ITEM_MASTER.FORMAT_ID is a valid VAR_UPC_EAN.FORMAT_ID if
ITEM_MASTER.ITEM_NUMBER_TYPE = ‘VPLU’.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
LOAD_ORDERABLE_PACK
This function contains a PL/SQL block that selects from the DC_ORDERABLE_PACK
external table and inserts the data to the RMS ITEM_MASTER table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ORDERABLE_PACK to ITEM_MASTER Column Defaults
ITEM_NUMBER_TYPE ITEM
ITEM_LEVEL 1
TRAN_LEVEL 1
SHORT_DESC SUBSTRB 120 characters If NULL
from ITEM_DESC
DESC_UP Upper ITEM_DESC
STATUS A
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
MFG_REC_RETAIL Ensure that SELLABLE_IND = Y,
otherwise NULL
RETAIL_ZONE_GROUP_ID Lookup from Ensure that SELLABLE_IND = Y,
PRICE_ZONE_GROUP otherwise NULL
table
COST_ZONE_GROUP_ID Ensure that ORDERABLE_IND = Y and
PACK_TYPE != B, otherwise NULL
STANDARD_UOM EA
STORE_ORD_MULT If NULL, E
ORDERABLE_IND Y
INVENTORY_IND Y
PACK_TYPE Ensure V if simple pack
CONST_DIMEN_IND N
GIFT_WRAP_IND N
SHIP_ALONE_IND N
ITEM_XFORM_IND N
PACK_IND Y
MERCHANDISE_IND Y
FORECAST_IND N
CONTAINS_INNER_IND N
PERISHABLE_IND N
LOAD_SELLABLE_PACK
This function contains a PL/SQL block that selects from the DC_SELLABLE_PACK
external table and inserts the data to the RMS ITEM_MASTER table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_SELLABLE_PACK to ITEM_MASTER Column Defaults
ITEM_NUMBER_TYPE ITEM
ITEM_LEVEL 1
TRAN_LEVEL 1
SHORT_DESC RTRIM/SUBSTRB 120 If NULL
characters from ITEM_DESC
DESC_UP Upper ITEM_DESC
STATUS A
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
RETAIL_ZONE_GROUP_ID Lookup from Since always sellable
PRICE_ZONE_GROUP table
COST_ZONE_GROUP_ID NULL Since always non-orderable
STANDARD_UOM EA
STORE_ORD_MULT E
ORDERABLE_IND N
INVENTORY_IND Y
PACK_TYPE NULL
Since always non-orderable
ORDER_AS_TYPE NULL Since always non-orderable
ITEM_AGGREGATE_IND N
DIFF_1_AGGREGATE_IND N
DIFF_2_AGGREGATE_IND N
DIFF_3_AGGREGATE_IND N
DIFF_4_AGGREGATE_IND N
PRIMARY_REF_ITEM_IND N
CONST_DIMEN_IND N
GIFT_WRAP_IND N
SHIP_ALONE_IND N
ITEM_XFORM_IND N
PACK_IND Y
SIMPLE_PACK_IND N Since always non-orderable
CATCH_WEIGHT_IND N Since always non-orderable
ORDER_TYPE NULL Since not catch weight
SALE_TYPE NULL Since not catch weight
MERCHANDISE_IND Y
FORECAST_IND N
CONTAINS_INNER_IND N
PERISHABLE_IND N
LOAD_PACK_COMPONENT
This function contains a PL/SQL block that selects from the DC_PACK_COMPONENT
external tables and inserts the data to the RMS PACKITEM and
PACKITEM_BREAKOUT tables.
Because inner packs are not supported as part of the data conversion toolset, the RMS
tables PACKITEM and PACKITEM_BREAKOUT have the same data after loading.
It is assumed that all component items in the DC_PACK_COMPONENT table have been
loaded as approved items with data in the ITEM_MASTER and ITEM_SUPP_COUNTRY
tables, and that the components for each of the packs in DC_SELLABLE_PACK and
DC_ORDERABLE_PACK are included in this table. If not, the data will be inconsistent.
Most of the columns from the external Oracle table defined above directly map to the
RMS table. The following table defines the default values in the RMS table if no
information is provided in the data file (external table field values are NULL or not
defined).
The function returns a Boolean value.
DC_PACK_COMPONENT to PACKITEM and PACKITEM_BREAKOUTColumn Defaults
LOAD_PACK_XREF
This function contains a PL/SQL block that selects from the DC_PACK_XREF and
DC_PACK external tables and inserts the data to the RMS ITEM_MASTER table.
Most of the columns from the external Oracle table defined above directly map to the
RMS table. The following table defines the default values in the RMS table if no
information is provided in the data file (external table field values are NULL or not
defined).
The function returns a Boolean value.
DC_PACK_XREF and DC_PACK to ITEM_MASTER Column Defaults
ITEM_LEVEL 2
TRAN_LEVEL 1
SHORT_DESC SUBSTR 120 characters from If NULL
ITEM_DESC
DESC_UP Upper ITEM_DESC
STATUS A
CREATE_DATETIME SYSDATE
LAST_UPDATE_ID Current user ID
LAST_UPDATE_DATETIME SYSDATE
PERISHABLE_IND N
INSERT_SELLABLE_PRICE_HIST
This function inserts the 0 tran_type, 0 reason, 0 location record into the RMS
PRICE_HIST table only for sellable non-orderable packs. (All other items have this
record inserted with the ITEM_SUPPLIER load script.) It retrieves the items from the
DC_SELLABLE_PACK table. For each item, it calls the
PACKITEM_ADD_SQL.BUILD_COMP_COST_RETAIL function to retrieve the
UNIT_COST and UNIT_RETAIL in the primary currency. It uses these values for the 0
record in PRICE_HIST for the UNIT_COST and UNIT_RETAIL.
The pack’s UNIT_COST and UNIT_RETAIL are determined from the pack components.
It is assumed that all component items in the DC_PACK_COMPONENT table have been
loaded as approved items with data in the ITEM_MASTER and ITEM_SUPP_COUNTRY
tables, and that the components for each of the packs in DC_SELLABLE_PACK are
included in this table. If not, the data will be inconsistent.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
ACTION_DATE VDATE
TRAN_TYPE 0
LOC 0
REASON 0
SELLING_UNIT_RETAIL UNIT_RETAIL
SELLING_UOM ‘EA’
INSERT_SELLABLE_RPM_IZP
This function selects from the DC_SELLABLE_PACK external table and joins with
RPM_MERCH_RETAIL_DEF to insert data to the RPM_ITEM_ZONE_PRICE table.
This function retrieves the regular zone group ID for the department of the items in the
DC_SELLABLE_PACK table, and joins with the RPM_MERCH_RETAIL_DEF_EXPL
view to get the regular RPM GROUP_ZONE_ID for the item’s department/class/
subclass. It performs a bulk collect of this data and loops through the results to insert into
the RPM_ITEM_ZONE_PRICE table. For the insert/select, it joins DC_SELLABLE_PACK
for each item and the RPM_ZONE for the department’s ZONE_GROUP_ID.
The function retrieves the primary currency from SYSTEM_OPTIONS table. If the zone
currency and the primary currency are different, UNIT_RETAIL is converted to the zone
currency. The following table indicates the data retrieved for value insert.
DC_SELLABLE_PACK to RPM_ITEM_ZONE_PRICE Column Defaults
DEFAULT_PACKS
This function inserts item defaults from the merchandise hierarchy specifications for
UDAs, VAT (if SYSTEM_OPTIONS.VAT_IND = ‘Y’) and for ITEM CHARGES (non-
buyer packs only).
This retrieves the ITEM, DEPT, CLASS and SUBCLASS values from
DC_ORDERBLE_PACK and DC_SELLABLE_PACK. Calls
UDA_SQL.INSERT_DEFAULTS for both sellable and orderable packs. If
SYSTEM_OPTIONS.VAT_IND = ‘Y’, then it calls VAT_SQL.DEFAULT_VAT_ITEM for
both sellable and orderable packs.
This also retrieves SKU and dept information for non-buyer packs. Calls
ITEM_CHARGE_SQL.DEFAULT_CHARGES.
Required files to load: dc_orderable_pack.dat, dc_sellable_pack.dat
Item Supplier
This section describes data conversion for the following tables, listed in the order in
which they must be loaded:
ITEM_SUPPLIER
ITEM_SUPP_COUNTRY
RPM_ITEM_ZONE_PRICE
PRICE_HIST
ITEM_SUPP_COUNTRY_DIM
The following programs are included in this functional area.
Main wrapper script dc_load_main.ksh
This main script is used across all functional areas to call segment load scripts. Refer
to Chapter 2 for details.
Segment load script dc_load_item_supplier.ksh
This wrapper calls the external Oracle table create and load scripts listed below.
External Oracle table create scripts:
– dbc_create_item_supp_tab.sql
– dbc_create_isc_tab.sql
– dbc_create_price_hist_tab.sql
– dbc_create_isc_dim_tab.sql
Data Flow
The following diagram shows the data flow for the Item Supplier functional area:
Prerequisites
Before you begin using the data conversion toolset for Item Supplier, you must complete
data conversion for the following:
Fashion Items
Hardlines
Grocery Items
Pack Items
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
DC_ITEM_SUPPLIER Table
File name: DC_ITEM_SUPPLIER.DAT
Table create SQL script: DBC_CREATE_ITEM_SUPPLIER_TAB.SQL
External Oracle table created: DC_ITEM_SUPPLIER
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_ITEM_SUPP_COUNTRY Table
File name: DC_ITEM_SUPP_COUNTRY.DAT
Table create SQL script: DBC_CREATE_ISC_TAB.SQL
External Oracle table created: DC_ITEM_SUPP_COUNTRY
Field Name Data Type Max Req’d Description Field Name Data Type
Length
INNER_PACK_ Numeric 12,4 Y Break pack size for this item INNER_PACK_ NUMBER(12,4)
SIZE from the supplier SIZE
DC_PRICE_HIST Table
File name: DC_PRICE_HIST.DAT
Table create SQL script: DBC_CREATE_PRICE_HIST_TAB.SQL
External Oracle table created: DC_PRICE_HIST
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_ITEM_SUPP_COUNTRY_DIM Table
File name: DC_ITEM_SUPP_COUNTRY_DIM.DAT
Table create SQL script: DBC_CREATE_ISC_DIM_TAB.SQL
External Oracle table created: DC_ITEM_SUPP_COUNTRY_DIM
Suggested post-loading validation (sequence after dc_load_item_supplier.ksh:
Capture counts from ITEM_SUPP_COUNTRY_DIM and compare to flat file
DC_ITEM_SUPP_COUNTRY_DIM.DAT to ensure that all rows are loaded.
Ensure that ITEM_SUPP_COUNTRY_DIM.ITEM/SUPPLIER/
ORIGIN_COUNTRY_ID combination exists in ITEM_SUPP_COUNTRY.
Ensure that ITEM_SUPP_COUNTRY_DIM.DIM_OBJECT is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘DIMO’.
Ensure that ITEM_SUPP_COUNTRY_DIM.PRESENTATION_METHOD is a valid
CODE_DETAIL.CODE where CODE_DETAIL.CODE_TYPE = ‘PCKT’.
Ensure that ITEM_SUPP_COUNTRY_DIM.LWH_UOM is a valid
UOM_CLASS.UOM with UOM_CLASS.UOM_CLASS = ‘DIMEN’.
Ensure that ITEM_SUPP_COUNTRY_DIM.WEIGHT_UOM is a valid
UOM_CLASS.UOM with UOM_CLASS.UOM_CLASS = ‘MASS’.
Ensure that ITEM_SUPP_COUNTRY_DIM.LIQUID_VOLUME_UOM is a valid
UOM_CLASS.UOM with UOM_CLASS.UOM_CLASS = ‘LVOL’.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
LOAD_ITEM_SUPPLIER
This function contains a PL/SQL block that selects from the DC_ITEM_SUPPLIER
external table and inserts the data to the RMS ITEM_SUPPLIER table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_SUPPLIER to ITEM_SUPPLIER Column Defaults
LOAD_ITEM_SUPP_COUNTRY
This function contains a PL/SQL block that selects from the
DC_ITEM_SUPP_COUNTRY external table and inserts the data to the RMS
ITEM_SUPP_COUNTRY table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_SUPP_COUNTRY to ITEM_SUPP_COUNTRY Column Defaults
INSERT_RPM_ITEM_ZONE_PRICE
This function selects from the DC_PRICE_HIST external table and joins with
ITEM_MASTER and RPM_MERCH_RETAIL_DEF to insert data to the RPM
RPM_ITEM_ZONE_PRICE table.
The function retrieves the regular zone group ID for the department of the items in the
DC_PRICE_HIST table and joins data with the ITEM_MASTER and
RPM_MERCH_RETAIL_DEF tables. It performs a bulk collect of this data and loops
through the results to insert into the RPM_ITEM_ZONE_PRICE table. For the
insert/select, join DC_PRICE_HIST for each item and RPM_ZONE for the department’s
ZONE_GROUP_ID.
The following table indicates the values retrieved for data insert. This function uses the
primary currency from the SYSTEM_OPTIONS table. If the zone currency and the
primary currency are different, the function converts the UNIT_RETAIL to the zone
currency.
DC_PRICE_HIST to RPM_ITEM_ZONE_PRICE Column Defaults
INSERT_PRICE_HIST
This function inserts the 0 tran_type, 0 reason, 0 location record into the RMS
PRICE_HIST table:
It gets the UNIT_COST value from the primary supplier and primary country record
in the DC_ITEM_SUPP_COUNTRY table for each item.
It gets the UNIT RETAIL, SELLING UOM values from the DC_PRICE_HIST table.
It gets the primary currency from the SYSTEM_OPTIONS table and the supplier’s
currency from the SUPS table. If these values are different, it converts the
UNIT_COST to the primary currency (uses one insert/select for records where the
supplier currency equals the primary currency (no conversion necessary), uses a
second for where they are unequal and calls CURRENCY_SQL.CONVERT_VALUE).
The following table defines the default values in the RMS table when no data is retrieved:
PRICE_HIST Column Defaults
ACTION_DATE VDATE
POST_DATE VDATE
SELLING_UNIT_RETAIL DC_PRICE_HIST.UNIT_RETAIL
LOAD_ITEM_SUPP_COUNTRY_DIM
This function contains a PL/SQL block that selects from the
DC_ITEM_SUPP_COUNTRY_DIM external table and inserts the data to the RMS
ITEM_SUPP_COUNTRY_DIM table.
Most of the columns from the external Oracle table listed above directly map to the RMS
table. The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_SUPP_COUNTRY_DIM to ITEM_SUPP_COUNTRY_DIM Column Defaults
Post-Loading Requirements
After using the data conversion toolset for Item Supplier, you must manually load the
ITEM_SUPP_COUNTRY_BRACKET_COST table. This table is required if the supplier
has bracket costing.
Manual data loading can be done online through Merchandising applications (RMS or
RPM), or you can create scripts. Manual data loading is not included as part of this data
conversion toolset. Check with your database administrator to determine the best
approach for your data conversion needs.
Item Location
This section describes data conversion for the following RMS/RPM tables, listed in the
order that they must be loaded:
ITEM_LOC
ITEM_LOC_SOH
RPM_FUTURE_RETAIL
ITEM_SUPP_COUNTRY_LOC
FUTURE_COST
PRICE_HIST
Data Flow
The following diagram shows the data flow for the Item Location functional area:
Prerequisites
Before you begin using the data conversion toolset for Item Location, you must complete
data conversion for Items and Item Supplier:
Fashion Items
Hardlines
Grocery Items
Pack Items
Item Supplier
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
DC_ITEM_LOC Table
File name: DC_ITEM_LOC.DAT
Table create SQL script: DBC_CREATE_ITEM_LOC_TAB.SQL
External Oracle table created: DC_ITEM_LOC
Suggested post-loading validation (sequence after dc_load_item_location.ksh:
Ensure that ITEM_SEASONS.ITEM is a valid ITEM_MASTER.ITEM where
ITEM_MASTER.ITEM_LEVEL <=ITEM_MASTER.TRAN_LEVEL.
Ensure that ITEM_SEASONS.SEASON_ID/PHASE_ID combination exists in
PHASES.
Ensure that ITEM_LOC.ITEM is a valid ITEM_MASTER.ITEM where
ITEM_MASTER.ITEM_LEVEL <=ITEM_MASTER.TRAN_LEVEL.
Ensure that ITEM_LOC_SOH.ITEM is a valid ITEM_MASTER.ITEM where
ITEM_MASTER.ITEM_LEVEL = ITEM_MASTER.TRAN_LEVEL.
Ensure that ITEM_LOC.LOC is a valid V_LOCATION.LOCATION_ID with
V_LOCATION.STOCKHOLDING_IND = ‘Y’.
Ensure that ITEM_LOC_SOH.ITEM/LOC combination exists on ITEM_LOC.
Ensure that ITEM_LOC.ITEM_PARENT/ITEM)GRANDPARENT for the item are
the same as ITEM_MASTER.ITEM_PARENT, ITEM_GRANDPARENT.
Ensure that ITEM_LOC.SELLING_UOM is a valid UOM_CLASS.UOM.
Ensure that ITEM_LOC.PROMO_SELLING_UOM (if not NULL) is a valid
UOM_CLASS.UOM.
Ensure that ITEM_LOC.MULTI_SELLING_UOM (if not NULL) is a valid
UOM_CLASS.UOM.
Ensure that ITEM_LOC.SOURCE_WH is a valid WH.WH where
STOCKHOLDING_IND = ‘Y’ if ITEM_LOC.SOURCE_METHOD = ‘W’.
Ensure that ITEM_LOC.PRIMARY_COST_PACK (if not NULL) is valid
ITEM_MASTER.ITEM with ITEM_MASTER.SIMPLE_PACK_IND = ‘Y’ and that the
ITEM_LOC.ITEM = PACKITEM.ITEM when ITEM_LOC.PRIMARY_COST_PACK =
PACKITEM.PACK_NO.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
LOAD_ITEM_LOC
This function contains a PL/SQL block that selects from the DC_ITEM_LOC external
table and inserts the data to the RMS ITEM_LOC table. It joins the external table with a
virtual table that is a union of store and warehouse, so that only stockholding
warehouses are included. This function performs two inserts, as follows:
The primary supplier and primary country fields are populated if the item is
orderable. First, it populates the RMS ITEM_LOC table with the values from
DC_ITEM_LOC joined with a virtual table that selects the primary supplier and the
supplier’s primary country for the item from THE ITEM_SUPP_COUNTRY table.
Also, it joins the table with ITEM_MASTER to get the ORDER_AS_TYPE value for
the RECEIVE_AS_TYPE column. This is populated only for buyer packs.
For the sellable only items, there is no primary supplier or primary country. This is
done by limiting the insert to items that do not exist in the RMS
ITEM_SUPP_COUNTRY table.
The following table defines the default value in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_LOC to ITEM_LOC Column Defaults
INSERT_ITEM_LOC_SOH
This function contains a PL/SQL block that selects from the DC_ITEM_LOC external
table and inserts the data to the RMS ITEM_LOC_SOH table. It joins the external Oracle
table with a virtual table that is a union of store and warehouse, so that only
stockholding warehouses are included. It joins the external table with ITEM_MASTER to
insert only transactional items (ITEM_LEVEL = TRAN_LEVEL). This function performs
two inserts, as follows:
It joins with RMS ITEM_SUPP_COUNTRY and SUPS tables to get the UNIT_COST
and supplier currency, to convert the UNIT_COST into location currency.
For sellable only items, it does not join with the RMS ITEM_SUPP_COUNTRY and
SUPS tables. It creates an insert statement that excludes items that exist in
ITEM_SUPP_COUNTRY and sets UNIT_COST to NULL.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
INSERT_RPM_FUTURE_RETAIL
This function contains a PL/SQL block that selects from the DC_ITEM_LOC external
table and inserts the data into the RPM RPM_FUTURE_RETAIL table.
Many of the columns from the external Oracle table defined above map directly to the
RPM table. The exception is to retrieve dept, class, and subclass values for each item from
the ITEM_MASTER table. The currency code is retrieved from the STORE or WH table,
based on the location and the location type.
The RPM_FUTURE_RETAIL table is loaded for sellable transaction level items only.
Even though SELLING_UNIT_RETAIL and SELLING_UOM are not required fields in
the DC_ITEM_LOC table, they are required for sellable items. Without the values,
inserting into RPM_FUTURE_RETAIL table will fail.
Warehouse locations are conditionally inserted into the RPM_FUTURE_RETAIL table,
based on the RPM system option RECOGNIZE_WH_AS_LOCATIONS. This uses one
insert for stores and checks this system option before the insert for warehouses.
Warehouses must be stockholding locations.
The following table defines the default values in the RPM table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_LOC to RPM_FUTURE_RETAIL Column Defaults
FUTURE_RETAIL_ID Sequence
MULTI_UNIT_RETAIL_ SELLING_UNIT_RETAIL_ Populate if
CURRENCY CURRENCY MULTI_UNIT_RETAIL
is NOT NULL
SELLING_UNIT_RETAIL_ Lookup STORE or WH currency
CURRENCY
ACTION_DATE VDATE
ZONE_NODE_TYPE If LOC_TYPE = ‘S’ then 0
If LOC_TYPE = ‘W’ then 2
INSERT_ITEM_SUPP_COUNTRY_LOC
This function inserts the data into the RMS ITEM_SUPP_COUNTRY_LOC table.
The DC_ ITEM_LOC external Oracle table is joined with the RMS
ITEM_SUPP_COUNTRY table to insert data into the RMS ITEM_SUPP_COUNTRY_LOC
table for the item’s primary supplier/primary country. The function also joins the
external Oracle table with a virtual table that is a union of store and warehouse, so that
only stockholding warehouses are included.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_LOC to ITEM_SUPP_COUNTRY_LOC Column Defaults
CREATE_DATETIME SYSDATE
PRIMARY_LOC_IND If NULL, lowest loc ID = ‘Y’,
otherwise default = ‘N’.
Use analytic function.
The table requires that all
records contain
PRIMARY_LOC_IND
information, or all records can
have this indicator set to NULL.
ROUND_LVL ITEM_SUPP_COUNTRY.
ROUND_LVL
ROUND_TO_INNER_PCT ITEM_SUPP_COUNTRY.
ROUND_TO_INNER_PCT
ROUND_TO_CASE_PCT ITEM_SUPP_COUNTRY.
ROUND_TO_CASE_PCT
ROUND_TO_LAYER_PCT ITEM_SUPP_COUNTRY.
ROUND_TO_LAYER_PCT
ROUND_TO_PALLET_PCT ITEM_SUPP_COUNTRY.
ROUND_TO_PALLET_PCT
INSERT_FUTURE_COST
This function selects from the DC_ITEM_LOC external table, joined with the RMS
ITEM_SUPP_COUNTRY_LOC table, and inserts data into the RMS FUTURE_COST table
for the item’s primary supplier/primary country. Data is inserted into the
RMS_FUTURE_COST table for sellable items only.
This function uses the UNIT_COST from the RMS ITEM_SUPP_COUNTRY_LOC table as
the value for all the cost columns. It joins the external table with a virtual table that is a
union of store and warehouse, so that only stockholding warehouses are included.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_LOC to FUTURE_COST Column Defaults
ACTIVE_DATE VDATE
START_IND Y
CALC_DATE VDATE
INSERT_PRICE_HIST
This function selects from the DC_ITEM_LOC external table, joined with the RMS
PRICE_HIST table for the item’s 0 tran_type, 0 reason, 0 location record, to insert data
into the RMS PRICE_HIST table for each item/location combination.
The UNIT_COST is already in the primary currency in the 0 PRICE_HIST record, so it
must be converted to local currency. The function retrieves the CURRENCY_CODE from
the RMS STORE or WH table, based on the location and the LOC_TYPE. It retrieves only
stockholding warehouses. This function performs the following inserts:
The location currency (STORE/WH) is equal to the primary currency
The location currency is different from the primary currency, so it requires the
conversion function to convert UNIT_COST.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_LOC to PRICE_HIST Column Defaults
Others
This section describes data conversion for the following RMS tables, listed in the order
that they must be loaded:
UDA_ITEM_LOV
UDA_ITEM_DATE
UDA_ITEM_FF
VAT_ITEM
ITEM_SEASONS
ITEM_TICKET
The following programs are included in this functional area:
Main wrapper script dc_load_main.ksh
This main script is used across all functional areas to call segment load scripts. Refer
to Chapter 2 for details.
Segment load script dc_load_item_other.ksh
This wrapper calls the external Oracle table create and load scripts listed below.
External Oracle table create scripts:
– dbc_create_uda_item_lov.sql
– dbc_create_uda_item_date.sql
– dbc_create_uda_item_ff.sql
– dbc_create_vat_item.sql
– dbc_create_item_seasons.sql
– dbc_create_item_ticket.sql
Data Flow
The following diagram shows the data flow for the Items–Others functional area:
DATA FILES
PREPARATION SCRIPTS CONVERSION TABLES RMS/RPM TABLES
dc_uda_item_lov.dat
dc_uda_item_date.dat dbc_create_uda_item_lov_tab.sql dc_uda_item_lov uda_item_lov
LOAD PROCESS
dc_uda_item_ff.dat dbc_create_uda_item_date_tab.sql dc_uda_item_date uda_item_date
dc_uda_vat_item.dat dbc_create_uda_item_ff_tab.sql dc_uda_item_ff uda_item_ff
dc_load_item_other.ksh
dc_item_seasons.dat dbc_create_vat_item_tab.sql dc_vat_item vat_item
dc_item_ticket.dat dbc_create_item_seasons_tab.sql dc_item_seasons item_seasons
dbc_create_item_ticket_tab.sql dc_item_ticket item_ticket
Prerequisites
Before you begin using the data conversion toolset for Item Others, you must complete
data conversion for Items, Item Supplier, and Item Location:
Fashion Items
Hardlines
Grocery Items
Pack Items
Item Supplier
Item Location
File Format
In the table definitions that follow, the File Format columns Field Name, Data Type, and
Max Length define the structure of the source file.
Character fields cannot contain carriage returns, because the load process will process a
carriage return as an indication of a new record.
DC_UDA_ITEM_LOV Table
File name: DC_UDA_ITEM_LOV.DAT
Table create SQL script: DBC_CREATE_UDA_ITEM_LOV_TAB.SQL
External Oracle table created: DC_UDA_ITEM_LOV
Suggested post-loading validation (sequence after dc_load_item_other.ksh:
Ensure that UDA_ITEM_LOV.ITEM is a valid ITEM_MASTER.ITEM where
ITEM_MASTER.ITEM_LEVEL <=ITEM_MASTER.TRAN_LEVEL.
Ensure that UDA_ITEM_LOV.UDA_ID/UDA_VALUE combination exists in
UDA_VALUES.
Ensure that any UDA_ITEM_LOV.ITEM with a UDA_ITEM_LOV.UDA_ID where
UDA.SINGE_VALUE_IND = ‘Y’ has no other UDA_ITEM_LOV rows.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_UDA_ITEM_DATE Table
File name: DC_UDA_ITEM_DATE.DAT
Table create SQL script: DBC_CREATE_UDA_ITEM_DATE_TAB.SQL
External Oracle table created: DC_UDA_ITEM_DATE
Suggested post-loading validation (sequence after dc_load_item_other.ksh:
Ensure that UDA_ITEM_DATE.ITEM is a valid ITEM_MASTER.ITEM, where
ITEM_MASTER.ITEM_LEVEL <=ITEM_MASTER.TRAN_LEVEL.
Ensure that UDA_ITEM_DATE.UDA_ID is a valid UDA.UDA_ID with
UDA.DISPLAY_TYPE of ‘DT’.
Ensure that any UDA_ITEM_DATE.ITEM with a UDA_ITEM_DATE.UDA_ID where
UDA.SINGE_VALUE_IND = ‘Y’ has no other UDA_ITEM_DATE rows.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_UDA_ITEM_FF Table
File name: DC_UDA_ITEM_FF.DAT
Table create SQL script: DBC_CREATE_UDA_ITEM_FF_TAB.SQL
External Oracle table created: DC_UDA_ITEM_FF
Suggested post-loading validation (sequence after dc_load_item_other.ksh:
Ensure that UDA_ITEM_FF.ITEM is a valid ITEM_MASTER.ITEM where
ITEM_MASTER.ITEM_LEVEL <=ITEM_MASTER.TRAN_LEVEL.
Ensure that UDA_ITEM_FF.UDA_ID is a valid UDA.UDA_ID with
UDA.DISPLAY_TYPE of ‘FF’.
Ensure that any UDA_ITEM_FF.ITEM with a UDA_ITEM_FF.UDA_ID where
UDA.SINGE_VALUE_IND = ‘Y’ has no other UDA_ITEM_FF rows.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_VAT_ITEM Table
File name: DC_VAT_ITEM.DAT
Table create SQL script: DBC_CREATE_VAT_ITEM_TAB.SQL
External Oracle table created: DC_VAT_ITEM
Suggested post-loading validation (sequence after dc_load_item_other.ksh:
Ensure that VAT_ITEM.ITEM is a valid ITEM_MASTER.ITEM where
ITEM_MASTER.ITEM_LEVEL <=ITEM_MASTER.TRAN_LEVEL.
Ensure that VAT_ITEM.VAT_REGION is a valid VAT_REGION.VAT_REGION.
Ensure that VAT_ITEM.VAT_CODE/VAT_RATE is a valid combination in
VAT_CODE_RATES, where VAT_ITEM.ACTIVE_DATE >=
VAT_CODE_RATES.ACTIVE_DATE, and no other row on VAT_CODE_RATES
exists for the combination with a greater ACTIVE_DATE that is still <=
VAT_ITEM.ACTIVE_DATE.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
VAT_RATE Numeric 20,10 Y Rate of the VAT for the item/ VAT_RATE NUMBER(20,10)
VAT region combination.
Valid values come from the
VAT_RATE column in the
dc_vat_code_rates.dat file. These
values exist in the
VAT_CODE_RATES table.
ACTIVE_ Alpha- 11 Y Date the item/VAT region ACTIVE_DATE DATE
DATE numeric combination is active.
Date format is ‘DDMONYYYY’
(for example, 02JAN2007).
DC_ITEM_SEASONS Table
File name: DC_ITEM_SEASONS.DAT
Table create SQL script: DBC_CREATE_ITEM_SEASONS_TAB.SQL
External Oracle table created: DC_ITEM_SEASONS
Suggested post-loading validation (sequence after dc_load_item_other.ksh:
Ensure that ITEM_SEASONS.ITEM is a valid ITEM_MASTER.ITEM where
ITEM_MASTER.ITEM_LEVEL <=ITEM_MASTER.TRAN_LEVEL.
Ensure that ITEM_SEASONS.SEASON_ID/PHASE_ID combination exists in
PHASES.
Capture count from ITEM_SEASONS and compare to flat file
DC_ITEM_SEASONS.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
DC_ITEM_TICKET Table
File name: DC_ITEM_TICKET.DAT
Table create SQL script: DBC_CREATE_ITEM_TICKET_TAB.SQL
External Oracle table created: DC_ITEM_TICKET
Suggested post-loading validation (sequence after dc_load_item_other.ksh):
Ensure that ITEM_TICKET.ITEM is a valid ITEM_MASTER.ITEM, where
ITEM_MASTER.ITEM_LEVEL <=ITEM_MASTER.TRAN_LEVEL.
Ensure that ITEM_TICKET.TICKET_TYPE_ID is a valid
TICKET_TYPE_HEAD.TICKET_TYPE_ID.
Capture the count from ITEM_TICKET and compare to flat file
DC_ITEM_TICKET.DAT to ensure that all rows are loaded.
Field Name Data Type Max Req’d Description Field Name Data Type
Length
LOAD_UDA_ITEM_LOV
This function contains a PL/SQL block that selects from the DC_UDA_ITEM_LOV
external table and inserts the data to the RMS UDA_ITEM_LOV table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_UDA_ITEM_LOV to UDA_ITEM_LOV Column Defaults
LOAD_UDA_ITEM_DATE
This function contains a PL/SQL block that selects from the DC_UDA_ITEM_DATE
external table and inserts the data to the RMS UDA_ITEM_DATE table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_UDA_ITEM_DATE to UDA_ITEM_DATE Column Defaults
LOAD_UDA_ITEM_FF
This function contains a PL/SQL block that selects from the DC_UDA_ITEM_FF external
table and inserts the data to the RMS UDA_ITEM_FF table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_UDA_ITEM_FF to UDA_ITEM_FF Column Defaults
LOAD_VAT_ITEM
This function contains a PL/SQL block that selects from the DC_VAT_ITEM external
table and inserts the data to the RMS VAT_ITEM table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_VAT_ITEM to VAT_ITEM Column Defaults
LOAD_ITEM_SEASONS
This function contains a PL/SQL block that selects from the DC_ITEM_SEASONS
external table and inserts the data to the RMS ITEM_SEASONS table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_SEASONS to ITEM_SEASONS Column Defaults
LOAD_ITEM_TICKET
This function contains a PL/SQL block that selects from the DC_ITEM_TICKET external
table and inserts the data to the RMS ITEM_TICKET table.
The following table defines the default values in the RMS table if no information is
provided in the data file (external table field values are NULL or not defined).
The function returns a Boolean value.
DC_ITEM_TICKET to ITEM_TICKET Column Defaults
The following sections list the optional tables for each of the functional area included in
this data conversion toolset. Tables should be loaded in the order that they are listed.
Core Tables
DIFF_RATIO_HEAD
DIFF_RATIO_DETAIL
SOURCE_DLVRY_SCHED
SOURCE_DLVRY_SCHED_DAYS
SOURCE_DLVRY_SCHED_EXC
STOP_SHIP
TRANSIT_TIMES
Supplier Tables
SUP_ATTRIBUTES
SUP_INV_MGMT
SUP_REPL_DAY
SUPP_PREISSUE
SUPS_MIN_FAIL
Items Tables
PACK_TMPL_HEAD
PACK_TMPL_DETAIL
ITEM_ATTRIBUTES
ITEM_SUPP_UOM
ITEM_LOC_TRAITS
SUB_ITEMS_HEAD
SUB_ITEMS_DETAIL
ITEM_FORECAST
REPL_ITEM_LOC
REPL_DAY
MASTER_REPL_ATTR
NAVROLE.SQL NAV_ELEMENT_MODE_ROLE
CODES.SQL CODE_HEAD
CODE_DETAIL
CODE_DETAIL_TRANS
POPULATE_SEC_FORM_ SEC_FORM_ACTION
ACTION.SQL
RESTART.SQL RESTART_PROGRAM_STATUS
RESTART_CONTROL+C11
RTK_ERRORS.SQL RTK_ERRORS
RTK_REPORTS.SQL RTK_REPORTS
TL_COLUMNS.SQL TL_COLUMNS
WIZARD.SQL WIZARD_TEXT
CONTEXT.SQL CONTEXT_HELP
POPULATE_FORM_ FORM_LINKS
LINKS.SQL
POPULATE_FORM_ FORM_LINKS_ROLE
LINKS_ROLE.SQL
UOM_X_CONVERSION.SQL UOM_X_CONVERSION
VAR_UPC_EAN_LOAD.SQL VAR_UPC_EAN
MULTIVIEW_DATA.SQL MULTIVIEW_SAVED_45
MULTIVIEW_DEFAULT_45
RMSUOMCONV1.SQL UOM_CONVERSION
RMSUOMCONV2.SQL UOM_CONVERSION
CALENDAR.SQL HALF
CALENDAR
SYSTEM_VARIABLES
PERIOD
SA_SYSTEM_REQUIRED.SQL Calls SA_METADATA.SQL to insert into POS_TENDER_TYPE_HEAD
these tables: SA_CC_VAL
SA_REFERENCE
SA_ERROR_CODES
SA_EXPORT_OPTIONS
SA_ERROR_IMPACT
Calls SA_METADATA.SQL, which in SA_REALM_TYPE
turn calls SA_REALM_TYPE.SQL to insert
into this table:
Calls SA_METADATA.SQL, which in SA_REALM
turn calls SA_REALM.SQL to insert into
this table:
Calls SA_METADATA.SQL, which in SA_PARM_TYPE
turn calls SA_PARM_TYPE.SQL to insert
into this table:
Calls SA_METADATA.SQL, which in SA_PARM
turn calls SA_PARM.SQL to insert into
this table:
RMS12RTM.SQL Calls ENTRY_TYPE.SQL to insert into this ENTRY_TYPE
table:
Calls ENTRY_STATUS.SQL to insert into ENTRY_STATUS
this table:
Calls OGA.SQL to insert into this table: OGA
Calls TARIFF_TREATMENT.SQL to insert TARIFF_TREATMENT
into this table:
QUOTA_CATEGORY.SQL QUOTA_CATEGORY
Calls COUNTRY_TARIFF_TREATMENT. COUNTRY_TARIFF_TREATMENT
SQL to insert into this table:
Calls HTS_HEADINGS.SQL to insert into HTS_CHAPTER
this table: