<?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: single record fetching in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026794#M1169431</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; Hi Nilesh,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Use the following code. It works for all cases!!!!&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data : f1,f2,f3.
&amp;gt; 
&amp;gt; while f1 NE 'X' or f2 NE 'X' or f3 NE 'X'.
&amp;gt;    
&amp;gt;      if f1 NE 'X'.
&amp;gt;         read table itab1 index sy-index.
&amp;gt;         if sy-subrc &amp;lt;&amp;gt; 0.
&amp;gt;             f1 = 'X'.
&amp;gt;         else.
&amp;gt;            //write contents of table 1!!
&amp;gt;         endif.
&amp;gt;     else.
&amp;gt;       //Leave space for blank table 1 entries!!!
&amp;gt; 
&amp;gt;      endif. 
&amp;gt;     
&amp;gt;       if f2 NE 'X'.
&amp;gt;         read table itab2 index sy-index.
&amp;gt;         if sy-subrc &amp;lt;&amp;gt; 0.
&amp;gt;             f2 = 'X'.
&amp;gt;         else.
&amp;gt;            //write contents of table 2!!
&amp;gt;         endif.
&amp;gt;     else
&amp;gt;          //Leave space for blank table 2 entries!!!
&amp;gt;      endif.
&amp;gt; 
&amp;gt;   if f3 NE 'X'.
&amp;gt;         read table itab3 index sy-index.
&amp;gt;         if sy-subrc &amp;lt;&amp;gt; 0.
&amp;gt;             f3 = 'X'.
&amp;gt;         else.
&amp;gt;            //write contents of table 3!!
&amp;gt;         endif.
&amp;gt;     else
&amp;gt;          //Leave space for blank table 3 entries!!!
&amp;gt;      endif.
&amp;gt; endwhile.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Hpe this helps!!!&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Edited by: Bala Shanmuga Priyan on Jan 6, 2009 8:32 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why the sy-index value is not changing here, its remains on one (1) each time so its just showing the first record of the table. what could be the problem..??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jan 2009 05:45:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-09T05:45:15Z</dc:date>
    <item>
      <title>single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026764#M1169401</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;&lt;/P&gt;&lt;P&gt;I m doing a report in which i have collected the data in 3 internal tables and now i want to disply them&lt;/P&gt;&lt;P&gt;row by row . like only 1 row of 1st table , only 1st row of 2nd table, only 1st row of 3rd table. then 2nd of each...&lt;/P&gt;&lt;P&gt;im bit confused in it. im trying to do it by looping it but its not getting so plzz help me out..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 06:59:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026764#M1169401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T06:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026765#M1169402</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;I am getting ur points. Can u show me the code which u did.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:02:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026765#M1169402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026766#M1169403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use &lt;STRONG&gt;READ table itab1 index 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;READ table itab2 index 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;READ table itab3 index 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in index u can use a variable so next time it gets row 2 of all table and then row 3 like that....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kartik tarla on Jan 6, 2009 12:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:02:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026766#M1169403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026767#M1169404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prepare one temporaty table, looping first table and append to the temp table with the &lt;STRONG&gt;INDEX 1&lt;/STRONG&gt; and like that do all for other tables also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it will solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:04:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026767#M1169404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026768#M1169405</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 my understanding of ur problem, u can loop the 1st internal table first and do the write statement and loop the 2nd one and do write and loop the 3rd one and do write the entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:04:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026768#M1169405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026769#M1169406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOU CAN DO LIKE THIS.................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : v_index type sy-tabix.
loop at ITAB1 into WA_TAB1.
V_INDEX = SY-TABIX.
WRITE : / "WRITE ROW OF ITAB1
READ ITAB2 INTO WA_TAB2 INDEX V_INDEX.
READ ITAB3 INTO WA_TAB3 INDEX V_INDEX.
WRITE : / "WRITE ROW OF ITAB2
WRITE : / "WRITE ROW OF ITAB3
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:07:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026769#M1169406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026770#M1169407</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;use SELECT SINGEL................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:07:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026770#M1169407</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026771#M1169408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; use &lt;STRONG&gt;READ table itab1 index 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;       &lt;STRONG&gt;READ table itab2 index 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;       &lt;STRONG&gt;READ table itab3 index 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; in index u can use a variable so next time it gets row 2 of all table and then row 3 like that....&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Edited by: kartik tarla on Jan 6, 2009 12:33 PM&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u tel me this in more brief..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bcoz im using nested looping but in 3rd table the thngs are going wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:11:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026771#M1169408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026772#M1169409</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;This is easy if u have same number of records in all the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the following coding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;     read table itab1 index sy-index.&lt;/P&gt;&lt;P&gt;     //write here&lt;/P&gt;&lt;P&gt;     read table itab2 index sy-index. &lt;/P&gt;&lt;P&gt;     //write here&lt;/P&gt;&lt;P&gt;     read table itab3 index sy-index. &lt;/P&gt;&lt;P&gt;     //write here&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if the table has differnt number of entries.... I ll give the code for  it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bala Shanmuga Priyan on Jan 6, 2009 8:13 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:12:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026772#M1169409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026773#M1169410</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;define another variable in each internal table (like INDEX). &lt;/P&gt;&lt;P&gt;for each internal table loop pass sy-tabix to index.&lt;/P&gt;&lt;P&gt;now, make final internal table (with entries of all the 3 tables) and SORT the final table with index ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND liens of itab1 to itab.&lt;/P&gt;&lt;P&gt;APPEND liens of itab2 to itab.&lt;/P&gt;&lt;P&gt;APPEND liens of itab3 to itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;  write : itab-...,&lt;/P&gt;&lt;P&gt;            itab-....&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works for ur req...&lt;/P&gt;&lt;P&gt;Let me know if you need any further help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vishnu Pavan on Jan 6, 2009 8:17 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:16:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026773#M1169410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026774#M1169411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; This is easy if u have same number of records in all the tables.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Use the following coding&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; loop at itab1.&lt;/P&gt;&lt;P&gt;&amp;gt;      read table itab1 index sy-index.&lt;/P&gt;&lt;P&gt;&amp;gt;      //write here&lt;/P&gt;&lt;P&gt;&amp;gt;      read table itab2 index sy-index. &lt;/P&gt;&lt;P&gt;&amp;gt;      //write here&lt;/P&gt;&lt;P&gt;&amp;gt;      read table itab2 index sy-index. &lt;/P&gt;&lt;P&gt;&amp;gt;      //write here&lt;/P&gt;&lt;P&gt;&amp;gt; endloop.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Please let me know if the table has differnt number of entries.... I ll give the code for  it&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes,&lt;/P&gt;&lt;P&gt;1st table may have 2 entries. so at start 1st record of 1st tab. 1 or 2 records of 2nd tab. same like 3rd.&lt;/P&gt;&lt;P&gt;again 2nd row of 1st tab. corresponding records from 2nd and then 3rd...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026774#M1169411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026775#M1169412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nilesh can you tell me whether the number of records in all three tables is same?&lt;/P&gt;&lt;P&gt;then u can just get the number of record for any of the table with DESCRIBE stnt and using a DO-ENDDO loop simply read the table using READ TABLE stmt and pass the loop index.&lt;/P&gt;&lt;P&gt;like follows&lt;/P&gt;&lt;P&gt;data: lv_lin type i, lv_index type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE itab1 lines lv_lin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do lv_lins times.&lt;/P&gt;&lt;P&gt;lv_index = sy-index.&lt;/P&gt;&lt;P&gt;read table itab1 index lv_index.&lt;/P&gt;&lt;P&gt;read table itab2 index lv_index.&lt;/P&gt;&lt;P&gt;read table itab3 index lv_index.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the number of record are dissimilar then get the no of records for each of the itab and use greatest value for the DO loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026775#M1169412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026776#M1169413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; &amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; This is easy if u have same number of records in all the tables.&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; Use the following coding&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; loop at itab1.&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt;      read table itab1 index sy-index.&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt;      //write here&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt;      read table itab2 index sy-index. &lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt;      //write here&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt;      read table itab2 index sy-index. &lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt;      //write here&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; endloop.&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; Please let me know if the table has differnt number of entries.... I ll give the code for  it&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; yes,&lt;/P&gt;&lt;P&gt;&amp;gt; 1st table may have 2 entries. so at start 1st record of 1st tab. 1 or 2 records of 2nd tab. same like 3rd.&lt;/P&gt;&lt;P&gt;&amp;gt; again 2nd row of 1st tab. corresponding records from 2nd and then 3rd...&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; thanx..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reply back with code as u told b4....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026776#M1169413</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026777#M1169414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the following code. It works for all cases!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data : f1,f2,f3.

while f1 NE 'X' or f2 NE 'X' or f3 NE 'X'.
   
     if f1 NE 'X'.
        read table itab1 index sy-index.
        if sy-subrc &amp;lt;&amp;gt; 0.
            f1 = 'X'.
        else.
           //write contents of table 1!!
        endif.
    else.
      //Leave space for blank table 1 entries!!!

     endif. 
    
      if f2 NE 'X'.
        read table itab2 index sy-index.
        if sy-subrc &amp;lt;&amp;gt; 0.
            f2 = 'X'.
        else.
           //write contents of table 2!!
        endif.
    else
         //Leave space for blank table 2 entries!!!
     endif.

  if f3 NE 'X'.
        read table itab3 index sy-index.
        if sy-subrc &amp;lt;&amp;gt; 0.
            f3 = 'X'.
        else.
           //write contents of table 3!!
        endif.
    else
         //Leave space for blank table 3 entries!!!
     endif.
endwhile.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hpe this helps!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bala Shanmuga Priyan on Jan 6, 2009 8:32 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bala Shanmuga Priyan on Jan 6, 2009 8:33 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bala Shanmuga Priyan on Jan 6, 2009 8:33 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bala Shanmuga Priyan on Jan 6, 2009 8:37 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:31:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026777#M1169414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026778#M1169415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i Made a few changes to code please try the new code!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:37:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026778#M1169415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026779#M1169416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the easy way to display o/p like this using loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st row of 1st table.&lt;/P&gt;&lt;P&gt;1st row of 2nd table&lt;/P&gt;&lt;P&gt;1st row of 3rd table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd row of 1st table.&lt;/P&gt;&lt;P&gt;2nd row of 2nd table&lt;/P&gt;&lt;P&gt;2nd row of 3rd table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thats it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but by nesting the tables its giving prob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:39:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026779#M1169416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026780#M1169417</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;I think the following prg will help u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: spfli, sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_spfli type STANDARD TABLE OF spfli,&lt;/P&gt;&lt;P&gt;      wa_spfli like LINE OF it_spfli,&lt;/P&gt;&lt;P&gt;      it_sflight TYPE STANDARD TABLE OF sflight,&lt;/P&gt;&lt;P&gt;      wa_sflight LIKE LINE OF it_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: BEGIN OF x_result,&lt;/P&gt;&lt;P&gt;      carrid type spfli-carrid,&lt;/P&gt;&lt;P&gt;      connid TYPE sflight-connid,&lt;/P&gt;&lt;P&gt;     END OF x_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_result TYPE TABLE OF x_result,&lt;/P&gt;&lt;P&gt;      wa_result LIKE LINE OF it_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: count TYPE i,&lt;/P&gt;&lt;P&gt;      n_count TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select carrid connid from spfli INTO CORRESPONDING FIELDS OF TABLE&lt;/P&gt;&lt;P&gt;it_spfli  .&lt;/P&gt;&lt;P&gt;SELECT carrid connid FROM sflight INTO CORRESPONDING FIELDS OF TABLE&lt;/P&gt;&lt;P&gt;  it_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_spfli INTO wa_spfli .&lt;/P&gt;&lt;P&gt;  count = count + 1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_sflight INTO wa_sflight .&lt;/P&gt;&lt;P&gt;  count = count + 1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n_count = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO count  TIMES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n_count = n_count + 1.&lt;/P&gt;&lt;P&gt;READ TABLE it_spfli INTO wa_spfli INDEX n_count.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  move: wa_spfli-carrid to wa_result-carrid,&lt;/P&gt;&lt;P&gt;        wa_spfli-connid to wa_result-connid.&lt;/P&gt;&lt;P&gt;  append wa_result to it_result.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;read TABLE it_sflight INTO wa_sflight INDEX n_count.&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    MOVE: wa_result-carrid to wa_result-carrid,&lt;/P&gt;&lt;P&gt;          wa_sflight-connid to wa_result-connid.&lt;/P&gt;&lt;P&gt;    append wa_result to it_result.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at it_result INTO wa_result.&lt;/P&gt;&lt;P&gt;    write:/ wa_result-carrid, wa_result-connid.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can understand it and modify the requirement as per urs.&lt;/P&gt;&lt;P&gt;Give points if it is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:46:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026780#M1169417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026781#M1169418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi i Made a few changes to code please try the new code!!&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for that i need some time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanxx.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:47:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026781#M1169418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026782#M1169419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi i Made a few changes to code please try the new code!!&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx  i need some time to try it...&lt;/P&gt;&lt;P&gt;thanx..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:49:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026782#M1169419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: single record fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026783#M1169420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi i Made a few changes to code please try the new code!!&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx  i need some time to try it...&lt;/P&gt;&lt;P&gt;thanx..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 07:49:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-record-fetching/m-p/5026783#M1169420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T07:49:48Z</dc:date>
    </item>
  </channel>
</rss>

