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.
Showing results for 
Search instead for 
Did you mean: 

Wrong sum in ALV-List

Former Member
0 Kudos

Hi experts!

I'm using the SAP-standard-function K_LINE_ITEMS_SELECT_AND_LIST to display actual cost line items for cost centers in an ALV-list. This funtion is called by a double-click on a cell in another ALV-list.

Works wonderful - until this function doesn't select any items. When you call the function after that again and cost line items have been found, the sum in the ALV-list is doubled. If you call the function without finding cost line items four times the is sum fourfold.

Think, there must be a buffer/stack, that I have to reset. Has somebody an idea?

Thanks for you help!

Best regards,



Former Member
0 Kudos

hi ,

i think you have to clear the workarea before it is again displaying...means after the double click code put clear itab ,

it will exactly works..



0 Kudos

Hi Venkat,

sorry, but I only give the select-options to the standard-funtion. no items, no sums. the standard-function collects the data and does the summation. it shows one item with 100 Euro and a sum of 200 Euro. or 300, 400, .... if you collect a line without items within the starting-alv for several times.

Best regards


0 Kudos

Hi Jens,

is this FM is released by SAP for customer use. If yes then there must be some OSS note for this problem. Just search in OSS.



0 Kudos

Hi Atish,

thanks for your answer. But seraching in the OSS was my first activity, when the problem occured.

I haven't found a matching note

Think I will implement a select-statement before calling the funtion. If I don't find any co-items, I won't call the function.