翻转字符串

DATA: c1(20) TYPE c ,
      c2(20) TYPE c.

c1 = '赵兄托你帮我办点事'.

CALL FUNCTION 'STRING_REVERSE'
  EXPORTING
    string    = c1
    lang      = '1'
  IMPORTING
    rstring   = c2
  EXCEPTIONS
    too_small = 1
    OTHERS    = 2.

WRITE c2.

你可能感兴趣的:(翻转字符串)