ABAP HANA 7.51: REDUCE Operator
Reduce operator creates a result of specified data type after going through iterations. It can have many forms in which it can indulge in in-loop calculations/assignments.
Common code applicable for all variants:

Sample Source Code: Variant 1

Output: Variant 1


Sample Source Code: Variant 2

Output: Variant 2

Sample Source Code: Variant 3

Output: Variant 3

![]()
Sample Source Code: Variant 4

Output: Variant 4

![]()
Check the video for Illustration and Example:
Find the code on GitHub: