<?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: ASSIGN_TYPE_CONFLICT runtime error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836912#M1683849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Declare field symbol as &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS :&lt;/P&gt;&lt;P&gt;&amp;lt;fs_selval&amp;gt; TYPE &lt;STRONG&gt;any&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Brackets denote the &lt;STRONG&gt;value of the variable&lt;/STRONG&gt;. Without brackets it directly assigns the variable to field symbol. Try doing both and check the difference in debugger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jun 2012 09:06:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-06-28T09:06:52Z</dc:date>
    <item>
      <title>ASSIGN_TYPE_CONFLICT runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836911#M1683848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS :&lt;/P&gt;&lt;P&gt;&amp;lt;fs_selval&amp;gt; TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_selfld(40) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_selfld = 'KOMG-VGPOS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN (l_selfld) TO &amp;lt;fs_selval&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On running, I got the above mentioned dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) VGPOS is of type NUMC, which caused the error. How can this compatibility issue be resolved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Why is ASSIGN (l_selfld) used instead of ASSIGN l_selfld&amp;nbsp;&amp;nbsp; {without the brackets}...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 08:36:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836911#M1683848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-28T08:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: ASSIGN_TYPE_CONFLICT runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836912#M1683849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Declare field symbol as &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS :&lt;/P&gt;&lt;P&gt;&amp;lt;fs_selval&amp;gt; TYPE &lt;STRONG&gt;any&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Brackets denote the &lt;STRONG&gt;value of the variable&lt;/STRONG&gt;. Without brackets it directly assigns the variable to field symbol. Try doing both and check the difference in debugger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 09:06:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836912#M1683849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-28T09:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: ASSIGN_TYPE_CONFLICT runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836913#M1683850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chinmay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is it that TYPE ANY is not recommended way of declaring?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also can we declare field symbol without giving any type?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 09:32:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836913#M1683850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-28T09:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: ASSIGN_TYPE_CONFLICT runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836914#M1683851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Type Any&lt;/STRONG&gt; is generic type which determine at runtime. In this case T&lt;STRONG&gt;ype Any &lt;/STRONG&gt;has little bit slow performance wise comparatively with typed statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in case of dynamic programing we don't know the type at the time of declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Ravi Lanjewar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 10:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836914#M1683851</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2012-06-28T10:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: ASSIGN_TYPE_CONFLICT runtime error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836915#M1683852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't agree with Chinmay's suggestion to use TYPE ANY - it's half correct!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case you know the type of the data object whose memory address you want to assign &amp;amp; so TYPE ANY is not required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the &lt;A href="http://help.sap.com/abapdocu_731/en/abapassign_casting.htm"&gt;CASTING&lt;/A&gt; addition of the ASSIGN statement to make your code work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;gv_numc &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;vgpos &lt;SPAN class="L0S52"&gt;VALUE &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;FIELD&lt;/SPAN&gt;&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;SYMBOLS&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;&amp;lt;gv_char&amp;gt; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;c&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;* Cast the numeric type to a character field&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;ASSIGN &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'GV_NUMC'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;gv_char&amp;gt; CASTING&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;&amp;lt;gv_char&amp;gt; &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ASSIGNED&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'Numeric Value:'&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;20 &lt;/SPAN&gt;gv_numc&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / &lt;SPAN class="L0S33"&gt;'Character Value:' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;20 &lt;/SPAN&gt;&amp;lt;gv_char&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an Unicode(UC) environment data objects of TYPE c, n, d, t are referred to as character-like data types. Each character in the data object is represented by 2 bytes (in UC systems the system code page is UTF-16 ) - hence you will not face any conversion issues when assigning the memory address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try CASTING non character-type data objects (TYPE p, i, f) to a character-type field symbol. &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/825/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Suhas Saha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 12:11:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/assign-type-conflict-runtime-error/m-p/8836915#M1683852</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-06-28T12:11:43Z</dc:date>
    </item>
  </channel>
</rss>

