<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166120#M458682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to join 3 tables kna1,vbak,vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The select query is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select k~kunnr,&lt;/P&gt;&lt;P&gt;         k~name1,&lt;/P&gt;&lt;P&gt;         k~ort01,&lt;/P&gt;&lt;P&gt;         k~land1,&lt;/P&gt;&lt;P&gt;         v~vbeln,&lt;/P&gt;&lt;P&gt;         v~erdat,&lt;/P&gt;&lt;P&gt;         v~netwr,&lt;/P&gt;&lt;P&gt;         a~posnr,&lt;/P&gt;&lt;P&gt;         a~arktx,&lt;/P&gt;&lt;P&gt;         a~werks,&lt;/P&gt;&lt;P&gt;         into table t_orders from&lt;/P&gt;&lt;P&gt;        (kna1 as k inner join vbak as v&lt;/P&gt;&lt;P&gt;        on k&lt;SUB&gt;kunnr = v&lt;/SUB&gt;kunnr)&lt;/P&gt;&lt;P&gt;        inner join vbap as a&lt;/P&gt;&lt;P&gt;        on v&lt;SUB&gt;vbeln = a&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;        where k~kunnr in s_custno&lt;/P&gt;&lt;P&gt;       and v~vbeln in s_orderno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the display the data thru loop statement. The program is syntactically correct.&lt;/P&gt;&lt;P&gt;However execution lead to a runtime error.&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reason is " The data read during a select access could not be inserted into the target field.&lt;/P&gt;&lt;P&gt;Either conversion is not supported for  the target's field type or the target field is too short to accept the value or the data or not in a form that the target field can accept."&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could i fix this error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2007 21:43:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-08T21:43:46Z</dc:date>
    <item>
      <title>Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166120#M458682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to join 3 tables kna1,vbak,vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The select query is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select k~kunnr,&lt;/P&gt;&lt;P&gt;         k~name1,&lt;/P&gt;&lt;P&gt;         k~ort01,&lt;/P&gt;&lt;P&gt;         k~land1,&lt;/P&gt;&lt;P&gt;         v~vbeln,&lt;/P&gt;&lt;P&gt;         v~erdat,&lt;/P&gt;&lt;P&gt;         v~netwr,&lt;/P&gt;&lt;P&gt;         a~posnr,&lt;/P&gt;&lt;P&gt;         a~arktx,&lt;/P&gt;&lt;P&gt;         a~werks,&lt;/P&gt;&lt;P&gt;         into table t_orders from&lt;/P&gt;&lt;P&gt;        (kna1 as k inner join vbak as v&lt;/P&gt;&lt;P&gt;        on k&lt;SUB&gt;kunnr = v&lt;/SUB&gt;kunnr)&lt;/P&gt;&lt;P&gt;        inner join vbap as a&lt;/P&gt;&lt;P&gt;        on v&lt;SUB&gt;vbeln = a&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;        where k~kunnr in s_custno&lt;/P&gt;&lt;P&gt;       and v~vbeln in s_orderno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the display the data thru loop statement. The program is syntactically correct.&lt;/P&gt;&lt;P&gt;However execution lead to a runtime error.&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reason is " The data read during a select access could not be inserted into the target field.&lt;/P&gt;&lt;P&gt;Either conversion is not supported for  the target's field type or the target field is too short to accept the value or the data or not in a form that the target field can accept."&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could i fix this error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 21:43:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166120#M458682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T21:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166121#M458683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There appears to be a problem with the definition of t_orders. Are all the fields you are selecting there in the proper order?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 21:45:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166121#M458683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T21:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166122#M458684</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 order of the fields declared in the internal table T_ORDERS and the order given in the select statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both has to match..If you are using INTO TABLE t_orders..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 21:46:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166122#M458684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T21:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166123#M458685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi venkat,&lt;/P&gt;&lt;P&gt;   The way you have defined t_orders shoukd be exactly in the same order as the order in the select statement.&lt;/P&gt;&lt;P&gt;the types and lengths of those fields also should be exactly the same as in the tables from which they are selected.&lt;/P&gt;&lt;P&gt;No commas should be there after each field in the select statement.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 21:47:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166123#M458685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T21:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166124#M458686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using end-of-page event and displaying page number. The report has 48 pages. It is displaying page no for 47 pages.&lt;/P&gt;&lt;P&gt;What should be done to display page number on the last page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 22:13:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166124#M458686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T22:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166125#M458687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your last page records are not completing the count required to populate end of page result.&lt;/P&gt;&lt;P&gt;check your list-count declarations and and try to add remaining blank or skip lines to reach it to the end of page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 22:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166125#M458687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T22:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166126#M458688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkar , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes  the line count for the end of page is not reaching if you difine the line count for the footer &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; then you skip the un occupied lines after writing then the last page will trigger &lt;/P&gt;&lt;P&gt;if you want to write the page of page numbers any one i can give u some simple code &lt;/P&gt;&lt;P&gt;simple go through it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM UPDATE_PAGE_NUMBERS.&lt;/P&gt;&lt;P&gt;***&lt;/P&gt;&lt;P&gt;  DATA: TO_PAGE(6) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get current number of pages.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TO_PAGE = SY-PAGNO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Go to 1st line of every page and update 'Page n Of' Page number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DO SY-PAGNO TIMES.&lt;/P&gt;&lt;P&gt;    READ LINE 1 OF PAGE SY-INDEX.&lt;/P&gt;&lt;P&gt;    REPLACE '------' WITH TO_PAGE INTO SY-LISEL.&lt;/P&gt;&lt;P&gt;    MODIFY CURRENT LINE.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;***&lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward the points if usefull . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, &lt;/P&gt;&lt;P&gt;Srinu reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 01:20:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166126#M458688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T01:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166127#M458689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;Try this. I guess this will help you&lt;/P&gt;&lt;P&gt;select k~kunnr,&lt;/P&gt;&lt;P&gt;k~name1,&lt;/P&gt;&lt;P&gt;k~ort01,&lt;/P&gt;&lt;P&gt;k~land1,&lt;/P&gt;&lt;P&gt;v~vbeln,&lt;/P&gt;&lt;P&gt;v~erdat,&lt;/P&gt;&lt;P&gt;v~netwr,&lt;/P&gt;&lt;P&gt;a~posnr,&lt;/P&gt;&lt;P&gt;a~arktx,&lt;/P&gt;&lt;P&gt;a~werks,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;INTO CORRESPONDING FIELDS OF TABLE&amp;lt;/b&amp;gt; t_orders from&lt;/P&gt;&lt;P&gt;(kna1 as k inner join vbak as v&lt;/P&gt;&lt;P&gt;on k&lt;SUB&gt;kunnr = v&lt;/SUB&gt;kunnr)&lt;/P&gt;&lt;P&gt;inner join vbap as a&lt;/P&gt;&lt;P&gt;on v&lt;SUB&gt;vbeln = a&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;where k~kunnr in s_custno&lt;/P&gt;&lt;P&gt;and v~vbeln in s_orderno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward point to all useful answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SaiRam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 03:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166127#M458689</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2007-05-09T03:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166128#M458690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check your select statement by given like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select k~kunnr,&lt;/P&gt;&lt;P&gt;k~name1,&lt;/P&gt;&lt;P&gt;k~ort01,&lt;/P&gt;&lt;P&gt;k~land1,&lt;/P&gt;&lt;P&gt;v~vbeln,&lt;/P&gt;&lt;P&gt;v~erdat,&lt;/P&gt;&lt;P&gt;v~netwr,&lt;/P&gt;&lt;P&gt;a~posnr,&lt;/P&gt;&lt;P&gt;a~arktx,&lt;/P&gt;&lt;P&gt;a~werks,&lt;/P&gt;&lt;P&gt;into corresponding fields of table t_orders from&lt;/P&gt;&lt;P&gt;( ( kna1 as k inner join vbak as v&lt;/P&gt;&lt;P&gt;on k&lt;SUB&gt;kunnr = v&lt;/SUB&gt;kunnr )&lt;/P&gt;&lt;P&gt;inner join vbap as a&lt;/P&gt;&lt;P&gt;on v&lt;SUB&gt;vbeln = a&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;where k~kunnr in s_custno&lt;/P&gt;&lt;P&gt;and v~vbeln in s_orderno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this going to be work.&lt;/P&gt;&lt;P&gt;Reward if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 03:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166128#M458690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T03:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166129#M458691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT ZRD_TEST no standard page heading line-size 250 line-count 60(10)&lt;/P&gt;&lt;P&gt; .&lt;/P&gt;&lt;P&gt;TABLES: vbak,kna1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF t_table OCCURS 0,&lt;/P&gt;&lt;P&gt;        kunnr LIKE kna1-kunnr,&lt;/P&gt;&lt;P&gt;        name1 LIKE kna1-name1,&lt;/P&gt;&lt;P&gt;        ort01 LIKE kna1-ort01,&lt;/P&gt;&lt;P&gt;        land1 LIKE kna1-ort01,&lt;/P&gt;&lt;P&gt;        vbeln LIKE vbak-vbeln,&lt;/P&gt;&lt;P&gt;        erdat LIKE vbak-erdat,&lt;/P&gt;&lt;P&gt;        netwr LIKE vbak-netwr,&lt;/P&gt;&lt;P&gt;        posnr LIKE vbap-posnr,&lt;/P&gt;&lt;P&gt;        arktx LIKE vbap-arktx,&lt;/P&gt;&lt;P&gt;        werks LIKE vbap-werks,&lt;/P&gt;&lt;P&gt;      END OF t_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_kunnr for kna1-kunnr ,&lt;/P&gt;&lt;P&gt;                s_vbeln for vbak-vbeln .&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b.&lt;/P&gt;&lt;P&gt;&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 k&lt;SUB&gt;kunnr k&lt;/SUB&gt;name1 k&lt;SUB&gt;ort01 k&lt;/SUB&gt;land1 v&lt;SUB&gt;vbeln v&lt;/SUB&gt;erdat v~netwr&lt;/P&gt;&lt;P&gt;a&lt;SUB&gt;posnr a&lt;/SUB&gt;arktx a~werks INTO CORRESPONDING FIELDS OF TABLE t_table&lt;/P&gt;&lt;P&gt;FROM ( kna1 as k INNER JOIN vbak as v ON k&lt;SUB&gt;kunnr = v&lt;/SUB&gt;kunnr ) INNER JOIN&lt;/P&gt;&lt;P&gt;vbap as a on v&lt;SUB&gt;vbeln = a&lt;/SUB&gt;vbeln WHERE  k&lt;SUB&gt;kunnr in s_kunnr AND v&lt;/SUB&gt;vbeln in&lt;/P&gt;&lt;P&gt;s_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    SORT t_table BY kunnr vbeln.&lt;/P&gt;&lt;P&gt;   ELSE.&lt;/P&gt;&lt;P&gt;   MESSAGE i000(zsa) WITH 'NO DATA FOUND'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT t_table.&lt;/P&gt;&lt;P&gt;WRITE:/ t_table-kunnr,&lt;/P&gt;&lt;P&gt;        t_table-name1,&lt;/P&gt;&lt;P&gt;        t_table-ort01,&lt;/P&gt;&lt;P&gt;        t_table-land1,&lt;/P&gt;&lt;P&gt;        t_table-vbeln,&lt;/P&gt;&lt;P&gt;        t_table-erdat,&lt;/P&gt;&lt;P&gt;        t_table-netwr,&lt;/P&gt;&lt;P&gt;        t_table-posnr,&lt;/P&gt;&lt;P&gt;        t_table-arktx,&lt;/P&gt;&lt;P&gt;        t_table-werks.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think this code will help u&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 05:21:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166129#M458691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T05:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166130#M458692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this may help you &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;... [(] {dbtab_left [AS tabalias_left]} | join &lt;/P&gt;&lt;P&gt;{[INNER] JOIN}|{LEFT [OUTER] JOIN} &lt;/P&gt;&lt;P&gt;{dbtab_right [AS tabalias_right] ON join_cond} [)] ... . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The join syntax represents a recursively nestable join expression. A join expression consists of a left-hand and a right- hand side, which are joined either by means of [INNER] JOIN or LEFT [OUTER] JOIN . Depending on the type of join, a join expression can be either an inner ( INNER) or an outer (LEFT OUTER) join. Every join expression can be enclosed in round brackets. If a join expression is used, the SELECT command circumvents SAP buffering. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the left-hand side, either a single database table, a view dbtab_left, or a join expression join can be specified. On the right-hand side, a single database table or a view dbtab_right as well as join conditions join_cond can be specified after ON. In this way, a maximum of 24 join expressions that join 25 database tables or views with each other can be specified after FROM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AS can be used to specify an alternative table name tabalias for each of the specified database table names or for every view. A database table or a view can occur multiple times within a join expression and, in this case, have various alternative names. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax of the join conditions join_cond is the same as that of the sql_cond conditions after the addition WHERE, with the following differences: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least one comparison must be specified after ON. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Individual comparisons may be joined using AND only. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All comparisons must contain a column in the database table or the view dbtab_right on the right-hand side as an operand. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following language elements may not be used: BETWEEN, LIKE, IN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No sub-queries may be used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For outer joins, only equality comparisons (=, EQ) are possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an outer join occurs after FROM, the join condition of every join expression must contain at least one comparison between columns on the left-hand and the right-hand side. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In outer joins, all comparisons that contain columns as operands in the database table or the view dbtab_right on the right-hand side must be specified in the corresponding join condition. In the WHERE condition of the same SELECT command, these columns are not allowed as operands. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resulting set for inner join &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The inner join joins the columns of every selected line on the left- hand side with the columns of all lines on the right-hand side that jointly fulfil the join_cond condition. A line in the resulting set is created for every such line on the right-hand side. The content of the column on the left-hand side may be duplicated in this case. If none of the lines on the right-hand side fulfils the join_cond condition, no line is created in the resulting set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resulting set for outer join &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The outer join basically creates the same resulting set as the inner join, with the difference that at least one line is created in the resulting set for every selected line on the left-hand side, even if no line on the right-hand side fulfils the join_cond condition. The columns on the right-hand side that do not fulfil the join_cond condition are filled with null values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Join the columns carrname, connid, fldate of the database tables scarr, spfli and sflight by means of two inner joins. A list is created of the flights from p_cityfr to p_cityto. Alternative names are used for every table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_cityfr TYPE spfli-cityfrom, &lt;/P&gt;&lt;P&gt;p_cityto TYPE spfli-cityto. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa, &lt;/P&gt;&lt;P&gt;fldate TYPE sflight-fldate, &lt;/P&gt;&lt;P&gt;carrname TYPE scarr-carrname, &lt;/P&gt;&lt;P&gt;connid TYPE spfli-connid, &lt;/P&gt;&lt;P&gt;END OF wa. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA itab LIKE SORTED TABLE OF wa &lt;/P&gt;&lt;P&gt;WITH UNIQUE KEY fldate carrname connid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT c&lt;SUB&gt;carrname p&lt;/SUB&gt;connid f~fldate &lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE itab &lt;/P&gt;&lt;P&gt;FROM ( ( scarr AS c &lt;/P&gt;&lt;P&gt;INNER JOIN spfli AS p ON p&lt;SUB&gt;carrid = c&lt;/SUB&gt;carrid &lt;/P&gt;&lt;P&gt;AND p~cityfrom = p_cityfr &lt;/P&gt;&lt;P&gt;AND p~cityto = p_cityto ) &lt;/P&gt;&lt;P&gt;INNER JOIN sflight AS f ON f&lt;SUB&gt;carrid = p&lt;/SUB&gt;carrid &lt;/P&gt;&lt;P&gt;AND f&lt;SUB&gt;connid = p&lt;/SUB&gt;connid ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa. &lt;/P&gt;&lt;P&gt;WRITE: / wa-fldate, wa-carrname, wa-connid. &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;Example &lt;/P&gt;&lt;P&gt;Join the columns carrid, carrname and connid of the database tables scarr and spfli using an outer join. The column connid is set to the null value for all flights that do not fly from p_cityfr. This null value is then converted to the appropriate initial value when it is transferred to the assigned data object. The LOOP returns all airlines that do not fly from p_cityfr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_cityfr TYPE spfli-cityfrom. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa, &lt;/P&gt;&lt;P&gt;carrid TYPE scarr-carrid, &lt;/P&gt;&lt;P&gt;carrname TYPE scarr-carrname, &lt;/P&gt;&lt;P&gt;connid TYPE spfli-connid, &lt;/P&gt;&lt;P&gt;END OF wa, &lt;/P&gt;&lt;P&gt;itab LIKE SORTED TABLE OF wa &lt;/P&gt;&lt;P&gt;WITH NON-UNIQUE KEY carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT s&lt;SUB&gt;carrid s&lt;/SUB&gt;carrname p~connid &lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE itab &lt;/P&gt;&lt;P&gt;FROM scarr AS s &lt;/P&gt;&lt;P&gt;LEFT OUTER JOIN spfli AS p ON s&lt;SUB&gt;carrid = p&lt;/SUB&gt;carrid &lt;/P&gt;&lt;P&gt;AND p~cityfrom = p_cityfr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa. &lt;/P&gt;&lt;P&gt;IF wa-connid = '0000'. &lt;/P&gt;&lt;P&gt;WRITE: / wa-carrid, wa-carrname. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we r using 2 type of joins in abap they are&lt;/P&gt;&lt;P&gt;1) inner join.&lt;/P&gt;&lt;P&gt;this will join 2 tables using an common fiend and return the result with field values wich are common in both the tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1 itab2&lt;/P&gt;&lt;P&gt;a b c a d &lt;/P&gt;&lt;P&gt;1 2 3 1 5 &lt;/P&gt;&lt;P&gt;2 3 4 3 6&lt;/P&gt;&lt;P&gt;after innerjoining itab1 n itab2 on field a we wil get the o/p as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a b c d &lt;/P&gt;&lt;P&gt;1 2 3 5&lt;/P&gt;&lt;P&gt;only common field is taken..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)left outer join&lt;/P&gt;&lt;P&gt;here it wil work in opossite way it will give values whic are not common&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1 itab2&lt;/P&gt;&lt;P&gt;a b c a d &lt;/P&gt;&lt;P&gt;1 2 3 1 5 &lt;/P&gt;&lt;P&gt;2 3 4 3 6&lt;/P&gt;&lt;P&gt;after left outer joining itab1 n itab2 on field a we wil get the o/p as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a b c d &lt;/P&gt;&lt;P&gt;2 3 4 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only fields which are not common is taken from the left table..other field(d here) wil be empty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it will help u.&lt;/P&gt;&lt;P&gt;I u want the docs regarding that , let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Reward Points if helpful.&amp;lt;/i&amp;gt;&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;Amber S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 05:25:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166130#M458692</guid>
      <dc:creator>former_member198270</dc:creator>
      <dc:date>2007-05-09T05:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166131#M458693</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 surely problem with itab defination ,  t_orders :&lt;/P&gt;&lt;P&gt;this itab FIELD SEQUENCE and DATA TYPE must be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;k~kunnr, kna1&lt;/P&gt;&lt;P&gt;k~name1, kna1&lt;/P&gt;&lt;P&gt;k~ort01, kna1&lt;/P&gt;&lt;P&gt;k~land1, kna1&lt;/P&gt;&lt;P&gt;v~vbeln,  vbak&lt;/P&gt;&lt;P&gt;v~erdat,  vbak&lt;/P&gt;&lt;P&gt;v~netwr, vbak&lt;/P&gt;&lt;P&gt;a~posnr,  vbap&lt;/P&gt;&lt;P&gt;a~arktx, vbap&lt;/P&gt;&lt;P&gt;a~werks, vbap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;build itab like this and execute again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 05:39:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166131#M458693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T05:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166132#M458694</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;just check out ur fields may be u might have given them in a wrong order....while declaring n while using in the select statement.....some times if the declaration of fields n the fields used in the select statement r not same then it shows this problem....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if useful reward with points,&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;madhuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 05:54:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2166132#M458694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T05:54:28Z</dc:date>
    </item>
  </channel>
</rss>

