<?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: Please help me to modify the code here !!!! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341228#M800987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have any common fields in Itab1 and Itab2 you can make it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab1.

loop at itab2 where field1 eq Itab1-field1. " Check here
write : / itab2-vtext.
exit.
endloop.

endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2008 11:25:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-04T11:25:15Z</dc:date>
    <item>
      <title>Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341226#M800985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am trying to fetch data from itab2  &lt;/P&gt;&lt;P&gt;with in another itab1 using loop at&lt;/P&gt;&lt;P&gt;but i am getting same value for vtext.....&lt;/P&gt;&lt;P&gt;How will i get other values of vtext ...&lt;/P&gt;&lt;P&gt;i dont want repeation of values of vtext....in every line of itab1 values......&lt;/P&gt;&lt;P&gt;plz give me the solutions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any system variable which can increment the value of &lt;/P&gt;&lt;P&gt;itab2-vtext before every exit....?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;loop at itab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2&lt;/P&gt;&lt;P&gt;    write : / itab2-vtext.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;endlloop.&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;plz help...its urgent !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:20:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341226#M800985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341227#M800986</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;You can do as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab1.

read table itab2 with key field1 = itab1-field1. "Here field1 of itab1 and itab2 should be equal

if sy-subrc eq 0.
write : itab2-vtext.
endif.

endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:24:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341227#M800986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341228#M800987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have any common fields in Itab1 and Itab2 you can make it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab1.

loop at itab2 where field1 eq Itab1-field1. " Check here
write : / itab2-vtext.
exit.
endloop.

endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341228#M800987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341229#M800988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2&lt;/P&gt;&lt;P&gt;if itab2-vtext ne  itab1-vtext.&lt;/P&gt;&lt;P&gt;write : / itab2-vtext.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endlloop.&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;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2 where itab2-vtext ne itab1-vtext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : / itab2-vtext.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endlloop.&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, 04 Feb 2008 11:25:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341229#M800988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341230#M800989</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;U should use some conditions to read the table ITAB2, or if there are no conditions, u can check the index:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab1.
   loop at itab2 where .......
     write : / itab2-vtext.
     exit.
  endlloop.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab1.
  VN_TABIX = VN_TABIX + 1.
  READ TABLE ITAB2 INDEX VN_TABIX. 
  IF SY-SUBRC = 0.
     write : / itab2-vtext.
  ENDIF.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you shoul give us the link beetween the ITAB1 and ITAB2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:27:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341230#M800989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341231#M800990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this friend&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;read table itab2 with key field1 = itab1-field1. "checking equality"&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;write : itab2-vtext.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;message e001.&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;plz reward if helpful&lt;/P&gt;&lt;P&gt;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:27:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341231#M800990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341232#M800991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after looping over itab2, you can write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM itab2&lt;/P&gt;&lt;P&gt;COMPARING vtext.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:31:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341232#M800991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341233#M800992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please  there is no common field  between  itab 1 and itab 2&lt;/P&gt;&lt;P&gt;they are completely different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code  i have written something like that....Is there can be done between 'exit'   and  write : / itab2-vtext&lt;/P&gt;&lt;P&gt;so that i could get differeent values of vtext along with fieldx ,  fieldy....need help thnks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1&lt;/P&gt;&lt;P&gt;write : / itab1-fieldx,&lt;/P&gt;&lt;P&gt;            itab1-fieldy.&lt;/P&gt;&lt;P&gt;loop at itab2&lt;/P&gt;&lt;P&gt;write : / itab2-vtext.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endlloop.&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, 04 Feb 2008 11:33:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341233#M800992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341234#M800993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sort itab2 by field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1.&lt;/P&gt;&lt;P&gt;clear wa2.&lt;/P&gt;&lt;P&gt;read table itab2 into wa2 with key field1 = wa1-field1 binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;write:/ wa2-field1.&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>Mon, 04 Feb 2008 11:34:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341234#M800993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341235#M800994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WHAT IS VN_TABIX  ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:42:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341235#M800994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341236#M800995</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;In the code you've pasted, it seems there's no link beetween the two internal table, so u can use an index (a counter) to be sure to print a record of ITAB2 only once:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: VN_TABIX TYPE SY-TABIX.

LOOP AT ITAB1.
* Calculate the index
   VN_TABIX = VN_TABIX + 1.
   READ TABLE ITAB2 INDEX VN_TABIX.
   IF SY-SUBRC = 0.
     WRITE: ......
   ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can use the system variable SY-TABIX instead of the variable VN_TABIX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT ITAB1.
* SY-TABIX has the number of the current record of ITAB1:
   READ TABLE ITAB2 INDEX SY-TABIX.
   IF SY-SUBRC = 0.
     WRITE: ......
   ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In thi way you're sure of writing a record of ITAB2 once,but I don't know if the right solution for you, because I can't understand the link beetween ITAB1 and ITAB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:50:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341236#M800995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to modify the code here !!!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341237#M800996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;plz proceed with sriram ponna's code, that is better in the performance view&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sre&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:58:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-me-to-modify-the-code-here/m-p/3341237#M800996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:58:39Z</dc:date>
    </item>
  </channel>
</rss>

