2014 Nov 15 6:51 AM
Dear Experts,
Can anyone let me know how to sort table containing single row as display.
The scenario is i have to show lastest text (comment) in the top following by its previous.
Here in text i have "date" "time" "userid" -"comment".
PS: i'm append one line having '________' after every row and my table has only 1-Row
PFB the details
Thanks
SK
Dear Experts,
Can anyone let me know how to sort table containing single row as display.
The scenario is i have to show lastest text (comment) in the top following by its previous.
Here in text i have "date" "time" "userid" -"comment".
PS: i'm append one line having '________' after every row and my table has only 1-Row
PFB the details
Thanks
SK
2014 Nov 15 7:14 AM
HI
Is your database table also having one record only..?
regards
laxman
2014 Nov 15 7:16 AM
Sorting this kind of data is the wrong approach. Get your data in order using the original data then construct your table.
SORT original_data BY date descending time descending.
LOOP AT original_data INTO record.
row = record-date && record-time && record-username && record-comment.
insert row into table rows.
insert row_of_underlines into table rows.
ENDLOOP.
Not exactly complicated ABAP is it?
2014 Nov 15 7:17 AM
Do you mean your table has only 1 column right?
but multiple rows still.
You can build another table having date, time, row id as columns, extract data from your table and fill this, and then sort based on date & time and then fetch row id and rearrange your original internal table.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |