Skip to Content
0
Former Member
Feb 19, 2009 at 02:47 PM

Finding the totals

29 Views

Hi,

In my scenario if i give a range of document number(belnr) i have to fetch the details of the PO and have to find the totals of the PO from the history tab.

I have written the code as

gi_value and gi_amt are like table ekbe.

gv_total = 0.

LOOP AT gi_value WHERE vgabe = 1.

gv_total = gv_total + gi_price-dmbtr.

APPEND gi_value TO gi_amt.

ENDLOOP.

this code is working fine if i give only one belnr value.It identifying the total correctly.If i give 10 belnr values its finding the total of 10 belnr.In my scenario have to find the totals of each belnr based on PO number to do further coding.How to do so.Please help.