Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
horst_keller
Product and Topic Expert
Product and Topic Expert
2,269



cl_demo_output=>display(

  |\n\n\n{ REDUCE string( LET t = replace( val =  REDUCE string(

  INIT l = replace( val = replace( val =  replace( val = replace(

  val = REDUCE string( LET x = cl_abap_random_int=>create( seed =

  CONV i( sy-uzeit ) min = 1 max = 1999 ) IN INIT h = repeat( val

  = ` ` occ = 2000 ) FOR k = 1 UNTIL k > 500 NEXT h = replace( val

  = h off = x->get_next( ) len = 1 with = COND string( WHEN k / 2

  = ( k - 1 ) / 2 THEN `*` ELSE `+` ) ) ) sub = `**` with = `* `

  occ = 0 ) sub = `*+` with = `* ` occ = 0 ) sub = `+*` with = `+ `

  occ = 0 ) sub = `++` with = `+ ` occ = 0 ) FOR j = 0 UNTIL j > 2

  NEXT l = replace( val = l off = 800 + j * 100 + 30 len = 40 with

  = repeat( val = ` ` occ = 40 ) ) ) off = 930 len = 40 with = |{

                      `Season's Greetings!`

  WIDTH = 40 ALIGN = CENTER }| ) IN INIT s = `` FOR i = 0 UNTIL i >

  19 NEXT s = s && substring( val = t off = i * 100  len = 100 ) &&

  |\n| ) }| ).

(Statement can be executed on ABAP 7.40, SP08 and higher)

9 Comments
Labels in this area