2008 Apr 25 3:14 PM
Hi,
My requirement is like that when user run the report a ALV should be comes sorted w.r.t. to one column..
<REMOVED BY MODERATOR>
Amit.
Edited by: Alvaro Tejada Galindo on Apr 25, 2008 1:03 PM
2008 Apr 25 3:41 PM
hi when you give that sort itab it will not sort itab by any column .
if you specify
sort itab by field it will do in ascending by default .
regards,
venkat.
2008 Apr 25 3:19 PM
2008 Apr 25 3:19 PM
2008 Apr 25 3:20 PM
Fill sort catalogue (IT_SORT table) in the function module for ALV
2008 Apr 25 3:23 PM
Hi Jony,
Just sort the output internal table by the field u want before passing it to the Function module.
SORT itab BY f3.
CALL FUNCTION REUSE_ALV..
Here pass ur itab.
Thanks,
Vinod.
2008 Apr 25 3:34 PM
Hi Jony,
You can sort the internal table based on the field requiread and pass it to the ALV FM or method.
Hope it helps.
2008 Apr 25 3:41 PM
hi when you give that sort itab it will not sort itab by any column .
if you specify
sort itab by field it will do in ascending by default .
regards,
venkat.
2008 Apr 25 3:48 PM
DATA: gt_sort TYPE slis_t_sortinfo_alv,
gs_sort TYPE slis_sortinfo_alv.
CLEAR gs_sort.
gs_sort-fieldname = 'LDDAT'.
gs_sort-spos = 1.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = 'PROCESS_USER_COMMANDS'
is_layout = w_layout
it_fieldcat = i_fieldcat[]
it_sort = gt_sort[]
i_default = 'X'
i_save = 'A'
it_events = v_events
is_print = w_print
TABLES
t_outtab = i_final1