<?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>Question Re: Printing Table of Array Values in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/printing-table-of-array-values/qaa-p/12530738#M4697307</link>
    <description>&lt;P&gt;Option 1, use newLine character(s).&lt;BR /&gt;Option 2: do the whole thing by simply inserting a CrossTab.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 18:05:27 GMT</pubDate>
    <dc:creator>ido_millet</dc:creator>
    <dc:date>2022-03-10T18:05:27Z</dc:date>
    <item>
      <title>Printing Table of Array Values</title>
      <link>https://community.sap.com/t5/technology-q-a/printing-table-of-array-values/qaq-p/12530737</link>
      <description>&lt;P&gt;I have two arrays that I am building in my report -- one with a description and one with an associated running total for that description. As I read each record, I am looking to see if the description already exists in the array. If so, the associated running total is incremented. If not, a new array element is added for each array containing the new info:&lt;/P&gt;
  &lt;P&gt;Shared NumberVar Array PkgBal;&lt;/P&gt;
  &lt;P&gt;Shared StringVar Array PkgDesc;&lt;/P&gt;
  &lt;P&gt;NumberVar i;&lt;/P&gt;
  &lt;P&gt;BooleanVar FoundIt := NO;&lt;/P&gt;
  &lt;P&gt;For i := 1 to UBound(PkgBal) Do&lt;/P&gt;
  &lt;P&gt;(&lt;/P&gt;
  &lt;P&gt; If PkgDesc[i] = Packaging-Code THEN &lt;/P&gt;
  &lt;P&gt; (&lt;/P&gt;
  &lt;P&gt; PkgBal[i] := PkgBal[i] + Balance;&lt;/P&gt;
  &lt;P&gt; FoundIt := YES;&lt;/P&gt;
  &lt;P&gt; Exit For&lt;/P&gt;
  &lt;P&gt; );&lt;/P&gt;
  &lt;P&gt;);&lt;/P&gt;
  &lt;P&gt;If FoundIt = NO THEN&lt;/P&gt;
  &lt;P&gt;(&lt;/P&gt;
  &lt;P&gt; i := Ubound(PkgBal) + 1;&lt;/P&gt;
  &lt;P&gt; Redim Preserve PkgBal[i];&lt;/P&gt;
  &lt;P&gt; Redim Preserve PkgDesc[i];&lt;/P&gt;
  &lt;P&gt; PkgBal[i] := Balance;&lt;/P&gt;
  &lt;P&gt; PkgDesc[i] :=Packaging-Code&lt;/P&gt;
  &lt;P&gt;);&lt;/P&gt;
  &lt;P&gt;In the report footer, I want to print a table of the value of the arrays:&lt;/P&gt;
  &lt;P&gt;Desc 1 Total 1&lt;/P&gt;
  &lt;P&gt;Desc 2 Total 2&lt;/P&gt;
  &lt;P&gt;etc.&lt;/P&gt;
  &lt;P&gt;Is there a way to do it without creating a Report Footer section for each possible array element (could be 100+) and creating an associated formula for each element (e.g. Desc-1 = PkgDesc[1], Desc-2 = PkgDesc[2], etc)?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 17:31:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/printing-table-of-array-values/qaq-p/12530737</guid>
      <dc:creator>jsstern</dc:creator>
      <dc:date>2022-03-10T17:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Table of Array Values</title>
      <link>https://community.sap.com/t5/technology-q-a/printing-table-of-array-values/qaa-p/12530738#M4697307</link>
      <description>&lt;P&gt;Option 1, use newLine character(s).&lt;BR /&gt;Option 2: do the whole thing by simply inserting a CrossTab.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 18:05:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/printing-table-of-array-values/qaa-p/12530738#M4697307</guid>
      <dc:creator>ido_millet</dc:creator>
      <dc:date>2022-03-10T18:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Table of Array Values</title>
      <link>https://community.sap.com/t5/technology-q-a/printing-table-of-array-values/qaa-p/12530739#M4697308</link>
      <description>&lt;P&gt;Thanks, Ido.  I'll use Join(x, CHR(10)).  However, that won't work for the numeric array, correct?  What would be the syntax for that one, or do I have to convert the numbers to strings?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 19:21:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/printing-table-of-array-values/qaa-p/12530739#M4697308</guid>
      <dc:creator>jsstern</dc:creator>
      <dc:date>2022-03-10T19:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Table of Array Values</title>
      <link>https://community.sap.com/t5/technology-q-a/printing-table-of-array-values/qaa-p/12530740#M4697309</link>
      <description>&lt;P&gt;Yes, convert to string using ToText() function.&lt;/P&gt;&lt;P&gt;The reason I would advise against doing an implicit conversion using the &amp;amp; operator is that implicit conversion might leave you with undesired decimals and thousand separators.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 19:25:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/printing-table-of-array-values/qaa-p/12530740#M4697309</guid>
      <dc:creator>ido_millet</dc:creator>
      <dc:date>2022-03-10T19:25:10Z</dc:date>
    </item>
  </channel>
</rss>

