<?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 Unicode - error - how to replace? *need help* in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-error-how-to-replace-need-help/m-p/4701610#M1104803</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 a report that I have to migrate into an unicode-system and there are some errors. With one of these errors I have aproblem because I don't know how to solve the problem and how to replace the logic so that is unicode-compatible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the form-routine, that has the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

FORM init_packed_fields CHANGING cp_str TYPE zstr_test_bapi.

  TYPE-POOLS: sydes.

  CONSTANTS: co_hex_20   TYPE x VALUE '20'.
  DATA: lt_nametab              TYPE sydes_desc.
*--------------------------------

* Workareas
  DATA: BEGIN OF lwa_nametab_type.
  DATA:  l_type TYPE sydes_typeinfo.
  DATA: END OF lwa_nametab_type.

  DATA: BEGIN OF lwa_nametab_name.
  DATA:  l_name TYPE sydes_nameinfo.
  DATA: END OF lwa_nametab_name.
*-----------------------------------------

  DATA: l_fieldname LIKE dd03l-fieldname,
        l_tabix LIKE sy-tabix,
        l_typ(1) TYPE c,
        l_no_of_components TYPE i.
*----------------------------------

  FIELD-SYMBOLS: &amp;lt;f1&amp;gt; TYPE ANY.
*-----------------------------

* Packed fields
  CLEAR lt_nametab-types.
  CLEAR lt_nametab-names.
  REFRESH lt_nametab-types.
  REFRESH lt_nametab-names.
  DESCRIBE FIELD cp_structure INTO lt_nametab.
  LOOP AT lt_nametab-types INTO lwa_nametab_type
                           WHERE type = 'P'.
    l_tabix = lwa_nametab_type-l_type-idx_name.
    READ TABLE lt_nametab-names INTO lwa_nametab_name
               INDEX l_tabix.
    SHIFT lwa_nametab_name-l_name.
    CONCATENATE 'cp_str'
                '-'
                lwa_nametab_name-l_name
                INTO l_fieldname.
    ASSIGN (l_fieldname) TO &amp;lt;f1&amp;gt;.
    IF &amp;lt;f1&amp;gt; CO co_hex_20.                      " &amp;lt;--- here is the error
      CLEAR &amp;lt;f1&amp;gt;.
    ENDIF.
  ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error message is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"CO_HEX_20" must be a character-type data object (data type C, N, D, T, or STRING)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be really great if you can give me hints and/or solutions. What should the coding do concretly?&lt;/P&gt;&lt;P&gt;Thanks a lot &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Nov 2008 11:22:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-16T11:22:48Z</dc:date>
    <item>
      <title>Unicode - error - how to replace? *need help*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-error-how-to-replace-need-help/m-p/4701610#M1104803</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 a report that I have to migrate into an unicode-system and there are some errors. With one of these errors I have aproblem because I don't know how to solve the problem and how to replace the logic so that is unicode-compatible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the form-routine, that has the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

FORM init_packed_fields CHANGING cp_str TYPE zstr_test_bapi.

  TYPE-POOLS: sydes.

  CONSTANTS: co_hex_20   TYPE x VALUE '20'.
  DATA: lt_nametab              TYPE sydes_desc.
*--------------------------------

* Workareas
  DATA: BEGIN OF lwa_nametab_type.
  DATA:  l_type TYPE sydes_typeinfo.
  DATA: END OF lwa_nametab_type.

  DATA: BEGIN OF lwa_nametab_name.
  DATA:  l_name TYPE sydes_nameinfo.
  DATA: END OF lwa_nametab_name.
*-----------------------------------------

  DATA: l_fieldname LIKE dd03l-fieldname,
        l_tabix LIKE sy-tabix,
        l_typ(1) TYPE c,
        l_no_of_components TYPE i.
*----------------------------------

  FIELD-SYMBOLS: &amp;lt;f1&amp;gt; TYPE ANY.
*-----------------------------

* Packed fields
  CLEAR lt_nametab-types.
  CLEAR lt_nametab-names.
  REFRESH lt_nametab-types.
  REFRESH lt_nametab-names.
  DESCRIBE FIELD cp_structure INTO lt_nametab.
  LOOP AT lt_nametab-types INTO lwa_nametab_type
                           WHERE type = 'P'.
    l_tabix = lwa_nametab_type-l_type-idx_name.
    READ TABLE lt_nametab-names INTO lwa_nametab_name
               INDEX l_tabix.
    SHIFT lwa_nametab_name-l_name.
    CONCATENATE 'cp_str'
                '-'
                lwa_nametab_name-l_name
                INTO l_fieldname.
    ASSIGN (l_fieldname) TO &amp;lt;f1&amp;gt;.
    IF &amp;lt;f1&amp;gt; CO co_hex_20.                      " &amp;lt;--- here is the error
      CLEAR &amp;lt;f1&amp;gt;.
    ENDIF.
  ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error message is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"CO_HEX_20" must be a character-type data object (data type C, N, D, T, or STRING)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be really great if you can give me hints and/or solutions. What should the coding do concretly?&lt;/P&gt;&lt;P&gt;Thanks a lot &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 11:22:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-error-how-to-replace-need-help/m-p/4701610#M1104803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-16T11:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode - error - how to replace? *need help*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-error-how-to-replace-need-help/m-p/4701611#M1104804</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;Just change like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : co_hex_20   TYPE string.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anversha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 11:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-error-how-to-replace-need-help/m-p/4701611#M1104804</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2008-11-16T11:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode - error - how to replace? *need help*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-error-how-to-replace-need-help/m-p/4701612#M1104805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is that then the same logic????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think '20' in type HEX (X) stands for SPACE, isn't it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 11:37:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-error-how-to-replace-need-help/m-p/4701612#M1104805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-16T11:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode - error - how to replace? *need help*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-error-how-to-replace-need-help/m-p/4701613#M1104806</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;Just do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: co_hex_20  TYPE c VALUE cl_abap_char_utilities=&amp;gt;cr_lf.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer this thread - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=18732916&amp;amp;messageID=2088832" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=18732916&amp;amp;messageID=2088832&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anversha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anversha s on Nov 16, 2008 5:29 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 11:58:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-error-how-to-replace-need-help/m-p/4701613#M1104806</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2008-11-16T11:58:26Z</dc:date>
    </item>
  </channel>
</rss>

