top of page

Get IFS Error Messages From sqlerrm

  • Writer: Rumesh Aponso (RMAX)
    Rumesh Aponso (RMAX)
  • Nov 21, 2024
  • 1 min read
EXCEPTION
   WHEN OTHERS THEN
      error_ := rec_.contract || ';' || rec_.part_status || ';' || rec_.part_no;

      IF (Error_SYS.Is_Foundation_Error(SQLCODE)) THEN
         -- Return the Foundation1 error message
         error_ := error_ || ' => ' || LTRIM(SUBSTR(SQLERRM, INSTR(SQLERRM, ':', 1, 2) + 1)) || rpad(' ', 20) || SUBSTR(SQLERRM, 1, INSTR(SQLERRM, ':', 1, 2) - 1);
      ELSE
         -- Return complete error structure
         error_ := error_ || ' => ' || sqlerrm;
      END IF;

      Dbms_Output.Put_Line(RPAD('ERROR', 6, ' ') || ' - ' || error_);
      Transaction_SYS.Set_Status_Info(SUBSTR(error_, 1, 2000), 'WARNING');

      ROLLBACK TO start_process_;

Comments


Copyright © 2025 RMAXOneNote

  • Online CV
  • LinkedIn
  • Youtube
  • GitHub
  • Blogger
bottom of page