2007 Sep 10 1:36 PM
Hi all,
Iam doing the subtotal based on id on alv output
Iam doing subtotal programtically
wa_sort-spos = 1.
wa_sort-fieldname = 'ID'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
wa_sort-comp = 'X'.
append wa_sort to it_sortcat.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
it_fieldcat = fieldcatalog[]
it_sort = it_sortcat[]----
i_save = 'X'
it_events = it_events
say i see like
id amount
1 1
1 2
1 3
1 4
10 --subtotal
2 1
2 4
2 6
11 -
subtotal
21 -
total. i don't need this .Right now iam seeing this
can any one tell how to achieve this
Thanks
2007 Sep 10 2:01 PM
Hi all,
Iam doing the subtotal based on id on alv output
Iam doing subtotal programtically
wa_sort-spos = 1.
wa_sort-fieldname = 'ID'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
wa_sort-comp = 'X'.
append wa_sort to it_sortcat.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
it_fieldcat = fieldcatalog[]
it_sort = it_sortcat[]----
i_save = 'X'
it_events = it_events
say i see like
id amount
1 1
1 2
1 3
1 4
10 --subtotal
2 1
2 4
2 6
11 -
subtotal
21 -
total. i don't need this .Right now iam seeing this
can any one tell how to achieve this
Thanks
2007 Sep 10 1:39 PM
Hi,
Look at the sample program
http://www.sap-basis-abap.com/abap/alv-grid-list-with-sub-totals.htm
Regards
Sudheer
2007 Sep 10 2:01 PM
2007 Sep 10 2:23 PM
hi,
while declaring fieldcatalog we have to give.
d_fieldcat_wa-fieldname = 'SALARY'.
d_fieldcat_wa-seltext_l = 'Salary'.
d_fieldcat_wa-do_sum = 'X'.
d_fieldcat_wa-col_pos = 1.
append d_fieldcat_wa to d_fieldcat.
clear d_fieldcat_wa.
Reward with points if helpful.
2007 Sep 10 2:26 PM
Hi,
In your layout added the code as below :
gs_layout-no_totalline = 'X'.
By using this code you avoid displaying the total line.
Thanks,
Sri.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |