Skip to Content
avatar image
Former Member

String Reverse

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Mar 12, 2008 at 10:34 AM

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

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 12, 2008 at 11:45 AM

    hi,

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

    regards,

    bharathi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 12, 2008 at 12:03 PM

    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

    Add comment
    10|10000 characters needed characters exceeded