<?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: Variants and edit control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/variants-and-edit-control/m-p/5323803#M1226963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Save variant in a dialog screen&lt;/P&gt;&lt;P&gt;/people/alvaro.tejadagalindo/blog/2007/05/22/save-a-variant-from-a-dynpro-screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Putting a long text in selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The following example is provided by Rich in this forum few months back&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report  zars no standard page heading
        line-size 170
        line-count 65(4).
data:
      dockingleft  type ref to cl_gui_docking_container,
      text_editor    type ref to cl_gui_textedit,
      repid type syrepid.

data: begin of header.
        include structure thead.
data: end of header.

data: begin of lines occurs 0.
        include structure tline.
data: end of lines.

data: textlines type table of tline-tdline,
      wa_text type tline-tdline.

parameters: p_check.
parameters: matnr like mara-matnr.

at selection-screen output.

  repid = sy-repid.

  create object dockingleft
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingleft-&amp;gt;dock_at_left
                        extension = 400.

  create object text_editor
              exporting
                   parent     = dockingleft.

start-of-selection.

  call method text_editor-&amp;gt;get_text_as_r3table
     importing
           table              = textlines
     exceptions
           others             = 1.

  loop at textlines into wa_text.
    write:/ wa_text.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Mar 2009 15:52:16 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2009-03-19T15:52:16Z</dc:date>
    <item>
      <title>Variants and edit control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variants-and-edit-control/m-p/5323800#M1226960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to have a report with a custom control (containing cl_gui_textedit) which can save variants for some other fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So either i build my own screen, but how do i save the input fields(not the control) in a variant?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or i am creating a standard report with a selection screen, but how can i use the text editor in the selection screen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 14:46:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variants-and-edit-control/m-p/5323800#M1226960</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-03-19T14:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Variants and edit control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variants-and-edit-control/m-p/5323801#M1226961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So either i build my own screen, but how do i save the input fields(not the control) in a variant?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is not possible , ie save contents of textedit gui control in a variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but how can i use the text editor in the selection screen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possible way is create a push button in selection screen and user press the button call fm EDIT_TEXT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 14:55:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variants-and-edit-control/m-p/5323801#M1226961</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-03-19T14:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Variants and edit control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variants-and-edit-control/m-p/5323802#M1226962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, the content of text edit control does not need to be saved in the variant. I have some other fields which i'm putting either in the selection screen (but then i dont know how to show the text edit control) or i'm creating my own screen with drop down boxes but then i dont know how to save them in a variant. Selection fields and edit control should be visible together, but only the selection fields needs to be stored in a variant. Hope it is a little bit clearer now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 15:11:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variants-and-edit-control/m-p/5323802#M1226962</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-03-19T15:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Variants and edit control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variants-and-edit-control/m-p/5323803#M1226963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Save variant in a dialog screen&lt;/P&gt;&lt;P&gt;/people/alvaro.tejadagalindo/blog/2007/05/22/save-a-variant-from-a-dynpro-screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Putting a long text in selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The following example is provided by Rich in this forum few months back&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report  zars no standard page heading
        line-size 170
        line-count 65(4).
data:
      dockingleft  type ref to cl_gui_docking_container,
      text_editor    type ref to cl_gui_textedit,
      repid type syrepid.

data: begin of header.
        include structure thead.
data: end of header.

data: begin of lines occurs 0.
        include structure tline.
data: end of lines.

data: textlines type table of tline-tdline,
      wa_text type tline-tdline.

parameters: p_check.
parameters: matnr like mara-matnr.

at selection-screen output.

  repid = sy-repid.

  create object dockingleft
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingleft-&amp;gt;dock_at_left
                        extension = 400.

  create object text_editor
              exporting
                   parent     = dockingleft.

start-of-selection.

  call method text_editor-&amp;gt;get_text_as_r3table
     importing
           table              = textlines
     exceptions
           others             = 1.

  loop at textlines into wa_text.
    write:/ wa_text.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 15:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variants-and-edit-control/m-p/5323803#M1226963</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-03-19T15:52:16Z</dc:date>
    </item>
  </channel>
</rss>

