ABAP HANA 7.51 : Repeating Values
ABAP 7.51 provides new keyword REPEAT which can be used to repeating output. This can be effectively used in some of the scenario and reduce LOOPs and lines of code.
Sample Source Code – Variant 1:
Output – Variant 1:
Sample Source Code – Variant 2:
Output – Variant 2:
Sample Source Code – Variant 3 : Case of Error handling
Repeat take 2 arguments. Second argument “occ” has to be always positive value. In case when this can’t be handled, code throws an exception called “cx_sy_strg_par_val”.
Output – Variant 3:
Check the video for Code and Execution:
Find the code on GitHub: