<?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 Loop inside ITAB. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-inside-itab/m-p/3748617#M901955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are few records in ITAB, I want to loop it twice in order to pick correct answer where S = 'X'. Once I completed 1st loop I shud loop from second loop in same loop.&lt;/P&gt;&lt;P&gt;I am using loop at itab into wa from index.&lt;/P&gt;&lt;P&gt;How to loop it correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following table is to be looped, twice.&lt;/P&gt;&lt;P&gt;where S is is my correct answer.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;                         
"1st loop.
TYPE	ID	                           TEXT              	S

Qesn	q1	                          Best PM of India	
Ans	id_47d61fa77bc600ece1008	Manmohan singh1	 -
Ans	id_47d61fc27bc600ece1008	N  Ra0	                  X
Ans	id_47d61fcd7bc600ece1008	Vajpayee	                  -
Ans	id_47d621b57bc600ece1008	Rajiv gandhi	  -
Ans	id_47d6248b7bc600ece1008	IGandhi	                  -

"second loop.
Qesn	id_47dee7d3499f008de10080	who is the best FM	
Ans	id_47dee7e0499f008de10080	Yashwant Sinha	   X
Ans	id_47dee800499f008de10080	Chidambram	   -   &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any clarrification is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to pick correct answer where S = 'X'.&lt;/P&gt;&lt;P&gt;My 1st loop data shud be.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Qesn	q1	                          Best PM of India	
Ans	id_47d61fc27bc600ece1008	N  Ra0	                  X
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;second table data shud be&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Qesn	id_47dee7d3499f008de10080	who is the best FM	
Ans	id_47dee7e0499f008de10080	Yashwant Sinha	   X
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2008 05:48:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-02T05:48:20Z</dc:date>
    <item>
      <title>Loop inside ITAB.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-inside-itab/m-p/3748617#M901955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are few records in ITAB, I want to loop it twice in order to pick correct answer where S = 'X'. Once I completed 1st loop I shud loop from second loop in same loop.&lt;/P&gt;&lt;P&gt;I am using loop at itab into wa from index.&lt;/P&gt;&lt;P&gt;How to loop it correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following table is to be looped, twice.&lt;/P&gt;&lt;P&gt;where S is is my correct answer.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;                         
"1st loop.
TYPE	ID	                           TEXT              	S

Qesn	q1	                          Best PM of India	
Ans	id_47d61fa77bc600ece1008	Manmohan singh1	 -
Ans	id_47d61fc27bc600ece1008	N  Ra0	                  X
Ans	id_47d61fcd7bc600ece1008	Vajpayee	                  -
Ans	id_47d621b57bc600ece1008	Rajiv gandhi	  -
Ans	id_47d6248b7bc600ece1008	IGandhi	                  -

"second loop.
Qesn	id_47dee7d3499f008de10080	who is the best FM	
Ans	id_47dee7e0499f008de10080	Yashwant Sinha	   X
Ans	id_47dee800499f008de10080	Chidambram	   -   &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any clarrification is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to pick correct answer where S = 'X'.&lt;/P&gt;&lt;P&gt;My 1st loop data shud be.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Qesn	q1	                          Best PM of India	
Ans	id_47d61fc27bc600ece1008	N  Ra0	                  X
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;second table data shud be&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Qesn	id_47dee7d3499f008de10080	who is the best FM	
Ans	id_47dee7e0499f008de10080	Yashwant Sinha	   X
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 05:48:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-inside-itab/m-p/3748617#M901955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T05:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loop inside ITAB.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-inside-itab/m-p/3748618#M901956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the solution,from wat Iunderstood ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab where type = 'Qesn'.&lt;/P&gt;&lt;P&gt;read table itab with key S = 'X'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;do ur logic.&lt;/P&gt;&lt;P&gt;modify itab with s= 'space.' this is to pick the correct record for next read.&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>Fri, 02 May 2008 06:16:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-inside-itab/m-p/3748618#M901956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T06:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Loop inside ITAB.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-inside-itab/m-p/3748619#M901957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i solved myself .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for replying.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 12:37:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-inside-itab/m-p/3748619#M901957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T12:37:45Z</dc:date>
    </item>
  </channel>
</rss>

