2009 May 06 11:04 AM
Hi Experts,
I am creating an ALV output, inwhich I want to have the subtotal for particular field.
In the sorting internal table I did like
l_sort-subtot = 'X'.
Then in field cat I did like
l_fcat-do_sum = 'X'.
But still it is not displaying the result. How can I insert a line in ALV which will show the sub total.
Thanks and regards,
Venkat
2009 May 06 11:07 AM
2009 May 06 11:07 AM
Hi,
The requirement here : subtotal of 'Total Hours Work' should be displayed Weekly wise.
g_fieldcat-tabname = 'I_INA2011'.
g_fieldcat-fieldname = 'HRTOT'. " It should be Integer type field i.e. other thabn char/date/time field
g_fieldcat-coltext = 'Total Hours Work'(006).
g_fieldcat-do_sum = 'X'.
APPEND g_fieldcat TO i_fieldcat.
CLEAR g_fieldcat.
i_vsort_line-spos = 3.
i_vsort_line-fieldname = 'WEEK'. " Sort the table on Week
i_vsort_line-subtot = 'X'.
APPEND i_vsort_line TO i_vsort. CLEAR i_vsort_line.
2009 May 06 11:08 AM
Hi,
Have u passed this sort table'l_sort' to the FM 'REUSE_ALV_GRID_DISPLAY'? It seems thats missing.
Regards,
Mansi.
2009 May 06 11:10 AM
gs_sort-spos = 1.
gs_sort-fieldname = 'EBELN'.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.
2009 May 06 11:13 AM