‎2007 Dec 12 1:12 PM
Hi,
i've got to make a report with subtotal for each partner.
my table looks like this
Partner | Vertrag | Verb | Ford | Saldo
A1 12345 -250 0 0
A1 23456 0 500 250
A2 46798 -125 0 0
A2 45123 -75 0 0
A2 45678 0 150 -50
and so on.
so the subtotal shoul stand in the Saldo-field.
i tried it so
CLEAR wa_sort.
wa_sort-fieldname = 'SALDO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO itab_sort.but i only get a subtotal for the field ford, but i need it for both fields, verb and ford and the result should stand in saldo.
hope someone has a good idea.
regards,
tobias
‎2007 Dec 12 1:24 PM
Hi Tobias,
try replacing
wa_sort-fieldname = 'SALDO'.with
wa_sort-fieldname = 'PARTNER'.The totals on Verb, Ford and Saldo you activate by setting DO_SUM = 'X' for these fields in IT_FIELDCAT.
‎2007 Dec 12 1:24 PM
Hi Tobias,
try replacing
wa_sort-fieldname = 'SALDO'.with
wa_sort-fieldname = 'PARTNER'.The totals on Verb, Ford and Saldo you activate by setting DO_SUM = 'X' for these fields in IT_FIELDCAT.
‎2007 Dec 12 1:32 PM
Hi,
Chnage the code as below :
CLEAR wa_sort.
wa_sort-fieldname = 'PARTNER'. "Change the code
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO itab_sort.Thanks,
Sriram Ponna.
‎2007 Dec 12 2:26 PM
so the report should look like this.
i only get the totalsum.
GS Name BuKr Ges Forderung Verbindlichkeit Saldo Agt.
001 Pfefferminzia 1010 MVG 3.000,00
1041 MSV -1.500,00 1.500,00
001 Musterimus 1010 MVG -1.000,00
1012 MKV -2.000,00
1030 VSC 500,00 -2.500,00
GS-Summe 3.500,00 -4.500,00 -1.000,00
002 Beispieleria 1010 MVG 10.000,00 10.000,00
GS-Summe 10.000,00 0,00 10.000,00
Gesamtsumme 13.500,00 -4.500,00 9.000,00
Summen je Gesellschaft MVG 13.000,00 -1.000,00 12.000,00
MSV 0,00 -1.500,00 -1.500,00
MKV 0,00 -2.000,00 -2.000,00
VCS 500,00 0,00 500,00
i hope someone has a good idea.
regards,
tobias