<?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: Table attribute to a class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-attribute-to-a-class/m-p/2709150#M627890</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;&lt;/P&gt;&lt;P&gt;To define your internal table in Atribute tab you must use a &amp;lt;b&amp;gt;Table Type&amp;lt;/b&amp;gt; with Mara as row type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;You can create Table Type on SE11.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;In you atribute tab you can use as follow:&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
t_mara TYPE &amp;lt;Your Table Type&amp;gt;. "Use TYPE for this
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;If you're trying to define the table as method parameter you can try the same way used in atribute tab:&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Inside the the method you can try this way:&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: line_mara TYPE mara. "You can use this 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: line_mara TYPE LINE OF &amp;lt;Your Table Type&amp;gt;. "Or this 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT t_mara INTO line_mara.
"CHANGE line_mara.

MODIFY t_mara FROM line_mara INDEX &amp;lt;idx&amp;gt; "You can use this 
APPEND line_mara TO t_mara.   "Or this 

APPEND 
ENDLOOP.
&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Aug 2007 15:18:13 GMT</pubDate>
    <dc:creator>marcelo_ramos1</dc:creator>
    <dc:date>2007-08-22T15:18:13Z</dc:date>
    <item>
      <title>Table attribute to a class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-attribute-to-a-class/m-p/2709148#M627888</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 am creating a custom global class using SE24. I have a constructor and method called SCC_DELETE. For this i need to pass MARA table in the attribute tab. I have doubt that can i choose LIKE typing in the attribute tab ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i choose how i can loop this table inside the method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the delete inside the method i need to send the data back ? for this can i do that?&lt;/P&gt;&lt;P&gt;Whether i have to use different table as CHANGING in the attribute tab?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sa_R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 14:32:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-attribute-to-a-class/m-p/2709148#M627888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T14:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Table attribute to a class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-attribute-to-a-class/m-p/2709149#M627889</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;You have to use CHANGING parameter for the method, if you want to change the data in the method and return the changed value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if you want to send an internal table of type MARA then you might have to use a DDIC table type whose line type is MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also you cannot use LIKE, you can only use LIKE to refer to an already existing attribute. So you have to use TYPE and give the TABLE TYPE name to pass internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 14:58:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-attribute-to-a-class/m-p/2709149#M627889</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-08-22T14:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Table attribute to a class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-attribute-to-a-class/m-p/2709150#M627890</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;&lt;/P&gt;&lt;P&gt;To define your internal table in Atribute tab you must use a &amp;lt;b&amp;gt;Table Type&amp;lt;/b&amp;gt; with Mara as row type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;You can create Table Type on SE11.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;In you atribute tab you can use as follow:&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
t_mara TYPE &amp;lt;Your Table Type&amp;gt;. "Use TYPE for this
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;If you're trying to define the table as method parameter you can try the same way used in atribute tab:&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Inside the the method you can try this way:&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: line_mara TYPE mara. "You can use this 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: line_mara TYPE LINE OF &amp;lt;Your Table Type&amp;gt;. "Or this 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT t_mara INTO line_mara.
"CHANGE line_mara.

MODIFY t_mara FROM line_mara INDEX &amp;lt;idx&amp;gt; "You can use this 
APPEND line_mara TO t_mara.   "Or this 

APPEND 
ENDLOOP.
&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 15:18:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-attribute-to-a-class/m-p/2709150#M627890</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2007-08-22T15:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Table attribute to a class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-attribute-to-a-class/m-p/2709151#M627891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcelo Ramos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You saved my day. Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points assigned&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sa_R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 15:38:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-attribute-to-a-class/m-p/2709151#M627891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T15:38:35Z</dc:date>
    </item>
  </channel>
</rss>

