2 weeks ago
Hello,
I know this would be basic question, but I need this to figure-out issue. I have an internal table lt_result with four fields (field1, field2, field3, field4). I have fetched data from an Infotype into this internal table. Now, I have N no.of records in lt_result. Among these, I have two records with same value in field2 where field4 is varied.
EG: Before SORT
field1 | field2 | field3 | field4 |
12345 | 01.01.2013 | 01.01.2013 | 01.04.2012 |
12345 | 04.11.2020 | 04.11.2020 | 04.11.2020 |
12345 | 20.12.2022 | 20.12.2022 | 01.04.2012 |
12345 | 20.12.2022 | 20.12.2022 | 04.11.2020 |
I would like to sort with field1 ascending and field2 descending.
SORT lt_result BY <field1> ASCENDING <field2> DESCENDING.
In that case, what will happen if for the records in violet.
i) which record will come first either 01.04.2012 or 04.11.2020?
ii) usually how does sorting works for date comparison?
Thanks!!
Request clarification before answering.
User | Count |
---|---|
78 | |
11 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.