Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

sumarize

hi experts

i am running a loop on a table and i want to use the command sum but my process block is defined by to attributes.

how can i do this

thanks

amit

Tags:
replied
SORT i_data by lifnr grund.

LOOP at i_data INTO wa_data.
if i_data-shkzg = 'H'.
i_data-erfmg = i_data-erfmg * -1.
modify i_data.
ENDIF.
AT END OF grund.
SUM.
WRITE: / wa_data-lifnr, wa_data-grund.
ENDAT.
ENDLOOP.

the table is already sorted by lifnr and grund so you don't need nested "AT"

sum supports types I , F and P, make sure you have this data type there

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question