Application Development 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: 

summation of netvalues with currency in alv

Former Member
0 Kudos

Hi,

how to display subtotals of netvalues currency wise at bottom of alv grid display ?

Thanks & Regards ,

PRadeep

1 ACCEPTED SOLUTION

former_member632729
Contributor
0 Kudos

Hi ,

at sort section use this..it sort lifnr wise and do sum..

FORM sort_alv .

wa_sort-spos = 1.

wa_sort-fieldname = 'LIFNR'.

wa_sort-up = 'X'.

wa_sort-subtot = 'X'.

APPEND wa_sort TO it_sort.

ENDFORM. "sort_alv

Hope Helpfull

Raghunath.S

10 REPLIES 10

former_member632729
Contributor
0 Kudos

Hi ,

at sort section use this..it sort lifnr wise and do sum..

FORM sort_alv .

wa_sort-spos = 1.

wa_sort-fieldname = 'LIFNR'.

wa_sort-up = 'X'.

wa_sort-subtot = 'X'.

APPEND wa_sort TO it_sort.

ENDFORM. "sort_alv

Hope Helpfull

Raghunath.S

0 Kudos

thanks for ur reply.but, i want to display totals currency wise only at the bottom of list

0 Kudos

hi,

use this.


  fieldcatalog-fieldname   = 'WRBTR'.
  fieldcatalog-REF_TABNAME   = 'BSEG'.
   fieldcatalog-seltext_l   = 'TRANSACTION CURRRENCY'.
  fieldcatalog-col_pos     = 17.
   fieldcatalog-cfieldname   = 'WAERS'.     < -----     you should give this
  fieldcatalog-do_sum   = 'X'.
  fieldcatalog-emphasize   = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

0 Kudos

for example plz refer BCALV_TEMPLATE

0 Kudos

For above replies , the totals will be displayed only at the middle of list i;e; before currency changes .but i want to display them at the bottom of list

0 Kudos

For example if u want to display at end of particulat item,

then use at end of ebeln (ex).

....

endat.

0 Kudos

Hi Jansi Dorai ,

i am displaying in alv grid and i want at bottom of list.

Regards,

Pradeep

0 Kudos

Hi Gautam,

my problem solved by following ur code .

Thanks a lot and i am closing this thread.

With Regards,

Pradeep

0 Kudos

Thanks a lot to u all and i am closing this thread.

Former Member
0 Kudos

select the field sub_tot from fieldcatalog table.