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: 

Runtime Error in ALV Totaling.

Former Member
0 Kudos
352

Dear Friends

i am getting run time error in ALV while pressing sum button.

my alv code as follows

FIELDCATALOG-FIELDNAME = 'DMBTR'.

FIELDCATALOG-SELTEXT_M = 'Amount'.

FIELDCATALOG-COL_POS = 1.

  • FIELDCATALOG-ref_fieldname = 'WAERS'.

  • FIELDCATALOG-DO_SUM = 'X'. "Display column total

  • FIELDCATALOG-ref_tabname = 'BKPF'.

  • FIELDCATALOG-DATATYPE = 'CURR'.

APPEND FIELDCATALOG TO FIELDCATALOG.

CLEAR FIELDCATALOG.

I have tried all possibilities but did not get the solution...

if anything left let me know

thank you

Avirat Patel

4 REPLIES 4

Former Member
0 Kudos
98

Hi,

We have to use Collectstatement to calculate SUM

Regards

kk

Former Member
0 Kudos
98

Hi,

Issue is with your filed catalog... Check all your fileds in the filed catalog. It is not problem of totaling. There may some thing with other field also..(name,data type). comment and uncomment fileds and check.. You will be able to find the problem..

Regards,

Ravi.

0 Kudos
98

Dear Ravi

Thank you .. i am able to trace out my problem

the problem with this code

          • FIELDCATALOG-FIELDNAME = 'AUGBL'.

          • FIELDCATALOG-SELTEXT_M = 'Clearing Doc.No'.

          • FIELDCATALOG-COL_POS = 1.

            • FIELDCATALOG-DO_SUM = 'X'. "Display column total

            • FIELDCATALOG-DATATYPE = 'CURR'.

*****

          • APPEND FIELDCATALOG TO FIELDCATALOG.

          • CLEAR FIELDCATALOG.

i am getting an error with this code

how can i able to display this field in alv column.?

- Avirat Patel

*SORRY FRIENDS I HAVE NOT DECLARED MENTIONED VARIABLE IN INTERNAL TABLE ITSELF SO THAT

I AM GETTING ERROR.*

problem has been resolved..

thank you.

Edited by: Corrtech on Dec 19, 2011 1:05 PM

Former Member
0 Kudos
98

In the population of the filed catalog will be a prblem check out all the fields before u pass the values to alv output.

Define the DMBTR with the referance of the amount field of data element. This will be work out.