<?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: need data form three different itabs in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751530#M902529</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;he selection screen data has benn taken into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an code example for me ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Apr 2008 12:56:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-24T12:56:59Z</dc:date>
    <item>
      <title>need data form three different itabs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751528#M902527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are three various internal tables&lt;/P&gt;&lt;P&gt;lets say itab1,itab2,itab3 which are containing data. &lt;/P&gt;&lt;P&gt;Only these information where the user&lt;/P&gt;&lt;P&gt;selects through select-options fields are relevant for the&lt;/P&gt;&lt;P&gt;report which have to be created. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Problem is now. How can I obtain these affected &lt;/P&gt;&lt;P&gt;information simultionously from three different itabs and also&lt;/P&gt;&lt;P&gt;considering the restrictions in respect of users entered values&lt;/P&gt;&lt;P&gt;via select-options fileds. Do u have an idea how to solve &lt;/P&gt;&lt;P&gt;such a complex situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks is advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Erdem Sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 12:34:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751528#M902527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T12:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: need data form three different itabs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751529#M902528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well I hope that the data in your three internal tables already have the selection screen data taken into account before filling them. So the selections on selection screen should be used during selection of the data. So this problem should really not be an issue here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now take ONE internal table as your starting point and loop over it. Next read (READ or LOOP depends on the relation between the internal tables) the other two tables with the keys fields from the first internal table into a workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At last move all the data to a new internal table which will be your output. For this, define a fourth internal table with the structure of your output. Also create a workarea for this internal table and you are almost there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 12:53:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751529#M902528</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-04-24T12:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: need data form three different itabs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751530#M902529</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;he selection screen data has benn taken into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an code example for me ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 12:56:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751530#M902529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T12:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: need data form three different itabs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751531#M902530</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;Check the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables p0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select-options: s_pernr for p0001-pernr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab1 occurs 0,&lt;/P&gt;&lt;P&gt;       pernr like p0001-pernr,&lt;/P&gt;&lt;P&gt;      end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab2 occurs 0,&lt;/P&gt;&lt;P&gt;       pernr like p0001-pernr,&lt;/P&gt;&lt;P&gt;       ename like p0001-ename,&lt;/P&gt;&lt;P&gt;      end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab3 occurs 0,&lt;/P&gt;&lt;P&gt;       pernr like p0001-pernr,&lt;/P&gt;&lt;P&gt;       gbdat like p0002-gbdat,&lt;/P&gt;&lt;P&gt;      end of itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_final occurs 0,&lt;/P&gt;&lt;P&gt;       pernr like p0001-pernr,&lt;/P&gt;&lt;P&gt;       ename like p0001-ename,&lt;/P&gt;&lt;P&gt;       gbdat like p0002-gbdat,&lt;/P&gt;&lt;P&gt;      end of it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select distinct pernr&lt;/P&gt;&lt;P&gt;       from pa0000 up to 5 rows&lt;/P&gt;&lt;P&gt;       into table itab1  where stat2 ='3' .&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; sort itab1 by pernr.&lt;/P&gt;&lt;P&gt; select distinct pernr ename from pa0001 into table itab2&lt;/P&gt;&lt;P&gt; for all entries in itab1 where pernr = itab1-pernr.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  sort itab2 by pernr.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; select distinct pernr gbdat from pa0002 into table itab3&lt;/P&gt;&lt;P&gt; for all entries in itab1 where pernr = itab1-pernr.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  sort itab3 by pernr.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 where pernr in &lt;STRONG&gt;s_pernr&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;  it_final-pernr = itab1-pernr.&lt;/P&gt;&lt;P&gt; read table itab2 with key pernr = itab1-pernr.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  it_final-ename = itab2-ename.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; read table itab3 with key pernr = itab1-pernr.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  it_final-gbdat = itab3-gbdat.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;append  it_final.&lt;/P&gt;&lt;P&gt;clear it_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_final.&lt;/P&gt;&lt;P&gt; write:/5  it_final-pernr,&lt;/P&gt;&lt;P&gt;        15 it_final-ename,&lt;/P&gt;&lt;P&gt;        55 it_final-gbdat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Velangini Showry Maria Kumar Bandanadham on Apr 24, 2008 2:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 12:59:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751531#M902530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T12:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: need data form three different itabs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751532#M902531</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;declare one more internal table it_final. with all the fields u want in output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa_itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move fields of wa_itab1 to wa_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab2 into wa_itab2 with key &amp;lt; use the fields which are common in itab1 and itab2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc is initail.&lt;/P&gt;&lt;P&gt;move fields of wa_itab2 to wa_final.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab3 into wa_itab3 with key &amp;lt; use the fields which are common in itab1 and itab3&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc is initail.&lt;/P&gt;&lt;P&gt;move fields of wa_itab3 to wa_final.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_final to it_final.&lt;/P&gt;&lt;P&gt;clear: wa_final,wa_itab1,wa_itab2,wa_itab3.&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;regards,&lt;/P&gt;&lt;P&gt;sudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 13:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751532#M902531</guid>
      <dc:creator>S0025444845</dc:creator>
      <dc:date>2008-04-24T13:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: need data form three different itabs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751533#M902532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at itab1 into wa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read itab2 into wa2 with key fieldx = wa1-fieldx&lt;/P&gt;&lt;P&gt;                                         fieldy = wa1-fieldy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OR IF SECOND TABLE CAN HAVE MORE THAN ONE ENTRY FOR EVERY RECORD IN itab1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2 into wa2 where fieldx = wa1-fieldx and fieldy = wa1-fieldy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOR THIRD INTERNAL TABLE DO THE SAME.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;AT THE END MOVE DATA TO NEW WORKAREA AND APPEND TO FOURTH INTERNAL TABLE.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;wa4-fieldx = wa1-fieldx&lt;/P&gt;&lt;P&gt;wa4-fieldy = wa1-fieldy&lt;/P&gt;&lt;P&gt;wa4-fielda = wa2-fielda&lt;/P&gt;&lt;P&gt;wa4-fieldb = wa3-fieldb.&lt;/P&gt;&lt;P&gt;append wa4 to itab2.&lt;/P&gt;&lt;P&gt;clear wa1, wa2, wa3, wa4.&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;This is just an example, you will have to determine what the best is in your particular case. Like should we do an append in there a NO entries in itab2 when reading / looping??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There has to be a relationship between the three internal tables and this relationship is in this case fieldx and fieldy. You jhave to determine for yourself which fields are relevant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 13:05:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-data-form-three-different-itabs/m-p/3751533#M902532</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-04-24T13:05:09Z</dc:date>
    </item>
  </channel>
</rss>

