Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HOW to do subtotal

Former Member
0 Likes
637

hi gurus,

i have to show the summation of credit and debit balance in the alv output....cud u plz suggest me the parameter...the scenario is like this...

employee no debitamnt credit amnt

10001 42 00

10001 190 00

10001 89 00

10001 00 -56

10001 00 -67

-


-


total total

how to show the total in alv o/p......plz help me thnx in advance

hi gurus,

i have to show the summation of credit and debit balance in the alv output....cud u plz suggest me the parameter...the scenario is like this...

employee no debitamnt credit amnt

10001 42 00

10001 190 00

10001 89 00

10001 00 -56

10001 00 -67

-


-


total total

how to show the total in alv o/p......plz help me thnx in advance

4 REPLIES 4
Read only

Former Member
0 Likes
613
for totals 

in the fieldcatalog  

wa_fcat-do_sum = 'X'.

for subtotals , u have to build the sort table

it_sort-fieldname = 'CREIT'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.

append it_sort.
clear it_sort.
Read only

Former Member
0 Likes
613

Hi

go thru this url:

http://www.sap-basis-abap.com/sapalv.htm

Regards

Shiva

Read only

Former Member
0 Likes
613

HI Ravi,

See the Below Sample code for Totals in ALV ....

http://sap.niraj.tripod.com/id64.html

Regards

Sudheer

Read only

Former Member
0 Likes
613

in fieldcat of devit and credit

wfieldcat-do_sum = 'X'.

data : isort type slis_t_sortinfo_alv,

wsort type slis_sortinfo_alv.

wsortinfo-fieldname = 'KUNNR'.

wsortinfo-up = 'X'.

wsortinfo-subtot = 'X'.

wsortinfo-group = '*'.

append wsortinfo to isortinfo.

in alv grid or list display pass the isort.

regards

shiba dutta