Ansicht
Dokumentation

Unfulfillable sort conditions for SAP-SELECT <br />Tip-No.: 768 ( INFO768 )

Unfulfillable sort conditions for SAP-SELECT
Tip-No.: 768 ( INFO768 )

Vendor Master (General Section)   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

Short text

Unfulfillable sort conditions for SAP-SELECT
Tip-No.: 768

Symptom

A SAP-SELECT statement in the form
SELECT * FROM WHERE ... ORDER BY ...
causes an abend with ABAP/4 run-time error at run-time
SAPSQL_SELECT_ILLEGAL_ORDER, as the sort condition cannot be fulfilled.
is a pool or cluster table here.

Cause

Pool and cluster tables can only be sorted in accordance with their
primary keys. Other sort sequences are not supported by the data base
interface at this time.

Solution

Um eine Sortierung gem{~ Prim{rschl}ssel zu erreichen, sollte beim SAP-
SELECT mºglichst mit "ORDER BY PRIMARY KEY" gearbeitet werden.

Falls aus irgendwelchen Gr}nden die Prim{rschl}sselfelder in der ORDER-
BY-Klausel explizit angegeben werden sollen, ist zu beachten, da~ eine
ORDER-BY-Klausel
ORDER BY f1 ... fk
beim Zugriff auf eine Pool- oder Clustertabelle genau dann erf}llbar
ist, wenn f1 ... fk ein Anfangsst}ck des Prim{rschl}ssels der Tabelle
ist.

(Falls die Tabelle mandantenabh{ngig ist, ist das Mandantenfeld das
erste Prim{rschl}sselfeld und kann - anders als in der WHERE-Bedingung -
in der ORDER-BY-Klausel wahlweise auch bei nicht mandanten}bergreifen-
dem SQL auch explizit genannt werden).






Fill RESBD Structure from EBP Component Structure   General Material Data  
This documentation is copyright by SAP AG.

Length: 1459 Date: 20240424 Time: 150228     sap01-206 ( 20 ms )