Skip to Content

ORDER BY field not listed after SELECT key word

Apr 28, 2017 at 09:23 AM


avatar image

Hi All,

I have following select statement

DATA lt_mara TYPE STANDARD TABLE OF mara-matnr.

SELECT matnr  
FROM mara  
INTO TABLE lt_mara  
WHERE matkl = 'XYZ'  
ORDER BY bismt laeda matnr.

this statement is working correctly in ABAP 7.5 environment but giving syntax error in 7.01 enviroment - field from ORDER BY clause is missing in the SELECT list . Is there any official information that this functionality was added and we can use it without risk? I like the functionality of not passing not needed fields from DB but still be able to sort by it.

Thanks for your answers

10 |10000 characters needed characters left characters exceeded

Change line to:

ORDER BY: bismt, laeda, matnr.

This worked on our 7.4 system.

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Horst Keller
Apr 28, 2017 at 11:07 AM

See point 7.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

thank you for confirming that, it is great feature.