SAP Knowledge Base Article - Preview

1894602 - How to solve error "[ASE error SQL158]Too many ORDER BY expressions. The maximum is 31." - SAP ASE for BS


You are running SAP Business Suite on SAP Sybase ASE 15.7 and a business transaction or a report stops with the following error message:

Category                 Installation Errors

Runtime Errors         DBIF_RSQL_SQL_ERROR
Except.                CX_SY_OPEN_SQL_DB
Date and Time         24.06.2013 10:28:30 

Short text            SQL error 158 when accessing table "FAGLFLEXT".

What happened?       Error Text of the Database: "[ASE Error SQL158]Too many ORDER BY expressions.  The maximum is 31."

The Short text may reference a different table name.



The following versions of SAP Sybase ASE are affected:

  • SAP Sybase Adaptive Server Enterprise (ASE) 15.7 up to and including ESD#4.2 for Business Suite
  • SAP Sybase Adaptive Server Enterprise (ASE) 15.7 SP100, SP101, SP102, and SP103 for Business Suite


SAP Adaptive Server Enterprise 15.7


ASE error SQL 158; CR730154; Adaptive Server Enterprise; Fehlermeldung; DB-Fehler; , KBA , BC-DB-SYB , Business Suite on Adaptive Server Enterprise , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.