Hi Experts,
Am getting sorting as per my requirement [i.e.
1.Material # (ascending)...2.Last Price Change Date (most recent first)..3. Plant (ascending)] in my_ITAB, with the following code,
<i><b>sort i_out ascending
by matnr ascending
laepr descending
werks ascending .</b></i>
But, wanna to get it the same in ALV, so I hv written the code as follows, but NOT working??? particularly, the Last change date of the price, is not sorting(its displaying defaultly/just ascending)
So, how to get it done? Is it some wht related with WA_SORT-GROUP field populating?
<i><b>* wa_sort-spos = 1.
wa_sort-fieldname = 'MATNR'.
wa_sort-tabname = 'I_OUT'.
wa_sort-up = 'X'.
APPEND wa_sort TO alv_sort.
*
wa_sort-spos = 2.
wa_sort-fieldname = 'LAEPR'.
wa_sort-tabname = 'I_OUT'.
wa_sort-up = 'X'.
wa_sort-down = 'X'.
APPEND wa_sort TO alv_sort.
wa_sort-spos = 3.
wa_sort-fieldname = 'WERKS'.
wa_sort-tabname = 'I_OUT'.
wa_sort-up = 'X'.
APPEND wa_sort TO alv_sort.</b></i>
thanq.