<?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: itab with 2 diffrnet DB tables fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271375#M1019199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.&lt;/P&gt;&lt;P&gt;first of all check common fields in both the table if find then use for all entries to club the data from both the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else check out the table that have common fields from db1 and db2. like it has field a or b or c and d. for common table try to check value table of all four fields. &lt;/P&gt;&lt;P&gt;and try to join all the three for for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the syntex for 'for all entries ' check out F1 or SDN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2008 12:21:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-07T12:21:35Z</dc:date>
    <item>
      <title>itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271373#M1019197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts!!,&lt;/P&gt;&lt;P&gt;i have a scenario where i need to select fields A,B,C,and  D . A,B,C are in 1 DB table ex DB1 and D field is in other DB table ex DB2. how to select these 4 fields to a internal table.&lt;/P&gt;&lt;P&gt;plz tell me how to define a itab for this and how to fetch the values for the same.&lt;/P&gt;&lt;P&gt;plz help.&lt;/P&gt;&lt;P&gt;mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:14:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271373#M1019197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T12:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271374#M1019198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT  ZZZZ000000.&lt;/P&gt;&lt;P&gt;tables:mara,marc,mard,makt.&lt;/P&gt;&lt;P&gt;data:begin of it_mara occurs 0,&lt;/P&gt;&lt;P&gt;     matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;     mtart like mara-mtart,&lt;/P&gt;&lt;P&gt;     meins like mara-meins,&lt;/P&gt;&lt;P&gt;     end of it_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of it_marc occurs 0,&lt;/P&gt;&lt;P&gt;     matnr like marc-matnr,&lt;/P&gt;&lt;P&gt;     pstat like marc-pstat,&lt;/P&gt;&lt;P&gt;     werks like marc-werks,&lt;/P&gt;&lt;P&gt;     end of it_marc.&lt;/P&gt;&lt;P&gt;data:begin of it_mard occurs 0,&lt;/P&gt;&lt;P&gt;     werks like mard-werks,&lt;/P&gt;&lt;P&gt;     lgort like mard-lgort,&lt;/P&gt;&lt;P&gt;     labst like mard-labst,&lt;/P&gt;&lt;P&gt;     end of it_mard.&lt;/P&gt;&lt;P&gt;&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;     matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;     mtart like mara-mtart,&lt;/P&gt;&lt;P&gt;     meins like mara-meins,&lt;/P&gt;&lt;P&gt;     pstat like marc-pstat,&lt;/P&gt;&lt;P&gt;     werks like marc-werks,&lt;/P&gt;&lt;P&gt;     lgort like mard-lgort,&lt;/P&gt;&lt;P&gt;     labst like mard-labst,&lt;/P&gt;&lt;P&gt;     maktx like makt-maktx,&lt;/P&gt;&lt;P&gt;     end of it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:s_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  matnr&lt;/P&gt;&lt;P&gt;        mtart&lt;/P&gt;&lt;P&gt;        meins&lt;/P&gt;&lt;P&gt;        from mara&lt;/P&gt;&lt;P&gt;        into table it_mara&lt;/P&gt;&lt;P&gt;        where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if not it_mara[] is initial.&lt;/P&gt;&lt;P&gt;        select matnr&lt;/P&gt;&lt;P&gt;               pstat&lt;/P&gt;&lt;P&gt;               werks&lt;/P&gt;&lt;P&gt;               from marc&lt;/P&gt;&lt;P&gt;               into table it_marc&lt;/P&gt;&lt;P&gt;               for all entries in it_mara&lt;/P&gt;&lt;P&gt;               where matnr = it_mara-matnr.&lt;/P&gt;&lt;P&gt;               if not it_marc[] is initial.&lt;/P&gt;&lt;P&gt;               select werks&lt;/P&gt;&lt;P&gt;                      lgort&lt;/P&gt;&lt;P&gt;                      labst&lt;/P&gt;&lt;P&gt;                      from mard&lt;/P&gt;&lt;P&gt;                      into table it_mard&lt;/P&gt;&lt;P&gt;                      for all entries in it_marc&lt;/P&gt;&lt;P&gt;                      where werks = it_marc-werks.&lt;/P&gt;&lt;P&gt;               endif.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;loop at it_mara.&lt;/P&gt;&lt;P&gt;it_final-matnr = it_mara-matnr.&lt;/P&gt;&lt;P&gt;it_final-mtart = it_mara-mtart.&lt;/P&gt;&lt;P&gt;it_final-meins = it_mara-meins.&lt;/P&gt;&lt;P&gt;read table it_marc with key matnr = it_mara-matnr.&lt;/P&gt;&lt;P&gt;it_final-werks = it_marc-werks.&lt;/P&gt;&lt;P&gt;it_final-pstat = it_marc-pstat.&lt;/P&gt;&lt;P&gt;read table it_mard with key werks = it_marc-werks.&lt;/P&gt;&lt;P&gt;it_final-lgort = it_mard-lgort.&lt;/P&gt;&lt;P&gt;it_final-labst = it_mard-labst.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;select maktx from makt into it_final-maktx where matnr = it_final-matnr.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_final.&lt;/P&gt;&lt;P&gt;write:/ it_final-matnr under 'material',&lt;/P&gt;&lt;P&gt;        it_final-mtart under 'material type',&lt;/P&gt;&lt;P&gt;        it_final-meins under 'unit of measure',&lt;/P&gt;&lt;P&gt;        it_final-werks under 'plant' ,&lt;/P&gt;&lt;P&gt;        it_final-pstat under 'status',&lt;/P&gt;&lt;P&gt;        it_final-lgort under 'storage loc',&lt;/P&gt;&lt;P&gt;        it_final-labst under 'stock',&lt;/P&gt;&lt;P&gt;        it_final-maktx.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271374#M1019198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T12:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271375#M1019199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.&lt;/P&gt;&lt;P&gt;first of all check common fields in both the table if find then use for all entries to club the data from both the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else check out the table that have common fields from db1 and db2. like it has field a or b or c and d. for common table try to check value table of all four fields. &lt;/P&gt;&lt;P&gt;and try to join all the three for for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the syntex for 'for all entries ' check out F1 or SDN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:21:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271375#M1019199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T12:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271376#M1019200</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;To retrieve the data from 2 different tables a common field should be there, in your case do you have a common field? Then write a select query with for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:21:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271376#M1019200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T12:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271377#M1019201</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;First you SELECT  A B C Fields from DB Table put into one ITAB and then SELECT D field from DB1 Table ITAB2 and move to these Fields to ITAB3. and Modify the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sridhar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:23:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271377#M1019201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T12:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271378#M1019202</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 these two tables are related i mean they have key fields in common then you can JOIN these two tables DB1 &amp;amp; DB2 into the internal table ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:23:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271378#M1019202</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-08-07T12:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271379#M1019203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create a internal table with those four field, fetch the data into the internal table from the 2 DB table using join...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:23:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271379#M1019203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T12:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271380#M1019204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;join&lt;/STRONG&gt; or &lt;STRONG&gt;for all entries&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example on join check this link:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3958648"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example on for all entries check this link:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3777639"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:23:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271380#M1019204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T12:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271381#M1019205</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;is there any common field(key) available between DB1 and DB2...if yes then u can use inner join and put it in one internal table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u don't have any key field then do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a b c from db1 into correspoding fields of table itab1...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select d from db2 appending corresponding fields of table itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now u will get the a b c and d data in one internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:24:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271381#M1019205</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2008-08-07T12:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271382#M1019206</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;Please check this code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Field string declarations for 3rd internal table
Data:
   Begin of fs_db3,
	a type db1-a,
	b type db1-b,
	c type db1-c,
	d type db2-d,
   End of fs_db3,

* Third internal table
     t_db3 like 
  standard table 
	of fs_db3,
*Workarea of 3rd internal table
  wa_db3 like line of t_db3.
  
data:
   wa_db1 like line of t_db1, " Work area for first internal table
   wa_db2 like line of t_db2. " Work area for second internal table

  select * from db1 into t_db1.
  select * from db2 into t_db2.

  append lines of t_db1 to t_db3.

  loop at t_db2 into wa_db2.
    
    wa_db3-d = wa_db2-d.
    modify t_db3 from wa_db3 index sy-tabix.	
   
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this would help you and solve your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Narin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271382#M1019206</guid>
      <dc:creator>narin_nandivada3</dc:creator>
      <dc:date>2008-08-07T12:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271383#M1019207</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 Retreive the Data from two database table into one internal table through &lt;STRONG&gt;Join Statement&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;For that there must be common field in both the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another method is that you can use two internal table for two database table. An one final table to store final Records.You can use &lt;STRONG&gt;For all entries&lt;/STRONG&gt; in this case.For this also common fields should be there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to simply populate the internal table without checking field similarity then go for Append Lines of itab.&lt;/P&gt;&lt;P&gt;Modify the final internal table tranporting that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:25:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271383#M1019207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T12:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271384#M1019208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii!&lt;/P&gt;&lt;P&gt;  Check out this sample code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT z_sdn.

TABLES:
  sflight.

SELECT-OPTIONS:
  s_carrid FOR sflight-carrid,
  s_connid FOR sflight-connid.
DATA:
  BEGIN OF fs_tab,
   carrid TYPE sflight-carrid,
   connid TYPE sflight-connid,
   fldate TYPE sflight-fldate,
   bookid TYPE sbook-bookid,
  END OF fs_tab.

DATA:
  t_tab LIKE
  TABLE OF
        fs_tab.


START-OF-SELECTION.

SELECT f~carrid
       f~connid
       f~fldate
       b~bookid
  FROM ( sflight AS f
       INNER JOIN sbook AS b ON f~carrid = b~carrid
                            AND f~connid = b~connid
                            AND f~fldate = b~fldate )
  INTO TABLE t_tab
 WHERE f~carrid IN s_carrid
   AND f~connid IN s_connid.

LOOP AT t_tab INTO fs_tab.
  WRITE: / fs_tab-carrid,
           fs_tab-connid,
           fs_tab-fldate,
           fs_tab-bookid.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhijeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:27:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271384#M1019208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T12:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: itab with 2 diffrnet DB tables fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271385#M1019209</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 said there is no D field in the first internal table and its only present in 2nd table.... so how can you think that join would be possible... as join or for all entries needs common fields..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Narin..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 12:33:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-with-2-diffrnet-db-tables-fields/m-p/4271385#M1019209</guid>
      <dc:creator>narin_nandivada3</dc:creator>
      <dc:date>2008-08-07T12:33:33Z</dc:date>
    </item>
  </channel>
</rss>

