<?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: Append an Internal Table in OO in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852019#M926010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have abandoned using header lines you know already how to do this. Basically itabs in classes are always based on &lt;STRONG&gt;table types&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: 
  lt_return     TYPE bapirettab,  " table type of BAPIRET2
  ls_return     TYPE bapiret2.
" OR: ls_return   LIKE LINE OF lt_return.
...
  LOOP AT lt_return INTO ls_return.
  ...
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same is true for static/instance attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 May 2008 04:49:58 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2008-05-23T04:49:58Z</dc:date>
    <item>
      <title>Append an Internal Table in OO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852018#M926009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to Use an internal Table in classes.How to use these internal tables in one or more classes declared locally &amp;amp; How to append it?I need an example in OO ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ravi S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 04:34:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852018#M926009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T04:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Append an Internal Table in OO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852019#M926010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have abandoned using header lines you know already how to do this. Basically itabs in classes are always based on &lt;STRONG&gt;table types&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: 
  lt_return     TYPE bapirettab,  " table type of BAPIRET2
  ls_return     TYPE bapiret2.
" OR: ls_return   LIKE LINE OF lt_return.
...
  LOOP AT lt_return INTO ls_return.
  ...
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same is true for static/instance attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 04:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852019#M926010</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-05-23T04:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Append an Internal Table in OO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852020#M926011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi UWe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for UR Reply.But how to pass these Internal Tables as parameters in Methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I'm trying to understand this Append statement in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD CREATE_TEAM.&lt;/P&gt;&lt;P&gt;    DO TEAM_MEMBERS TIMES.&lt;/P&gt;&lt;P&gt;      CREATE OBJECT BIKER EXPORTING TEAM_ID = ID&lt;/P&gt;&lt;P&gt;                                    MEMBERS = TEAM_MEMBERS.&lt;/P&gt;&lt;P&gt;      APPEND BIKER TO BIKER_TAB.&lt;/P&gt;&lt;P&gt;      CALL METHOD BIKER-&amp;gt;STATUS_LINE IMPORTING LINE = STATUS_LINE.&lt;/P&gt;&lt;P&gt;      APPEND STATUS_LINE TO STATUS_LIST.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the link [Sap Help for Using Methods|http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6554f411d194a60000e8353423/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u explain the above statement about Append.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ravi S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 05:00:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852020#M926011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T05:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Append an Internal Table in OO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852021#M926012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added the relevant coding from the SAP docu. Please check my comments in the coding below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...
  TYPES: BIKER_REF TYPE REF TO C_BIKER,
         BIKER_REF_TAB TYPE STANDARD TABLE OF BIKER_REF
                                           WITH DEFAULT KEY,

         BEGIN OF STATUS_LINE_TYPE,
           FLAG(1)  TYPE C,
           TEXT1(5) TYPE C,
           ID       TYPE I,
           TEXT2(7) TYPE C,
           TEXT3(6) TYPE C,
           GEAR     TYPE I,
           TEXT4(7) TYPE C,
           SPEED    TYPE I,
         END OF STATUS_LINE_TYPE.

...
  DATA: ID TYPE I,
        STATUS_LINE TYPE STATUS_LINE_TYPE,
        STATUS_LIST TYPE SORTED TABLE OF STATUS_LINE_TYPE
                                      WITH UNIQUE KEY ID,

        BIKER_TAB TYPE BIKER_REF_TAB,
        BIKER_SELECTION LIKE BIKER_TAB,
        BIKER LIKE LINE OF BIKER_TAB.

  METHODS: WRITE_LIST.

ENDCLASS.

...
  METHOD CREATE_TEAM.
    DO TEAM_MEMBERS TIMES.
      " Biker instance is created. The biker has a private instance attribute STATUS_LINE
      " of TYPE status_line_type (i.e. a structure).
      CREATE OBJECT BIKER EXPORTING TEAM_ID = ID
                                    MEMBERS = TEAM_MEMBERS.
      APPEND BIKER TO BIKER_TAB.

      " Here we read the private attribute STATUS_LINE from the biker instance.
      CALL METHOD BIKER-&amp;gt;STATUS_LINE 
        IMPORTING 
          LINE = STATUS_LINE.

      " And here the STATUS_LINE is added to the itab STATUS_LIST
      " which is a (sorted) table type of TYPE status_line (see above)
      APPEND STATUS_LINE TO STATUS_LIST.
     " Thus, method CREATE_TEAM collect the status lines of the bikers in the team.
    ENDDO.
  ENDMETHOD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 08:50:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852021#M926012</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-05-23T08:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Append an Internal Table in OO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852022#M926013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Understood.Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 May 2008 05:50:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-an-internal-table-in-oo/m-p/3852022#M926013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-24T05:50:36Z</dc:date>
    </item>
  </channel>
</rss>

