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

alv sum

Former Member
0 Likes
745

hi, i am using alv grid , i wont tu have sum total numbers without clicking on sum buton after program executed.

thanks.

6 REPLIES 6
Read only

anversha_s
Active Contributor
0 Likes
719

hi,

u can do it in the field catlog.

eg:

  fieldcatalog-fieldname   = 'NETPR'.
  fieldcatalog-seltext_m   = 'Net Price'.
  fieldcatalog-col_pos     = 7.
  fieldcatalog-outputlen   = 15.  
  fieldcatalog-do_sum      = 'X'        "Display column total
  fieldcatalog-datatype     = 'CURR'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

rgds

Anver

Read only

Former Member
0 Likes
719

Hi Nick,

do this in the Fieldcatspecification:

MOVE 'X' TO WA_FIELDCAT-DO_SUM.

for the field you want to sum.

regards, Dieter

Read only

Former Member
0 Likes
719

For the columns for which you want to have the totals, you should set the field catalog parameter do_sum = 'X'. IT would automatically give the total in the last line.

REgards,

ravi

Read only

Former Member
0 Likes
719

in your field catalog add

wfieldcat-fieldname = <your field for which you want sum>

wfieldcat-do_sum = 'X'.

regrards

shiba dutta

Read only

Former Member
0 Likes
719

use this while designing the field catalog

fieldcatalog-do_sum = 'X'

Read only

Former Member
0 Likes
719

Hi Nick,

Please use the following code:

AT NEW field.

SUM.

ENDAT.