1 Reply Latest reply: Feb 7, 2014 3:45 AM by Siva-Oracle RSS

    pl/sql report not populating output

    84331732-8090-4cca-aa1c-9d6f10dfc8c7

      SQL> CREATE OR REPLACE PROCEDURE GET_RECORDS(v_action IN VARCHAR2) IS
       
      2  v_thing VARCHAR2(10);
       
      3  get_records SYS_REFCURSOR;
       
      4  BEGIN
       
      5   IF (v_action = 'DO THIS') THEN
       
      6   OPEN get_records FOR
       
      7   SELECT 1 FROM dual;
       
      8   ELSE
       
      9   OPEN get_records FOR
      10   SELECT 2 FROM dual;
      11   END IF;
      12 
      13  LOOP
      14   FETCH get_records INTO v_thing;
      15   EXIT WHEN get_records%NOTFOUND;
      16   /* do things */
      17  dbms_output.put_line(v_thing);
      18   END LOOP;
      19   CLOSE get_records;
      20  END;
      21  /

      Procedure created

      SQL
      > exec get_records ('DO THIS');
      1



      If I call this procedure it is populating data but , if I register it in oracle apps I am not getting data   can any one help

      also I  replaced dbms_output.put_line with fnd_file.put_line , still it is not populating data