Something went wrong and I realise that I do not get what I want. I have the following lines in a table:
0000527746 1000 10.06.2017 20170718100757.5010080
0000527746 1000 10.06.2017 20170718100757.5039300
0000527746 1000 11.06.2017 20170718100839.9209480
0000527746 1000 11.06.2017 20170718100906.3337170
0000527746 1000 24.07.2017 20170718095843.3555610
0000527746 1000 24.07.2017 20170718100209.2203570
0000527746 1000 24.07.2017 20170718100757.4970390
and I want to select the last date of each month namely I want the select to bring me the following lines
0000527746 1000 11.06.2017 20170718100906.3337170
0000527746 1000 24.07.2017 20170718100757.4970390
I use the following sql
select bukrs kunnr dat max( time ) as time
from zcollectoraction into corresponding fields of table it_collectoraction
where bukrs = p_bukrs and
kunnr in so_kunnr and
dat in so_date
group by bukrs kunnr dat.
but it displays the following lines
0000527746 1000 11.06.2017 20170718100906.3337170
0000527746 1000 11.06.2017 20170718100906.3337170
0000527746 1000 24.07.2017 20170718100757.4970390
What to do in order to have 1 line per month?