09-22-2009 6:31 AM
Hello Guys,
I'm using 'REUSE_ALV_GRID_DISPLAY' in my prog.
There is a field in output table which is of type P(8) Decimals 3.
When I'm trying to get the sum of this field in ALV Display it gives the message " Desired operation cannot be performed for column 'Converted Quantity' ".
I have also tried do_sum = 'X'.
But it is not working. Please help guys.
Regards,
Abhinav
09-22-2009 6:35 AM
You have to fill these components
quantity(3) type c,
qfieldname type slis_fieldname, " field with quantity unit
qtabname type slis_tabname, " and table
in your fieldcatalog for this field.
09-22-2009 6:35 AM
You have to fill these components
quantity(3) type c,
qfieldname type slis_fieldname, " field with quantity unit
qtabname type slis_tabname, " and table
in your fieldcatalog for this field.
09-22-2009 7:35 AM
Thanks for the suggestion.
I have used the above points mentioned by you.
But I'm still not getting the sum.
09-22-2009 7:41 AM
<li>How you are populating fieldcatalog internal table for the quantity field for which you are expecting sum? Thanks Venkat.O
09-22-2009 7:46 AM
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'QUAN'.
wa_fieldcat-ref_tabname = 'I_OUT2'.
wa_fieldcat-qfieldname = 'ABSMG_ME'.
wa_fieldcat-qtabname = 'I_OUT2'.
wa_fieldcat-outputlen = '15'.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-seltext_l = text-052.
APPEND wa_fieldcat TO i_fieldcat.
Quan is the field name.
There is another fieldname 'ABSMG', I'm getting sum for this particular field. It is from Standard SAP table.
Both QUAN and ABSMG have same data type.
09-22-2009 7:48 AM
why do you pass so many things:
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'QUAN'.
wa_fieldcat-tabname = 'I_OUT2'. "only use tabname
wa_fieldcat-outputlen = '15'.
" wa_fieldcat-do_sum = 'X'. " needed for automatic sum
wa_fieldcat-seltext_l = text-052.
APPEND wa_fieldcat TO i_fieldcat.
Edited by: Soumyaprakash Mishra on Sep 22, 2009 12:19 PM
09-22-2009 7:55 AM
Hi,
Try this way an run.
Thanks
Venkat.O
wa_fieldcat-fieldname = 'QUAN'.
wa_fieldcat-tabname = 'I_OUT2'.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-seltext_l = text-052.
APPEND wa_fieldcat TO i_fieldcat.
09-22-2009 7:59 AM
Thanks a lot guys for your inputs.
The program is working now.
Now I'm using :
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'QUAN'.
* wa_fieldcat-ref_tabname = 'I_OUT2'.
* wa_fieldcat-tabname = 'I_OUT2'.
wa_fieldcat-qfieldname = 'MEAS'.
wa_fieldcat-qtabname = 'I_OUT2'.
wa_fieldcat-outputlen = '15'.
wa_fieldcat-seltext_l = text-052.
APPEND wa_fieldcat TO i_fieldcat.
The program is working fine now.
I have commented tabname and -ref_tabname , and the program is working fine now.
Thanks a lot.
09-22-2009 6:54 AM
As you are using Quantity field for Sum oepration , you also have to pass other required inputs in the fieldcatalog for this field.
09-22-2009 7:47 AM
can you please show us how you have defined field catalog for that field?