Repeating Values

Index

 

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:

Repeat_Var1_source

Output – Variant 1:

Repeat_Var1_output

Sample Source Code – Variant 2:

Repeat_Var2_source

Output – Variant 2:

Repeat_Var2_output

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”.

Repeat_Var3_source
Error handing

Output – Variant 3:

Repeat_Var3_output

Check the video for Code and Execution:

Find the code on GitHub:

Go to Code

Index

 

Leave a Reply