2019 Feb 12 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
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
2019 Feb 12 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.
2019 Feb 12 9:15 PM
By native SQL, it's best to use CL_SQL_STATEMENT, rather than EXEC...
2019 Feb 12 10:18 PM
SUBSTRING valid from ABAP >= 7.40 sp 5 cf ABAP documentation - SQL string functions
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |