<?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 Problem with data type Xstring in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883853#M1790302</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 facing an issue when assigning string to X-String.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA &lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt; &lt;SPAN class="L0S52"&gt;lv_string &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;string&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_xstring&amp;nbsp;&amp;nbsp; type xstring.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;lv_string = '128'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;lv_xstring = lv_string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;Lv_xstring value is getting changed to '1280' , Additionally zero is getting added , I have tried with many solutions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;How to avoid adding additional zero to lv_xstring fired.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;But still facing the same issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Nov 2013 15:51:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-11-16T15:51:43Z</dc:date>
    <item>
      <title>Problem with data type Xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883853#M1790302</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 facing an issue when assigning string to X-String.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA &lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt; &lt;SPAN class="L0S52"&gt;lv_string &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;string&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_xstring&amp;nbsp;&amp;nbsp; type xstring.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;lv_string = '128'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;lv_xstring = lv_string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;Lv_xstring value is getting changed to '1280' , Additionally zero is getting added , I have tried with many solutions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;How to avoid adding additional zero to lv_xstring fired.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;But still facing the same issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2013 15:51:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883853#M1790302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-16T15:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type Xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883854#M1790303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi-&lt;/P&gt;&lt;P&gt;What's your exact requirement? &lt;SPAN style="font-size: 10pt;"&gt;Why are you directly converting a variable from string to xstring, please use standard FM's like : 'SCMS_STRING_TO_XSTRING' or 'HR_KR_STRING_TO_XSTRING'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Also have you observed below things like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;*If your string starts with with a character value after this step lv_xstring = lv_string, lv_xstring will hold nothing means space.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;*Also say lv_string = 128 after moving to lv_xstring it will hold 1280 as you said.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;*Also say lv_string = 128xyzzzz after moving to lv_xstring even this will hold 1280.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;-Venkat&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2013 16:33:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883854#M1790303</guid>
      <dc:creator>venkat_aileni</dc:creator>
      <dc:date>2013-11-16T16:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type Xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883855#M1790304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to convert the input value to Binary , Here the Input is Hexa value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the below code , when I assign value to lv_xstring&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_text is string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; lv_text &lt;SPAN class="L0S55"&gt;= &lt;SPAN class="L0S33"&gt;'128'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;. " This input is dynamic , User can give in selection screen.&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CLEAR &lt;/SPAN&gt;lv_text&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="L0S31"&gt;** calculate length&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; lv_length &lt;SPAN class="L0S55"&gt;=&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;XSTRLEN&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;lv_xstring &lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;* &lt;SPAN class="L0S32"&gt;8&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WHILE &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;index &lt;/SPAN&gt;&amp;lt;= lv_length&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;GET &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;BIT &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;index &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;lv_xstring &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;lv_value&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;MOVE &lt;/SPAN&gt;lv_value &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;lv_input&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CONCATENATE &lt;/SPAN&gt;lv_text lv_input &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;lv_text&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDWHILE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="L0S31"&gt;** delete leading zeros&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SHIFT &lt;/SPAN&gt;lv_text &lt;SPAN class="L0S52"&gt;LEFT &lt;/SPAN&gt;DELETING &lt;SPAN class="L0S52"&gt;LEADING &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'0'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2013 16:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883855#M1790304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-16T16:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type Xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883856#M1790305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nagesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if this helps - &lt;/P&gt;&lt;P&gt;&lt;A href="http://saptib.blogspot.in/2008/07/translate-hexadecimal-to-binary-to.html"&gt;http://saptib.blogspot.in/2008/07/translate-hexadecimal-to-binary-to.html&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2013 18:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883856#M1790305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-16T18:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type Xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883857#M1790306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;128 is hex ? are u sure ? coz i dont think hex has consists of a 3 digit number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2013 19:20:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883857#M1790306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-16T19:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type Xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883858#M1790307</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 solved my self....Thnx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Nov 2013 06:22:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883858#M1790307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-17T06:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data type Xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883859#M1790308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paste your solution. It will be helpful for others.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Nov 2013 07:27:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-data-type-xstring/m-p/9883859#M1790308</guid>
      <dc:creator>former_member207873</dc:creator>
      <dc:date>2013-11-17T07:27:10Z</dc:date>
    </item>
  </channel>
</rss>

