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: 

item charecteristics

Former Member
0 Kudos

hi i am doing heirarchical alv,

the output is being displayed,

buit when i select a column and truy to do sum on that numerical column it says:

" sum can not be calculated on this item charecteristics "

did any one face this situation earlier.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If you are doing for currency(amounts) you can use ls_fieldcat-datatype = 'CURR'. For example quantity you can use ls_fieldcat-datatype = 'QUAN'.

See below example code:



 IF f = 'DMBE2' OR f = 'WRBTR' OR f  = 'DMBTR'.
    ls_fieldcat-datatype = 'CURR'.
  ENDIF.

Thanks,

Sriram Ponna.

3 REPLIES 3

Former Member
0 Kudos

What is the data type of the column you are trying to do totals.

The field should be of type number.

Regards

Sudhir Atluru

Former Member
0 Kudos

Hi,

If you are doing for currency(amounts) you can use ls_fieldcat-datatype = 'CURR'. For example quantity you can use ls_fieldcat-datatype = 'QUAN'.

See below example code:



 IF f = 'DMBE2' OR f = 'WRBTR' OR f  = 'DMBTR'.
    ls_fieldcat-datatype = 'CURR'.
  ENDIF.

Thanks,

Sriram Ponna.

raymond_giuseppi
Active Contributor
0 Kudos

By default only CURR and QUAN are suitable for SUM (when field catalog generated by REUSE ALV FIELDCATALOG MERGE or via structure name)

You can update the field catalog to allow sum of other numerical fields.

ls_fieldcat-do_sum = 'X'. 

You can also allow use of sum for all NUMC fields using layout

gs_layout-numc_sum = 'X'. 

Regards