<?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: Convert string table to Char table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6247003#M1383056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Subash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;although I don't no what you really want to do and why, this is what I would do to convert a table of STRINGs inro a table of CHAR elements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM conv .
  DATA:
    lt_string TYPE TABLE OF string,
    lv_maxl   TYPE sy-linsz,
    lr_clin   TYPE REF TO data,
    lr_ctab   TYPE REF TO data.
  FIELD-SYMBOLS:
    &amp;lt;any&amp;gt;     TYPE ANY,
    &amp;lt;tab&amp;gt;     TYPE table.
* get some test data into a string table
  SELECT text
    INTO TABLE lt_string
    FROM t100
    UP TO 100 ROWS.
* determine required maximum length
  LOOP AT lt_string ASSIGNING &amp;lt;any&amp;gt;.
    CHECK STRLEN( &amp;lt;any&amp;gt; ) &amp;gt; lv_maxl.
    lv_maxl = STRLEN( &amp;lt;any&amp;gt; ).
  ENDLOOP.
* create a CHASR object of that length
  CREATE DATA lr_clin TYPE c LENGTH lv_maxl.
* Now we have a reference to  the data, assign it to field-symbol for use
  ASSIGN lr_clin-&amp;gt;* TO &amp;lt;any&amp;gt;.
* create a table with records of this CHAR field
  CREATE DATA lr_ctab LIKE TABLE OF &amp;lt;any&amp;gt;.
* Now we have a reference to  the data, assign it to field-symbol for use
  ASSIGN lr_ctab-&amp;gt;* TO &amp;lt;tab&amp;gt;.
* transfer the STRING data to CHAR data
  LOOP AT lt_string ASSIGNING &amp;lt;any&amp;gt;.
    APPEND &amp;lt;any&amp;gt; TO &amp;lt;tab&amp;gt;.
  ENDLOOP.
* That's it
  BREAK-POINT. "See what we got
ENDFORM.                    " CONV&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Oct 2009 12:00:14 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2009-10-01T12:00:14Z</dc:date>
    <item>
      <title>Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246988#M1383041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Could someone please give me the ABAP code to convert string table to Char table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subash M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 11:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246988#M1383041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T11:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246989#M1383042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at the string table,&lt;/P&gt;&lt;P&gt;pass it to char structure.&lt;/P&gt;&lt;P&gt;append.&lt;/P&gt;&lt;P&gt;endlooop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 11:25:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246989#M1383042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T11:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246990#M1383043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Its not that simple, because string and the char would be different lengths and so data loss might be there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subash M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 11:29:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246990#M1383043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T11:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246991#M1383044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use FM &lt;STRONG&gt;CONVERT_STRING_TO_TABLE&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 11:48:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246991#M1383044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T11:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246992#M1383045</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;&lt;/P&gt;&lt;P&gt;Use SPLIT keyword. For example please type SPLIT in your abap editor and press F1 you will get sample examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!!&lt;/P&gt;&lt;P&gt;VEnk@&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 11:53:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246992#M1383045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T11:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246993#M1383046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its simple.&lt;/P&gt;&lt;P&gt;take strlen of that string . it will give you the string length.&lt;/P&gt;&lt;P&gt;by the way dont you know the maximum length of text what you are going to get?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 12:13:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246993#M1383046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T12:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246994#M1383047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try FM RKD_WORD_WRAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 12:25:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246994#M1383047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T12:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246995#M1383048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is an example converting to a binary string - this could be used for regular string as well with a couple of changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data:  lt_pdf            type lvc_t_tlin,&lt;/P&gt;&lt;P&gt;           ll_pdf            like line of lt_pdf,&lt;/P&gt;&lt;P&gt;           l_pdf_xstring     type xstring,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; convert the table into binary string&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  loop at lt_pdf into ll_pdf.&lt;/P&gt;&lt;P&gt;    assign ll_pdf to &amp;lt;l_xline&amp;gt; casting.&lt;/P&gt;&lt;P&gt;    concatenate l_pdf_xstring &amp;lt;l_xline&amp;gt; into l_pdf_xstring in byte mode.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 13:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246995#M1383048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T13:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246996#M1383049</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;did you search in SDN?&lt;/P&gt;&lt;P&gt;I think you will get a lot of informations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards, Dieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 14:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246996#M1383049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T14:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246997#M1383050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt; Thanks  for your answers. &lt;/P&gt;&lt;P&gt;I still have one more  query. Could you please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to store some text in ITF format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I get it as a string and using the funcation module 'CONVERT_STRING_TO_TABLE'  I convert it to char table.&lt;/P&gt;&lt;P&gt;Now I need to convert this to stream so that I can use the funcation module  CONVERT_STREAM_TO_ITF_TEXT &lt;/P&gt;&lt;P&gt;to finally convert it to ITF .&lt;/P&gt;&lt;P&gt;So could you tell me how to convert it to stream.&lt;/P&gt;&lt;P&gt;I tried various options but nothing is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subash M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 05:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246997#M1383050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-01T05:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246998#M1383051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CONVERT_ASCII_TO_ITF&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 05:39:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246998#M1383051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-01T05:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246999#M1383052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Subhash,
As you got data into char table, Char table contains ASCII data only. You can directly pass char table to your &lt;STRONG&gt;CONVERT_STREAM_TO_ITF_TEXT&lt;/STRONG&gt; directly like below.
&lt;PRE&gt;&lt;CODE&gt;" Convert ASCII to ITF
  CALL FUNCTION 'CONVERT_STREAM_TO_ITF_TEXT'
       TABLES
            text_stream = l_char_tab   "ascii
            itf_text    = l_itf_tab.&lt;/CODE&gt;&lt;/PRE&gt;
&amp;lt;li&amp;gt;After that you can convert ITF to HTML 
&lt;PRE&gt;&lt;CODE&gt;
  CALL FUNCTION 'CONVERT_ITF_TO_HTML'
    EXPORTING
      i_header                 = l_header
      i_replace                = space
      i_html_header            = space
    TABLES
      t_itf_text               = l_itf_tab
      t_html_text              = l_char_tab
    EXCEPTIONS
      illegal_header           = 1
      OTHERS                   = 2.&lt;/CODE&gt;&lt;/PRE&gt;

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 05:49:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6246999#M1383052</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-10-01T05:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6247000#M1383053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Subhash, 
&amp;lt;li&amp;gt;Check the method &lt;STRONG&gt;CONVERT_ASCII_TO_HTML&lt;/STRONG&gt; in the class &lt;STRONG&gt;CL_BFW_WEBRESOURCE_POC&lt;/STRONG&gt;  @SE24 tcode.See the source code of the method. You will come to know many things.

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 05:53:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6247000#M1383053</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-10-01T05:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6247001#M1383054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat/All,&lt;/P&gt;&lt;P&gt;Using CONVERT_ASCII_TO_ITF this works. But the problem is , sometimes  the alignment of the the text is not done properly.  &lt;/P&gt;&lt;P&gt;For example when there are carriage returns in the text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subash M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 11:24:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6247001#M1383054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-01T11:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6247002#M1383055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use format is before you call the FM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 11:49:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6247002#M1383055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-01T11:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert string table to Char table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6247003#M1383056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Subash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;although I don't no what you really want to do and why, this is what I would do to convert a table of STRINGs inro a table of CHAR elements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM conv .
  DATA:
    lt_string TYPE TABLE OF string,
    lv_maxl   TYPE sy-linsz,
    lr_clin   TYPE REF TO data,
    lr_ctab   TYPE REF TO data.
  FIELD-SYMBOLS:
    &amp;lt;any&amp;gt;     TYPE ANY,
    &amp;lt;tab&amp;gt;     TYPE table.
* get some test data into a string table
  SELECT text
    INTO TABLE lt_string
    FROM t100
    UP TO 100 ROWS.
* determine required maximum length
  LOOP AT lt_string ASSIGNING &amp;lt;any&amp;gt;.
    CHECK STRLEN( &amp;lt;any&amp;gt; ) &amp;gt; lv_maxl.
    lv_maxl = STRLEN( &amp;lt;any&amp;gt; ).
  ENDLOOP.
* create a CHASR object of that length
  CREATE DATA lr_clin TYPE c LENGTH lv_maxl.
* Now we have a reference to  the data, assign it to field-symbol for use
  ASSIGN lr_clin-&amp;gt;* TO &amp;lt;any&amp;gt;.
* create a table with records of this CHAR field
  CREATE DATA lr_ctab LIKE TABLE OF &amp;lt;any&amp;gt;.
* Now we have a reference to  the data, assign it to field-symbol for use
  ASSIGN lr_ctab-&amp;gt;* TO &amp;lt;tab&amp;gt;.
* transfer the STRING data to CHAR data
  LOOP AT lt_string ASSIGNING &amp;lt;any&amp;gt;.
    APPEND &amp;lt;any&amp;gt; TO &amp;lt;tab&amp;gt;.
  ENDLOOP.
* That's it
  BREAK-POINT. "See what we got
ENDFORM.                    " CONV&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 12:00:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-string-table-to-char-table/m-p/6247003#M1383056</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2009-10-01T12:00:14Z</dc:date>
    </item>
  </channel>
</rss>

