<?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: Return a standard Table from a method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915582#M58037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sergei,&lt;/P&gt;&lt;P&gt;I would agree with you that it is a good practice to have a data dictionary, however in this case the type is already defined in the dictionary, and you are making an extra type that has the same meaning and serving value only to appease the compiler.&lt;/P&gt;&lt;P&gt;That&amp;#146;s why i view it as a pollution you haven't create a new type, just expressed an existing one slightly differently.  Keep in mind you can return T100 just fine in a function module using the "tables" area.  &lt;/P&gt;&lt;P&gt;Would it make sense to have to define a new string type in the data dictionary just because you wanted to use it as a returning parameter in a method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 May 2005 16:55:43 GMT</pubDate>
    <dc:creator>former_member10945</dc:creator>
    <dc:date>2005-05-16T16:55:43Z</dc:date>
    <item>
      <title>Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915578#M58033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone explain to me WHY i have to create a data dictionary type just so I can return an SAP defined table from a method call?&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;methods getT100Table
    returning
      value(t100List) type T100 .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to create a public method in a class that a bunch of other classes use.  I want that method in that class to return a table of type T100.  This is an SAP defined, delivered, standard table.  If you attempt to return a table of this type from a method call the complier complains that " "[parameterName]" is not an internal table - the "OCCURS n" specification is missing"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do I have to pollute my data dictionary with unnecessary types just to use ABAPOO?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know you can pass a generic table type and such, I know HOW to get around this I want to know why I should have to.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 15:56:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915578#M58033</guid>
      <dc:creator>former_member10945</dc:creator>
      <dc:date>2005-05-16T15:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915579#M58034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even though T100 is a table in SAP, it still represents both a structure and a table. So when you say type T100, you are only referring to it as a structure rather than a table. You have to tell the compiler both the structure(T100) and how you want to use it(as a table or a string of structure T100).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 16:13:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915579#M58034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-16T16:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915580#M58035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Just to add to a nice explanation of Srinivas, I could say that defining your types in dictionary is not a pollution, it is just a good development practice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 16:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915580#M58035</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-05-16T16:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915581#M58036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Srinivas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how can i force the compiler to look at the parameter t100List as a table instead of a structure?  Why isnt there a "type table of" in the drop down when you add a new parameter?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 16:40:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915581#M58036</guid>
      <dc:creator>former_member10945</dc:creator>
      <dc:date>2005-05-16T16:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915582#M58037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sergei,&lt;/P&gt;&lt;P&gt;I would agree with you that it is a good practice to have a data dictionary, however in this case the type is already defined in the dictionary, and you are making an extra type that has the same meaning and serving value only to appease the compiler.&lt;/P&gt;&lt;P&gt;That&amp;#146;s why i view it as a pollution you haven't create a new type, just expressed an existing one slightly differently.  Keep in mind you can return T100 just fine in a function module using the "tables" area.  &lt;/P&gt;&lt;P&gt;Would it make sense to have to define a new string type in the data dictionary just because you wanted to use it as a returning parameter in a method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 16:55:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915582#M58037</guid>
      <dc:creator>former_member10945</dc:creator>
      <dc:date>2005-05-16T16:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915583#M58038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is an ambiguity in ABAP concerning tables. Inspite of that the transparent table is a real table consisting of rows, ABAP compiler treats it as a structured type (just like a structure). And to tell the compiler that in FM interface you want it to be treat as an internal table you must explicitly place it in the ugly TABLES section. It's ugly because you cannot say if one of the TABLES parameter is importing or exporting or changing. You can only understand which is which by browsing FM source code. By the way it could be a potential reason for bugs difficult to catch. With introducing table types the situation became more symmetric (if this is the word). Even in FM you can define table parameters in IMPORTING, EXPORTING or CHANGING. And in OO you have more accurate sintax control. Alas, it costs additional entry in the dictionary (not very much, I gues &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 17:30:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915583#M58038</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-05-16T17:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915584#M58039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess my displeasure with the situation stems from the fact that the new, welcome, syntax control has not been fully rolled into existing tables in the system --- so for now I&amp;#146;m stuck copying from one type of structure to another, which seems very silly to me.  Maybe there should be a tool to convert existing items directly on the system.  If you could simply replace the current object with one defined as a Table Type with a Row Structure this problem would not exist.  Your FMs would still work correctly and so would anything new you write in OO.&lt;/P&gt;&lt;P&gt;Thanks guess I&amp;#146;m stuck doing unnecessary labor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 17:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915584#M58039</guid>
      <dc:creator>former_member10945</dc:creator>
      <dc:date>2005-05-16T17:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915585#M58040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wait, wait! Why do you copy structures? Could you provide some more details?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 17:43:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915585#M58040</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-05-16T17:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915586#M58041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really a copy, guess i should have picked my words more carefully:&lt;/P&gt;&lt;P&gt;1) Create a NEW Data Type (ZT100) of type: Table Type.  &lt;/P&gt;&lt;P&gt;2) Set ZT100's Line Type to T100.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it is not really a "copy" but im still creating the exact same structure to hold data as I had before, just with a differnent name and express slightly differently in the system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 17:49:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915586#M58041</guid>
      <dc:creator>former_member10945</dc:creator>
      <dc:date>2005-05-16T17:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Return a standard Table from a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915587#M58042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, I see.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2005 17:51:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-a-standard-table-from-a-method/m-p/915587#M58042</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-05-16T17:51:33Z</dc:date>
    </item>
  </channel>
</rss>

