<?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 Inner join and corresponding fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-corresponding-fields/m-p/2855298#M669236</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello people,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to do a inner join between two tables A and B, and put the results in an internal table (using into corresponding fields of).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, my query is:&lt;/P&gt;&lt;P&gt;select * INTO CORRESPONDING FIELDS OF TABLE ts_eban&lt;/P&gt;&lt;P&gt; FROM eban AS a INNER JOIN ebkn AS b&lt;/P&gt;&lt;P&gt;      ON a&lt;SUB&gt;banfn EQ b&lt;/SUB&gt;banfn&lt;/P&gt;&lt;P&gt;     AND a&lt;SUB&gt;bnfpo EQ b&lt;/SUB&gt;bnfpo&lt;/P&gt;&lt;P&gt;where.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my ts_eban has 15 fields from eban and only 3 from ebkn.&lt;/P&gt;&lt;P&gt;The field ts_eban-menge is getting the value from ebkn. I would like to take the value from eban. I have to pass all the fields in select clause?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2007 16:57:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-04T16:57:55Z</dc:date>
    <item>
      <title>Inner join and corresponding fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-corresponding-fields/m-p/2855298#M669236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello people,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to do a inner join between two tables A and B, and put the results in an internal table (using into corresponding fields of).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, my query is:&lt;/P&gt;&lt;P&gt;select * INTO CORRESPONDING FIELDS OF TABLE ts_eban&lt;/P&gt;&lt;P&gt; FROM eban AS a INNER JOIN ebkn AS b&lt;/P&gt;&lt;P&gt;      ON a&lt;SUB&gt;banfn EQ b&lt;/SUB&gt;banfn&lt;/P&gt;&lt;P&gt;     AND a&lt;SUB&gt;bnfpo EQ b&lt;/SUB&gt;bnfpo&lt;/P&gt;&lt;P&gt;where.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my ts_eban has 15 fields from eban and only 3 from ebkn.&lt;/P&gt;&lt;P&gt;The field ts_eban-menge is getting the value from ebkn. I would like to take the value from eban. I have to pass all the fields in select clause?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 16:57:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-corresponding-fields/m-p/2855298#M669236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T16:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join and corresponding fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-corresponding-fields/m-p/2855299#M669237</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;Yes you will have to pass all the fields in the select statement.&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;Mukesh Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 17:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-corresponding-fields/m-p/2855299#M669237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T17:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join and corresponding fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-corresponding-fields/m-p/2855300#M669238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can't use Select * when using Joins between 2 tables&lt;/P&gt;&lt;P&gt;You have to explicitely pass the fields names from those tables see the example code&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF s_mat,&lt;/P&gt;&lt;P&gt;         mblnr TYPE mblnr,                   " GI Doc No&lt;/P&gt;&lt;P&gt;         mjahr TYPE mjahr,                   " Fiscal Year&lt;/P&gt;&lt;P&gt;         zeile TYPE mblpo,                   " Item No&lt;/P&gt;&lt;P&gt;         bwart TYPE bwart,                   " Movement Type&lt;/P&gt;&lt;P&gt;         matnr TYPE matnr,                   " Material No&lt;/P&gt;&lt;P&gt;         werks TYPE werks_d,                 " Plant&lt;/P&gt;&lt;P&gt;         lgort TYPE lgort_d,                 " St.Location&lt;/P&gt;&lt;P&gt;         menge TYPE menge_d,                 " Quantity&lt;/P&gt;&lt;P&gt;         meins TYPE meins,                   " UOM&lt;/P&gt;&lt;P&gt;         hsdat TYPE hsdat,                   " Production date&lt;/P&gt;&lt;P&gt;         vfdat TYPE vfdat,                   " Shelf Exp.Date&lt;/P&gt;&lt;P&gt;       END OF s_mat.&lt;/P&gt;&lt;P&gt;DATA: i_mat  TYPE STANDARD TABLE OF s_mat WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~mblnr                    " GI Doc No&lt;/P&gt;&lt;P&gt;         a~mjahr                    " Fiscal Year&lt;/P&gt;&lt;P&gt;         b~zeile                    " Item No&lt;/P&gt;&lt;P&gt;         b~bwart                    " Movement Type&lt;/P&gt;&lt;P&gt;         b~matnr                    " Material No&lt;/P&gt;&lt;P&gt;         b~werks                    " Plant&lt;/P&gt;&lt;P&gt;         b~lgort                    " St.Location&lt;/P&gt;&lt;P&gt;         b~menge                    " Quantity&lt;/P&gt;&lt;P&gt;         b~meins                    " UoM&lt;/P&gt;&lt;P&gt;         b~hsdat                    " Production date&lt;/P&gt;&lt;P&gt;         b~vfdat                    " Shelf Exp.Date&lt;/P&gt;&lt;P&gt;    INTO TABLE i_mat&lt;/P&gt;&lt;P&gt;    FROM mkpf AS a JOIN mseg AS b&lt;/P&gt;&lt;P&gt;    ON a&lt;SUB&gt;mblnr = b&lt;/SUB&gt;mblnr JOIN mara AS c&lt;/P&gt;&lt;P&gt;    ON b&lt;SUB&gt;matnr = c&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;    WHERE a~mjahr EQ gv_year   AND&lt;/P&gt;&lt;P&gt;          b~matnr IN s_matnr   AND&lt;/P&gt;&lt;P&gt;          b~werks IN s_werks   AND&lt;/P&gt;&lt;P&gt;          b~lgort IN s_lgort .&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;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 17:07:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-corresponding-fields/m-p/2855300#M669238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T17:07:55Z</dc:date>
    </item>
  </channel>
</rss>

