<?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: Question on using table types in methods in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-using-table-types-in-methods/m-p/6826326#M1470806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should define a TABLE TYPE based upon the data dictionary type (at1) either in the data dictionary using SE11 or in the TYPES section of the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then define the parameter of this new type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Mar 2010 03:22:28 GMT</pubDate>
    <dc:creator>GrahamRobbo</dc:creator>
    <dc:date>2010-03-25T03:22:28Z</dc:date>
    <item>
      <title>Question on using table types in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-using-table-types-in-methods/m-p/6826325#M1470805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;   I have a simple question involving passing table types in method &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to pass an internal table by reference - to a method and within the method populate the internal table (t1) using a select * into the internal table and then sort t1 by f1 and f2. t1 is an internal table based on a ABAP dictionary table ( at1 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question is : If I use a generic type TABLE declaration , it does not allow sort operation specifically by fields. If I use type at1 as in &lt;/P&gt;&lt;P&gt;the METHODS M1 exporting t1 type at1statement, syntax error is - t1 is not an internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I achieve the above using the method implementation ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample code that I try&lt;/P&gt;&lt;P&gt;***************************************************************************************************&lt;/P&gt;&lt;P&gt;CLASS C1 DEFINITION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PUBLIC SECTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHODS M1 exporting t1 type table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS C1 IMPLEMENTATION&lt;/P&gt;&lt;P&gt;METHOD M1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from at1 into t1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort t1 field f1 f2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&g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L&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 02:55:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-using-table-types-in-methods/m-p/6826325#M1470805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-25T02:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Question on using table types in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-using-table-types-in-methods/m-p/6826326#M1470806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should define a TABLE TYPE based upon the data dictionary type (at1) either in the data dictionary using SE11 or in the TYPES section of the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then define the parameter of this new type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 03:22:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-using-table-types-in-methods/m-p/6826326#M1470806</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2010-03-25T03:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Question on using table types in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-using-table-types-in-methods/m-p/6826327#M1470807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the prompt reply. Full points awarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 03:29:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-using-table-types-in-methods/m-p/6826327#M1470807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-25T03:29:35Z</dc:date>
    </item>
  </channel>
</rss>

