1 Reply Latest reply: Feb 20, 2013 1:48 AM by Hilton RSS

    Trouble in calling API using DB Trigger

    991470
      Hello Everyone,
      I am trying to execute a procedure using DB trigger.
      In procedure I am using API 'qp_price_list_pub.process_price_list' to insert item into price list.
      when I excute this procedure on TOAD it gets excuted and inserts req rows to the price list as per my need,
      but when I tried to call it from (By adding item on price list form on r12) DB trigger it wont able to get excuted.
      In xx_new_item_in_dp it insert the 'INVENTORY_ITEM_ID' which I insert on appliction i.e. on 'Price List Form'(Navigation:Order Management:pricing:price lists:price list setups )



      -- Trigger
      CREATE OR REPLACE TRIGGER apps.xx_add_new_item_pl
      AFTER INSERT
      ON QP.QP_PRICING_ATTRIBUTES
      FOR EACH ROW
      WHEN (
      NEW.list_header_id = 6015
      )
      DECLARE

      BEGIN
      apps.xx_add_new_item_price_list(:NEW.PRODUCT_ATTR_VALUE); --This is procedure which have an API 'qp_price_list_pub.process_price_list'

      INSERT INTO apps.xx_new_item_in_dp
      (INVENTORY_ITEM_ID,flag)
      VALUES
      (:NEW.PRODUCT_ATTR_VALUE,'T');
      exception when others then null;
      END;


      please give some suggestions.
      Thanks & Regards