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

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s