I'm trying to sum up some values but it keeps giving me weird values. I'm posting the code to help, and an image too of what is happening.
at end of kunnr.
soma-waers = <fs_main-waers.
soma-wrbtr = <fs_main-wrbtr.
soma-fwste = <fs_main-fwste.
soma-hwaer = <fs_main-hwaer.
soma-dmbtr = <fs_main-dmbtr.
soma-hwste = <fs_main-hwste.
APPEND soma TO it_soma.
LOOP AT it_soma INTO soma.
IF sy-tabix = 1.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
SUM.
WRITE: "/ sy-uline(137),
/ sy-vline NO-GAP,
'Subtotal' NO-GAP,
'-' NO-GAP,
soma-waers,
63 sy-vline NO-GAP,
64 soma-wrbtr NO-GAP,
sy-vline NO-GAP,
soma-fwste NO-GAP,
sy-vline NO-GAP,
soma-hwaer NO-GAP,
sy-vline NO-GAP,
soma-dmbtr NO-GAP,
sy-vline NO-GAP,
soma-hwste NO-GAP,
sy-vline NO-GAP,
/ sy-uline(137).
ELSE.
ENDIF.
ENDLOOP.
ENDAT.