Friday, September 2, 2011

Function Module to split input text

The function is used to split the input text to multiple line of data based on the number of character given.


Function Module: RKD_WORD_WRAP

Sample:

CALL FUNCTION 'RKD_WORD_WRAP'
    EXPORTING
      TEXTLINE       = lw_itcsy-value  "input text
*    DELIMITER    = lw_delimiter      "Default = space
      OUTPUTLEN  = 30                    "Default = 35
    IMPORTING
      OUT_LINE1      = lv_desc1
      OUT_LINE2      = lv_desc2
      OUT_LINE3      = lv_desc3
    TABLES
      OUT_LINES      = lt_output
    EXCEPTIONS
       OUTPUTLEN_TOO_LARGE = 1.

If the output having more then 3 lines, you can retrieve using the table.

No comments:

Post a Comment