<?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: Modify Main Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146546#M748062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric - thanks for that, but unfortunately that really messes up the data!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Dec 2007 13:24:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-17T13:24:27Z</dc:date>
    <item>
      <title>Modify Main Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146542#M748058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck in a dilemma here. What I am trying to do is this........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a MAIN internal table name gt_main with key ANLN1. I have another internal table with fields ANLN1, PERAF and NAFAZ. The second internal table has several entries for ANLN1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERAF = Month and NAFAZ = depreciation value. My main internal table has 12 NAFAZ fields named xx_anlp_nafaz. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get these values appended to the main internal table based on PERAF AND NAFAZ. I am doing the following.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FILL_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lv_index TYPE sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT GT_MAIN INTO gw_main.&lt;/P&gt;&lt;P&gt;  lv_index = sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE GT_ANLP INTO GW_ANLP&lt;/P&gt;&lt;P&gt;  WITH KEY ANLN1 = GW_MAIN-ANLN1&lt;/P&gt;&lt;P&gt;  BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CASE GW_ANLP-PERAF.&lt;/P&gt;&lt;P&gt;    WHEN '1'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-01_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '2'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-02_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '3'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-03_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '4'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-04_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '5'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-05_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '6'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-06_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '7'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-07_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '8'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-08_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '9'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-09_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '10'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-10_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '11'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-11_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN '12'.&lt;/P&gt;&lt;P&gt;      GW_MAIN-12_ANLP_PERAF = gw_anlp-NAFAZ.&lt;/P&gt;&lt;P&gt;    WHEN OTHERS.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODIFY GT_MAIN FROM gw_main INDEX lv_index.&lt;/P&gt;&lt;P&gt;    CLEAR: gw_main, gw_anlp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_____________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However all this is doing is setting ONE of the TWELVE fields in the internal table. I need to somehow loop at the second internal table if anln1 keeps equalling gt_main-anln1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points galore if answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 12:58:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146542#M748058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T12:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Main Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146543#M748059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dipesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you have in the second internal table? What do mean by 'somehow loop at the second internal table if anln1 keeps equalling gt_main-anln1.'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 13:03:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146543#M748059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T13:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Main Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146544#M748060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my second internal table i have ANLN1, PERAF and NAFAZ. But for one ANLN1 entry in GT_MAIN i have several in GT_ANLP. However PERAF is different. I need to do a pass on the Main internal table and get all the values from GT_ANLP into one of the 12 fields (xx_anlp-nafaz) based on that CASE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 13:13:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146544#M748060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T13:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Main Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146545#M748061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Dipesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT gt_main INTO gw_main.&lt;/P&gt;&lt;P&gt;LOOP AT gt_anlp INTO gw_anlp WHERE anln1 EQ gw_main-anln1.&lt;/P&gt;&lt;P&gt;... here you have all 12 lines, one by one, you can insert your CASE here&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 13:18:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146545#M748061</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-12-17T13:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Main Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146546#M748062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric - thanks for that, but unfortunately that really messes up the data!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 13:24:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146546#M748062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T13:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Main Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146547#M748063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric - cheers actually that nearly answered my question. I did a few tweaks and it works! THANKS!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 13:30:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-main-internal-table/m-p/3146547#M748063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T13:30:41Z</dc:date>
    </item>
  </channel>
</rss>

