<?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: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909357#M1963068</link>
    <description>&lt;P&gt;SAP answered they are about to correct the bug, and they'll issue a new SAP note... to be continued...&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2019 07:50:24 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2019-05-14T07:50:24Z</dc:date>
    <item>
      <title>constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909345#M1963056</link>
      <description>&lt;P&gt;Maybe another ABAP kernel bug, not corrected yet?&lt;/P&gt;
  &lt;P&gt;With the code below, the DATA(name) = ... does a SHORT DUMP with GETWA_NOT_ASSIGNED. In some other situations, it may not fail but return a value which is at a different offset an with a different length !!&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA(text) = 'hello'.
FIND ALL OCCURRENCES OF 'l' IN text RESULTS DATA(matches).
LOOP AT matches ASSIGNING FIELD-SYMBOL(&amp;lt;match&amp;gt;).
  DATA(name) = to_upper( CONV string( text+&amp;lt;match&amp;gt;-offset(&amp;lt;match&amp;gt;-length) ) ). " short dump
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;It's due to the constructor expression combined with the &lt;A href="https://help.sap.com/doc/abapdocu_753_index_htm/7.53/en-US/index.htm?file=abenoffset_length.htm"&gt;subfield access&lt;/A&gt;. If I remove one of them, then it's okay.&lt;/P&gt;
  &lt;P&gt;It seems that subfield access/constructor expression is really a problem, because I also had another issue with COND (not CONV) inside a table comprehension. Moving it to a LET aux = str+off(len) had solved the issue, but I didn't see a note about that topic (only &lt;A href="https://launchpad.support.sap.com/#/notes/1972833"&gt;1972833&lt;/A&gt; was close but was for an old kernel 741).&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Do you have the same issue, what is your ABAP version/kernel, do you know what SAP note/kernel solves?&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;My ABAP versions:&lt;/P&gt;
  &lt;UL&gt;
   &lt;LI&gt;ABAP 7.52 (7.5C) SP0 kernel 753 SP300.&lt;/LI&gt;
   &lt;LI&gt;ABAP 7.52 SP1 kernel 753 SP16.&lt;/LI&gt;
  &lt;/UL&gt;
  &lt;P&gt;Thank you very much.&lt;/P&gt;
  &lt;P&gt;Sandra&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 14:45:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909345#M1963056</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-05-07T14:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909346#M1963057</link>
      <description>&lt;P&gt;Hello Sandra, hope you're well&lt;/P&gt;&lt;P&gt;The error happened because the interpretor cannot convert a static &lt;EM&gt;char &lt;/EM&gt;into &lt;EM&gt;string &lt;/EM&gt;(as you have done before). The field-symbol statement has the capablity to change a variable content dinamically (without using MODIFY statement, or any other...), so it's not possible to convert a char(5) to string(255) because a string value is to long for the table content.&lt;/P&gt;&lt;P&gt;I did a few changea on your code. Please test it again&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(text) = CONV string( 'hello' ).
FIND ALL OCCURRENCES OF 'l' IN text RESULTS DATA(matches) .
LOOP AT matches ASSIGNING FIELD-SYMBOL(&amp;lt;match&amp;gt;) .
*  DATA(name) = to_upper( CONV string( text+&amp;lt;match&amp;gt;-offset(&amp;lt;match&amp;gt;-length) ) ) . " short dump
  DATA(name) = to_upper( text+&amp;lt;match&amp;gt;-offset(&amp;lt;match&amp;gt;-length) ) . " no dump :)
ENDLOOP .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;KR,&lt;BR /&gt;Arthur Silva&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 15:39:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909346#M1963057</guid>
      <dc:creator>arthursilva</dc:creator>
      <dc:date>2019-05-07T15:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909347#M1963058</link>
      <description>&lt;P&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;: the question is not about how to make the assignment work, the question is about what SAP note/kernel solves. And eventually could you run the code, say if it works and what is your ABAP version.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 15:52:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909347#M1963058</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-05-07T15:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909348#M1963059</link>
      <description>&lt;P&gt;The ABAP runtime can "convert char into string". String is not 255 characters.&lt;/P&gt;&lt;P&gt;You may check this code, it works well:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data(v1) = 'Hello'.
data(v2) = to_upper( conv string( v1+2(1) ) ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I expect more an answer about a patch for correcting the bug.&lt;/P&gt;&lt;P&gt;(or maybe I should contact the SAP support)&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 15:57:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909348#M1963059</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-05-07T15:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909349#M1963060</link>
      <description>&lt;P&gt;Sandra,&lt;/P&gt;&lt;P&gt;Did you try the code that I've sent ?&lt;/P&gt;&lt;P&gt;No field sympol, no error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data(v1) = 'Hello'.
data(v2) = to_upper( conv string( v1+2(1) ) ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;With field-symbol: error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(name) = to_upper( CONV string( text+&amp;lt;match&amp;gt;-offset(&amp;lt;match&amp;gt;-length) ) ) .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Don't confuse the use of field-symbol with inline-declaration.&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 16:16:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909349#M1963060</guid>
      <dc:creator>arthursilva</dc:creator>
      <dc:date>2019-05-07T16:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909350#M1963061</link>
      <description>&lt;P&gt;What happens if you use substring instead?&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 17:04:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909350#M1963061</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2019-05-07T17:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909351#M1963062</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/2688/matthewbillingham.html"&gt;Matthew Billingham&lt;/A&gt; I can't test now, but probably that would work. But that's not my question &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 18:26:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909351#M1963062</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-05-07T18:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909352#M1963063</link>
      <description>&lt;P&gt;For what it is worth, it dumps here on SAP_ABA 750 SP9 as well.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 06:33:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909352#M1963063</guid>
      <dc:creator>former_member259807</dc:creator>
      <dc:date>2019-05-08T06:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909353#M1963064</link>
      <description>&lt;P&gt;its ok if i do like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(text) = 'hello'.
DATA part.
FIND ALL OCCURRENCES OF 'l' IN text RESULTS DATA(matches).
LOOP AT matches ASSIGNING FIELD-SYMBOL(&amp;lt;match&amp;gt;).
  part = text+&amp;lt;match&amp;gt;-offset(&amp;lt;match&amp;gt;-length).
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but its syntax error if i do like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(text) = 'hello'.&lt;BR /&gt;FIND ALL OCCURRENCES OF 'l' IN text RESULTS DATA(matches).&lt;BR /&gt;LOOP AT matches ASSIGNING FIELD-SYMBOL(&amp;lt;match&amp;gt;).&lt;BR /&gt;  DATA(part) = text+&amp;lt;match&amp;gt;-offset(&amp;lt;match&amp;gt;-length).&lt;BR /&gt;ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if i separate the inline like this, there is no dump:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIND ALL OCCURRENCES OF 'l' IN text RESULTS DATA(matches).&lt;BR /&gt;LOOP AT matches ASSIGNING FIELD-SYMBOL(&amp;lt;match&amp;gt;).
  DATA(conv) = CONV string( text+&amp;lt;match&amp;gt;-offset(&amp;lt;match&amp;gt;-length) ).&lt;BR /&gt;  DATA(name) = to_upper( conv ).
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;mightbe its about generic type in inline declaration...&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 06:46:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909353#M1963064</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-05-08T06:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909354#M1963065</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; Oh yes, I know. But if you're going to use old-fashioned constructs... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 09:04:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909354#M1963065</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2019-05-08T09:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909355#M1963066</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt; let's discuss about substring/text+off(len) in this &lt;A href="https://answers.sap.com/questions/12683497/better-use-substring-or-subfield-access.html"&gt;new question&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 09:44:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909355#M1963066</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-05-08T09:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909356#M1963067</link>
      <description>&lt;P&gt;For the record, I have posted an incident at SAP support. I will keep you informed.&lt;/P&gt;&lt;P&gt; (link for my own use: &lt;A href="https://launchpad.support.sap.com/#/incident/pointer/002075129500002584942019"&gt;258494 / 2019 constructor + subfield access -&amp;gt; short dump GETWA_NOT_ASSIGNED&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE 20190603: it's corrected by the SAP note &lt;A href="https://launchpad.support.sap.com/#/notes/2791097"&gt;2791097 - ABAP Expressions with Offset/Length Access Yield Wrong Result&lt;/A&gt; &lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 09:47:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909356#M1963067</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-05-08T09:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: constructor + subfield access - GETWA_NOT_ASSIGNED. ABAP kernel bug?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909357#M1963068</link>
      <description>&lt;P&gt;SAP answered they are about to correct the bug, and they'll issue a new SAP note... to be continued...&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 07:50:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-subfield-access-getwa-not-assigned-abap-kernel-bug/m-p/11909357#M1963068</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-05-14T07:50:24Z</dc:date>
    </item>
  </channel>
</rss>

