02-12-2019 3:47 PM
Hi,
I want to create a Select Distinct Statement, which looks only the last 2 digits of the affected column. Generally there is a DISTINCT RIGHT Option in SQL, but this doesn't work in ABAP.
I hope you can help me.
Here is an example:
Column1
0023
1126
2123
6723
6626
The result should be:
23
26
02-12-2019 7:34 PM
You can't with ABAP releases before 7.40.
For >= 7.40 sp 5 cf ABAP documentation - SQL string functions
Or use native SQL.
02-12-2019 9:15 PM
By native SQL, it's best to use CL_SQL_STATEMENT, rather than EXEC...
02-12-2019 10:18 PM
SUBSTRING valid from ABAP >= 7.40 sp 5 cf ABAP documentation - SQL string functions