Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8802

HELP displaying total

$
0
0

Hi Guys,

 

I'm relatively new to ABAP would like to seek a pointer from gurus,

I'm stumbling on how to make a total,

 

my code as follows,

 

DATA: scustom_tab TYPE standard table of scustom,

       scustom_wa  TYPE scustom.

 

SELECT *

        FROM scustom

        INTO TABLE scustom_tab  where CUSTTYPE = 'B' and

     city = 'Frankfurt' and COUNTRY = 'DE'.

 

LOOP AT scustom_tab INTO scustom_wa.

AT NEW Discount.

     SUM.

     WRITE: / 'Sum',

               scustom_wa-discount.

endAT.

 

   AT LAST.

     SUM.

     WRITE: / 'Overall Sum',

               scustom_wa-discount.

 

   ENDAT.

ENDLOOP.

 

it generate the correct discount rate on each record but unable to do a overall sum.

 

any advice / solution would be very much appreciated.


Thank you,

Norman


Viewing all articles
Browse latest Browse all 8802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>