Oracle Pricing SQL Query

Price List :
     Price lists are essential for ordering products because each item entered on an order must  have a price. Each price list contains basic list information and one or more pricing lines, price breaks, pricing attributes, qualifiers, and secondary price lists.

Modifiers:
      Using modifiers, you can set up price adjustments, benefits, freight and special charges, and promotional limits to control spending or usage. You can define simple discounts and surcharges as well as more advanced deals and promotions. Modifiers can adjust net price either up or down

Qualifiers:
      Qualifiers are used in sync with Price Lists and Modifiers. Qualifiers can be set   According to the business needs. A qualifier consists of one or more conditions that define eligibility for a discount, promotion, or surcharge

SQL QUERY

SELECT qph.NAME "Modifier Name",
       qpl.list_line_no "Modifier Line No",
       qph.description "Modifier Description",
       qph.comments,
       qpl.list_line_type_code,
       qpq.qualifier_context,
       qph.orig_org_id,
       qph.active_flag,
       qpl.start_date_active,
       qpl.end_date_active,
       qph.list_type_code,
       qpl.modifier_level_code,
       qpl.organization_id,
       oeoh.order_number,
       qpl.pricing_phase_id,
       qpl.list_line_no,
       qpq.header_quals_exist_flag,
       qpq.qualifier_datatype,
       qpq.qualifier_attribute,
       qpq.segment_id,
       qpq.CONTEXT,
       qpq.qualifier_grouping_no
  FROM qp_list_headers_all   qph,
       qp_list_lines         qpl,
       qp_pricing_attributes qpa,
       qp_qualifiers         qpq,
       qp_qualifier_rules    qqr,
       oe_order_lines_all    oeol,
       oe_order_headers_all  oeoh
 WHERE qph.list_header_id = qpl.list_header_id
   AND qpl.list_header_id = qpa.list_header_id
   AND qpl.list_line_id = qpq.list_line_id(+)
   AND qqr.qualifier_rule_id(+) = qpq.created_from_rule_id
   AND oeol.price_list_id(+) = qpl.list_header_id
   AND oeol.header_id = oeoh.header_id(+)
   AND qpl.list_line_id = qpa.list_line_id(+)
   AND qpl.pricing_phase_id > 1
   AND qph.name = :P_Price_list_name

Comments

Popular posts from this blog

Oracle BI Publisher Tags For-each grouping for Matrix report

SQL Scripts for Custom Table Creation in Oracle Application 12.2.x

Oracle Fusion Business Intelligence Roles