SAP REPEAT FUNCTIONS



Get Example source ABAP code based on a different SAP table
  


• repeat ABAP_FUNCTION
• occ repeat function

ABAP_STRINGFUNC - repeat

ABAP_SYNTAX
... repeat( val = text occ = occ ) ...

What does it do?
This built-in function returns a character string that contains the content of text as many times as specified in occ. If text is an empty string or if occ contains the value 0, an empty string is returned.
occ is a numeric expression position with type i. If the value of occ is negative, an exception of the class CX_SY_STRG_PAR_VAL is raised.
The return value has the type string.



Latest notes:

The parameter occ has a different meaning here than in functions used for searching.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
The function repeat is used to create a string with ten blanks.
ABEXA 01229
ABAP_EXAMPLE_END



Runtime Exceptions



Catchable Exceptions
CX_SY_STRG_PAR_VAL
Reason for error:
Occurrences in occ are less than 0.
Runtime error:
STRG_ILLEGAL_PAR