<?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: Type inferrence with 7.40 inline data declaration buggy? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681283#M1945689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandra, thanks for the info!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyhow, I think the description text should be adapted slightly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If operands are specified as generically typed field symbols or formal parameters and an inline declaration DATA(var) is used as the target field of an assignment, &lt;SPAN style="text-decoration: line-through;"&gt;the generic types&lt;/SPAN&gt; &lt;STRONG&gt;those operands&lt;/STRONG&gt; contribute to the statically detectable calculation type (used to determine the data type of the declaration) as follows [...]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yeah, what a mess... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 May 2016 08:58:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-05-17T08:58:26Z</dc:date>
    <item>
      <title>Type inferrence with 7.40 inline data declaration buggy?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681279#M1945685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are developing on a SAP basis 7.40 SP 8 and experience some trouble with inline data declarations:&lt;/P&gt;&lt;P&gt;* we defined a data element with tpye P(9) DEC 2&lt;/P&gt;&lt;P&gt;* when using two variables with that data element as type the derived type is not a P(9) DEC 2, but only a P(8)&lt;/P&gt;&lt;P&gt;* in the debugger the tooltips show the types:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/951612" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here both iv_base_amount and iv_offset_amount are of type P(9) DEC 2, but the derived type is P(8)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/951611" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would consider this as a bug, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know whether a note is already available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and kind regards,&lt;/P&gt;&lt;P&gt;Valentin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 11:34:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681279#M1945685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-13T11:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Type inferrence with 7.40 inline data declaration buggy?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681280#M1945686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it's not a bug &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; but a consequence of historical way of calculating: there is the concept of "calculation type", that you may find in the &lt;A href="http://help.sap.com/abapdocu_74/en/?file=abenarith_type.htm"&gt;abap documentation&lt;/A&gt;. Quote:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;If operands are specified as generically typed field symbols or formal parameters and an inline declaration DATA(var) is used as the target field of an assignment, the generic types contribute to the statically detectable calculation type (used to determine the data type of the declaration) as follows&lt;/P&gt;
&lt;P&gt;- any, data, simple, numeric, and decfloat like decfloat34&lt;/P&gt;
&lt;P&gt;- csequence, clike, c, n, and p like p. If no type with a higher priority is involved, the type &lt;STRONG&gt;p with length 8 (no decimal places)&lt;/STRONG&gt; is used for the declaration.&lt;/P&gt;
&lt;P&gt;- xsequence and x like i&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I guess "no type with a higher priority is involved" means no type that would be interpreted in the previous line "like decfloat34", but it's subject to interpretation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 08:23:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681280#M1945686</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-05-14T08:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Type inferrence with 7.40 inline data declaration buggy?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681281#M1945687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sandra Rossi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your answer is correct. Unfortunately this behaviour cannot be changed anymore :-). In Open SQL we where more clever. If you write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT @iv_base_amount - @iv_offset_amount FROM t000 WHERE mandt = @sy-mandt INTO @DATA(foo)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will hopefully don't get a P(8) but a P(12,2) or so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Kilian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 17:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681281#M1945687</guid>
      <dc:creator>kilian_kilger</dc:creator>
      <dc:date>2016-05-16T17:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Type inferrence with 7.40 inline data declaration buggy?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681282#M1945688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good. But what a mess globally speaking, too many particular cases in ABAP &lt;SPAN __jive_emoticon_name="laugh" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/laugh.gif"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2016 18:36:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681282#M1945688</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-05-16T18:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Type inferrence with 7.40 inline data declaration buggy?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681283#M1945689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandra, thanks for the info!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyhow, I think the description text should be adapted slightly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If operands are specified as generically typed field symbols or formal parameters and an inline declaration DATA(var) is used as the target field of an assignment, &lt;SPAN style="text-decoration: line-through;"&gt;the generic types&lt;/SPAN&gt; &lt;STRONG&gt;those operands&lt;/STRONG&gt; contribute to the statically detectable calculation type (used to determine the data type of the declaration) as follows [...]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yeah, what a mess... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 08:58:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-inferrence-with-7-40-inline-data-declaration-buggy/m-p/11681283#M1945689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-05-17T08:58:26Z</dc:date>
    </item>
  </channel>
</rss>

