cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Long text to be displayed in Text Edit ui element

0 Kudos

Dear ALL,

I have a requirement to display unlimited text in ABAP webdynpro application where i have defined one variable string and binded to text edit ui element.

On execution i can enter unlimited characters and using Create_text i can able to store the text as well.Again in the next level I need to display the data but iam able to display only 132 characters only for retrieval iam using Read_text to get the data.

kindly help me in this.

0 Kudos

Solved

thanks all

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi,

What data type is the context attribute that's bound to the TextEdit's value property? Is the data type limited to 132 characters? I recommend using data type STRING so the length won't be limited.

Below is the code I use to read in a standard text and set it to a field of type STRING.

  CALL FUNCTION 'READ_TEXT'
    EXPORTING
      id       = text_id
      language = sy-langu
      name     = text_name
      object   = text_object
    TABLES
      lines    = lt_tline
    EXCEPTIONS
      OTHERS   = 0.

  LOOP AT lt_tline ASSIGNING FIELD-SYMBOL(<tline>).
    CASE sy-tabix.
      WHEN 1.
        string_field = <tline>-tdline.
      WHEN OTHERS.
        string_field = |{ string_field }{ cl_abap_char_utilities=>newline }{ <tline>-tdline } |.
    ENDCASE.
  ENDLOOP. " <tline>

Cheers,
Amy

Answers (0)