<?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 Text Editor - Saving in Z table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-saving-in-z-table/m-p/4717832#M1107817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a module pool program in which I need to call text editor.&lt;/P&gt;&lt;P&gt;I have created a custom container to implement a text editor.The version &lt;/P&gt;&lt;P&gt;I am using is 4.6b where I couldnt create a field longer than&lt;/P&gt;&lt;P&gt;255 field.In the text editor there is every possibilty that user will type more than &lt;/P&gt;&lt;P&gt;255 characters.Now I would like to save the data that is entered in this text editor in a 'z' table.&lt;/P&gt;&lt;P&gt;Please explain how should I do save it?If possible send me the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Nov 2008 18:53:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-13T18:53:54Z</dc:date>
    <item>
      <title>Text Editor - Saving in Z table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-saving-in-z-table/m-p/4717832#M1107817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a module pool program in which I need to call text editor.&lt;/P&gt;&lt;P&gt;I have created a custom container to implement a text editor.The version &lt;/P&gt;&lt;P&gt;I am using is 4.6b where I couldnt create a field longer than&lt;/P&gt;&lt;P&gt;255 field.In the text editor there is every possibilty that user will type more than &lt;/P&gt;&lt;P&gt;255 characters.Now I would like to save the data that is entered in this text editor in a 'z' table.&lt;/P&gt;&lt;P&gt;Please explain how should I do save it?If possible send me the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 18:53:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-saving-in-z-table/m-p/4717832#M1107817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-13T18:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor - Saving in Z table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-saving-in-z-table/m-p/4717833#M1107818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why you don't save it in Text Objects?.&lt;/P&gt;&lt;P&gt;You can see Text Objects in the transaction SE75.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM SAVE .

  DATA: w_header TYPE thead,
          t_tline TYPE TABLE OF tline,
          w_tline TYPE tline,
          t_texto TYPE TABLE OF char255,
          w_texto TYPE char255.



  CLEAR w_header.

  w_header-tdobject = 'ZYOBJECT'.
  w_header-tdid     = 'Z001'.
  w_header-tdname = '0001'.
  w_header-tdspras = sy-langu.
*



***** Get text of custom container

  CALL METHOD otxtarea_cabecera-&amp;gt;get_text_as_r3table
*        EXPORTING
*          ONLY_WHEN_MODIFIED     = FALSE
        IMPORTING
          table                  = t_texto
*          IS_MODIFIED            =
        EXCEPTIONS
          error_dp               = 1
          error_cntl_call_method = 2
          error_dp_create        = 3
          potential_data_loss    = 4
          OTHERS                 = 5
             .
  IF sy-subrc &amp;lt;&amp;gt; 0.
*       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.




  LOOP AT t_texto INTO w_texto.
    w_tline-tdformat = '*'.
    w_tline-tdline = w_texto.
    APPEND w_tline TO t_tline .
  ENDLOOP.

* Save text
  CALL FUNCTION 'ZSAVE_TEXT'
    EXPORTING
      i_client          = sy-mandt
      i_header          = w_header
      i_savemode_direct = 'X'
    TABLES
      t_lines           = t_tline.

	  
endform.
	  
-----------------------------------------------------------------------------------------------------------------------

function zsave_text.
*"----------------------------------------------------------------------
*"*"Interfase local
*"  IMPORTING
*"     VALUE(I_CLIENT) LIKE  SY-MANDT DEFAULT SY-MANDT
*"     VALUE(I_HEADER) LIKE  THEAD STRUCTURE  THEAD
*"     VALUE(I_INSERT) TYPE  CHAR1 DEFAULT SPACE
*"     VALUE(I_SAVEMODE_DIRECT) TYPE  CHAR1 DEFAULT SPACE
*"     VALUE(I_OWNER_SPECIFIED) TYPE  CHAR1 DEFAULT SPACE
*"     VALUE(I_LOCAL_CAT) TYPE  CHAR1 DEFAULT SPACE
*"  EXPORTING
*"     VALUE(E_FUNCTION) TYPE  CHAR5
*"     VALUE(E_NEWHEADER) LIKE  THEAD STRUCTURE  THEAD
*"  TABLES
*"      T_LINES STRUCTURE  TLINE OPTIONAL
*"----------------------------------------------------------------------


  i_header-tdspras = sy-langu.

  call function 'SAVE_TEXT'
    exporting
      client	= i_client
      header  = i_header
      insert 	= i_insert
      savemode_direct = i_savemode_direct
      owner_specified = i_owner_specified
      local_cat = i_local_cat
    importing
      function  = e_function
      newheader = e_newheader
   tables
      lines = t_lines
   exceptions
      id = 1
      language = 2
      name = 3
      object = 4.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 19:53:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-saving-in-z-table/m-p/4717833#M1107818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-13T19:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor - Saving in Z table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-saving-in-z-table/m-p/4717834#M1107819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could use a cluster Z-table for saving a text with more than 255 characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For saving the text use &lt;STRONG&gt;EXPORT&lt;/STRONG&gt; &lt;EM&gt;parameter_list&lt;/EM&gt; &lt;STRONG&gt;FROM&lt;/STRONG&gt; &lt;EM&gt;wa&lt;/EM&gt; &lt;STRONG&gt;TO DATABASE&lt;/STRONG&gt; &lt;EM&gt;dbtab(ar)&lt;/EM&gt; &lt;STRONG&gt;ID&lt;/STRONG&gt; &lt;EM&gt;id&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reading use &lt;STRONG&gt;IMPORT&lt;/STRONG&gt; &lt;EM&gt;parameter_list&lt;/EM&gt; &lt;STRONG&gt;FROM DATABASE&lt;/STRONG&gt; &lt;EM&gt;dbtab(ar)&lt;/EM&gt; &lt;STRONG&gt;TO&lt;/STRONG&gt; &lt;EM&gt;wa&lt;/EM&gt;  &lt;STRONG&gt;ID&lt;/STRONG&gt; &lt;EM&gt;id&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cluster tables must consist of certain fields in a certain order. How to design cluster tables is described in the ABAP Reference. Just place your cursor on EXPORT and type F1 within SE80.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Mark-André&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mark-André Kluck on Nov 13, 2008 9:05 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mark-André Kluck on Nov 13, 2008 9:06 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 20:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-saving-in-z-table/m-p/4717834#M1107819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-13T20:04:37Z</dc:date>
    </item>
  </channel>
</rss>

