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.

Important implementation Notes: How Entities Are Utilized


Table Name QP_INTERFACE_LIST_HEADERS QP_INTERFACE_LIST_LINES QP_INTERFACE_QUALIFIERS QP_INTERFACE_PRICING_ATTRIBS QP_INTERFACE_ERRORS QP_LIST_HEADERS_B QP_LIST_HEADERS_TL QP_LIST_LINES QP_QUALIFIERS QP_PRICING_ATTRIBUTES QP_RLTD_MODIFIERS Select X X X X Insert X X X X X X X Update X X X X X X X X X X Delete X X X X X X X 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.

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

Delete existing records from QP Interface tables.

Yes

Should data be deleted from QP 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

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.

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.

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

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)

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.

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,

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 primary key of the

/* The combination of this and ORIG_SYS_HEADER_REF is

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 primary key of the

/* The combination of this and ORIG_SYS_HEADER_REF is

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.

   ! "#$%& '$( )'%0 123& 4 ( 25 P PQ Q PG G G G G 89@A@ BA@ CDAEF C FAHIE @ R SABDT@ 9B DBU @ VC@ H FHFVTB @ G @ QVTW THBP@A EUG@AXBD@ GB QT@C YFBGD `66a`CbT`cdefghipqCbT7q r 9 9 X@s DVCGHt@AC BI@ FAHIEP@P EUDHAA@DG IBTV@C GH G @C@ CDAEFGC PV@ GH 9 9 s 9ED9 G 9@ CDAEFG @u@DVG EHU XBETC q 89@ DVCGHt@AC VCVBTTR tBW@ tECGBW@C EU FAHIEPEUv G 9@ DHAA@DG IBTV@C XHA G9@ FAEDEUv BGG AEQVG@C G 9BG BA@ DHUCGBUG IBTV@C BUP DBC@ C@UCEG EI@ q Yw@X@A GH QVv xy) 2%&  && 2 4 $& 1$! #2$(   ) #&  & 2%'&!  & '%2&3 2 & 5 dwS r wde h Se hi g hd hihj 8 88 8 8 8f 8 dwS r w Sh g hdekhe Swl d hi dhj 8 88 f 8 8 dwS r w krf dmd g hi66nho 8 88 f 67 2%&  && 2 4 $& 1$! #2$(   pqrs #&  & 2%'&!  & '%2&3 2 & 5 dwS r wde h Se hi g hd hihj 8 88 8 8 8f 8 dwS r w Sh g td hi r huSwlv j 8 88 f 8 8 dwS r w Sh g 6 j `pDBG@vHAR EP XHA i dmqi dm p` 8 88 f wxy  z { | }~  w {{  w | }  dwS r wde h Se hi g hd hihj 8 88 8 8 8f 8 dwS r w Sh g trff d himv j 8 88 f 8 dwS r w krf dmd g trffv j 8 88 f y7 9@U AVUUEUv G 9@ eVTW fHBP@A VCEUv G9@ dr8 h HFG EHU XHA VFPBGEUv BUR HX G 9@ @UGEGE@C TEW@ @BP@Ao fEU@o dAEDEUv BGGAEQVG@ BUP bVBTEX E@ACo G9@ EUG@AXBD@ GBQT@ C9HVTP Q@ FHFVTBG@P sEG 9 BTT G 9@ U@D@CCBAR XE@TPC q dX BUR HX G 9@ X E@TPC BA@ UHG FHFVTBG@P EU G 9@ EUG@AXBD@ GBQT@YC7 o G9@ FAHvABt BCCVt@C G9BG G9@ X E@TP U@@PC GH Q@ VFPBG@P BC effq dX BUR HX G 9@ X E@TPC t@UG EHU@P Q@THs EC UHG FHFVTBG@P G 9@U G 9@ VFPBG@ HF@ABG EHU VCEUv QVTW THBP@A sETT A@CVTG EU BU @AAHAq Yw@X@A GH QVv xayx7

16

232 $&%3! $ 4 1 p 2 & 5 eBt@ fdm hr hw d 8 fdm ldh Sh 88 de8 hwrhr8 dSeSh dwShmm m r m fru 8 8 dwShmm fru Swdumlm hr hw wh 232 $&%3! $ 4 1 1 2 & 5 fdm fdeh d 8 fdm hr hw d 8 fdm fdeh ldh Sh 8 8 de8 hwrhr8 dSeSh dwShmm m r m fru 8 8 dwShmm fru Swdumlm f deh wh Swdumlm hr hw wh 232 $&%3! $ 4 4 q p) 2 & 5 dwd deu r wde h d 88 8 fdm fdeh d 8 de8 hwrhr8 dSeSh dwShmm fru dwShmm m r m fru 8 8 Swdumlm dwd deur88 w wh Swdumlm f deh wh Swdumlm hr hw wh

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