Skip to Content
Former Member
Apr 28, 2017 at 09:23 AM

ORDER BY field not listed after SELECT key word

705 Views Last edit Apr 28, 2017 at 03:42 PM 2 rev

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