<?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: select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447457#M212208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make a join on MKPF and MSEG, use the materials fetched above and select from MAKT..for material description..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thereby you are using two big tables in a join ,and getting the rest of the info in another select.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Jul 2006 05:53:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-17T05:53:27Z</dc:date>
    <item>
      <title>select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447456#M212207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  if i have to select Doc no.,posting date,material description for the particular Doc no. what is the select Query.&lt;/P&gt;&lt;P&gt;Doc no., is from mseg,&lt;/P&gt;&lt;P&gt;Posting date is from mkpf,&lt;/P&gt;&lt;P&gt;Material description is from makt.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 05:48:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447456#M212207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T05:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447457#M212208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make a join on MKPF and MSEG, use the materials fetched above and select from MAKT..for material description..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thereby you are using two big tables in a join ,and getting the rest of the info in another select.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 05:53:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447457#M212208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T05:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447458#M212209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi amit , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first select MBLNR BUDAT MATNR MENGE from MKPF+ MSEG.&lt;/P&gt;&lt;P&gt;and get the MATNR from that List , and get the MAKTX from MAKT.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT A~MBLNR
         A~MJAHR
         A~VGART
         A~BUDAT
         A~XBLNR
         B~ZEILE
         B~BWART
         B~MATNR
         B~WERKS
         B~KUNNR
         B~SHKZG
         B~MENGE
         B~meins
   FROM  ( MKPF AS A JOIN MSEG AS B
   ON    A~MBLNR = B~MBLNR  AND
         A~MJAHR = B~MJAHR )
   INTO  TABLE T_MSEG
   WHERE A~BUDAT GE S_DATE-LOW     AND
         A~VGART in ('WA' ,'WL')   AND
         B~MATNR in S_MATNR        AND
         B~WERKS IN S_WERKS1       AND
         B~SOBKZ EQ 'V'            AND
         B~KUNNR EQ W_CUST         .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;like .&lt;/P&gt;&lt;P&gt;data : r_matnr for makt-matnr.&lt;/P&gt;&lt;P&gt;loop at t_mseg.&lt;/P&gt;&lt;P&gt;r_matnr-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_matnr-option = 'EQ'.&lt;/P&gt;&lt;P&gt;r_matnr-low = t_mseg-matnr.&lt;/P&gt;&lt;P&gt;apppend r_matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;sort r_matnr by low.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from r_matnr comparing low.&lt;/P&gt;&lt;P&gt;sort r_matnr by low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if r_matnr[] is not initial.&lt;/P&gt;&lt;P&gt;select matnr maktx&lt;/P&gt;&lt;P&gt;frm makt &lt;/P&gt;&lt;P&gt;into corresponding fields of table i_makt.&lt;/P&gt;&lt;P&gt;where matnr in r_matnr&lt;/P&gt;&lt;P&gt;  and SPRAS eq 'E'.&lt;/P&gt;&lt;P&gt;endif/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this case no need to check the Performance of report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prabhu &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 05:57:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447458#M212209</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T05:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447459#M212210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;types: begin of ty_m,                        &lt;/P&gt;&lt;P&gt;mblnr type mkpf-mblnr,                       &lt;/P&gt;&lt;P&gt;budat type mkpf-budat,                       &lt;/P&gt;&lt;P&gt;maktx type makt-maktx, end of ty_m.          &lt;/P&gt;&lt;P&gt;data it_m type table of ty_m with header line&lt;/P&gt;&lt;P&gt;data w_mblnr type mkpf-mblnr.&lt;/P&gt;&lt;P&gt;select mkpf&lt;SUB&gt;mblnr mkpf&lt;/SUB&gt;budat makt~maktx &lt;/P&gt;&lt;P&gt;into corresponding fields of table it_m&lt;/P&gt;&lt;P&gt;from mkpf&lt;/P&gt;&lt;P&gt;join mseg on mseg&lt;SUB&gt;mblnr = mkpf&lt;/SUB&gt;mblnr&lt;/P&gt;&lt;P&gt;join makt on makt&lt;SUB&gt;matnr = mseg&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;         and spras = sy-langu&lt;/P&gt;&lt;P&gt;where mkpf~mblnr = w_mblnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 05:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447459#M212210</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-07-17T05:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447460#M212211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;  Thank u  Can you give me a select query for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 05:58:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447460#M212211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T05:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447461#M212212</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;use join on mseg ,mkpf ,and use &amp;lt;b&amp;gt;for all entries&amp;lt;/b&amp;gt; and get the material description from makt table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 05:59:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447461#M212212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T05:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447462#M212213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select a&lt;SUB&gt;mblnr a&lt;/SUB&gt;mjahr a&lt;SUB&gt;budat a&lt;/SUB&gt;bldat &lt;/P&gt;&lt;P&gt;     b&lt;SUB&gt;matnr b&lt;/SUB&gt;werks b&lt;SUB&gt;zeile b&lt;/SUB&gt;lifnr b&lt;SUB&gt;erfmg b&lt;/SUB&gt;ebeln b~ebelp into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;       from ( mkpf as a inner join mseg as b &lt;/P&gt;&lt;P&gt;              on a&lt;SUB&gt;mblnr = b&lt;/SUB&gt;mblnr and a&lt;SUB&gt;mjahr = b&lt;/SUB&gt;mjahr )&lt;/P&gt;&lt;P&gt;    where a~mblnr = mblnr.&lt;/P&gt;&lt;P&gt; or&lt;/P&gt;&lt;P&gt; select * from wb2_v_mkpf_mseg2 where mblnr = mblnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;note : wb2_v_mkpf_mseg2 is database view&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 06:01:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447462#M212213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T06:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447463#M212214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you give me that select statement and the DATA declarations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: amit teja&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 06:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447463#M212214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T06:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447464#M212215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When ever u have to  write select statement from 2 table its strongly recommended that you select the values from first header table (here its MKPF table in  ur case ) than from the values from segement table (ie mseg in this case ) Than u select values from Makt .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly for PO details selects 1st from EKKO ( header Po table first ) than from the line item table ie ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similary from Delivery ir select vales fro LIKP ( delivery header table ) than from the Details table Lips.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Niraj Kumar\&lt;/P&gt;&lt;P&gt;Patni Computers Systems&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 06:06:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447464#M212215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T06:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447465#M212216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TABLES : MKPF, MSEG.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF ITAB.&lt;/P&gt;&lt;P&gt;          MBLNR LIKE MKPF-MBLNR,&lt;/P&gt;&lt;P&gt;          MJAHR LIKE MKPF-MJAHR,&lt;/P&gt;&lt;P&gt;          BUDAT LIKE MKPF-BUDAT,&lt;/P&gt;&lt;P&gt;          BLDAT LIKE MKPF-BLDAT,&lt;/P&gt;&lt;P&gt;          MATNR LIKE MSEG-MATNR,&lt;/P&gt;&lt;P&gt;          WERKS LIKE MSEG-WERKS,&lt;/P&gt;&lt;P&gt;          ZEILE LIKE MSEG-ZEILE,&lt;/P&gt;&lt;P&gt;          LIFNR LIKE MSEG-LIFNR,&lt;/P&gt;&lt;P&gt;          ERFMG LIKE MSEG-ERFMG,&lt;/P&gt;&lt;P&gt;          EBELN LIKE MSEG-EBELN,&lt;/P&gt;&lt;P&gt;          EBELP LIKE MSEG-EBELP,&lt;/P&gt;&lt;P&gt;       END OF ITAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 06:31:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1447465#M212216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-17T06:31:23Z</dc:date>
    </item>
  </channel>
</rss>

