<?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 Generic Table type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-table-type/m-p/1782051#M337024</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'm developing some classes that implement an interface. This classes will have a method that differ on the return datatype, even though it always be a table type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i'm calling the class methods i'm using the interface .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data:    obj        type ref to YCM_INTERFACE.

create object obj type (CLASSNAME).

call method obj-&amp;gt;GETENTRIES(
Importing
  it_records = &amp;lt;it_records&amp;gt;
).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that if i define the exporting parameter on the interface method to ANY but when using it on the method implementation i always get an error.The excepiton occurs here:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELD-SYMBOLS: &amp;lt;it_records&amp;gt;   TYPE ycmx_qualcat.
assign it_records TO &amp;lt;it_records&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;it_records is type any (defined on the interface method definition).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception:&lt;/P&gt;&lt;P&gt;The following error text was processed in the system NSP : Type conflict with ASSIGN in program YCM_QUALIFICATIONSCATALOG=====CP . &lt;/P&gt;&lt;P&gt;The termination type was: RABAX_STATE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is what type should i use on the method definition to make this work.&lt;/P&gt;&lt;P&gt;Or if there's a better way to do this i'm all ears &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;Pedro Barbosa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Dec 2006 09:19:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-28T09:19:18Z</dc:date>
    <item>
      <title>Generic Table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-table-type/m-p/1782051#M337024</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'm developing some classes that implement an interface. This classes will have a method that differ on the return datatype, even though it always be a table type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i'm calling the class methods i'm using the interface .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data:    obj        type ref to YCM_INTERFACE.

create object obj type (CLASSNAME).

call method obj-&amp;gt;GETENTRIES(
Importing
  it_records = &amp;lt;it_records&amp;gt;
).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that if i define the exporting parameter on the interface method to ANY but when using it on the method implementation i always get an error.The excepiton occurs here:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELD-SYMBOLS: &amp;lt;it_records&amp;gt;   TYPE ycmx_qualcat.
assign it_records TO &amp;lt;it_records&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;it_records is type any (defined on the interface method definition).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception:&lt;/P&gt;&lt;P&gt;The following error text was processed in the system NSP : Type conflict with ASSIGN in program YCM_QUALIFICATIONSCATALOG=====CP . &lt;/P&gt;&lt;P&gt;The termination type was: RABAX_STATE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is what type should i use on the method definition to make this work.&lt;/P&gt;&lt;P&gt;Or if there's a better way to do this i'm all ears &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;Pedro Barbosa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 09:19:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-table-type/m-p/1782051#M337024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-28T09:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Generic Table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-table-type/m-p/1782052#M337025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've solved the problem. Having any in the parameter datatype was not the problem, the problem was using it as a table. That was the reason i was trying to use the assing statements.&lt;/P&gt;&lt;P&gt;Anyways the solution was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Data: it_qualcat type table of ycm_qualcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from ycm_qualcat into table it_qualcat.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    it_records = it_qualcat[].&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pedro Barbosa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 11:25:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-table-type/m-p/1782052#M337025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-28T11:25:12Z</dc:date>
    </item>
  </channel>
</rss>

