0 Replies Latest reply: Oct 1, 2013 11:42 AM by R RSS

    Need info about QP_PREC_PUB.Price_request

    R

      Hello Gurus,

       

      I am looking to know more about the API QP_PREC_PUB.Price_request funtionality.

      I am trying to execute the API by passing Item ID, Price List Id as follows.

       

      {code}

          p_control_rec.pricing_event := 'BATCH';   -- 'BATCH'; LINE

          p_control_rec.calculate_flag := 'Y';   --QP_PREQ_GRP.G_SEARCH_N_CALCULATE;

          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 := 'ONT';

          p_control_rec.temp_table_insert_flag := 'Y';

          p_control_rec.source_order_amount_flag := 'Y';

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

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

          line_rec.request_type_code := 'ONT';

          line_rec.line_id           := 23346;   -- Order Line Id. This can be any thing for this script

          line_rec.line_index        := '1';   -- Request Line Index

          line_rec.line_type_code    := 'LINE';   -- LINE or ORDER(Summary Line)

          line_rec.pricing_effective_date := SYSDATE;   -- Pricing as of what date ?

          line_rec.active_date_first := SYSDATE;   -- Can be Ordered Date or Ship Date

          line_rec.active_date_second := SYSDATE;   -- Can be Ordered Date or Ship Date

          line_rec.active_date_first_type := 'NO TYPE';   -- ORD/SHIP

          line_rec.active_date_second_type := 'NO TYPE';   -- ORD/SHIP

          line_rec.line_quantity     := 4;   -- Ordered Quantity

          line_rec.line_uom_code     := 'CS';   -- Ordered UOM Code

          line_rec.currency_code     := 'EUR';   -- Currency Code

          line_rec.price_flag        := 'Y';   -- Price Flag can have 'Y' , 'N'(No pricing) , 'P'(Phase)

          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 := 'N';

          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 := '28926';   -- INVENTORY ITEM ID

          line_attr_rec.validated_flag := 'N';

          p_line_attr_tbl (2)        := line_attr_rec;

          ---- Qualifier Attribute Record

          qual_rec.line_index        := 1;   -- Attributes for the above line. Attributes are attached with the line index

          qual_rec.qualifier_context := 'MODLIST';

          qual_rec.qualifier_attribute := 'QUALIFIER_ATTRIBUTE4';

          qual_rec.qualifier_attr_value_from := '1715456';   -- PRICE LIST ID;

          qual_rec.comparison_operator_code := '=';

          qual_rec.validated_flag    := 'Y';

          p_qual_tbl (1)             := qual_rec;

          qual_rec.line_index        := 1;

          qual_rec.qualifier_context := 'CUSTOMER';

          qual_rec.qualifier_attribute := 'QUALIFIER_ATTRIBUTE2';

          qual_rec.qualifier_attr_value_from := 888888;   -- CUSTOMER ID;

          qual_rec.comparison_operator_code := '=';

          qual_rec.validated_flag    := 'Y';

          p_qual_tbl (2)             := qual_rec;

      {code}

       

      My question is for the Line Attribute records and Qualifier Attriute records are this must we need to provide the values. Is this standard for every one.

      Or is that it depends on the set up how it is defined. After executing this, the messages say

      Value of Return API Stauts : S

      Value of Unit Price : 22.87

      Value oif Adjusted Unit Price: 22.87

      Value of pricing status code: Updated

      Value of Context : 2

      Value of Attribute : PRIMARY ATTRIBUTE1

      Value of pricing attr_value_frm : '28926'

      Vallue of Status Code: NULL

       

      Please let me know before running this API do i need to run/execute any other packages.

      Thanks