2009 Dec 16 8:52 AM
I am using REUSE_ALV_GRID_DISPLAY to produce an ALV report. I want to display the sum row for some of the columns but am unable to do so for some. Some work others dont.
They are all of type MBEW-SALK3 CURR 13. When I click on the Total button for some of the columns, the message pops up 'Desired operation cannot be performed for column'. Any idea why this must be happening. do_sum is set to 'X' and no_sum set to space.
2009 Dec 16 1:58 PM
Hi
Create a varaible with decimal data type simliar to your currency fields which is getting displyed in the output of the ALV report and pass do_sum = 'X'.
Regards
Srilaxmi
2009 Dec 16 2:23 PM
Hi Sajid,
I guess in your field catalog definition for the field you might have made some mistake,
change
ls_fieldcat-datatype = 'CURR'
to
ls_fieldcat-inttype = 'CURR'
Also use the below attributes in the fieldcatalog
ls_fieldcat-ref_field = <--- give the ref field name
ls_fieldcat-ref_table = <------- giv eth e ref table name.
Regards
Abhii
2009 Dec 17 4:55 AM
hi sajid,
In fieldcatalog of ALV you have to pass
*wa_fieldcat is define as workarea of fieldcatlog
WA_FIELDCAT-REF_FIELD = ' '.
WA_FIELDCA-REF_TABLE = ' '.
OR
you can also use in fieldcatalog of alv to display sum
WA_FIELDCAT-INTTYPE = 'C'.
Regards
Gaurav
2009 Dec 17 4:55 AM
hi sajid,
In fieldcatalog of ALV you have to pass
*wa_fieldcat is define as workarea of fieldcatlog
WA_FIELDCAT-REF_FIELD = ' '.
WA_FIELDCA-REF_TABLE = ' '.
OR
you can also use in fieldcatalog of alv to display sum
WA_FIELDCAT-INTTYPE = 'C'.
Regards
Gaurav
2009 Dec 17 5:40 AM
u can pass do_sum = 'X'
example:
CLEAR w_alv.
w_alv-fieldname = 'MNGLG'.
w_alv-tabname = 'ITAB''.
w_alv-seltext_m = 'Manuf. Qty'.
w_alv-seltext_l = 'Manuf. Qty'.
w_alv-outputlen = 10.
w_alv-do_sum = 'X'.
APPEND w_alv TO t_alv.
CLEAR w_alv.