top of page

Get IFS Error Messages From sqlerrm

Writer's picture: Rumesh Aponso (RMAX)Rumesh Aponso (RMAX)
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_;

3 views0 comments

Related Posts

See All

Fnd Dynamic Tab Page in IEE Client

[FndWindowRegistration("YVVDA_COMPANY_ADDR", "YvvdaCompanyAddr", FndWindowRegistrationFlags.HomePage)] [FndDynamicTabPage("frmCompanyAddr...

LISTAGG in PLSQL

Example 1: SELECT DISTINCT LISTAGG(t.commission_receiver, ';') WITHIN GROUP (ORDER BY t.commission_receiver) FROM...

Get Foundation Error from ORA Error

FUNCTION Strip_Ora_Error ( sqlerrm_        IN VARCHAR2,    sqlcode_        IN NUMBER DEFAULT NULL,    strip_ora_only_ IN BOOLEAN DEFAULT...

Comments


Copyright © 2025 RMAXOneNote

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