on 2024 Aug 08 3:34 AM
Hi Experts,
Name's Dio, I have a need to add a new line after the group data, that new line is the subtotal of the 'WRBTR' field. I've been looking for a way for 3 days and haven't found a way. Please help me to solved this, I appreciate any help.
Regards,
Dio
Hi,
My requirement was need do subtotal and grand total in itab, I'll do this in display before and I'm using this code:
wa_fieldcat-fieldname = 'WRBTR'. " Fieldname in the data table
wa_fieldcat-seltext_m = 'Amount Invoice'. " Column description in the output
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
wa_sort-spos = 1.
wa_sort-fieldname = 'ZNME1'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO it_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_data
EXCEPTIONS
program_error = 1
Regards,
Dio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
11 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.