cancel
Showing results for 
Search instead for 
Did you mean: 

Problem while Displaying Text of SO10 in Formatted Text View

former_member185241
Active Participant
0 Kudos

Hi All,

In SO10, i have written multiple line.

To use these lines in Web dynpro i have called READ_TEXT FM and m storing into internal table.

How to show the exactly data into Formatted Text View.

Thanks and Regards,

Abhsihek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi abhi,

To get formattd text  use TLINE structure....

Use below code to get text..

->Create text object in SO10

->Do coding like below...

     data:      lt_tline type table of tline,

               ls_tline type tline,

                lv_string type string.

1. use 'READ_TEXT' FM to get text from SO10 which give you TLINE format table (lt_tline).

loop at lt_tline into ls_tline.

      concatenate lv_string ls_tline-tdline into lv_string.

      clear: ls_tline.

endloop.

2. Now lv_string contains full text of SO10.

            3. Bind lv_string to textedit UI element text.

Regards,

Venkat

Answers (1)

Answers (1)

former_member197696
Participant
0 Kudos

i get a dump while using read_text Fm bro .. where did u write that code

0 Kudos

Hi,

you are supposed to call the FM in WDDOINIT method of the view.

steps to be followed.

1) Call the FM - Read_text

pass the parameters:client = sy-mandt

                               id      = 'ST'

                               language = sy-langu

                                name = SO10 text in quotes

                                object = 'TEXT'

                               archive_handle = 0

                               local_cat = '  '

                               tables = lt_lines ( where lt_lines should be type table of tline)

2)   LOOP AT LT_LINES INTO WA_LINES.

     LV_NOTETMP1 = WA_LINES-TDLINE.
     CONCATENATE LV_NOTE1 WA_LINES-TDLINE CL_ABAP_CHAR_UTILITIES=>NEWLINE INTO LV_NOTE1 SEPARATED BY SPACE.

   ENDLOOP.

3)  *   set single attribute
   LO_EL_CONTEXT->SET_ATTRIBUTE(
     NAME =  `NOTE1`
     VALUE = LV_NOTE1 ).

try this out.