0% found this document useful (0 votes)
415 views7 pages

QP List Line Detail

This document contains an SQL script that provides details about pricing list lines, including the line attributes, related lines, header information, and troubleshooting tips. It prompts for a list line ID and returns data from various Oracle pricing tables, displaying the details in an formatted report.

Uploaded by

shivar23
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
415 views7 pages

QP List Line Detail

This document contains an SQL script that provides details about pricing list lines, including the line attributes, related lines, header information, and troubleshooting tips. It prompts for a list line ID and returns data from various Oracle pricing tables, displaying the details in an formatted report.

Uploaded by

shivar23
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

rem * Filename : qp_list_line_detail.sql - Version 1.

1
rem * Filetype : NOEXEC
rem * Author : Ravi Tata, Oracle USA
rem * Original : 16-OCT-2000
rem * Modified : 17-Jul-2001 shulin add trouble shooting tips
rem * Description : Gives info about the list line , qualifiers , pricing
attrs etc.
rem * Usage : run qp_list_line_detail_tips.sql
rem * and enter the list_line_id when prompted. list_line_id
can be found
rem * by position the cursor on list line in the pricelist/m
odifierlist form,
rem * menu Help>Diagnostics>Examine>Field List_Line_Id value
rem /* $Header: qp_list_line_detail.sql 115.16 2004/04/12 21:25:25 gtippire ship
$ */
REM FILETYPE NOEXEC
REM dbdrv: none
set verify off
whenever sqlerror exit failure rollback;
set pages 24
set linesize 132
spool &&list_line_id;
prompt 'List Line Information'
prompt =========================================================================
==================================================
col list_line_id format 99999999 heading 'Line Id'
col list_header_id format 99999999 heading 'Hdr Id' new_value p_list_header_id
col list_line_type_code format a5 heading 'Line Type'
col start_date_active format date heading 'Start Date'
col end_date_active format date heading 'End Date'
col modifier_level_code format a5 heading 'Level'
col pricing_phase_id format 999 heading 'Phase' new_value p_pricing_phase_id
col incompatibility_grp_code format a20 heading 'Incomp'
col price_break_type_code format a8 heading 'Brk Type'
col operand format 9999999.99 heading 'Operand'
col arithmetic_operator format a10 heading 'Operator'
col qualification_ind format 99 heading 'QualInd'
col product_precedence format 9999 heading 'Prod Preced'
col automatic_flag format a10 heading 'Auto'
col price_by_formula_id format 999999 heading 'Formula Id'
select
a.list_line_id
, a.list_header_id
, a.list_line_type_code
, a.start_date_active
, a.end_date_active
, a.modifier_level_code
, a.pricing_phase_id
, a.incompatibility_grp_code
, a.price_break_type_code
, a.operand
, a.arithmetic_operator
, a.qualification_ind
, a.product_precedence
, a.automatic_flag
, a.price_by_formula_id
from qp_list_lines a
where a.list_line_id = &&list_line_id ;
prompt 'Related List Line Information'
prompt =========================================================================
==================================================
col list_line_id format 999999 heading 'Line Id'
col list_header_id format 999999 heading 'Hdr Id'
col list_line_type_code format a5 heading 'Line Type'
col start_date_active format date heading 'Start Date'
col end_date_active format date heading 'End Date'
col modifier_level_code format a5 heading 'Level'
col pricing_phase_id format 999 heading 'Phase'
col incompatibility_grp_code format a20 heading 'Incomp'
col price_break_type_code format a9 heading 'Brk Type'
col operand format 9999999.99 heading 'Operand'
col arithmetic_operator format a10 heading 'Operator'
col qualification_ind format 99 heading 'QualInd'
col product_precedence format 9999 heading 'Prod Preced'
col automatic_flag format a10 heading 'Auto'
col price_by_formula_id format 999999 heading 'Formula Id'
select a.list_line_id
, a.list_header_id
, a.list_line_type_code
, a.start_date_active
, a.end_date_active
, a.modifier_level_code
, a.pricing_phase_id
, a.incompatibility_grp_code
, a.price_break_type_code
, a.operand
, a.arithmetic_operator
, a.qualification_ind
, a.product_precedence
, a.automatic_flag
, a.price_by_formula_id
from qp_list_lines a, qp_rltd_modifiers b
where b.from_rltd_modifier_id = &&list_line_id and a.list_line_id = b.to_rltd_mo
difier_id;
prompt *** trouble shooting tips for List Line Info ****************************
*************
prompt * Line Type - verify it is the line type you are expecting. PLL- pricelis
t, PBH - price break header, SUR, DIS... - modifier list.
prompt * Start Date, End Date - verify Pricing Date from sales order is between
Start Date and End Date, blank means no restrictions.
prompt * Level - modifier level code could be Line (line level adjustment), Line
Group(group of lines), Order(order level adjustment).
prompt * Phase - verify phase is attached to the correct event, event can be PRI
CE, LINE, ORDER, BATCH..., each event may have several phases.
prompt * Incomp - modifiers should be in the same incompatibility level (set fro
m modifier form, mod line, Incompatibility Group) for the engine to solve the in
compatibility by precedence.
prompt * Brk Type - can be point, range, recurring.
prompt * Operand - the unit price based on UOM, if null then formula may be used
.
prompt * Prod Preced - product precedence, verify the line with lowest precedenc
e value gets selected. To price either by Precedence or by Best Price, check inc
ompat_resolve_code in qp_pricing_phases table.
prompt * Auto - automatic or manual.
prompt * Formula Id - id of the formula used to calculate price.
prompt *************************************************************************
*************

prompt 'List Header Information'


prompt =========================================================================
=================================================
col source_system_code format a8 heading 'Src Code' new_value p_source_system_co
de
col name format a30 heading 'List Name'
col active_flag format a6 heading 'Active'
col currency_code format a8 heading 'Currency'
col list_type_code format a9 heading 'List Type'
col ask_for_flag format a7 heading 'Ask For'
col gsa_indicator format a6 heading 'GSAInd'
col parent_list_header_id format 999999 heading 'Parent Hdr Id'
col active_date_first_type format a30 heading 'Act Date 1st Type'
col start_date_active_first format a14 heading 'S_Date_Act_1st'
col end_date_active_first format a14 heading 'E_Date_Act_1st'
col active_date_second_type format a30 heading 'Active Date 2nd Type'
col start_date_active_second format a14 heading 'S_Date_Act_2nd'
col end_date_active_second format a14 heading 'E_Date_Act_2nd'
col limit_exists_flag format a8 heading 'Lmt Exst'
select a.list_header_id list_header_id
, b.name name
, a.list_type_code list_type_code
, a.active_flag active_flag
, a.start_date_active start_date_active
, a.end_date_active end_date_active
, a.source_system_code source_system_code
, a.currency_code currency_code
, a.ask_for_flag ask_for_flag
, b.language language
, a.gsa_indicator gsa_indicator
, a.parent_list_header_id parent_list_header_id
, a.active_date_first_type active_date_first_type
, a.start_date_active_first start_date_active_first
, a.end_date_active_first end_date_active_first
, a.active_date_second_type active_date_second_type
, a.start_date_active_second start_date_active_second
, a.end_date_active_second end_date_active_second
, a.limit_exists_flag limit_exists_flag
from qp_list_headers_b a , qp_list_headers_tl b
where a.list_header_id = b.list_header_id
and a.list_header_id = &p_list_header_id;
prompt *** trouble shooting tips for List Header Info **************************
*************
prompt * List Type - verify it is the list type you are expecting, PRL for price
list, SLT, DLT, PRO... for modifier.
prompt * Active - verify it is 'Y'.
prompt * Start Date, End Date - verify pricing date is between Start Date and En
d Date, blank means no restrictions.
prompt * Currency - should match the currency in the sales order.
prompt * Ask For - if 'Y' for promotion, then promotion will not be applied unti
l it is 'asked for' from calling program.
prompt *************************************************************************
*************

prompt 'Pricing Attribute Information'


prompt =========================================================================
================================================
col product_attribute_context format a13 heading 'Prod Context'
col product_attribute format a20 heading 'Prod Attr'
col product_attr_value format a10 heading 'Prod Attr Value'
col product_uom_code format a5 heading 'UOM'
col comparison_operator_code format a10 heading 'Operator'
col pricing_attribute_context format a11 heading 'Pric Context'
col pricing_attribute format a20 heading 'Pric Attr'
col pricing_attr_value_from format a10 heading 'Value From'
col pricing_attr_value_to format a10 heading 'Value To'
col pricing_attr_value_from_number format 9999999999.99 heading 'Value From Numb
er'
col pricing_attr_value_to_number format 9999999999.99 heading 'Value To Number'
col attribute_grouping_no format 9999999 heading 'Group'
col qualification_ind format 99 heading 'Qual Ind'
col excluder_flag format a13 heading 'Excluder Flag'
select list_line_id
, list_header_id
, pricing_phase_id
, product_attribute_context
, product_attribute
, product_attr_value
, product_uom_code
, comparison_operator_code
, pricing_attribute_context
, pricing_attribute
, pricing_attr_value_from
, pricing_attr_value_to
, pricing_attr_value_from_number
, pricing_attr_value_to_number
, attribute_grouping_no
, qualification_ind
, excluder_flag
from qp_pricing_attributes
where list_line_id = &&list_line_id;
prompt 'Related Line Pricing Attribute Information'
prompt =========================================================================
================================================
col product_attribute_context format a13 heading 'Prod Context'
col product_attribute format a20 heading 'Prod Attr'
col product_attr_value format a10 heading 'Prod Attr Value'
col product_uom_code format a5 heading 'UOM'
col comparison_operator_code format a10 heading 'Operator'
col pricing_attribute_context format a11 heading 'Pric Context'
col pricing_attribute format a20 heading 'Pric Attr'
col pricing_attr_value_from format a10 heading 'Value From'
col pricing_attr_value_to format a10 heading 'Value To'
col pricing_attr_value_from_number format 9999999999.99 heading 'Value From Numb
er'
col pricing_attr_value_to_number format 9999999999.99 heading 'Value To Number'
col attribute_grouping_no format 9999999 heading 'Group'
col qualification_ind format 99 heading 'Qual Ind'
col excluder_flag format a13 heading 'Excluder Flag'
select list_line_id
, list_header_id
, pricing_phase_id
, product_attribute_context
, product_attribute
, product_attr_value
, product_uom_code
, comparison_operator_code
, pricing_attribute_context
, pricing_attribute
, pricing_attr_value_from
, pricing_attr_value_to
, pricing_attr_value_from_number
, pricing_attr_value_to_number
, attribute_grouping_no
, qualification_ind
, excluder_flag
from qp_pricing_attributes, qp_rltd_modifiers b
where b.from_rltd_modifier_id = &&list_line_id and list_line_id = b.to_rltd_modi
fier_id;
prompt *** trouble shooting tips for Pricing Attribute Info ********************
*************
prompt * Phase - make sure this phase is attached to the called event in the "Ph
ase Information".
prompt * Prod Context - should always be 'Item'.
prompt * Prod Attr - signifies item hierarchy element, PA1 is item number, PA2 i
s item category.
prompt * Prod Attr Value - internal id of item hierarchy element.
prompt * UOM - verify if this is the same as ordered UOM, if not, verify if prim
ary flag is checked in the pricelist line and conversion is defined in Inventory
.
prompt * Pric Context, Pric Attr - check dbg file and verify these entries are p
assed to the engine, if not run Build Sourcing Rules concurrent program.
prompt * Value From - verify this value is equal to the value passed to the engi
ne (other than Volume context).
prompt * Value To - For Volume context, the value passed to the engine shoule be
between Value From and Value To.
prompt * Excluder Flag - if 'Y' the product is excluded.
prompt *************************************************************************
*************

prompt 'Qualifier Information'


prompt =========================================================================
=================================================
col qualifier_context format a10 heading 'Qual Context'
col qualifier_attribute format a21 heading 'Qual Attr'
col qualifier_attr_value format a10 heading 'Value From'
col qualifier_attr_value_to format a10 heading 'Value To'
col qualifier_grouping_no format 999999 heading 'Group'
col start_date_active format date heading 'Start Date'
col end_date_active format date heading 'End Date'
col qualifier_precedence format 9999 heading 'Qual Preced'
col qual_attr_value_from_number format 9999999999.99 heading 'Value From Number'
col qual_attr_value_to_number format 9999999999.99 heading 'Value To Number'
col qualifier_group_cnt format 999999 heading 'Grp Cnt'
col header_quals_exist_flag format a5 heading 'Exist'
select list_header_id
, list_line_id
, active_flag
, list_type_code
, qualifier_context
, qualifier_attribute
, qualifier_attr_value
, qualifier_attr_value_to
, comparison_operator_code
, qualifier_grouping_no
, start_date_active
, end_date_active
, qualifier_precedence
, search_ind
, qualifier_group_cnt
, header_quals_exist_flag
from qp_qualifiers
where list_header_id = &p_list_header_id;
prompt *** trouble shooting tips for Qualifier Info ****************************
*************
prompt * Line Id - lines with line id matches list line id are the line level qu
alifiers for the line, or -1 means it is a header level qualifier.
prompt * Active - verify it is 'Y'.
prompt * Qual Context, Qual Attr - check dbg file and verify these entries are p
assed to the engine, if not, run Build Sourcing Rules concurrent program.
prompt * Value From - if Operator is '=', verify value passed to the engine is e
qual to this value.
prompt * Value To - verify value passed to the engine is between Value From and
Value To if operator is BETWEEN.
prompt * Operator - values shoule be '=' or 'BETWEEN' or 'NOT='.
prompt * Group - verify conditions of the qualifiers in the same group are match
ed, conditions of all header level qualifers are also matched.
prompt * Qual Preced - qualifier precedence, in the incompatibility resolution t
his precedence and product precedence are used to select the appropriate list li
ne.
prompt *************************************************************************
*************
prompt 'Phases Information'
prompt =========================================================================
=================================================
col pricing_event_code format a20 heading 'Pricing Event'
col search_flag format a11 heading 'Search Flag'
select pricing_phase_id
, pricing_event_code
, nvl(user_search_flag,search_flag) search_flag
from qp_event_phases
where pricing_phase_id = &p_pricing_phase_id;
prompt *** trouble shooting tips ***********************************************
*************
prompt * Phase - verify the expected list line is in the phase associated with t
he event executed by the engine.
prompt * Pricing Event - verify if the expected phase is attached to this event.
prompt * Search Flag - engine will perform the extended search if the search fla
g is 'Y'.
prompt *************************************************************************
*************
prompt 'Rows in qp_list_header_phases'
prompt =========================================================================
=================================================
select list_header_id
, pricing_phase_id
from qp_list_header_phases
where list_header_id = &p_list_header_id;
prompt *** trouble shooting tips for Rows in qp_list_header_phases *************
*************
prompt * only applicable for modifiers, needs record(s) if there are any header
level or line level qualifiers attached to the line.
prompt *************************************************************************
*************
prompt 'Request Type - Source System Information'
prompt =========================================================================
==================================================
col request_type_code format a20 heading 'Request Type Code'
select request_type_code
, source_system_code
from qp_price_req_sources
where request_type_code = 'ONT';
prompt *** trouble shooting tips for Request Type Code and Source System Code **
***************
prompt * Request Type Code - calling application transaction being priced. ONT -
Order Management, ASO - istore/order capture, FTE - Logistics.
prompt * Source System Code - source system code should have a row for QP
prompt *************************************************************************
*************
spool off;
commit;
exit;

You might also like