<?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: Dynamic Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229176#M1628989</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 littile bit confused and only understodd your problem partially. Could you please provide two records for example and explain it with your desired output required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Keshav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Sep 2011 03:48:35 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2011-09-21T03:48:35Z</dc:date>
    <item>
      <title>Dynamic Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229171#M1628984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, people.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a request to develop a solution to read a matrix XY and apply a factor in the rows and columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´d like to split the X axis in a internal table T1 and the Y axis in another internal table T2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would have the same values in the tables, T1 in a vertical order and T2 in a horizontal order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The idea is that when i change a value in one table T1, the same referenced value of T2 change dinamically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that dynamic table could solve it but I don´t know how to build the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate if somebody could help me with examples to build the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 13:46:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229171#M1628984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-20T13:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229172#M1628985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I fail to see the benefit of your idea. Why would you hold redundant data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A internal table with more than one record is a matrix, so why use two tables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 14:01:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229172#M1628985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-20T14:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229173#M1628986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Florian. Thanks for your answer.&lt;/P&gt;&lt;P&gt;You are right. I have a matrix and that's the problem.&lt;/P&gt;&lt;P&gt;First I need to read the vertical lines of this matrix to find the total (of each vertical line).&lt;/P&gt;&lt;P&gt;This total will be used to calculate a factor that will be multiplied for all the cells (of each vertical line).&lt;/P&gt;&lt;P&gt;Then, after this, i will have new values in the matrix that should be seen horizontally.&lt;/P&gt;&lt;P&gt;The same process will occur with the horizontal lines.&lt;/P&gt;&lt;P&gt;I read the horizontal lines to find the total (of each horizontal line).&lt;/P&gt;&lt;P&gt;Then I calculate a factor that wil be multiplied for all the cells (of each horizontal line).&lt;/P&gt;&lt;P&gt;This process is called "balance" and will be used in a BPC solution.&lt;/P&gt;&lt;P&gt; That's why i thought in working with 2 linked internal tables.&lt;/P&gt;&lt;P&gt;Any suggestion ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 14:24:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229173#M1628986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-20T14:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229174#M1628987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, got it, but still i dont see where the second table does more than make things complicated &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what you basically want is:&lt;/P&gt;&lt;P&gt;1. looping over the records, determining totals for each column.&lt;/P&gt;&lt;P&gt;2. derive some factor out of your total value, and multiply every field of this column with that factor.&lt;/P&gt;&lt;P&gt;3. determining a total for each row.&lt;/P&gt;&lt;P&gt;4. derive again soem factor out of that and multiply every field of the according row with that factor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did i get you right that you need the totals row-wise for the already columnwise adopted values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to make things easier i´d add a field to your structure on that the itab is based on, that holds the total row-wise, and add a record at the end that holds the total columnwise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;solution should look something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: itab       type YOUR_TYPE,
       wa        like line of itab,
       wa_total  like line of itab.

loop at itab into wa.
  wa_total-field1 = wa_total-field1 + wa-field1.
  wa_total-field2 = wa_total-field2 + wa-field2.
  ...
  "do that for all fields

endloop.
append wa_total to itab. "well not neccesary to append it

"in wa_total you got your totals column-wise, which leads to factors column-wise.
"now loop again
loop at itab into wa.
  wa-field1 = wa-field1 * factor_column1.
  wa-field2 = wa-field2 * factor_column2.
  ...
  modify itab from wa index sy-tabix.
endloop.

now you got the vertikal things done. i guess based on this you should be able to come up with an idea how to do it for rows now.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 14:57:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229174#M1628987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-20T14:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229175#M1628988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your example, Florian.&lt;/P&gt;&lt;P&gt;I will try to use your logic to develop a solution.&lt;/P&gt;&lt;P&gt;Soon I return with the news.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 17:34:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229175#M1628988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-20T17:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229176#M1628989</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 littile bit confused and only understodd your problem partially. Could you please provide two records for example and explain it with your desired output required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Keshav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 03:48:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/8229176#M1628989</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-09-21T03:48:35Z</dc:date>
    </item>
  </channel>
</rss>

