Repeat string function in ABAP.

 * This function is used to repeat the string using x times.

Code

REPORT zab_rp_stringrepeat.

DATA: lv_string1 TYPE string VALUE 'Ajay',
      lv_string2 TYPE string,
      times      TYPE VALUE '3'.

WRITE:  'Before repeat'lv_string1.

lv_string2 repeatval lv_string1 occ times .

WRITE: 'After repeat',lv_string2.

Output


*****************Thank You****************

Comments

Popular posts from this blog

New syntax for append- VALUE (new syntax 7.4+) in ABAP

Read statement new syntax in ABAP. (7.4+).

Add custom tab to me51n at item level in ABAP