<?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: Passing any internal table to class method for processing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337307#M1397002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;similar situation for me as well in my case i am concatenating all the fields to a string.&lt;/P&gt;&lt;P&gt;will the same logic works? i mean some times the field symbol( work area) may have 2 fields or 7 fields.&lt;/P&gt;&lt;P&gt;please suggest.thannks alot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Nov 2009 12:26:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-05T12:26:50Z</dc:date>
    <item>
      <title>Passing any internal table to class method for processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337303#M1396998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to pass an internal table from a report to a class method so that it can be processed and converted to binary content for sending as an email attachment in Excel format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before converting to binary content the internal table must be looped through and have tabs and carriage returns inserted betweens fields and rows before appended to a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that I want to make this a generic method that can accept any type of internal table so the class can be used with any report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searched on the forums and can't seem to find anything related to this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 16:53:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337303#M1396998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-04T16:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Passing any internal table to class method for processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337304#M1396999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search "dynamic internal table creation"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 17:00:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337304#M1396999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-04T17:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Passing any internal table to class method for processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337305#M1397000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think there's any need for dynamic internal table creation. If I understand the OP correctly, the table is there, it's just a matter of passing it to a method, and then looping over the fields in each line. It is possible to have generic types for method parameters. Like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHODS test
  IMPORTING
    it_mytable TYPE STANDARD TABLE .
   
     
METHOD test.
  DATA:
    lv_index TYPE i,
    lv_comp_as_string TYPE string.

  FIELD-SYMBOLS:
    &amp;lt;fs_line&amp;gt; TYPE ANY,
    &amp;lt;fs_comp&amp;gt; TYPE ANY.

  LOOP AT it_mytable ASSIGNING &amp;lt;fs_line&amp;gt;.
    lv_index = 1.
    DO.
      ASSIGN COMPONENT lv_index OF STRUCTURE &amp;lt;fs_line&amp;gt; TO &amp;lt;fs_comp&amp;gt;.
      IF sy-subrc &amp;lt;&amp;gt; 0.
        EXIT. " DO-loop
      ENDIF.
      " Convert field value to string. May generate runtime error.
      MOVE &amp;lt;fs_comp&amp;gt; TO lv_comp_as_string.
      " Do whatever you need to do with the string
    ENDDO.
  ENDLOOP.
ENDMETHOD. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 17:35:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337305#M1397000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-04T17:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Passing any internal table to class method for processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337306#M1397001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sebastian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code has helped!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 12:11:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337306#M1397001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-05T12:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Passing any internal table to class method for processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337307#M1397002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;similar situation for me as well in my case i am concatenating all the fields to a string.&lt;/P&gt;&lt;P&gt;will the same logic works? i mean some times the field symbol( work area) may have 2 fields or 7 fields.&lt;/P&gt;&lt;P&gt;please suggest.thannks alot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 12:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-any-internal-table-to-class-method-for-processing/m-p/6337307#M1397002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-05T12:26:50Z</dc:date>
    </item>
  </channel>
</rss>

