cancel
Showing results for 
Search instead for 
Did you mean: 

Space btn characters

Former Member
0 Kudos

Hi all,

I need to print a CHAR16 variable using smartform in a way that there should be space between each character.

eg : 89007-01-004501-20-1 needs to be output as

8 9 0 0 7 - 0 1 - 0 0 4 5 0 1 - 2 0 - 1

Pls help how to do this??

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi.

just check this code.

REPORT ztn_test .

data: val(16),
      str type string,
      length type i,
      var type i value 0.
val = '321-1-12-1'.

length = strlen( val ).
BREAK-POINT.
DO length TIMES.
  cONCATENATE val+var(1)  str into str SEPARATED BY space.
   var = var + 1.

ENDDO.


write str.

Answers (2)

Answers (2)

Former Member
0 Kudos

Make sure Ur target field has appropriate length to accomodate spaces while u implement above mentioned solutions.

кu03B1ятu03B9к

Former Member
0 Kudos

Hi,

Use program lines node before displaying the Text and write a Concatenate Statement by inserting SPACEs between all characters of variable.