<?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: Internal table as a class attribute in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849539#M45939</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As mentioned earlier, you can TYPE the parameter as a generic table type, for example TYPE STANDARD TABLE, TYPE INDEX TABLE, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your next problem is how to use the table.  You can create a work area with a DATA statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  wa_table LIKE LINE OF parameter_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT parameter_table INTO wa_table.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since your code does not know the field names, you must&lt;/P&gt;&lt;P&gt;access the fields by assigning to a field symbol using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSIGN COMPONENT index OF ... TO ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2005 15:39:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-03-09T15:39:48Z</dc:date>
    <item>
      <title>Internal table as a class attribute</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849536#M45936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think many of you hhave passed through the same problem. I have a requirement to pass internal table to class as for example class constructor parameter. It is desirable that class should get the table of variable structure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How coult that be realized?&lt;/P&gt;&lt;P&gt;Thank you in advance for your kind help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;  Best regards, &lt;/P&gt;&lt;P&gt;  Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2005 12:21:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849536#M45936</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-09T12:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table as a class attribute</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849537#M45937</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;The parameter can be typed TYPE TABLE. Let us know if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2005 12:31:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849537#M45937</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-09T12:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table as a class attribute</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849538#M45938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a quick sample........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0003 .


*---------------------------------------------------------------------*
*       CLASS lcl_app DEFINITION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_app definition.

  public section.

    methods: constructor importing table type table.


endclass.



*---------------------------------------------------------------------*
*       CLASS lcl_app IMPLEMENTATION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_app implementation.

  method constructor.

    check sy-subrc = 0.

  endmethod.

endclass.


data: app type ref to lcl_app.
data: imara type table of mara.

start-of-selection.


  create object app
          exporting
                table = imara.

  check sy-subrc = 0.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2005 13:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849538#M45938</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-03-09T13:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table as a class attribute</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849539#M45939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As mentioned earlier, you can TYPE the parameter as a generic table type, for example TYPE STANDARD TABLE, TYPE INDEX TABLE, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your next problem is how to use the table.  You can create a work area with a DATA statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  wa_table LIKE LINE OF parameter_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT parameter_table INTO wa_table.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since your code does not know the field names, you must&lt;/P&gt;&lt;P&gt;access the fields by assigning to a field symbol using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSIGN COMPONENT index OF ... TO ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2005 15:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849539#M45939</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-09T15:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table as a class attribute</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849540#M45940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all dear colleagues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've found a way to move due to your kind help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- &lt;/P&gt;&lt;P&gt;  With kind regards,&lt;/P&gt;&lt;P&gt;  Andrey.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2005 16:10:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-as-a-class-attribute/m-p/849540#M45940</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-09T16:10:22Z</dc:date>
    </item>
  </channel>
</rss>

