3 Replies Latest reply: Mar 18, 2013 8:52 AM by CraigB RSS

    Help with Data Block Based on Procedure--getting compilation error

    984173
      I am trying to create a datablock based on a procedure , but im getting errors in compilation:
      Errors are :
      1) identifier 'HSM_WSH_DEL_UTIL.DEL_TBL' must be declared
      2)PL/SQL ERROR 320 at line 7, column 27
      the declaration of the type of this expression is incomplete or malformed


      ANy Help would be appreciated !
      Heres my pkg spec and body for the data block:
      ----------------------------------------------------------------
      CREATE OR REPLACE PACKAGE hsm_wsh_del_util IS
      TYPE del_record is record
      (delivery_id number);
      TYPE del_tbl is table of del_record INDEX BY BINARY_INTEGER;

      procedure do_query(p_del IN OUT del_tbl);

      END hsm_wsh_del_util ;
      ------------------------------------------------------------
      CREATE OR REPLACE PACKAGE BODY hsm_wsh_del_util IS

      procedure do_query(p_del IN OUT del_tbl)
      IS
      idx number :=1;

      CURSOR DELIVERY IS
      SELECT DELIVERY_ID
      FROM abc_deliveries;

      begin

      FOR CUR IN DELIVERY LOOP
      p_del(idx).delivery_id :=cur.delivery_id;
      idx:= idx+1;
      END LOOP;
      end do_query;
      END hsm_wsh_del_util;

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

      Edited by: 981170 on Mar 13, 2013 1:08 PM