<?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 need help in Join statements in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-join-statements/m-p/3442424#M826735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need to join these tables EKPO(Purchasing Doc Item), EKET(Scheduling Agreement Schedule line), MAKT(Material Desc), LIPS(SD Doc: Delivery Item data) tables.&lt;/P&gt;&lt;P&gt;The fields that EKPO has is ebeln,ebelp,matnr,menge, meins&lt;/P&gt;&lt;P&gt;The fields that EKET has is ebeln,ebelp,etenr,dat01.&lt;/P&gt;&lt;P&gt;The fields that MAKT has is matnr,spras,makts.&lt;/P&gt;&lt;P&gt;The fields that LIPS has is vbeln,posnr,matnr,vgpos,erdat,vrkme,lfimg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output needs to as&lt;/P&gt;&lt;P&gt;ebeln from table ekpo-ebeln&lt;/P&gt;&lt;P&gt;ebelp from table lips-vgpos&lt;/P&gt;&lt;P&gt;matnr from table ekpo-matnr&lt;/P&gt;&lt;P&gt;menge from table ekpo-menge&lt;/P&gt;&lt;P&gt;meins from table ekpo-meins&lt;/P&gt;&lt;P&gt;vrkme from table lips-vrkme&lt;/P&gt;&lt;P&gt;vbeln from table lips-vbeln&lt;/P&gt;&lt;P&gt;lfimg from table lips-lfimg&lt;/P&gt;&lt;P&gt;erdat from table lips-erdat&lt;/P&gt;&lt;P&gt;dat01 from table eket-dat01&lt;/P&gt;&lt;P&gt;maktx from table makt-maktx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The selection screen has ekpo-ebeln and eket-dat01 as select-options&lt;/P&gt;&lt;P&gt;and parameters as ekpo-bukrs and ekpo-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest as to how to write this join with the above tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Feb 2008 07:36:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-09T07:36:01Z</dc:date>
    <item>
      <title>need help in Join statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-join-statements/m-p/3442424#M826735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need to join these tables EKPO(Purchasing Doc Item), EKET(Scheduling Agreement Schedule line), MAKT(Material Desc), LIPS(SD Doc: Delivery Item data) tables.&lt;/P&gt;&lt;P&gt;The fields that EKPO has is ebeln,ebelp,matnr,menge, meins&lt;/P&gt;&lt;P&gt;The fields that EKET has is ebeln,ebelp,etenr,dat01.&lt;/P&gt;&lt;P&gt;The fields that MAKT has is matnr,spras,makts.&lt;/P&gt;&lt;P&gt;The fields that LIPS has is vbeln,posnr,matnr,vgpos,erdat,vrkme,lfimg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output needs to as&lt;/P&gt;&lt;P&gt;ebeln from table ekpo-ebeln&lt;/P&gt;&lt;P&gt;ebelp from table lips-vgpos&lt;/P&gt;&lt;P&gt;matnr from table ekpo-matnr&lt;/P&gt;&lt;P&gt;menge from table ekpo-menge&lt;/P&gt;&lt;P&gt;meins from table ekpo-meins&lt;/P&gt;&lt;P&gt;vrkme from table lips-vrkme&lt;/P&gt;&lt;P&gt;vbeln from table lips-vbeln&lt;/P&gt;&lt;P&gt;lfimg from table lips-lfimg&lt;/P&gt;&lt;P&gt;erdat from table lips-erdat&lt;/P&gt;&lt;P&gt;dat01 from table eket-dat01&lt;/P&gt;&lt;P&gt;maktx from table makt-maktx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The selection screen has ekpo-ebeln and eket-dat01 as select-options&lt;/P&gt;&lt;P&gt;and parameters as ekpo-bukrs and ekpo-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest as to how to write this join with the above tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2008 07:36:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-join-statements/m-p/3442424#M826735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-09T07:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: need help in Join statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-join-statements/m-p/3442425#M826736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai see the fields in tables vbfa and vbpa. i think we hav to use one of these to join ur tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sudheer b on Feb 9, 2008 9:02 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2008 08:02:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-join-statements/m-p/3442425#M826736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-09T08:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: need help in Join statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-join-statements/m-p/3442426#M826737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried joining your tables using inner join. Here is sample code which I have written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZAM_TABLEJOIN.&lt;/P&gt;&lt;P&gt;tables: ekpo,eket,makt,lips.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: s_ebeln for ekpo-ebeln,&lt;/P&gt;&lt;P&gt;                s_dat01 for eket-dat01.&lt;/P&gt;&lt;P&gt;parameters: p_bukrs type ekpo-bukrs,&lt;/P&gt;&lt;P&gt;            p_werks type ekpo-werks.&lt;/P&gt;&lt;P&gt;types: begin of itabtype,&lt;/P&gt;&lt;P&gt;ebeln type ekpo-ebeln,&lt;/P&gt;&lt;P&gt;ebelp type lips-vgpos,&lt;/P&gt;&lt;P&gt;matnr type ekpo-matnr,&lt;/P&gt;&lt;P&gt;menge type ekpo-menge,&lt;/P&gt;&lt;P&gt;meins type ekpo-meins,&lt;/P&gt;&lt;P&gt;vrkme type lips-vrkme,&lt;/P&gt;&lt;P&gt;vbeln type lips-vbeln,&lt;/P&gt;&lt;P&gt;lfimg type lips-lfimg,&lt;/P&gt;&lt;P&gt;erdat type lips-erdat,&lt;/P&gt;&lt;P&gt;dat01 type eket-dat01,&lt;/P&gt;&lt;P&gt;maktx type makt-maktx,&lt;/P&gt;&lt;P&gt;end of itabtype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab type standard table of itabtype,&lt;/P&gt;&lt;P&gt;      wa like line of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~ebeln&lt;/P&gt;&lt;P&gt;d~vgpos&lt;/P&gt;&lt;P&gt;a~matnr&lt;/P&gt;&lt;P&gt;a~menge&lt;/P&gt;&lt;P&gt;a~meins&lt;/P&gt;&lt;P&gt;d~vrkme&lt;/P&gt;&lt;P&gt;d~vbeln&lt;/P&gt;&lt;P&gt;d~lfimg&lt;/P&gt;&lt;P&gt;d~erdat&lt;/P&gt;&lt;P&gt;b~dat01&lt;/P&gt;&lt;P&gt;c~maktx&lt;/P&gt;&lt;P&gt;FROM ekpo AS a&lt;/P&gt;&lt;P&gt;INNER JOIN eket AS b&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;ebeln EQ b&lt;/SUB&gt;ebeln AND a&lt;SUB&gt;ebelp EQ b&lt;/SUB&gt;ebelp&lt;/P&gt;&lt;P&gt;INNER JOIN makt AS c&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;matnr EQ c&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;INNER JOIN lips AS d&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;matnr EQ d&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;INTO TABLE itab&lt;/P&gt;&lt;P&gt;WHERE a&lt;SUB&gt;ebeln IN s_ebeln AND b&lt;/SUB&gt;dat01 IN s_dat01 AND a~bukrs EQ p_bukrs&lt;/P&gt;&lt;P&gt;AND a~werks EQ p_werks.&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-ebeln, wa-ebelp,wa-matnr,wa-menge, wa-meins, wa-vrkme,&lt;/P&gt;&lt;P&gt;wa-vbeln, wa-lfimg, wa-erdat, wa-dat01, wa-maktx.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you. Please correct me if there is anything wrong in this code. &lt;/P&gt;&lt;P&gt;Reward All Helpful Answers!!!!&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2008 08:42:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-in-join-statements/m-p/3442426#M826737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-09T08:42:20Z</dc:date>
    </item>
  </channel>
</rss>

