Skip to Content
author's profile photo Former Member
Former Member

Sum of a field in ALV List

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Sep 22, 2009 at 05: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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • Posted on Sep 22, 2009 at 05: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2009 at 06:47 AM

    can you please show us how you have defined field catalog for that field?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.