<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: long  text    display  on screen using  dialog  programmin in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658613#M292112</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can read the text using READ_TEXT and put in a text editor in your screen.  Here is an example, this is implemented in a docking container in a selection screen, but it would be the same if you were to attach it to a custom container in your dynpro.  Simply create these objects in the PBO of your screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cut and paste this program in to your system and run it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001
       no standard page heading.

* Variable for "Text Container" Abap Object
data: editor type ref to cl_gui_textedit,
      docking type ref to cl_gui_docking_container.

data: wa_text like tline-tdline.

data: begin of lines occurs 0.
        include structure tline.
data: end of lines.

data: textlines like tline-tdline occurs 0.
data: syrepid type sy-repid.

parameters: p_check type c.

at selection-screen output.

  syrepid = sy-repid.

  check docking is initial.

  create object docking
              exporting repid     = syrepid
                        dynnr     = sy-dynnr
                        side      = docking-&amp;gt;dock_at_left
                        extension = 500.

  create object editor
      exporting parent = docking.

  perform set_text.

start-of-selection.

  perform write_text.

************************************************************************
*       FORM write_text                                                *
************************************************************************
form write_text.

  data: modified type i.

* Retrieve text from container
  call method editor-&amp;gt;get_text_as_r3table
     exporting
           only_when_modified = space
     importing
           table              = textlines
           is_modified        = modified
     exceptions
           others             = 1.

* Write out contents of text editor
  leave to list-processing.
  loop at textlines into wa_text.
    write:/ wa_text.
  endloop.

endform.

************************************************************************
*      FORM  SET_TEXT
************************************************************************
form set_text.

* Here use the READ_TEXT function module to get the text for your
* long text.  In this example, I'm filling the text manually

  lines-tdline = 'Here we are filling the text editor - Line 1'.
  append lines.

  lines-tdline = 'Here we are filling the text editor - Line 2'.
  append lines.

  loop at lines .
    shift lines left deleting leading space.
    append lines to textlines .
  endloop.

* Fill container with text lines
  call method editor-&amp;gt;set_text_as_r3table
     exporting
           table              = textlines
           exceptions
           others             = 1.

endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Oct 2006 13:08:57 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-10-20T13:08:57Z</dc:date>
    <item>
      <title>long  text    display  on screen using  dialog  programmin</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658612#M292111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;   How long text  long  text    display  on screen using  dialog  programmin.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 13:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658612#M292111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T13:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: long  text    display  on screen using  dialog  programmin</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658613#M292112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can read the text using READ_TEXT and put in a text editor in your screen.  Here is an example, this is implemented in a docking container in a selection screen, but it would be the same if you were to attach it to a custom container in your dynpro.  Simply create these objects in the PBO of your screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cut and paste this program in to your system and run it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001
       no standard page heading.

* Variable for "Text Container" Abap Object
data: editor type ref to cl_gui_textedit,
      docking type ref to cl_gui_docking_container.

data: wa_text like tline-tdline.

data: begin of lines occurs 0.
        include structure tline.
data: end of lines.

data: textlines like tline-tdline occurs 0.
data: syrepid type sy-repid.

parameters: p_check type c.

at selection-screen output.

  syrepid = sy-repid.

  check docking is initial.

  create object docking
              exporting repid     = syrepid
                        dynnr     = sy-dynnr
                        side      = docking-&amp;gt;dock_at_left
                        extension = 500.

  create object editor
      exporting parent = docking.

  perform set_text.

start-of-selection.

  perform write_text.

************************************************************************
*       FORM write_text                                                *
************************************************************************
form write_text.

  data: modified type i.

* Retrieve text from container
  call method editor-&amp;gt;get_text_as_r3table
     exporting
           only_when_modified = space
     importing
           table              = textlines
           is_modified        = modified
     exceptions
           others             = 1.

* Write out contents of text editor
  leave to list-processing.
  loop at textlines into wa_text.
    write:/ wa_text.
  endloop.

endform.

************************************************************************
*      FORM  SET_TEXT
************************************************************************
form set_text.

* Here use the READ_TEXT function module to get the text for your
* long text.  In this example, I'm filling the text manually

  lines-tdline = 'Here we are filling the text editor - Line 1'.
  append lines.

  lines-tdline = 'Here we are filling the text editor - Line 2'.
  append lines.

  loop at lines .
    shift lines left deleting leading space.
    append lines to textlines .
  endloop.

* Fill container with text lines
  call method editor-&amp;gt;set_text_as_r3table
     exporting
           table              = textlines
           exceptions
           others             = 1.

endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 13:08:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658613#M292112</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-20T13:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: long  text    display  on screen using  dialog  programmin</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658614#M292113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    use FM read_text Fm to read long text&lt;/P&gt;&lt;P&gt;     check table stxh,stxl.&lt;/P&gt;&lt;P&gt;use read_text function module to read text lines&lt;/P&gt;&lt;P&gt;edit_text to edit existing text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'READ_TEXT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ID = 'ST'&lt;/P&gt;&lt;P&gt;LANGUAGE = SY-LANGU&lt;/P&gt;&lt;P&gt;NAME = THEAD-TDNAME&lt;/P&gt;&lt;P&gt;OBJECT = 'TEXT'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;LINES = TLINE_TAB&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;ID = 1&lt;/P&gt;&lt;P&gt;LANGUAGE = 2&lt;/P&gt;&lt;P&gt;NAME = 3&lt;/P&gt;&lt;P&gt;NOT_FOUND = 4&lt;/P&gt;&lt;P&gt;OBJECT = 5&lt;/P&gt;&lt;P&gt;REFERENCE_CHECK = 6&lt;/P&gt;&lt;P&gt;WRONG_ACCESS_TO_ARCHIVE = 7&lt;/P&gt;&lt;P&gt;OTHERS = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 13:19:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658614#M292113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T13:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: long  text    display  on screen using  dialog  programmin</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658615#M292114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use &amp;lt;b&amp;gt;RKD_WORD_WRAP&amp;lt;/b&amp;gt; after &amp;lt;b&amp;gt;READ_TEXT&amp;lt;/b&amp;gt;...That way you can have multiple lines and maybe use a Table Control -;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 13:36:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658615#M292114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T13:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: long  text    display  on screen using  dialog  programmin</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658616#M292115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi asha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first create a conntainer on the screen in which you want to display the long text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write the following code in PBO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN TOP INCLLIUDE DECLARE THIS&lt;/P&gt;&lt;P&gt;DATA : TEXTEDIT_CUSTOM_CONTAINER1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER.&lt;/P&gt;&lt;P&gt;DATA : G_CONTAINER2 TYPE SCRFNAME VALUE 'TEXT_EDITOR2' ,&lt;/P&gt;&lt;P&gt;TEXT1111 TYPE REF TO CL_GUI_TEXTEDIT ,&lt;/P&gt;&lt;P&gt;G_CUSTOM_CONTAINER2 TYPE REF TO CL_GUI_CUSTOM_CONTAINER .&lt;/P&gt;&lt;P&gt;DATA : TEXTEDIT_CUSTOM_CONTAINER1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER.&lt;/P&gt;&lt;P&gt;DATA :  editor1 type ref to cl_gui_textedit.&lt;/P&gt;&lt;P&gt;CONSTANTS : line_length1 type i value 128.&lt;/P&gt;&lt;P&gt;TYPES :  BEGIN OF my_table_struct_definition1,&lt;/P&gt;&lt;P&gt;          LINE1(line_length) TYPE C,&lt;/P&gt;&lt;P&gt;         END OF my_table_struct_definition1,&lt;/P&gt;&lt;P&gt;         MY_TABLE1 TYPE my_table_struct_definition1 OCCURS 0.&lt;/P&gt;&lt;P&gt;DATA  :  MYTABLE1 TYPE MY_TABLE1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class CL_GUI_CONTROL definition LOAD.&lt;/P&gt;&lt;P&gt;Class CL_GUI_OBJECT definition load.&lt;/P&gt;&lt;P&gt;DATA : V_REPIDD LIKE SY-REPID.&lt;/P&gt;&lt;P&gt;V_REPIDD = SY-REPID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if editor1 is initial.&lt;/P&gt;&lt;P&gt;CREATE OBJECT TEXTEDIT_CUSTOM_CONTAINER1&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CONTAINER_NAME = 'TEXTEDITOR2'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;CNTL_ERROR = 1&lt;/P&gt;&lt;P&gt;CNTL_SYSTEM_ERROR = 2&lt;/P&gt;&lt;P&gt;CREATE_ERROR = 3&lt;/P&gt;&lt;P&gt;LIFETIME_ERROR = 4&lt;/P&gt;&lt;P&gt;LIFETIME_DYNPRO_DYNPRO_LINK = 5.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add your handling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;create calls constructor, which initializes, creats and links&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;a TextEdit Control&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT EDITOR1&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;PARENT = TEXTEDIT_CUSTOM_CONTAINER1&lt;/P&gt;&lt;P&gt;WORDWRAP_MODE = CL_GUI_TEXTEDIT=&amp;gt;WORDWRAP_AT_FIXED_POSITION&lt;/P&gt;&lt;P&gt;WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=&amp;gt;FALSE&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh mytable1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'POPUP_TO_INFORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TITEL = V_REPIDD "--&amp;gt; program name&lt;/P&gt;&lt;P&gt;TXT2 = SPACE&lt;/P&gt;&lt;P&gt;TXT1 = 'Error in flush'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF YOU ARE RETRIEVING THE DATA FROM ZTABLE USE THIS CODE IMMEDIATELY AFTER THE ABOVE CODE .&lt;/P&gt;&lt;P&gt;ELSE YOU CAN USE READ_TEXT IN YOU HAVE OBJECT CREATED FOR LONG TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : MYTABLE2 LIKE mytable WITH header line.&lt;/P&gt;&lt;P&gt;CLEAR MYTABLE2.&lt;/P&gt;&lt;P&gt;REFRESH MYTABLE2.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB99.&lt;/P&gt;&lt;P&gt;*INSERT ITAB99-ZTEXT1 INTO MYTABLE.&lt;/P&gt;&lt;P&gt; MYTABLE2-LINE = ITAB99-ZTEXT1..&lt;/P&gt;&lt;P&gt; APPEND MYTABLE2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MYTABLE1[] = MYTABLE2[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method editor1-&amp;gt;set_text_as_r3table&lt;/P&gt;&lt;P&gt;              exporting table = mytable1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know if you are not successful with achieving the results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;VENKI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2006 14:10:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/long-text-display-on-screen-using-dialog-programmin/m-p/1658616#M292115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-20T14:10:55Z</dc:date>
    </item>
  </channel>
</rss>

