Parameter | Reference | Type | Length | Default | Optional | Text |
---|---|---|---|---|---|---|
LANG | 0 | |||||
STRING | 0 | Character string to be reversed |
Parameter | Reference | Type | Length | Text |
---|---|---|---|---|
RSTRING | 0 | Reverse character string |
Exception | Text |
---|---|
TOO_SMALL | Output field too short |
Functionality The function module returns the character string entered inreverse sequence. Leading blanks are taken into account,trailing blanks are not. All exceptions are generated with RAISE and must be handled in thecalling program. Examples ' abc ' becomes 'cba ' . (If the actual parameter assigned tothe formal parameter RSTRING is longer than 4 characters as shownin this example, the remaining places are padded with blanks.) Sample call: DATA: REVERSESTRING(10). 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.at the end, however, are not taken into account. |