09-08-2008 7:52 AM
Hi friends,
i am creating alv grid report(with out oops). i am calculating value for one field that value is common for all the records . so i want to display that as common value instead of displaying number of lines .
is there any possibility to merge records of one column. using it_sort i tried . but it is not coming. since it is a currency field and i need to do display in the subtotal field.
please let me know if u have the solution.
regards,
kani.
Edited by: Julius Bussche on Sep 8, 2008 7:31 AM
09-08-2008 7:55 AM
Hi,
If you are calculating the Sub-Total then try doing the same with the help of Fieldcatalogue.....
There are fields available for Total and Sub-total. When checked they automatically display the row with the totals...
Regards,
Kunjal...
09-08-2008 7:57 AM
kani,
refwer sample code.
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
09-08-2008 8:32 AM