Skip to Content

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

Cumulative Sum creation Error?

Hi All,

Can I created Cumulative sum of salary based on Department Number but last row calculated only previous row only.

Custom function and Error attached as below.

Thanks,

Chandra

Capture.JPG (25856 B)
replied

Almost correct

This will work when you define $PREV_DEPT and $PREV_SAL as global variables instead of parameters (that are local to the call).

Make sure you initialise them properly before your first function call.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question