You are on page 1of 19

Pricing Data Bulk Loader API

An Oracle White Paper


Apr 2009
Pricing Data Bulk Loader API

OVERVIEW

This document gives an overview of the functionality provided


through the Pricing Data Bulk Loader API. This functionality is
available for Basic Pricing and Advanced Pricing. For a Basic Pricing
installation, only the Basic Pricing data is imported into the system.
The Pricing Data Bulk Loader API consists of a set of interface tables
and a concurrent program. All validations and defaulting are
performed before the data is inserted, deleted or updated. Records that
are successfully loaded are automatically purged from the interface
table(s).

Purpose of introducing this API

The Pricing Data Bulk Loader can be used as an alternative to


the price list user interface (UI) and Price List Business Object API
(QP_PRICE_LIST_PUB.Process_Price_List) for importing large volumes
of price list data such as from a legacy system. This functionality was
created to improve performance for this task. For details on the setup
for advanced pricing, please refer to advanced pricing users guide, My
Oracle Support Note 91798.1 - Order Management Product Suite
Documentation.

Your business practices may require that you upload price list data on
a regular basis such as those described in the following scenarios:
• When a new price list needs to be created by uploading a price
change file.

• When new product lines are created, new offerings to new


channels, acquisitions of product lines or companies, new
product rollout, and new price list creations.

• When implementing a new sales territory, to bulk load existing


price lists or to upload pricing from regions that may have their
pricing on spreadsheets.

1
Important implementation Notes:

How Entities Are Utilized


Table Name Select Insert Update Delete
QP_INTERFACE_LIST_HEADERS X - X X
QP_INTERFACE_LIST_LINES X - X X
QP_INTERFACE_QUALIFIERS X - X X
QP_INTERFACE_PRICING_ATTRIBS X - X X
QP_INTERFACE_ERRORS - X - -
QP_LIST_HEADERS_B - X X X
QP_LIST_HEADERS_TL - X X X
QP_LIST_LINES - X X X
QP_QUALIFIERS - X X X
QP_PRICING_ATTRIBUTES - X X X
QP_RLTD_MODIFIERS - X X X

Interface Tables
• QP_INTERFACE_LIST_HEADERS
• QP_INTERFACE_LIST_LINES
• QP_INTERFACE_QUALIFIERS
• QP_INTERFACE_PRICING_ATTRIBS
• QP_INTERFACE_ERRORS


Sample Scripts Are Provided

Patch #4900462 provides example scripts for Price List Bulk Loader feature
introduced in 11.5.10 under $QP_TOP/patch/115/sql directory.
• QPBLKEX1.sql - Script populates interface tables to insert price list
header and price list line.
• QPBLKEX2.sql - Script populates interface tables to insert price list
header and price list line and pricing attributes.
• QPBLKEX3.sql - Script populates interface tables to insert price list
header and price break line.
• QPBLKEX4.sql - Script populates interface tables to update price list
header with qualifiers.
• QPBLKEX5.sql - Script populates interface tables to attach secondary
price lists to the primary price list.

Date Formats

Populate QP_INTERFACE_LIST_HEADERS.START_DATE_ACTIVE or
END_DATE_ACTIVE with format 'YYYY/MM/DD', (for example, 2006/06/24).
See Note 416121.1 - How to set the start_date_active and end_date_active columns
in QP_INTERFACE_LIST_HEADERS. Type of start_date_active and
end_date_active columns is VARCHAR2 in QP_INTERFACE_LIST_HEADERS
and DATE in other tables.

2
Pricing Data Bulk Loader API Implementation

An overview of the tasks involved in the implementation for the Pricing Data
Bulk Loader API is depicted in the following flowchart

Should data be
Delete existing records from Yes deleted from QP
QP Interface tables. interface tables?

No

Populate the
Interface tables

Gather statistics on the


Interface tables

Gather statistics on the


inv and qp schemas (if this
task was not completed
recently/within the last week)

Set value for the profiles.


QP: Pricing Transaction Entity
QP: Source System Code
QP: Batch Size for Bulk Import

Run the Pricing Data Bulk


Loader API

End

3
Purge the Interface tables

If QP interface data is no longer needed, be sure to delete any outstanding


records; especially for the orig_sys_header_ref that will be populated for
the next run of this API.

Sample SQL that may be used for purging specific data:

Delete from qp_interface_list_headers where orig_sys_header_ref='XYZ';


Delete from qp_interface_list_headers where orig_sys_header_ref='XYZ';
Delete from qp_interface_list_lines where orig_sys_header_ref='XYZ';
Delete from qp_interface_pricing_attribs where orig_sys_header_ref='XYZ';
Delete from qp_interface_errors where orig_sys_header_ref='XYZ';
Commit;

Populate the Interface Tables


The pricing data bulk loader imports data from the following
interface tables:
• QP_INTERFACE_LIST_HEADERS: This table captures the
Price List header data.
• QP_INTERFACE_LIST_LINES: Price list line data is
captured in this interface table.
• QP_INTERFACE_QUALIFIERS: This table contains the
header qualifiers associated with the price lists to be imported.
• QP_INTERFACE_PRICING_ATTRIBS: The product and
pricing attributes data is captured in this table.

Gathering QP Interface Table Statistics


This step is required to improve performance.
1. Responsibility: System Administrator
2. Navigate to: Concurrent > Request
3. Submit a New Request
4. Select request 'Gather Table Statistics'
Ensure 'Estimate Percentage' parameter entered is 10 or greater
Run this request for the QP interface tables as listed above.

4
Gather Statistics for QP and INV Schemas

If data has recently been loaded or entered into QP(Advanced Pricing)


or INV (Inventory) or if it has been a while since statistics were
gathered for these schemas, please gather fresh statistics for both
schemas. See Note 419728.1 – How to Gather Statistics on Oracle
Applications 11i and above.

Profile Options used in Pricing Data Bulk Loader


The following profile options should be set:

• QP: Pricing Transaction Entity: When the Pricing Data Bulk


Loader API is called, the price list data is picked up from the
interface table when the Pricing Transaction Entity attribute
(column) is either: NULL or same as the profile value

• QP: Source System Code: When the Pricing Data Bulk


Loader API is called, the price list data is picked up from the
interface table when the Source System Code attribute
(column) is either; NULL or same as the profile value

• QP: Batch Size for Bulk Import: This profile value


determines the number of records loaded into the memory for
processing. For improved performance, set an appropriate
value for this profile based on your hardware configuration. If
the profile value is set too high, then the system may "hang."
The default value is 1000.

5
Run the Pricing Data Bulk Loader API

1. Responsibility: Oracle Pricing Manager


2. Navigate to: Reports
3. Select Name = QP:Bulk Import of Price List
4. Enter desired parameters

• Entity: Indicates which pricing entity is to be processed. This defaults as


PRL (price list). Currently only price lists(PRL) may be uploaded.

• Entity Name: Enter the name of the price list to be processed. When the
name is specified the price list is considered for import regardless of the
values. If left blank, all entities of the selected Entity type available for
processing in the interface tables will be processed: for example,
PROCESS_STATUS_FLAG = 'P', PROCESS_FLAG = 'Y' and
REQUEST_ID = NULL are considered for the import.
• Process ID: This value corresponds to the process_id in the interface
tables. The Process ID groups data in the interface table. You can select
criteria to specify which records should be processed. If this field is left
blank, all available records for processing will be considered subject to the
restrictions entered in Entity Name.

• Process Type: This corresponds to the process type listed in the interface
tables such as XML.

• Process Parent: Select Yes (the default) or No to define if the loader should
process a parent record if a child record has an error. This is applicable only
to the List Line and Pricing Attributes parent-child relation.

• No of Threads: Enter a number that indicates the total number of child


processes or threads to achieve multi-threading for list lines and their child
records. The default value is 1. Note: Multi-threading can impact the length
of processing time required; therefore, it is recommended that you do not
exceed the number of Central Processing Units (CPUs) available when
running the program. Ideally, schedule the concurrent request for a slow
processing period or when there are few users on the system.

• Turn Debug On: Valid values are Yes or No. If Yes, detailed debug
messages are written to the concurrent program log file. As debug
messages add to the performance overhead, specifying No results in
quicker completion of the concurrent request.

Note: The field PROCESS_STATUS_CODE is updated to ‘E’ for records that


fail the validation logic of value to id conversion

6
Example Case :

    
   
   
 

Price List Name – Test001


Description – Test001 Price List
Currency – USD
Multi-Currency Conversion – Corporate Pricelist Conversion list.
Start date active – 01-Jan-2009
End date active – 05-May-2009
Price List Lines Details:
Product Context – Item
Product Attribute – Item Number
Product Value –AS54888
Value – 100
Precedence – 220
Start Date – JAN-05-2009

Populate interface tables as follows.

INSERT INTO qp_interface_list_headers(orig_sys_header_ref,


list_type_code, NAME, description, active_flag, currency_code,
currency_header, rounding_factor, source_lang, LANGUAGE,
start_date_active, end_date_active,
interface_action_code, process_flag, process_status_flag)
VALUES('H_EXM123', 'PRL', 'Test001’, 'Test001 Price List',
'Y', 'USD', 'Corporate Pricelist Conversion list', -2,
'US', 'US', '2009/01/01', '2009/05/05',
'INSERT', 'Y', 'P');

INSERT INTO qp_interface_list_lines(orig_sys_line_ref,


orig_sys_header_ref, list_line_type_code,
start_date_active,
arithmetic_operator, operand, primary_uom_flag,
product_precedence, interface_action_code,
process_flag, process_status_flag)
VALUES('L_EXM123', 'H_EXM123',
'PLL', To_Date('JAN-05-2009', 'MON-DD-YYYY'),
'UNIT_PRICE', 100, 'Y', 220,
'INSERT', 'Y', 'P');

INSERT INTO qp_interface_pricing_attribs(orig_sys_pricing_attr_ref,


orig_sys_line_ref, orig_sys_header_ref,
product_attribute_context, product_attr_code, product_attr_val_disp,
product_uom_code,
interface_action_code, process_flag, process_status_flag)
VALUES('A_EXM123',
'L_EXM123', 'H_EXM123',
'ITEM', 'INVENTORY_ITEM_ID', 'AS54888',
'Ea', 'INSERT', 'Y', 'P');

Populate the Interface tables as follows to updatethe list price to 200


and UOM to DZ of the above price list.

INSERT INTO qp_interface_list_headers(orig_sys_header_ref, NAME,


list_type_code, interface_action_code,
process_flag, process_status_flag)
VALUES('H_EXM123', ‘Test001’, 'PRL', 'UPDATE', 'Y', 'P');

INSERT INTO qp_interface_list_lines(orig_sys_line_ref,


orig_sys_header_ref, list_line_type_code,
start_date_active,
arithmetic_operator, operand,
interface_action_code, process_flag, process_status_flag)

7
VALUES('L_EXM123', 'H_EXM123',
'PLL', To_Date('JAN-05-2009', 'MON-DD-YYYY'),
'UNIT_PRICE', 200,
'UPDATE', 'Y', 'P');

INSERT INTO qp_interface_pricing_attribs(orig_sys_pricing_attr_ref,


orig_sys_line_ref, orig_sys_header_ref,
product_attribute_context, product_attr_code, product_attr_val,
product_uom_code,
interface_action_code, process_flag, process_status_flag)
VALUES('A_EXM123', 'L_EXM123', 'H_EXM123',
'ITEM', 'INVENTORY_ITEM_ID', 'AS54888',
'DZ',
'UPDATE', 'Y', 'P');

Note the format of start_date_active and end_date_active and process_status_flag =


P and process_flag = Y.

8
OTHER BUSINESS SCENARIOS
Several other common business scenarios are provided below to assist
you in better understanding the setups required.

Scenario 1: Script to Insert ALL_ITEMS


REM /**************************************************************************

REM * The columns INTERFACE_ACTION_CODE, PROCESS_FLAG and


PROCESS_STATUS_FLAG
REM are mandatory and should be populated in all the interface tables with appropriate
values.
REM * Errors in the process are inserted into QP_INTERFACE_ERRORS table.
REM * Please read Oracle Electronic Technical Reference Manual (eTRM) to understand
REM interface tables, columns and interface tables relationship.
REM * Please read Oracle Advanced Pricing Implementation Guide(Metalink Note: 91798.1)
REM for details on QP: Bulk Import of Price List concurrent program and parameters.

REM***************************************************************************/

-- Script to Insert ALL_ITEMS

/* Insert Price list header details into QP_INTERFACE_LIST_HEADERS table */


INSERT INTO QP_INTERFACE_LIST_HEADERS(
ORIG_SYS_HEADER_REF,
LIST_TYPE_CODE,
NAME,
DESCRIPTION,
CURRENCY_CODE,
ACTIVE_FLAG,
CURRENCY_HEADER_ID,
START_DATE_ACTIVE,
END_DATE_ACTIVE,
ROUNDING_FACTOR,
SOURCE_LANG,
LANGUAGE,
INTERFACE_ACTION_CODE,
PROCESS_FLAG,
PROCESS_STATUS_FLAG
) VALUES
(
'SAMPLE_HEADER_SMITHA_SB13', /* Unique identification of the price list in the
external application
from where the price list is imported. */
'PRL', /* List Type Code. PRL for standard price list */
'Sample_BLK_PL_10', /* Price List Name */
'Sample Bulk Loaded Price List',/* Description */
'USD', /* Currency Code. The currency of the price list.*/
'Y', /* Active Flag */
30, /* Currency Header Id. Identifies Multi-Currency List associated with a
Price List.
Alternatively, populate CURRENCY_HEADER
column with Multi-Currency List Name. */
TO_CHAR(sysdate,'YYYY/MM/DD'), /* Start Date Active */
NULL, /* End Date Active */
-1, /* Rounding Factor */
'US', /* Source Language */
'US', /* Language */
'INSERT', /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE. */
'Y', /* Process flag for transaction */
'P' /* Process Status Flag for transaction */
);

/* Insert Price list line(PLL) details into QP_INTERFACE_LIST_LINES table. */


INSERT INTO QP_INTERFACE_LIST_LINES (
ORIG_SYS_LINE_REF,
ORIG_SYS_HEADER_REF,
LIST_LINE_TYPE_CODE,

9
START_DATE_ACTIVE,
END_DATE_ACTIVE,
ARITHMETIC_OPERATOR,
OPERAND,
PRIMARY_UOM_FLAG,
PRODUCT_PRECEDENCE,
INTERFACE_ACTION_CODE,
PROCESS_FLAG,
PROCESS_STATUS_FLAG
) VALUES
(
'SAMPLE_LINE_10', /* The combination of this and ORIG_SYS_HEADER_REF is
the primary key of the
equivalent of the price list line table of the external system from where
the price data is loaded.*/
'SAMPLE_HEADER_10', /* orig_sys_header_ref */
'PLL', /* List Line Type Code. PLL for price list line. */
sysdate, /* Start date active */
NULL, /* End date active */
'UNIT_PRICE', /* Arithmetic operator */
150, /* operand */
'Y', /* Primary UOM Flag */
230, /* Product Precedence */
'INSERT', /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE. */
'Y', /* Process flag for transaction */
'P' /* Process Status Flag for transaction */
);

/* Insert Product attribute details into QP_INTERFACE_PRICING_ATTRIBS table. */


INSERT INTO QP_INTERFACE_PRICING_ATTRIBS (
ORIG_SYS_PRICING_ATTR_REF,
ORIG_SYS_LINE_REF,
ORIG_SYS_HEADER_REF,
PRODUCT_ATTRIBUTE_CONTEXT,
PRODUCT_ATTR_CODE,
PRODUCT_ATTR_VAL_DISP,
--product_attr_value,
PRODUCT_UOM_CODE,
INTERFACE_ACTION_CODE,
PROCESS_FLAG,
PROCESS_STATUS_FLAG
) VALUES
(
'SAMPLE_PATTR_10', /* The combination of ORIG_SYS_HEADER_REF,
ORIG_SYS_LINE_REF, ORIG_SYS_PRICING_ATTR_REF
is the primary key of the equivalent of the pricing attribute table of the
external
system from where the price data is loaded.*/
'SAMPLE_LINE_10', /* orig_sys_line_ref */
'SAMPLE_HEADER_10', /* orig_sys_header_ref */
'ITEM', /* Product Attribute Context */
'ALL_ITEMS', /* Product Attribute Code */
'ALL', /* Product Name. Alternatively populate PRODUCT_ATTR_CODE with
inventory item id of the item.*/
--1, /*for category id MISC.MISC*/
'Ea', /* Product UOM */
'INSERT', /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE */
'Y', /* Process flag for transaction */
'P' /* Process Status Flag for transaction */
);

COMMIT;
EXIT;

10
Scenario 2: Script to Insert Item Number

REM /**************************************************************************

REM * The columns INTERFACE_ACTION_CODE, PROCESS_FLAG and


PROCESS_STATUS_FLAG
REM are mandatory and should be populated in all the interface tables with appropriate
values.
REM * Errors in the process are inserted into QP_INTERFACE_ERRORS table.
REM * Please read Oracle Electronic Technical Reference Manual (eTRM) to understand
REM interface tables, columns and interface tables relationship.
REM * Please read Oracle Advanced Pricing Implementation Guide(Metalink Note: 91798.1)
REM for details on QP: Bulk Import of Price List concurrent program and parameters.

REM***************************************************************************/

-- script to insert Item number

/* Insert Price list header details into QP_INTERFACE_LIST_HEADERS table */


INSERT INTO QP_INTERFACE_LIST_HEADERS(
ORIG_SYS_HEADER_REF,
LIST_TYPE_CODE,
NAME,
DESCRIPTION,
CURRENCY_CODE,
ACTIVE_FLAG,
CURRENCY_HEADER_ID,
START_DATE_ACTIVE,
END_DATE_ACTIVE,
ROUNDING_FACTOR,
SOURCE_LANG,
LANGUAGE,
INTERFACE_ACTION_CODE,
PROCESS_FLAG,
PROCESS_STATUS_FLAG
) VALUES
(
'SAMPLE_HEADER_10', /* Unique identification of the price list in the external
application
from where the price list is imported. */
'PRL', /* List Type Code. PRL for standard price list */
'Sample_BLK_PL_10', /* Price List Name */
'Sample Bulk Loaded Price List',/* Description */
'USD', /* Currency Code. The currency of the price list.*/
'Y', /* Active Flag */
30, /* Currency Header Id. Identifies Multi-Currency List associated with a
Price List.
Alternatively, populate CURRENCY_HEADER
column with Multi-Currency List Name. */
TO_CHAR(sysdate,'YYYY/MM/DD'), /* Start Date Active */
NULL, /* End Date Active */
-1, /* Rounding Factor */
'US', /* Source Language */
'US', /* Language */
'INSERT', /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE. */
'Y', /* Process flag for transaction */
'P' /* Process Status Flag for transaction */
);

/* Insert Price list line(PLL) details into QP_INTERFACE_LIST_LINES table. */


INSERT INTO QP_INTERFACE_LIST_LINES (
ORIG_SYS_LINE_REF,
ORIG_SYS_HEADER_REF,
LIST_LINE_TYPE_CODE,
START_DATE_ACTIVE,
END_DATE_ACTIVE,
ARITHMETIC_OPERATOR,
OPERAND,
PRIMARY_UOM_FLAG,
PRODUCT_PRECEDENCE,
INTERFACE_ACTION_CODE,
PROCESS_FLAG,
PROCESS_STATUS_FLAG
) VALUES

11
(
'SAMPLE_LINE_10', /* The combination of this and ORIG_SYS_HEADER_REF is
the primary key of the
equivalent of the price list line table of the external system from where
the price data is loaded.*/
'SAMPLE_HEADER_10', /* orig_sys_header_ref */
'PLL', /* List Line Type Code. PLL for price list line. */
sysdate, /* Start date active */
NULL, /* End date active */
'UNIT_PRICE', /* Arithmetic operator */
150, /* operand */
'Y', /* Primary UOM Flag */
230, /* Product Precedence */
'INSERT', /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE. */
'Y', /* Process flag for transaction */
'P' /* Process Status Flag for transaction */
);

/* Insert Product attribute details into QP_INTERFACE_PRICING_ATTRIBS table. */


INSERT INTO QP_INTERFACE_PRICING_ATTRIBS (
ORIG_SYS_PRICING_ATTR_REF,
ORIG_SYS_LINE_REF,
ORIG_SYS_HEADER_REF,
PRODUCT_ATTRIBUTE_CONTEXT,
PRODUCT_ATTR_CODE,
PRODUCT_ATTR_VAL_DISP,
PRODUCT_UOM_CODE,
INTERFACE_ACTION_CODE,
PROCESS_FLAG,
PROCESS_STATUS_FLAG
) VALUES
(
'SAMPLE_PATTR_10', /* The combination of ORIG_SYS_HEADER_REF,
ORIG_SYS_LINE_REF, ORIG_SYS_PRICING_ATTR_REF
is the primary key of the equivalent of the pricing attribute table of the
external
system from where the price data is loaded.*/
'SAMPLE_LINE_10', /* orig_sys_line_ref */
'SAMPLE_HEADER_10', /* orig_sys_header_ref */
'ITEM', /* Product Attribute Context */
'INVENTORY_ITEM_ID', /* Product Attribute Code */
'AS54888', /* Product Name. Alternatively populate PRODUCT_ATTR_CODE with
inventory item id of the item.*/
'Ea', /* Product UOM */
'INSERT', /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE */
'Y', /* Process flag for transaction */
'P' /* Process Status Flag for transaction */
);

COMMIT;
EXIT;

12
Scenario 3: Script to Insert Item Category

REM /**************************************************************************

REM * The columns INTERFACE_ACTION_CODE, PROCESS_FLAG and


PROCESS_STATUS_FLAG
REM are mandatory and should be populated in all the interface tables with appropriate
values.
REM * Errors in the process are inserted into QP_INTERFACE_ERRORS table.
REM * Please read Oracle Electronic Technical Reference Manual (eTRM) to understand
REM interface tables, columns and interface tables relationship.
REM * Please read Oracle Advanced Pricing Implementation Guide(Metalink Note: 91798.1)
REM for details on QP: Bulk Import of Price List concurrent program and parameters.

REM***************************************************************************/

-- script to insert item category

/* Insert Price list header details into QP_INTERFACE_LIST_HEADERS table */


INSERT INTO QP_INTERFACE_LIST_HEADERS(
ORIG_SYS_HEADER_REF,
LIST_TYPE_CODE,
NAME,
DESCRIPTION,
CURRENCY_CODE,
ACTIVE_FLAG,
CURRENCY_HEADER_ID,
START_DATE_ACTIVE,
END_DATE_ACTIVE,
ROUNDING_FACTOR,
SOURCE_LANG,
LANGUAGE,
INTERFACE_ACTION_CODE,
PROCESS_FLAG,
PROCESS_STATUS_FLAG
) VALUES
(
'SAMPLE_HEADER_12', /* Unique identification of the price list in the external
application
from where the price list is imported. */
'PRL', /* List Type Code. PRL for standard price list */
'Sample_BLK_PL_12', /* Price List Name */
'Sample Bulk Loaded Price List',/* Description */
'USD', /* Currency Code. The currency of the price list.*/
'Y', /* Active Flag */
30, /* Currency Header Id. Identifies Multi-Currency List associated with a
Price List.
Alternatively, populate CURRENCY_HEADER
column with Multi-Currency List Name. */
TO_CHAR(sysdate,'YYYY/MM/DD'), /* Start Date Active */
NULL, /* End Date Active */
-1, /* Rounding Factor */
'US', /* Source Language */
'US', /* Language */
'INSERT', /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE. */
'Y', /* Process flag for transaction */
'P' /* Process Status Flag for transaction */
);

/* Insert Price list line(PLL) details into QP_INTERFACE_LIST_LINES table. */


INSERT INTO QP_INTERFACE_LIST_LINES (
ORIG_SYS_LINE_REF,
ORIG_SYS_HEADER_REF,
LIST_LINE_TYPE_CODE,
START_DATE_ACTIVE,
END_DATE_ACTIVE,
ARITHMETIC_OPERATOR,
OPERAND,
PRIMARY_UOM_FLAG,
PRODUCT_PRECEDENCE,
INTERFACE_ACTION_CODE,
PROCESS_FLAG,
PROCESS_STATUS_FLAG
) VALUES
(

13
'SAMPLE_LINE_12', /* The combination of this and ORIG_SYS_HEADER_REF is
the primary key of the
equivalent of the price list line table of the external system from where
the price data is loaded.*/
'SAMPLE_HEADER_12', /* orig_sys_header_ref */
'PLL', /* List Line Type Code. PLL for price list line. */
sysdate, /* Start date active */
NULL, /* End date active */
'UNIT_PRICE', /* Arithmetic operator */
150, /* operand */
'Y', /* Primary UOM Flag */
230, /* Product Precedence */
'INSERT', /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE. */
'Y', /* Process flag for transaction */
'P' /* Process Status Flag for transaction */
);

/* Insert Product attribute details into QP_INTERFACE_PRICING_ATTRIBS table. */


INSERT INTO QP_INTERFACE_PRICING_ATTRIBS (
ORIG_SYS_PRICING_ATTR_REF,
ORIG_SYS_LINE_REF,
ORIG_SYS_HEADER_REF,
PRODUCT_ATTRIBUTE_CONTEXT,
PRODUCT_ATTR_CODE,
--PRODUCT_ATTR_VAL_DISP,
product_attr_value,
PRODUCT_UOM_CODE,
INTERFACE_ACTION_CODE,
PROCESS_FLAG,
PROCESS_STATUS_FLAG
) VALUES
(
'SAMPLE_PATTR_12', /* The combination of ORIG_SYS_HEADER_REF,
ORIG_SYS_LINE_REF, ORIG_SYS_PRICING_ATTR_REF
is the primary key of the equivalent of the pricing attribute table of the
external
system from where the price data is loaded.*/
'SAMPLE_LINE_12', /* orig_sys_line_ref */
'SAMPLE_HEADER_12', /* orig_sys_header_ref */
'ITEM', /* Product Attribute Context */
'ITEM_CATEGORY', /* Product Attribute Code */
--'MISC.MISC', /* Product Name. Alternatively populate PRODUCT_ATTR_CODE
with inventory item id of the item.*/
1, /*for category id MISC.MISC*/
'Ea', /* Product UOM */
'INSERT', /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE */
'Y', /* Process flag for transaction */
'P' /* Process Status Flag for transaction */
);

COMMIT;
EXIT;

Scenario 4: Script to Update Header/Line or


Attribute Details

REM /**************************************************************************
REM Please Note:
REM * The columns INTERFACE_ACTION_CODE, PROCESS_FLAG and
PROCESS_STATUS_FLAG
REM are mandatory and should be populated in all the interface tables with appropriate
values.
REM * Errors in the process are inserted into QP_INTERFACE_ERRORS table.
REM * Please read Oracle Electronic Technical Reference Manual (eTRM) to understand
REM interface tables, columns and interface tables relationship.
REM * Please read Oracle Advanced Pricing Implementation Guide(Metalink Note: 91798.1)
REM for details on QP: Bulk Import of Price List concurrent program and parameters.
REM***************************************************************************/

--Script to update Header/Line or Attribute details


/* Insert Price list header details into QP_INTERFACE_LIST_HEADERS table */

14
INSERT INTO QP_INTERFACE_LIST_HEADERS(
LIST_HEADER_ID
,LIST_TYPE_CODE
,INTERFACE_ACTION_CODE
,PROCESS_STATUS_FLAG
,process_flag
,ORIG_SYS_HEADER_REF
) VALUES
(
234415
,'PRL' /* List Type Code. PRL for standard price list */
,'UPDATE' /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE. */
,'P' /* Process Status Flag for transaction */
,'Y'
,'SAMPLE_HEADER_10'
);

/* Insert Price list line(PLL) details into QP_INTERFACE_LIST_LINES table. */


INSERT INTO QP_INTERFACE_LIST_LINES (
LIST_LINE_ID
,LIST_HEADER_ID
,LIST_LINE_TYPE_CODE
,INTERFACE_ACTION_CODE
,PROCESS_STATUS_FLAG
,OPERAND
,process_flag
,ORIG_SYS_LINE_REF
,ORIG_SYS_HEADER_REF
) VALUES
(
288720
,234415
,'PLL'
,'UPDATE' /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE. */
,'P' /* Process Status Flag for transaction */
,800
,'Y'
,'SAMPLE_LINE_10'
,'SAMPLE_HEADER_10'
);

/* Insert Product attribute details into QP_INTERFACE_PRICING_ATTRIBS table. */

INSERT INTO QP_INTERFACE_PRICING_ATTRIBS (


PRICING_ATTRIBUTE_ID
,LIST_LINE_ID
,INTERFACE_ACTION_CODE
,PROCESS_FLAG
,PROCESS_STATUS_FLAG
,product_uom_code
,ORIG_SYS_PRICING_ATTR_REF
,ORIG_SYS_LINE_REF
,ORIG_SYS_HEADER_REF
) VALUES
(
289676
,288720
,'UPDATE' /* Interface Action Code. The possible values are
INSERT/UPDATE/DELETE */
,'Y' /* Process flag for transaction */
,'P' /* Process Status Flag for transaction */
,'DZ'
,'SAMPLE_PATTR_10'
,'SAMPLE_LINE_10'
,'SAMPLE_HEADER_10'
);
COMMIT;
EXIT;

15
TROUBLESHOOTING
There are a few things to watch out for when you try to implement
the Pricing Data Bulk Loader API.

      ! " #

$% / 2 23 / / 3 2/ /
&'()( *)( +,)-. + .)01- ( 4 5)*,6( '* ,*7 ( 8+( 0 .0.86* (
/ ( 3869 60*2() -7/():*,( /* 36(+ ;.*/, <$$=<+>6<?@ABCDEFG+>6%G H
' '
:(I ,8+/0J()+ *1( .)01-2(2 -7,0))(,/ 1*68(+ /0 / (+( +,)-./+ 28( /0
' '
I '-,' / '( +,)-./ (K(,8/ -07 :*-6+ G &'( ,8+/0J()+ 8+8*664 J*9(
J-+/*9(+ -7 .)01-2-7L / '( ,0))(,/ 1*68(+ :0) /'( .)-,-7L *// )-38/(+ / '*/
*)( ,07+/*7/ 1*68(+ *72 ,*+( +(7+-/ -1( G ;M(:() /0 38L NOPQRPR)
S T U U "V U  W XYZ[ XYZ \]Z^ U VVU
W  U _ TT U!  #
@M5`ab H MdA a D b5e DE g hd Dihj
&c && & c & &f &
@M5`ab H M b5`D g hdekDe 5Ml d Di d`hj
&c && c f & c& c
@M5`ab H M kHB `dm@ g hbi$R$Rnho
&c && c c f

S T U U "V U  W XYZ[ XYZ pYqr^s U


VVU W  U _ TT U!  #
@M5`ab H MdA a D b5e DE g hd Dihj
&c && & c & &f &
@M5`ab H M b5`D g td Di bH Du5Mlv j
&c && c f & c &
@M5`ab H M b5`D g $ j <F,*/(L0)4 -2 :0) i dmbGi dmb F<
&c && c f

wxy      z {


 | } ~  w€ {{  w€ƒ |  } „

‚
… „   †
@M5`ab H MdA a D b5e DE g hd Dihj
&c && & c & &f &
@M5`ab H M b5`D g tHBB d Dimv j
&c && c f c&
@M5`ab H M kHB `dm@ g tHBBv j
&c && c c f

O% ‡'(7 )877-7L / '( A869 B0*2() 8+-7L /'( a@`H& D 0./ -07 :0)
8.2*/-7L *74 0: / '( (7/-/-(+ 6-9( ˆ(*2()o B-7(o @)-,-7L *//)-38/( *72
>8*6-: -()+o /'( -7/():*,( /*36( +'0862 3( .0.86*/(2 I-/ ' *66 / '(
7(,(++*)4 :-(62+ G d: *74 0: / '( : -(62+ *)( 70/ .0.86*/(2 -7 / '(
-7/():*,( /*36(;+% o /'( .)0L)*J *++8J(+ /'*/ /'( : -(62 7((2+ /0 3(
8.2*/(2 *+ eaBBG d: *74 0: / '( : -(62+ J(7/ -07(2 3(60I -+ 70/
.0.86*/(2 / '(7 / '( 8.2*/( 0.()*/ -07 8+-7L 3869 60*2() I-66 )(+86/ -7
*7 ())0)G ;M(:() /0 38L N=‰OQQN%

16
Z ! UŠ ‹!  Œ" XŽY p^Ž  #
 
e*J(
‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘
Bdm ˆDH `DM d`
&c c
Bdm l@D b5`D
&c& c
de& DM’HbDcHb& d5ecb5`D
@M5bDmm m H am ’BHu
c & & c
@M5bDmm ’BHu
c
5Mducmlmc ˆDH `DMc MD’

Z ! UŠ ‹!  Œ" XŽY X\Ž  #


 
Bdm BdeD d`
&c c
Bdm ˆDH `DM d`
&c c
Bdm BdeD l@D b5`D
&c c& c
de& DM’HbDcHb& d5ecb5`D
@M5bDmm m H am ’BHu
c & & c
@M5bDmm ’BHu
c
5Mducmlmc B deDc MD’
5Mducmlmc ˆDH `DMc MD’

Z ! UŠ ‹!  Œ" "^X X\q pYY^X]YŽ  #


 
@Mdb deu H MdAa D d`
c && & c
Bdm BdeD d`
&c c
de& DM’HbDcHb& d5ecb5`D
@M5bDmm ’BHu
c
@M5bDmm m H am ’BHu
c & & c
5Mducmlmc @Mdb deucH&& Mc MD’
5Mducmlmc B deDc MD’
5Mducmlmc ˆDH `DMc MD’

17
Pricing Data Bulk Loader API
May 2009
Author: Kelli Stone
Co-Author: Rajendra Badadare, Smitha Balaraman, Shaneed Muhammed
Copyright © Oracle Corporation 2009
All Rights Reserved Printed in the U.S.A.

This document is provided for informational purposes


only and the information herein is subject to change
without notice. Please report any errors herein to
Oracle Corporation. Oracle Corporation does not
provide any warranties covering and specifically
disclaims any liability in connection with this document.

Oracle is a registered trademark and Enabling the


Information Age are trademarks
of Oracle Corporation.

Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.

Worldwide Inquiries:
415.506.7000
Fax 415.506.7200

Copyright © Oracle Corporation 1995


All Rights Reserved

18

You might also like