7 Replies Latest reply: Apr 12, 2012 8:55 AM by omaha66 RSS

    PLSQL ERROR. REQUIRED HELP...!!

    857480
      Hi,

      I developed the following code which is throwing PLSQL ERROR. (error is below the code). Pls Help me out.

      CODE :

      Declare
      vRow binary_integer;
      v_pro_id number;
      i NUMBER := 1;

      cursor c1 IS (select BUSINESS_UNIT_ID, OBJECT_TYPE_ID, TASK_ID, CHECKLIST_HEADER_ID, CHECKLIST_ID, DEFAULT_SELF_REVIEW_FLAG, DEFAULT_PEER_REVIEW_FLAG, DEFAULT_ORIGIN_OF_DEFECTS, DEFAULT_ADMIN_SEVERITY, DEFAULT_ADMIN_CLASSIFICATION from RCL.RCL_CL_ADMIN_SETUP where BUSINESS_UNIT_ID = :P270_BUID);
      rec c1%ROWTYPE;

      TYPE bu IS TABLE OF RCL.RCL_CL_ADMIN_SETUP%ROWTYPE INDEX BY BINARY_INTEGER;
      bu_rec bu;

      begin

      FOR k IN 1..wwv_flow.g_f01.count LOOP
      vRow := wwv_flow.g_f01(k);

      open c1;
      fetch c1 into rec;
      bu_rec(i) := rec;
      WHILE (c1%FOUND) LOOP
      i := i + 1;
      FETCH c1 INTO rec;
      bu_rec(i) := rec;
      end loop;
      close c1;

      FOR j IN 1..i-1 LOOP

      select id into v_pro_id from projects where id = wwv_flow.g_f32(vRow);

      INSERT INTO RCL.RCL_CL_PROJECT_SETUP
      (BUSINESS_UNIT_ID
      ,PROJECT_ID
      ,OBJECT_TYPE_ID
      ,TASK_ID
      ,CHECKLIST_HEADER_ID
      ,CHECKLIST_ID
      ,DEFAULT_SELF_REVIEW_FLAG
      ,DEFAULT_PEER_REVIEW_FLAG
      ,PROJECT_ORIGIN_OF_DEFECTS
      ,DEFAULT_PROJECT_SEVERITY
      ,DEFAULT_PROJECT_CLASSIFICATION)
      VALUES
      (bu_rec(j).BUSINESS_UNIT_ID
      ,v_pro_id
      ,bu_rec(j).OBJECT_TYPE_ID
      ,bu_rec(j).TASK_ID
      ,bu_rec(j).CHECKLIST_HEADER_ID
      ,bu_rec(j).CHECKLIST_ID
      ,bu_rec(j).DEFAULT_SELF_REVIEW_FLAG
      ,bu_rec(j).DEFAULT_PEER_REVIEW_FLAG
      ,bu_rec(j).DEFAULT_ORIGIN_OF_DEFECTS
      ,bu_rec(j).DEFAULT_ADMIN_SEVERITY
      ,bu_rec(j).DEFAULT_ADMIN_CLASSIFICATION);
      END LOOP;
      END LOOP;
      end;


      Error :

      1 error has occurred
      ORA-06550: line 11, column 25: PLS-00302: component 'RCL_CL_ADMIN_SETUP' must be declared ORA-06550: line 11, column 1: PL/SQL: Item ignored ORA-06550: line 21, column 14: PLS-00382: expression is of wrong type ORA-06550: line 21, column 1: PL/SQL: Statement ignored ORA-06550: line 25, column 14: PLS-00382: expression is of wrong type ORA-06550: line 25, column 1: PL/SQL: Statement ignored ORA-06550: line 46, column 4: PLS-00487: Invalid reference to variable 'RCL.RCL_CL_ADMIN_SETUP%ROWTYPE'.

      Regards,
      VM