cancel
Showing results for 
Search instead for 
Did you mean: 

String Reverse

Former Member
0 Kudos

please tell me how to print a string in the reverse form.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Call The FM String_REVERSE


CALL FUNCTION 'STRING_REVERSE'

              EXPORTING     STRING      =     '  abcdef     '

              IMPORTING     RSTRING     =     REVERSESTRING

               EXCEPTIONS    TOO_SMALL   =     1.

     IF SY-SUBRC = 0.

*        The reverse string is in RSTRING

     ELSE.

*        RSTRING zu kurz

     ENDIF.

Regards

Sandipan

Former Member
0 Kudos

hi,

Call the FunctionModule 'STRING_REVERSE'. which is already available..

regards,

bharathi

Former Member
0 Kudos

use ... STRING_REVERSE fm to achieve that ...


CALL FUNCTION 'STRING_REVERSE'
      EXPORTING
        string  = descr
        lang    = 'E'
      IMPORTING
        rstring = descr.