<?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 Need help in logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958461#M1489573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have 2 internal  tables tl_item_pge1 &amp;amp;  tl_pge1. In both the internal tables tl_item_pge1 &amp;amp;  tl_pge1 there are 2 fields with field name VENUM . I want to replace the values of tl_item_pge1-venum with tl_pge1-venum . &lt;/P&gt;&lt;P&gt;I wrote the following logic . &lt;/P&gt;&lt;P&gt;As i dont have test data now, I 'm not able to test . so Please tell me if the below logic is correct . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at tl_item_pge1 into wl_item_pge1 .
      loop at tl_pge1 into wl_pge1.
        Move wl_pge1-INT_ID to wl_item_pge1-INT_ID .
        modify  tl_item_pge1 index sy-tabix from wl_item_pge1 transporting INT_ID .
      endloop.
    endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp; Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please use more descriptive subject lines and code tags from now on.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Jun 21, 2010 11:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jun 2010 09:14:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-21T09:14:50Z</dc:date>
    <item>
      <title>Need help in logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958461#M1489573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have 2 internal  tables tl_item_pge1 &amp;amp;  tl_pge1. In both the internal tables tl_item_pge1 &amp;amp;  tl_pge1 there are 2 fields with field name VENUM . I want to replace the values of tl_item_pge1-venum with tl_pge1-venum . &lt;/P&gt;&lt;P&gt;I wrote the following logic . &lt;/P&gt;&lt;P&gt;As i dont have test data now, I 'm not able to test . so Please tell me if the below logic is correct . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at tl_item_pge1 into wl_item_pge1 .
      loop at tl_pge1 into wl_pge1.
        Move wl_pge1-INT_ID to wl_item_pge1-INT_ID .
        modify  tl_item_pge1 index sy-tabix from wl_item_pge1 transporting INT_ID .
      endloop.
    endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp; Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please use more descriptive subject lines and code tags from now on.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Jun 21, 2010 11:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 09:14:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958461#M1489573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T09:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958462#M1489574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heyy&lt;/P&gt;&lt;P&gt;No , your logic is not correct ,&lt;/P&gt;&lt;P&gt;You can not modify the table on which you are looping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 09:18:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958462#M1489574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T09:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958463#M1489575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try with below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what u wrote is correct but we shouldn't write loop with in loop. Instead of that we can write read statement with binary addition for performance issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at tl_item_pge1 into wl_item_pge1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE  tl_pge1 into wl_pge1 WITH KEY VENUM = WL_ITEM_PGE1-VENUM.&lt;/P&gt;&lt;P&gt;Move wl_pge1-INT_ID to wl_item_pge1-INT_ID .&lt;/P&gt;&lt;P&gt;modify tl_item_pge1 index sy-tabix from wl_item_pge1 transporting INT_ID .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 09:23:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958463#M1489575</guid>
      <dc:creator>venkatasriram_mygapula</dc:creator>
      <dc:date>2010-06-21T09:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958464#M1489576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sreeram &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the internal tables tl_pge1 &amp;amp; tL_ITEM_PGE1  are having diffrent values for venum . So if i read tl_pge1 with the value from the table tL_ITEM_PGE1  it will give sy-subrc eq 4 since tl_pge1 is not having value present in tl_item_pge1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE tl_pge1 into wl_pge1 WITH KEY VENUM = WL_ITEM_PGE1-VENUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually my requirement is to replace the VENUM value present in tl_pge1 into tl_item_pge1 . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i should we achieve this .&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;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 09:32:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958464#M1489576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T09:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958465#M1489577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below code will solve your requierment...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Loop at 1st table
  LOOP AT tl_pge1 INTO wl_pge1.
* Read the corresponding record from 2nd table
    READ TABLE tl_item_pge1 INTO wl_item_pge1 WITH KEY &amp;lt;field&amp;gt; = &amp;lt;wl_pge1-field&amp;gt;.
* hold the row no of the corresponding record
    lw_tabix = sy-tabix.
    IF sy-subrc = 0.
* If corresponding record found
      MOVE wl_pge1-int_id TO wl_item_pge1-int_id .
* Modify the record
      MODIFY tl_item_pge1 INDEX lw_tabix FROM wl_item_pge1 TRANSPORTING int_id .
    ENDIF.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;DKS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 09:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958465#M1489577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T09:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958466#M1489578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;READ TABLE tl_pge1 into wl_pge1 index sy-index(sy-tabix).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass the tl_pge1 venum value to tl_item_pge1 venumvalue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and modify internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 09:38:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-logic/m-p/6958466#M1489578</guid>
      <dc:creator>venkatasriram_mygapula</dc:creator>
      <dc:date>2010-06-21T09:38:27Z</dc:date>
    </item>
  </channel>
</rss>

