<?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: loading data from one internal to another int table based on  condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706993#M627252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  How are the entries related.. is it like for one entry in y table there are more than one entry in x table then you have to use loop with in loop , here are the both the conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) For each entry in Y there are more than one entries in X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  sort y by quota trpid.&lt;/P&gt;&lt;P&gt;  sort x by quota trpid.&lt;/P&gt;&lt;P&gt;  loop at y.&lt;/P&gt;&lt;P&gt;  loop at x where quota eq y-quota&lt;/P&gt;&lt;P&gt;                        and trpid eq y-trpid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  z-value = x-value.&lt;/P&gt;&lt;P&gt;  append z.&lt;/P&gt;&lt;P&gt;&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;2) For each y there is one entry in x table.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;sort y by quota trpid.&lt;/P&gt;&lt;P&gt;  sort x by quota trpid.&lt;/P&gt;&lt;P&gt;  loop at y.&lt;/P&gt;&lt;P&gt;  read table x with key quota = y-quota&lt;/P&gt;&lt;P&gt;                            trpid = y-trpid binary search.&lt;/P&gt;&lt;P&gt; if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  z-value = x-value.&lt;/P&gt;&lt;P&gt;  append z.&lt;/P&gt;&lt;P&gt; Endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2007 13:57:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-16T13:57:34Z</dc:date>
    <item>
      <title>loading data from one internal to another int table based on  condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706988#M627247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have two internal tables say x and y .&lt;/P&gt;&lt;P&gt;internal table X has quota , trpid, as fields.&lt;/P&gt;&lt;P&gt;internal table Y has quota ,trpid and plants as fieds.&lt;/P&gt;&lt;P&gt;i will loop the internal table Y .&lt;/P&gt;&lt;P&gt;For each loop,&lt;/P&gt;&lt;P&gt;i want to load the quota value from X to Y where X-trpid  = Y-trpid.&lt;/P&gt;&lt;P&gt;So can anyone tell me  how can i acheive this using READ statemnet.&lt;/P&gt;&lt;P&gt;If this cannot be acheived with READ then please tell me how can i do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 13:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706988#M627247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T13:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: loading data from one internal to another int table based on  condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706989#M627248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itabx.&lt;/P&gt;&lt;P&gt;read table itaby with quota  = itabx-quota.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;itabx-value = itaby-value.&lt;/P&gt;&lt;P&gt;modify itabx.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 13:48:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706989#M627248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T13:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: loading data from one internal to another int table based on  condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706990#M627249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at Y.&lt;/P&gt;&lt;P&gt;read table X with key TRPID = Y-TRPID.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;Y-quota = X-quota.&lt;/P&gt;&lt;P&gt;MODIFY Y.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endloop. " Y&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD POINTS IF FOUND USEFUL, Get back in case of query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Tripat Pal Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 13:50:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706990#M627249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T13:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: loading data from one internal to another int table based on  condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706991#M627250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First u need to sort table X ,and use binary search , for better performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is ur code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort X  by trpid.&lt;/P&gt;&lt;P&gt;loop at y into wa_y.&lt;/P&gt;&lt;P&gt;read table x into wa_x with key trpid = wa_y-trpid binary search.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; wa_y-quota =  wa_x-quota.&lt;/P&gt;&lt;P&gt;modify  y with wa_y transporting quota.---&amp;gt; to overwrite the new QUOTA value in Y &lt;/P&gt;&lt;P&gt;endif.&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;Revert back if any issues,&lt;/P&gt;&lt;P&gt;Reward with points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 13:52:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706991#M627250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T13:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: loading data from one internal to another int table based on  condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706992#M627251</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;LOOP AT Y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE X WITH KEY TRPID = Y-TRPID.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;Y-quota = X-quota.&lt;/P&gt;&lt;P&gt;MODIFY Y.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP. "Y&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;~Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Arun Shekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 13:53:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706992#M627251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T13:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: loading data from one internal to another int table based on  condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706993#M627252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  How are the entries related.. is it like for one entry in y table there are more than one entry in x table then you have to use loop with in loop , here are the both the conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) For each entry in Y there are more than one entries in X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  sort y by quota trpid.&lt;/P&gt;&lt;P&gt;  sort x by quota trpid.&lt;/P&gt;&lt;P&gt;  loop at y.&lt;/P&gt;&lt;P&gt;  loop at x where quota eq y-quota&lt;/P&gt;&lt;P&gt;                        and trpid eq y-trpid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  z-value = x-value.&lt;/P&gt;&lt;P&gt;  append z.&lt;/P&gt;&lt;P&gt;&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;2) For each y there is one entry in x table.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;sort y by quota trpid.&lt;/P&gt;&lt;P&gt;  sort x by quota trpid.&lt;/P&gt;&lt;P&gt;  loop at y.&lt;/P&gt;&lt;P&gt;  read table x with key quota = y-quota&lt;/P&gt;&lt;P&gt;                            trpid = y-trpid binary search.&lt;/P&gt;&lt;P&gt; if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  z-value = x-value.&lt;/P&gt;&lt;P&gt;  append z.&lt;/P&gt;&lt;P&gt; Endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 13:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706993#M627252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T13:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: loading data from one internal to another int table based on  condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706994#M627253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sort it_x by trpid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_y assigning &amp;lt;fs_y&amp;gt;.&lt;/P&gt;&lt;P&gt;   read table it_x assigning &amp;lt;fs_x&amp;gt; with key trpid = &amp;lt;fs_y&amp;gt;-trpid binary search.&lt;/P&gt;&lt;P&gt;   if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;       &amp;lt;fs_y&amp;gt;-quota = &amp;lt;fs_x&amp;gt;-quota.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it can help u.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 14:03:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706994#M627253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T14:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: loading data from one internal to another int table based on  condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706995#M627254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can code like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : wrk_tabix like sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF the same entry is there in X &amp;amp; Y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort X by trpid.&lt;/P&gt;&lt;P&gt;loop at y into wa_y.&lt;/P&gt;&lt;P&gt;wrk_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;read table x into wa_x with key trpid = wa_y-trpid binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;wa_y-quota = wa_x-quota.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify y with wa_y index wrk_tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif the same entries are not there, instead of Read statement use LOOP statement for Y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Neslin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 14:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loading-data-from-one-internal-to-another-int-table-based-on-condition/m-p/2706995#M627254</guid>
      <dc:creator>Neslinn</dc:creator>
      <dc:date>2007-08-16T14:10:59Z</dc:date>
    </item>
  </channel>
</rss>

