Skip to Content
0
Dec 02, 2009 at 10:14 PM

SUM in select query

4755 Views

Hi all,

Im need to sum the amount for same company, account, document number and posting key. and my select query is as below;

SELECT bukrs
                   hkont
                   gjahr
                   belnr
*              buzei
                   bschl
                   sum( dmbtr ) as amount
              into CORRESPONDING FIELDS OF TABLE t_recs1
              from BSIS
              where bukrs = bukrs
                and hkont = saknr
                and ( bschl = lc_debit_asset or
                      bschl = lc_credit_asset )
              GROUP BY bukrs hkont gjahr belnr bschl
              order BY bukrs hkont gjahr belnr bschl.

But the amount (DMBTR) is displaying as 0.00 though the amount exist in table BSIS.

Can someone hlep mein this?

Thanks,

Amal