<?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: Generic CLASS parameters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-class-parameters/m-p/3200772#M762839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, you can't create a generic class attribute.  But you &amp;lt;b&amp;gt;can&amp;lt;/b&amp;gt; create a data reference to a generic object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of creating an attribute "mytab", create an attribute that is a reference to data,e.g. &amp;lt;b&amp;gt;ref_mytab&amp;lt;/b&amp;gt;, of type REF TO DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your method, where you've received the table through the parameters (e.g. it_mytab TYPE STANDARD TABLE ), do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GET REFERENCE OF it_mytab INTO ref_mytab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever you need to do something with the table, do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;mytab&amp;gt; TYPE STANDARD TABLE.
ASSIGN ref_mytab-&amp;gt;* TO &amp;lt;mytab&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Dec 2007 11:27:24 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2007-12-12T11:27:24Z</dc:date>
    <item>
      <title>Generic CLASS parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-class-parameters/m-p/3200769#M762836</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 have a function module with a  TABLE  parameter with generic type TABLE.&lt;/P&gt;&lt;P&gt;I have to pass these table parameter to a method in the class, then what should be the type of the corresponding parameter inside my class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anoop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 08:58:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-class-parameters/m-p/3200769#M762836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-12T08:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Generic CLASS parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-class-parameters/m-p/3200770#M762837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;STANDARD TABLE&amp;lt;/b&amp;gt; should work from a function module table param.  Otherwise &amp;lt;b&amp;gt;ANY TABLE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your function module table parameter is "&amp;lt;b&amp;gt;mytab&amp;lt;/b&amp;gt;", you may have to call the method using &amp;lt;b&amp;gt;mytab[].&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 09:11:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-class-parameters/m-p/3200770#M762837</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2007-12-12T09:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Generic CLASS parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-class-parameters/m-p/3200771#M762838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As if now i had passed mytab from fn mod to the method.&lt;/P&gt;&lt;P&gt;Now i have to assign it to a class attribute&lt;/P&gt;&lt;P&gt;Could u please guide me to create a class attribute with generic  type to assign this value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[I have tried to create a  class attribute with type STANDARD TABLE but it shows error msg like Generic type not possible for class attribute...]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 09:43:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-class-parameters/m-p/3200771#M762838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-12T09:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Generic CLASS parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-class-parameters/m-p/3200772#M762839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, you can't create a generic class attribute.  But you &amp;lt;b&amp;gt;can&amp;lt;/b&amp;gt; create a data reference to a generic object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of creating an attribute "mytab", create an attribute that is a reference to data,e.g. &amp;lt;b&amp;gt;ref_mytab&amp;lt;/b&amp;gt;, of type REF TO DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your method, where you've received the table through the parameters (e.g. it_mytab TYPE STANDARD TABLE ), do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GET REFERENCE OF it_mytab INTO ref_mytab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever you need to do something with the table, do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;mytab&amp;gt; TYPE STANDARD TABLE.
ASSIGN ref_mytab-&amp;gt;* TO &amp;lt;mytab&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 11:27:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-class-parameters/m-p/3200772#M762839</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2007-12-12T11:27:24Z</dc:date>
    </item>
  </channel>
</rss>

