Parameter | Reference | Type | Length | Default | Optional | Text |
---|---|---|---|---|---|---|
STRING1 | 0 | First String | ||||
STRING2 | 0 | Second String |
Parameter | Reference | Type | Length | Text |
---|---|---|---|---|
STRING | 0 | Concatenated String |
Exception | Text |
---|---|
TOO_SMALL | Output field too short |
Functionality The function module puts two character strings together in onecharacter string. Blanks at the end of the first string are truncated,unless they are of the type The parameter If the result is longer than the parameter If the system code page is a multibyte code page (for example, Chinese,Japanese, Korean), the Examples: STRING1 = 'abcde ' (4 blanks at the end) STRING2 = 'fgh ' (0 blanks at the beginning) STRING = 'abcdefgh ' (0 blanks in the middle) STRING1 = 'abcde' (0 blanks at the end) STRING2 = ' fgh ' (3 blanks at the beginning) STRING = 'abcde fgh ' (3 blanks in the middle) Sample call: DATA: CONCATSTRING(20). CALL FUNCTION 'STRING_CONCATENATE' EXPORTING STRING1 = 'abcdefghij' STRING2 = 'klmnopqrst' IMPORTING STRING = CONCATSTRING EXCEPTIONS TOO_SMALL = 1. IF SY-SUBRC = 0. * the composite character string is in STRING ELSE. * STRING too short ENDIF. |