0 Replies Latest reply: Sep 24, 2013 7:32 PM by Krr1sh RSS

    Issue in making pricing call

    Krr1sh

      Hi,

      In a price list we have multiple prices based on if the item is under a given model or on it's own.

      With this setup in place we are trying to make a pricing request with apps.qp_preq_pub.price_request but always getting the price of an item when it is on it's own.

      I am passing the attributes to API, could anyone help me correct these:

       

        ---- Control Record
      p_control_rec.pricing_event    :='LINE';
      p_control_rec.calculate_flag    := 'Y';
      p_control_rec.simulation_flag    := 'N';
      p_control_rec.rounding_flag    := 'Q';
      p_control_rec.manual_discount_flag    := 'Y';
      p_control_rec.request_type_code    := 'ASO';
      p_control_rec.temp_table_insert_flag    := 'Y';
      -------------------------

         

          ---- Line Records ---------

      line_rec.request_type_code    :='ASO';
      line_rec.line_id    :=  v_quote_line_id; -- Quote_line_id
      line_rec.line_index    :='1';
      line_rec.line_type_code    :='LINE';
      line_rec.pricing_effective_date    := SYSDATE;
      line_rec.active_date_first    := SYSDATE;
      line_rec.active_date_second    := SYSDATE;
      line_rec.active_date_first_type    := 'NO TYPE';
      line_rec.active_date_second_type    :='NO TYPE';
      line_rec.line_uom_code    := v_uom;
      line_rec.currency_code    := v_us_curr_code;
      line_rec.price_flag    := 'Y';
      p_line_tbl(1)    := line_rec;

         

          ---- Line Attribute Record

      line_attr_rec.line_index:= 1;
      line_attr_rec.pricing_context:='ITEM';
      line_attr_rec.pricing_attribute:='PRICING_ATTRIBUTE3';
      line_attr_rec.pricing_attr_value_from:='ALL';
      line_attr_rec.validated_flag:='Y';
      p_line_attr_tbl(1)     := line_attr_rec;

         

      line_attr_rec.line_index    := 1;
      line_attr_rec.pricing_context    :='ITEM';
      line_attr_rec.pricing_attribute    :='PRICING_ATTRIBUTE1';
      line_attr_rec.pricing_attr_value_from    :=v_item_id;
      line_attr_rec.validated_flag    :='Y';
      p_line_attr_tbl(2)    := line_attr_rec;

         

          line_attr_rec.line_index    := 1;

      line_attr_rec.pricing_context    :='PRICING ATTRIBUTE';
      line_attr_rec.pricing_attribute    :='PRICING_ATTRIBUTE3';
      line_attr_rec.pricing_attr_value_from    :=v_item_id;
      line_attr_rec.validated_flag    :='Y';
      p_line_attr_tbl(3)    := line_attr_rec;

         

          line_attr_rec.line_index    := 1;

      line_attr_rec.pricing_context    :='PRICING ATTRIBUTE';
      line_attr_rec.pricing_attribute    :='PRICING_ATTRIBUTE2';
      line_attr_rec.pricing_attr_value_from    := ip_operating_unit;
      line_attr_rec.validated_flag    :='Y';
      p_line_attr_tbl(4)    := line_attr_rec;

         

      line_attr_rec.line_index    := 1;
      line_attr_rec.pricing_context    :='MODEL_ID';
      line_attr_rec.pricing_attribute    :='PRICING_ATTRIBUTE4';
      line_attr_rec.pricing_attr_value_from    := v_config_model_id;
      line_attr_rec.validated_flag    :='Y';
      p_line_attr_tbl(4)    := line_attr_rec;

       

          ---- Qualifier Attribute Record

      qual_rec.line_index    := 1;
      qual_rec.qualifier_context    :='MODLIST';
      qual_rec.qualifier_attribute    :='QUALIFIER_ATTRIBUTE4';
      qual_rec.qualifier_attr_value_from    := v_us_price_id;
      qual_rec.comparison_operator_code    := '=';
      qual_rec.validated_flag    :='Y';
      p_qual_tbl(1)    := qual_rec;

         

          apps.qp_preq_pub.price_request (p_line_tbl, p_qual_tbl, p_line_attr_tbl, p_line_detail_tbl, p_line_detail_qual_tbl, p_line_detail_attr_tbl, p_related_lines_tbl, p_control_rec, x_line_tbl, x_line_qual, x_line_attr_tbl, x_line_detail_tbl, x_line_detail_qual_tbl, x_line_detail_attr_tbl, x_related_lines_tbl, x_return_status, x_return_status_text);

      -----------------------

       

       

      Thanks

      Sai