Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Text Editor control

former_member375795
Participant
0 Likes
1,896

I am not able to read characters from text editor more than 255 characters .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,859

Check this one:

Regards,

Felipe

12 REPLIES 12
Read only

Former Member
0 Likes
1,860

Check this one:

Regards,

Felipe

Read only

0 Likes
1,859

I am not able to understand Text object id . se75 .

Help me out

Read only

0 Likes
1,859

Alok

First of all please provide complete detail of what is the issue you are facing and what all you have tried rather than asking questions without providing complete details.

Please read ROE before posting

Nabheet

Read only

0 Likes
1,859

Sir ,

I create 2 text editor and when I input in that text editor , not able to get 255 character .

I use the function

CALL METHOD TEXT_EDITOR->GET_TEXTSTREAM
       EXPORTING
           ONLY_WHEN_MODIFIED     = CL_GUI_TEXTEDIT=>TRUE
          IMPORTING
              TEXT                   = LG_TEXT
             IS_MODIFIED             = modify
          EXCEPTIONS
              ERROR_CNTL_CALL_METHOD = 1
              NOT_SUPPORTED_BY_GUI   = 2
              OTHERS                 = 3.

*
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.


but i delare lg_text type string .

but lg_text read data from text editor only 255 char


Help me out



Read only

0 Likes
1,859

When you created the editor did you pass any wordwrap_position parameter. LG_TEXT you have declared as internal table right..? Can you please attach some screen shot text you input and debugging screene shot where text is not coming

Nabheet

Read only

0 Likes
1,859

I declare LG_text type text

FORM LONG_TEXT  USING    P_TEXTEDITOR TYPE ANY
                          P_TEXT_EDITOR TYPE REF TO CL_GUI_TEXTEDIT
                          P_EDITOR_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER .
IF P_TEXT_EDITOR IS INITIAL.
     CREATE OBJECT P_EDITOR_CONTAINER
       EXPORTING
         CONTAINER_NAME              = P_TEXTEDITOR
       EXCEPTIONS
         CNTL_ERROR                  = 1
         CNTL_SYSTEM_ERROR           = 2
         CREATE_ERROR                = 3
         LIFETIME_ERROR              = 4
         LIFETIME_DYNPRO_DYNPRO_LINK = 5.

     CREATE OBJECT P_TEXT_EDITOR
       EXPORTING
         PARENT                     = P_EDITOR_CONTAINER
         WORDWRAP_MODE              = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
         WORDWRAP_POSITION          = LINE_LENGTH
         WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.

Read only

0 Likes
1,859

Can you please attach screen shots of the on screen text and the text fetched in debugging..?

What values is passed in these

         WORDWRAP_MODE              = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION

         WORDWRAP_POSITION          = LINE_LENGTH

         WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.

Read only

0 Likes
1,859

Sir

Please find code  attachment

Read only

0 Likes
1,859

Alok it will be good if you can attach screen shots this what we are asking for to understand your issue better

Read only

0 Likes
1,859

find the test screen

Read only

0 Likes
1,859

Declara  LG_TEXT as shown below. You will get whole data in internal table. Please note that You are passing 80 char as the limit in below mentioned call.

CREATE OBJECT P_TEXT_EDITOR

      EXPORTING

        PARENT                     = P_EDITOR_CONTAINER

        WORDWRAP_MODE              = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION

        WORDWRAP_POSITION          = LINE_LENGTH

        WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.

 

BEGIN OF stream,
line(80) TYPE c,
END OF stream,

 

stream_table TYPE stream OCCURS 0.

 

LG_TEXT TYPE stream_table, " to test "stream"-methods

Read only

sivaganesh_krishnan
Contributor
0 Likes
1,859

Hi

Check the program SAPTEXTEDIT_TEST_1.