Skip to Content
avatar image
Former Member

Convert text string to table and include wordwrap

Is there an abap class that will convert a string field into a table that will include wordwrap ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Feb 06, 2009 at 06:35 PM

    Try below code:

        CALL FUNCTION 'RKD_WORD_WRAP'
          EXPORTING
            textline            = input_string
            delimiter           = ' '
            outputlen           = 100
          TABLES
            out_lines           = output_itab
          EXCEPTIONS
            outputlen_too_large = 1
            OTHERS              = 2.
    

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 06, 2009 at 09:49 PM

    Hi

    You can use class CL_GUI_TEXTEDIT method TRANSFORM_STRING_TO_TABLE.

    Nat

    Add comment
    10|10000 characters needed characters exceeded

  • May 12, 2011 at 05:47 PM

    Dale:

    Try class CL_SWF_UTL_CONVERT_XSTRING. The methods in it are named with XSTRING, but also work with type STRING as well.

    Regards,

    D.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Madhumahesh T

      You can use method '/SAPSLL/TEXT_TABLE_TO_STRING' to convert text lines to string

      *convert text lines to string

      data: lv_string type string.

      clear lv_string.

      CALL FUNCTION '/SAPSLL/TEXT_TABLE_TO_STRING'

      EXPORTING

      IT_TLINES = lt_lines

      IMPORTING

      EV_TXTSTRING = lv_string

      To Covnert String to Text Lines, use - '/SAPSLL/TEXT_STRING_TO_TABLE'

      • Convert text lines to string

      CALL FUNCTION '/SAPSLL/TEXT_STRING_TO_TABLE'

      EXPORTING

      IV_TXTSTRING = ls_extension-value

      IMPORTING

      ET_TLINES = lt_lines

      .