<?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 Incomplete type inference in quick fix? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/incomplete-type-inference-in-quick-fix/m-p/10754958#M1876111</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;I'm implementing the examples from the &lt;A _jive_internal="true" href="https://answers.sap.com/docs/DOC-40668"&gt;REST How-To&lt;/A&gt; and have come across the following behaviour: I've created the basic classes and want to add the method REGISTER_RESOURCES as described in section 2.3.2. Now I have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;nbsp; METHOD register_resources.

&amp;nbsp;&amp;nbsp;&amp;nbsp; registry-&amp;gt;register_discoverable_resource(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = '/restflights/01/carriers'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler_class&amp;nbsp;&amp;nbsp; = 'CL_SFLIGHT_ADT_RES_CARRIERS'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'Carriers'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category_scheme = 'http://www.mycompany,com/adt/categories/examples/flights'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category_term&amp;nbsp;&amp;nbsp; = 'carriers' ).

&amp;nbsp;&amp;nbsp;&amp;nbsp; collection = registry-&amp;gt;register_discoverable_resource(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = '/restflights/01/flights'
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; accepted_types&amp;nbsp; =
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler_class&amp;nbsp;&amp;nbsp; =
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'Flights'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category_scheme = 'http://www.mycompany,com/adt/categories/examples/flights'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category_term&amp;nbsp;&amp;nbsp; = 'flights'
&amp;nbsp;&amp;nbsp;&amp;nbsp; ).

&amp;nbsp; ENDMETHOD.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naturally, the editor will complain about collection not being defined. If I use the quick fix to declare a local variable, I get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: collection TYPE any.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which is not quite what I expected - I think this should be a TYPE REF TO IF_ADT_DISCOVERY_COLLECTION since this is what the method returns. The backend is SAP_BASIS/ABA 7.31 SP 13. Is this a known issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp; Volker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Dec 2014 20:44:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-12-01T20:44:34Z</dc:date>
    <item>
      <title>Incomplete type inference in quick fix?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incomplete-type-inference-in-quick-fix/m-p/10754958#M1876111</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;I'm implementing the examples from the &lt;A _jive_internal="true" href="https://answers.sap.com/docs/DOC-40668"&gt;REST How-To&lt;/A&gt; and have come across the following behaviour: I've created the basic classes and want to add the method REGISTER_RESOURCES as described in section 2.3.2. Now I have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;nbsp; METHOD register_resources.

&amp;nbsp;&amp;nbsp;&amp;nbsp; registry-&amp;gt;register_discoverable_resource(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = '/restflights/01/carriers'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler_class&amp;nbsp;&amp;nbsp; = 'CL_SFLIGHT_ADT_RES_CARRIERS'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'Carriers'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category_scheme = 'http://www.mycompany,com/adt/categories/examples/flights'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category_term&amp;nbsp;&amp;nbsp; = 'carriers' ).

&amp;nbsp;&amp;nbsp;&amp;nbsp; collection = registry-&amp;gt;register_discoverable_resource(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = '/restflights/01/flights'
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; accepted_types&amp;nbsp; =
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler_class&amp;nbsp;&amp;nbsp; =
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'Flights'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category_scheme = 'http://www.mycompany,com/adt/categories/examples/flights'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category_term&amp;nbsp;&amp;nbsp; = 'flights'
&amp;nbsp;&amp;nbsp;&amp;nbsp; ).

&amp;nbsp; ENDMETHOD.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naturally, the editor will complain about collection not being defined. If I use the quick fix to declare a local variable, I get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: collection TYPE any.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which is not quite what I expected - I think this should be a TYPE REF TO IF_ADT_DISCOVERY_COLLECTION since this is what the method returns. The backend is SAP_BASIS/ABA 7.31 SP 13. Is this a known issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp; Volker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 20:44:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incomplete-type-inference-in-quick-fix/m-p/10754958#M1876111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-12-01T20:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete type inference in quick fix?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incomplete-type-inference-in-quick-fix/m-p/10754959#M1876112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Volker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, this behavior is known - especially in SAP_BASIS 7.31. In this release we can't infer the type to that extent as we currently do it in SAP_BASIS 7.4. In the higher releases we are much better - nevertheless there are still some cases when we need to propose TYPE ANY instead of the complete (correct) type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We plan to improve this in the future, but unfortunately I can't give you any date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your understanding and best regards, Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 14:49:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incomplete-type-inference-in-quick-fix/m-p/10754959#M1876112</guid>
      <dc:creator>sebastian_wolf</dc:creator>
      <dc:date>2014-12-02T14:49:38Z</dc:date>
    </item>
  </channel>
</rss>

