Ascp Data Collection Technical Workshop Good Oracle Database
Ascp Data Collection Technical Workshop Good Oracle Database
Sanjeev Kale
Oracle Corporation
Introduction
This paper focuses on understanding
Data collection architecture. Data Collection is
a process that pulls data from designated
data sources into its planning data store. The
Data collection process consists of the ‘ pull
pull
process’ and ‘Operational Data Store (ODS)
load process’ .
Note: This
Note: This document is intended for use as a
reference document. Certain sections of the
text are intentionally repeated throughout the
document, so that each section can be read
and understood independently of one
another. This document is designed to
supplement Oracle Advanced Supply Chain Definitions
Planning and Oracle Global ATP Server Oracle Applications Data Store (ADS)
User’s Guide and other APS training class Represents all the source data tables used to
notes. build and maintain the planning data store
within Oracle ASCP. It represents a single
Overview of Running source data instance. E.g. transaction
tr ansaction system
(Source Instance)
Collections
Data Collection programs move data from the Operational Data Store (ODS) Part of Oracle
Pull program workbench is used to verify that the intended
data has been collected – If necessary,
Collects the data from the ADS, and stores troubleshoot errors in data collection and
the data into the staging tables. This pull rerun the data collection program.
program is a registered AOL concurrent
program that could be scheduled and Data Collection Setup Steps
launched by a system administrator. If you
The Data Collection can be implemented in
are using a legacy program, you must write
two configurations – Centralized
your own pull program. The pull program
configuration and Decentralized or
performs the following
f ollowing major processes.
Distributed configuration.
configuration.
Refresh snashots.
Launch the pull Workers to perform
Centralized configuration is where the
pulls from the appropriate source
transaction (Source) instance and
tables and insert the data in the
destination (APS) instance is on the same
Staging tables.
instance.
ODS Load
Decentralized configuration is where the
transaction (Source) instance and
A PL/SQL program which performs the data
Destination (APS) instance are two diff erent
transform and moves the data from the
instances
instance s. These two instances could be on
staging tables to the ODS. This collection
different machines.
program is a registered AOL concurrent
program that could be scheduled and
Depending on the type of configuration that
launched by the system administrator. The
is selected,
selected, the setup steps will change. E.g.
Launch_Monitor procedure performs the
For Centralized configuration there is no
following major processes:
need to set up database links, whereas in
Decentralized configuration,
configuration , the database
Key Transformation - Generate new
links will have to be set up before proceeding
local ID for global attributes such as
with any other setup steps.
items, category set,
items, set , vendor, vendor
source instance (known as the Planning • plans and link them up by feeding the
Database Link). Both the links are supply schedule of one
on e org as demand
bidirectional. schedule of another.
The Application Database link is used for In APS (Planning Database Link)
• Completing the “Publishing” process. =========================
create public database link vis1153
• The remote procedure that pulls the
connect to apps identified by apps
planned order or requisition record from using
using 'vis115
'vis1153.wo
3.world'
rld';
;
the planning instance to the transaction
instance does so by using the Application
Test the APS link as follows:
Database link.
In APS SQL*Plus:
Centralized vs. Distribution Configuration
====================
select sysdate from dual@vis1153;
• This refers to the deployment of
planning and ERP modules. Test the source link as follows:
Advanced
Advanced Supply Chain Planner
Planner
Setup Instances DB_LINK
The Database Administrator uses this form -------
vis1153
to setup instance names and to specify the
release version of the source database,
select m2a_dblink,a2m_dblink
Application Database link and Planning from
from msc_apps
msc_apps_ins
_instanc
tances;
es;
Database link associated with the instance
names. MSC_APPS_INSTANCES table will list all
the source instances from which destination
Complete the following Field and Flag in the (APS) instance can pull data from.
Application
Application Instance Window.
Window.
Set up Organizations by clicking on the
Organizations Button. The Organizations FIELD/FLAG DESCRIPTION
window lists the organization within the Instance Code Choose from Multiple instances
instance. To enable data collection for an Instance Type Discrete, Process, Discrete and
Process or Other. If the source
organization within an instance, select the
is discrete, only the discrete
enabled check box. entites are collected. IF Process,
then only
The database links can be confirmed by OPM related entities are
running the following SQL scripts after the collected
Version Unique version for the specified
instances are defined. instance
Application A link to connect to the
In vis1153 SQL*Plus Database Link Application database to Oracle
================ ASCP
Planning A link to connect to the Oracle
Oracle
Select db_link Database Link ASCP to the Application
Application
from
from dba_d
dba_db_
b_lin
links
ks
database
Enable Flag Select this option to enable the
where db_link = 'APS';
collection Process
GMT Difference The difference between instance
DB_LINK
time zone and GMT
2) BOM/Routing: Any change in
Example 1: Complete Refresh = Yes BOM/Routing, except for substitute
(Complete Refresh Mode), Pull Items = components.
Yes, Pull BOM/Routings = No – After the In the case of using
Data collection, the ODS will contain items alternate/simultaneous resources,
but no information about bills and routings. the change of the resource step
number is not supported.
3) Supply/Demand: Any change chang e in
When Complete Refresh is set to No supply/demand, includes onhand
(Incremental Refresh - Net Change mode), quantities and hard reservations.
then the data collection is performed in 4) Resource:
incremental refresh mode Net Change. The a) The department resource
data existing in the ODS is not purged. The capacity changes defined in
data that have flags set to Yes will be the simulation set.
refreshed. b) WIP line resource changes
c) WIP job's resource
requirement changes.
d) Supplier's capacity changes
In the Data pull parameters form the
number of workers to be employed can be
specified.
SELE
SELECT
CT ASSE
ASSEMB
MBLY
LY_I
_ITE
TEM_
M_ID
ID ITEM
ITEM_I
_ID,
D,
SEGMENT1, ITEM_I
ITEM_ID
D SEGMEN
SEGMENT1
T1 ORG_ID
ORG_ID BILL_S
BILL_SEQ_
EQ_ID
ID
BOM.ORGANI
BOM.ORGANIZATIO
ZATION_ID
N_ID ORG_ID,
ORG_ID, ------- ----------- ------ -----------
BILL_SEQUENCE_ID 8307 SK-DCTEST01 207 36656
MSC_BOMS ITEM_NAME,
COMPS.ORGA
COMPS.ORGANIZAT
NIZATION_I
ION_IDD ORG_ID,
ORG_ID,
MSC_BOM_COMPONENTS USAGE_QUANTITY
USAGE_QTY
Before the data is populated in the above FROM
FROM MSC_BO
MSC_BOM_C
M_COMP
OMPONE
ONENTS
NTS COMPS,
COMPS,
tables, there is a process of Key MSC_SYSTEM_ITEMS MTL
WHERE BILL_SEQUE
BILL_SEQUENCE_I
NCE_ID
D = 36656
transformation that takes place where the
AND
AND COMP
COMPS.
S.IN
INVE
VENT
NTOR
ORY_
Y_IT
ITEM
EM_I
_ID
D =
Source Inventory Item Id are Mapped to the MTL.INVENTORY_ITEM_ID
inventory Item Id’ in the Planning instance. AND
AND COMP
COMPS.
S.OR
ORGA
GANI
NIZA
ZATI
TION
ON_I
_ID
D =
For Inventory item Id,
Id , the mapping is stored MTL.ORGANIZATION_ID;
in the following table:
table :
ITEM_ID
ITEM_ID ITEM_NAME
ITEM_NAME ORG_ID
ORG_ID USAGE_QTY
USAGE_QTY
------- ----------- ------ ---------
MSC_ITEM_ID_LID 2334 SK-DCTEST02 207 2
2335 SK-DCTEST03 207 2
SELECT SR_INVENTORY_ITEM_ID SR_ITEM_ID,
INVENTORY_ITEM_ID ITEM_ID
User has the flexibility in determining when a
FROM
FROM MSC_IT
MSC_ITEM_
EM_ID_
ID_LID
LID
WHERE sr_invento
sr_inventory_it
ry_item_id
em_id IN
snapshot of information from the source
(8307,8309,8317); system should be taken, and in deciding what
information to capture with each job. The data
SR_ITEM_ID ITEM_ID collection program can be set to run upon
---------- -------
8307 2333
submission of a job request, and at specified
8309 2334 time intervals, and to collect different type s of
8317 2335 information with different frequenc ies. ies. For
example,
example , dynamic data such as sales orders
SELECT
SELECT INVENT
INVENTORY
ORY_IT
_ITEM_
EM_ID
ID ITEM_I
ITEM_ID,
D, can be collected frequently, while static data ,
ITEM_NAME,
SR_INVENTORY_ITEM_ID SR_ITEM_ID,
such as department resources,
resources , can be
ORG
ORGANIZ
ANIZA
ATION
TION_I
_ID
D ORG_I
RG_ID
D collected at longer intervals.
FROM
FROM MSC_SY
MSC_SYSTE
STEM_I
M_ITEM
TEMS
S
WHERE ITEM_NAME
ITEM_NAME LIKE 'SK-DC%';
'SK-DC%'; The objective is to set up data collection as
ITEM_ID
ITEM_ID ITEM_NAME
ITEM_NAME SR_ITEM_ID
SR_ITEM_ID ORG_ID
ORG_ID
needed to create a current replica of
------- ----------- ---------- ------ information for the APS system to use in its
The concurrent manager allows only one
stage in a request set to run at a time. When • Complete refresh – Ignores the most
one stage is complete,
complete , the following stage is recent refresh data and collects all data.
submitted. A stage is not considered to be • Incremental refresh – Collects only the
complete until all of the requests in the stage incremental changes since the most
are complete. One advantage of using stages recent refresh.
is the ability to run several requests in parallel
and then move sequentially to the next stage. Refresh Snapshot (MSRFWOR)
In Data collection there are two stages , Data Refresh Snapshot Process consistently
Pull Stage and ODS Load Stage. In the Data refreshes
refreshes one
one or more snapshots. The refresh
Pull Stage – Planning Data Pull, Refresh snapshot uses Oracle's replication
Snapshot and Planning Data Pull Worker management API’s following packages :
requests
requests are run. In the ODS Load Stage – DBMS_SNAPSHOT.REFRESH. A Comma-
Planning ODS Load, Planning ODS Load separated list of snapshots is provided and
Worker, and Planning Data Collection Purge the Type of refresh to perform for each
Staging tables request s are run. snapshot listed; 'F' or 'f' indicates a fast
refresh, 'C' or 'c' indicates a complete
Six different processes comprise the structure refresh.
of Data Collection process.
process . Each of these
processes are launched during the Data
collection run. The refresh snapshot process is started , and
purge the staging tables process is also
CONCURRENT SHORT NAME submitted while
while the refresh snapshot
PROGRAM process is running. For purging the staging
Planning Data Pull MSCPDP tables,
tables , the
Refresh Snapshot MSRFWOR MSC_CL_COLLECTION.PURGE_STAGIN
Planning Data Pull Worker MSCPDPW G_TABLES_SUB procedure is called. The
Planning ODS Load MSCPDC purpose of calling this procedure is that
Planning ODS Load MSCPDCW
there is a COMMIT after every task – If the
Please refer to the appendix for a complete
list of tasks and procedures called.
called. MRP:Cutoff Date Offset Months
Months profile
option is used for resource availability.
Planning ODS Load (MSCPDC)
Please refer to the appendix for a complete
Planning Data load is launched by Planning list of tasks and procedures called.
called.
ODS Load process. This is the process which
launches and then controls the remaining Planning Data Collection – Purge
Data load processes. Staging Tables (MSCPDCP)
Key transformation takes place here before The data in the staging tables is purged
the source data is made is available to APS. after the planning ODS load is successfully
Key transformation takes place only for Items, completed. The data collection process will
Categories, Suppliers, and Customers.
Customers . attempt to purge the already extracted data
and any data orphaned as a result of a
Key Transformation – To track data termination of the Data Collection process.
entities back to the source instance,
APS transforms eacheach unique ID within MRP:Purge Batch Size Size profile option is
APS.
APS. This process is called as Key used to determine the number of records to
Transformation. Generate new local ID be deleted at a time.
for global attributes such as items,
items,
category set,
set , vendor, vendor site,
site , The tables which are purged by the Purge
customer and
and customer site.
site. Staging tables process are:
Launch the ODS Load Workers to
perform Create, Update, and Delete • MSC_ST_BOM_COMPONENTS
• MSC_ST_BOMS
operations for each entity in ODS • MSC_ST_DEMANDS
(MSCPDCW). • MSC_ST_ROUTINGS
Recalculate the sourcing history based • MSC_ST_COMPONENT_SUBSTITUTES
• MSC_ST_ROUTING_OPERATIONS
on the latest sourcing information and
• MSC_ST_OPERATION_RESOURCES
the data from tr ansaction systems.
systems.
• MSC_ST_SOURCING_RULES
• MSC_ST_SR_ASSIGNMENTS
MRPCLHAB.pls This package has
• MSC_ST_SR_RECEIPT_ORG MRPCLHAS.pls some functions
• MSC_ST_SR_SOURCE_ORG used while
• MSC_ST_INTERORG_SHIP_METHODS collections.
• MSC_ST_SUB_INVENTORIES
• MSC_ST_ITEM_SUPPLIERS
• MSC_ST_SUPPLIER_CAPACITIES
• MSC_ST_SUPPLIER_FLEX_FENCES Important SQL scripts
• MSC_ST_SUPPLIES
• MSC_ST_RESOURCE_REQUIREMENTS
• MSC_ST_TRADING_PARTNERS
Following are the SQL scripts that are used
• MSC_ST_TRADING_PARTNER_SITES to create to the database objects used in
• MSC_ST_LOCATION_ASSOCIATIONS the Data Collection Process. The following
• MSC_ST_UNIT_NUMBERS
SQL Scripts are for reference only;
only ; They are
• MSC_ST_PROJECTS
• MSC_ST_PROJECT_TASKS provided here for debugging purpose s.
• MSC_ST_PARAMETERS
• MSC_ST_UNITS_OF_MEASURE
• MSC_ST_UOM_CLASS_CONVERSIONS
Snapshot Logs Create Snapshot
• MSC_ST_UOM_CONVERSIONS Tables
• MSC_ST_BIS_PFMC_MEASURES BOMMPS
BOMMPSNL.
NL.sql
sql BOMMPS
BOMMPSNP.
NP.sql
sql
• MSC_ST_BIS_TARGET_LEVELS
• MSC_ST_BIS_TARGETS MTLMPS
MTLMPSNL.
NL.sql
sql MTLMPS
MTLMPSNP.
NP.sql
sql
• MSC_ST_BIS_BUSINESS_PLANS MRPMPS
MRPMPSNL.
NL.sql
sql MRPMPS
MRPMPSNP.
NP.sql
sql
• MSC_ST_BIS_PERIODS
WIPMPS
WIPMPSNL.
NL.sql
sql WIPMPS
WIPMPSNP.
NP.sql
sql
• MSC_ST_ATP_RULES
• MSC_ST_PLANNERS POMPSN
POMPSNAL.
AL.sql
sql POMPSN
POMPSNAP.
AP.sql
sql
• MSC_ST_DEMAND_CLASSES OEMPSN
OEMPSNAL.
AL.sql
sql OEMPSN
OEMPSNAP.
AP.sql
sql
• MSC_ST_PARTNER_CONTACTS
DATA PULL (Request Set Stage) ODS LOAD (Request Set Stage)
APS 13/
13/14
/14
DATA COLLECTION
SOURCE (TRANSACTION) DESTINATION (PLANNING – APS)
• 11.0
• 11i APPLICATION DEFINE RUN /
DATABASE LINK
PLANS
(ODS)
P U B L I S H
APS 14/
14/14
/14