<?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: string to xstring in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597687#M268390</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;           See the below declaration. It should work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:    STRING  TYPE string,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srikanth M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Sep 2006 08:37:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-14T08:37:50Z</dc:date>
    <item>
      <title>string to xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597681#M268384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will convert a xstring into a string. But I receive a runtime error (CX_SY_DYN_CALL_ILLEGAL_TYPE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What did I wrong?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  Z_TEST.

  DATA:
    STRING(255) TYPE C,
    XSTRING TYPE XSTRING.

    MOVE '1abd19bb' TO XSTRING.

CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
  EXPORTING
*   FROM_CODEPAGE       = '8500'
    IN_XSTRING          = XSTRING
*   OUT_LEN             =
  IMPORTING
    OUT_STRING          = STRING.

WRITE: / ' STRING: ', STRING.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 07:51:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597681#M268384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T07:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: string to xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597682#M268385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think...&lt;/P&gt;&lt;P&gt;problem is the function module is expecting an internal table as parameter and you are sending it a variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 07:59:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597682#M268385</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T07:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: string to xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597683#M268386</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;chk this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  &amp;lt;b&amp;gt;  out_STRING TYPE STRING,&lt;/P&gt;&lt;P&gt;    in_STRING TYPE XSTRING.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MOVE '1abd19bb' TO IN_STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FROM_CODEPAGE       = '8500'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IN_XSTRING          = IN_STRING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OUT_LEN             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    OUT_STRING          = OUT_STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / ' STRING: ', OUT_STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 07:59:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597683#M268386</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-09-14T07:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: string to xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597684#M268387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check ot the declarations for XSTRING and STRING in the fumction module and declate the same in program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 08:03:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597684#M268387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T08:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: string to xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597685#M268388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now I have a internal table, but the same error...&lt;/P&gt;&lt;P&gt;What can I do? I only will convert a xstring in a string...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  Z_TEST.

  DATA:
    BEGIN OF OUTPUT OCCURS 0,
      OUT_STRING(255) TYPE C,
      IN_STRING TYPE XSTRING,
    END OF OUTPUT.

    MOVE '1abd19bb' TO OUTPUT-IN_STRING.

CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
  EXPORTING
*   FROM_CODEPAGE       = '8500'
    IN_XSTRING          = OUTPUT-IN_STRING
*   OUT_LEN             =
  IMPORTING
    OUT_STRING          = OUTPUT-OUT_STRING.

WRITE: / ' STRING: ', OUTPUT-OUT_STRING.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 08:12:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597685#M268388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T08:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: string to xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597686#M268389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: xl_content type xstring .
DATA: binary_content TYPE solix_tab.

CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = xl_content
TABLES
binary_tab = binary_content.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 08:22:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597686#M268389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T08:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: string to xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597687#M268390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;           See the below declaration. It should work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:    STRING  TYPE string,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srikanth M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 08:37:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597687#M268390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T08:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: string to xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597688#M268391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the following code to convert Xstring to String.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: content     TYPE STRING,&lt;/P&gt;&lt;P&gt;Xcontent   TYPE XSTRING .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: conv   TYPE REF TO CL_ABAP_CONV_IN_CE.&lt;/P&gt;&lt;P&gt;        conv = CL_ABAP_CONV_IN_CE=&amp;gt;CREATE( input = Xcontent ).&lt;/P&gt;&lt;P&gt;        conv-&amp;gt;READ( importing data = content ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 08:20:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597688#M268391</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-09-16T08:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: string to xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597689#M268392</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;You can refer to below class-method set to convert instead of using unreleased FMs.&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;    " Convert XString to String
*&amp;amp;---------------------------------------------------------------------*
DATA: lv_string TYPE string,
      lv_xstring TYPE xstring.

DATA: lo_conv_in TYPE REF TO CL_ABAP_CONV_IN_CE.

lo_conv_in = CL_ABAP_CONV_IN_CE=&amp;gt;CREATE( input = lv_xstring ).
lo_conv_in-&amp;gt;READ( IMPORTING data = lv_string ).&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;    " Convert String to XString
*&amp;amp;---------------------------------------------------------------------*
DATA: lo_conv TYPE REF TO cl_abap_conv_out_ce.

lo_conv = cl_abap_conv_out_ce=&amp;gt;create( encoding = '4110' ).
lo_conv-&amp;gt;convert( EXPORTING data   = lv_string
                  IMPORTING buffer = lv_xstring ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;    " Convert XString to Binary
*&amp;amp;---------------------------------------------------------------------*
 data: lt_binary_tab     TYPE solix_tab. " table of solix

      CLEAR: lt_binary_tab.
      lt_binary_tab = cl_document_bcs=&amp;gt;xstring_to_solix(
                      ip_xstring = lv_xstring ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Nov 2023 07:25:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring/m-p/1597689#M268392</guid>
      <dc:creator>robinthakral</dc:creator>
      <dc:date>2023-11-21T07:25:21Z</dc:date>
    </item>
  </channel>
</rss>

