Skip to Content
0
Dec 12, 2018 at 08:11 AM

ORDER BY when using SELECT FROM FIELDS

2387 Views

Hi,

I have been trying to work out how to specify an ORDER BY clause when using the SELECT FROM tablename FIELDS fieldname variant of the SELECT statement, but I'm unable to find anything that syntax checks. There's no specific example of this clause in the help for the SELECT statement, so I'm a bit lost. Has anyone got the magic keyword order? The system is ABAP 7.5.

As an example, I'm trying to do this sort of thing:

SELECT FROM tablename
FIELDS field1, field2
ORDER BY field1
INTO TABLE @data(internal_tablename).

Thanks,

Andrew