Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ORDER BY field not listed after SELECT key word

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

horst_keller
Product and Topic Expert
Product and Topic Expert

See point 7.

3 REPLIES 3

horst_keller
Product and Topic Expert
Product and Topic Expert

See point 7.

0 Kudos

thank you for confirming that, it is great feature.

Former Member
0 Kudos

Change line to:


ORDER BY: bismt, laeda, matnr.

This worked on our 7.4 system.