Parameter | Reference | Type | Length | Default | Optional | Text |
---|---|---|---|---|---|---|
STRING | 0 | String |
Parameter | Reference | Type | Length | Text |
---|---|---|---|---|
RSTRING | 0 | String shifted to the right |
Exception | Text |
---|---|
TOO_SMALL | Output field too short |
INCLUDE 'DOCU_HAS_TO_BE_ELABORATED' OBJECT DOKU ID TX Functionality The function module transports a string into the target field rightjustified. Trailing blanks are not taken into account. The targetfield is padded with blanks to the left. All exceptions are generated with RAISE and must be handled in thecalling program. Examples: ' abc ' is transported to an 8-character field as ' abc' (5 blanks at the beginning). Sample call: DATA: RIGHTSTRING(20). CALL FUNCTION 'STRING_MOVE_RIGHT' EXPORTING STRING = ' abcdef ' IMPORTING RSTRING = RIGHTSTRING EXCEPTIONS TOO_SMALL = 1. IF SY-SUBRC = 0. * Der übergebene String steht rechtsbündig in RSTRING ELSE. * RSTRING zu kurz ENDIF. Note The ABAP/4 language element WRITE ... RIGHT-JUSTIFIED TO ... providesthe same functionality as the function module. You can also use theABAP/4 language element SHIFT ... RIGHT DELETING TRAILING SPACE. Alsorefer to the ABAP/4 documentation for The ABAP/4 language elements provide better performance than thefunction module call. The function module has been retained to ensure compatibility withfuture releases. |