<?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/3588235#M863960</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on what field you are using for the condition check . Usually posting dates so use MKPF. You may aswell inner join the two tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Mar 2008 09:31:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-26T09:31:28Z</dc:date>
    <item>
      <title>Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588234#M863959</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;I have to develop a report in which I have to deal with 2 tables MKPF and MSEG. Can you please tell me which should I start with in my select st. in the &lt;/P&gt;&lt;P&gt;Start-Of-Selection. event block. &lt;/P&gt;&lt;P&gt;Thanks .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:28:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588234#M863959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:28: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/3588235#M863960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on what field you are using for the condition check . Usually posting dates so use MKPF. You may aswell inner join the two tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:31:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588235#M863960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588236#M863961</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;ERDAT A&lt;SUB&gt;ERNAM A&lt;/SUB&gt;XBLNR A&lt;SUB&gt;BLDAT A&lt;/SUB&gt;LIFNR A&lt;SUB&gt;WERKS A&lt;/SUB&gt;IVAL&lt;/P&gt;&lt;P&gt;    A&lt;SUB&gt;MATDOC A&lt;/SUB&gt;SWERK A&lt;SUB&gt;REV_DATE A&lt;/SUB&gt;RCAN B&lt;SUB&gt;MATNR B&lt;/SUB&gt;GR_MADE B&lt;SUB&gt;MBLNR B&lt;/SUB&gt;MJAHR B~MENGE&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;G1SNO = B&lt;/SUB&gt;G1SNO&lt;/P&gt;&lt;P&gt;             INTO CORRESPONDING FIELDS OF TABLE ITAB&lt;/P&gt;&lt;P&gt;             WHERE A~BUDAT IN ERDAT AND&lt;/P&gt;&lt;P&gt;                   A~LIFNR IN LIFNR AND&lt;/P&gt;&lt;P&gt;                   A~WERKS IN WERKS AND&lt;/P&gt;&lt;P&gt;                   B~MATNR IN MATNR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588236#M863961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588237#M863962</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 should start from MKPF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:35:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588237#M863962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588238#M863963</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 start with the Table mkpf , however it depends on where you are using the conditional checks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:36:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588238#M863963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588239#M863964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the sample code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   select single mseg&lt;SUB&gt;mblnr mseg&lt;/SUB&gt;menge mseg&lt;SUB&gt;dmbtr mseg&lt;/SUB&gt;werks mseg~lgort&lt;/P&gt;&lt;P&gt;    mseg&lt;SUB&gt;bwart mseg&lt;/SUB&gt;shkzg mseg&lt;SUB&gt;ebeln mseg&lt;/SUB&gt;ebelp&lt;/P&gt;&lt;P&gt;    into corresponding fields of table&lt;/P&gt;&lt;P&gt;    output2 from mseg inner join mkpf on ( mseg&lt;SUB&gt;mblnr = mkpf&lt;/SUB&gt;mblnr and mseg&lt;SUB&gt;mjahr = mkpf&lt;/SUB&gt;mjahr )&lt;/P&gt;&lt;P&gt;    and mseg&lt;SUB&gt;bwart = '351' and mseg&lt;/SUB&gt;shkzg = 'S'&lt;/P&gt;&lt;P&gt;    and mkpf~budat in s_date.&lt;/P&gt;&lt;P&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;Sugumar G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:37:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588239#M863964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588240#M863965</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 u should select from mkpf table that is master tabel&lt;/P&gt;&lt;P&gt;than based on u can selct the data from mseg table.&lt;/P&gt;&lt;P&gt;Please dont use join condition because we r using  cluster table(MSEG) and pooled table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588240#M863965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588241#M863966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this condition, to get the list of material with respect to the list from table  mseg.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:42:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588241#M863966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588242#M863967</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;tables:mseg,MKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_mseg occurs 0,&lt;/P&gt;&lt;P&gt;     MBLNR like mseg-MBLNR,&lt;/P&gt;&lt;P&gt;     MJAHR like mseg-MJAHR,&lt;/P&gt;&lt;P&gt;     ZEILE like mseg-ZEILE,&lt;/P&gt;&lt;P&gt;     end of it_mseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_mkpf occurs 0,&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;      BLART like mkpf-BLART,&lt;/P&gt;&lt;P&gt;      end of it_mkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:s_mblnr for mkpf-mblnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select      MBLNR&lt;/P&gt;&lt;P&gt;     MJAHR&lt;/P&gt;&lt;P&gt;     ZEILE&lt;/P&gt;&lt;P&gt;     from mseg&lt;/P&gt;&lt;P&gt;     into table it_mseg&lt;/P&gt;&lt;P&gt;     where mblnr in s_mblnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     select MBLNR&lt;/P&gt;&lt;P&gt;      MJAHR&lt;/P&gt;&lt;P&gt;      BLART&lt;/P&gt;&lt;P&gt;      from mkpf&lt;/P&gt;&lt;P&gt;      into table it_mkpf&lt;/P&gt;&lt;P&gt;      for all entries in it_mseg&lt;/P&gt;&lt;P&gt;      where mblnr = it_mseg-mblnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:42:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588242#M863967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:42: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/3588243#M863968</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;its depend of the ur requirement....coz MSEG is the master table and MKPF hv posting date... better to do the inner join both of table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regatd&lt;/P&gt;&lt;P&gt;nawa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:47:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588243#M863968</guid>
      <dc:creator>Nawanandana</dc:creator>
      <dc:date>2008-03-26T09:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588244#M863969</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;PRE&gt;&lt;CODE&gt;START-OF-SELECTION.

  SELECT  
MSEG~EXBWR
'MSEG~EXVKW
MSEG~GRUND
'MSEG~KDAUF
MSEG~KDEIN
MSEG~KDPOS
MSEG~KOSTL
MSEG~KUNNR
MSEG~KZBEW
    INTO CORRESPONDING FIELDS OF TABLE ITAB
    FROM MKPF INNER JOIN MSEG
    ON    MKPF~MANDT = MSEG~MANDT
      AND MKPF~MBLNR = MSEG~MBLNR
      AND MKPF~MJAHR = MSEG~MJAHR
    FOR ALL ENTRIES IN MATNR
    WHERE MATNR = MATNR-LOW
      AND MSEG~AUFNR IN AUFNR
      AND MKPF~BUDAT IN BUDAT
      AND MSEG~BWART IN BWART
      AND MSEG~CHARG IN CHARG
      AND MSEG~DMBTR IN DMBTR
      AND MSEG~KUNNR IN KUNNR
      AND MSEG~LGORT IN LGORT
      AND MSEG~LIFNR IN LIFNR
      AND MKPF~MBLNR IN MBLNR
      AND MKPF~MJAHR IN MJAHR
      AND MSEG~SOBKZ IN SOBKZ
      AND MKPF~USNAM IN USNAM
      AND MKPF~VGART IN VGART
      AND MSEG~WERKS IN WERKS
      AND MSEG~XAUTO IN XAUTO
      AND MKPF~XBLNR IN XBLNR&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ballack.&lt;/P&gt;&lt;P&gt;Reward Points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:50:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588244#M863969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T09:50: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/3588245#M863970</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;Start-Of-Selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MSEG TABLE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select mblnr lgort ablad wempf menge from mseg into corresponding&lt;/P&gt;&lt;P&gt;           fields of table t_mseg where&lt;/P&gt;&lt;P&gt;                               werks = '5900' and&lt;/P&gt;&lt;P&gt;                               bwart = '101' and&lt;/P&gt;&lt;P&gt;                               bwart = '102' and&lt;/P&gt;&lt;P&gt;                               wempf = wa_mseg-wempf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_mseg INTO wa_mseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MKPF TABLE&lt;/P&gt;&lt;P&gt;    select budat mblnr xblnr from mkpf into corresponding&lt;/P&gt;&lt;P&gt;         fields of table t_mkpf where&lt;/P&gt;&lt;P&gt;                                 budat ge pa_sdate and&lt;/P&gt;&lt;P&gt;                                 budat le pa_edate .&lt;/P&gt;&lt;P&gt;                                  &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;Are my select st. correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 05:11:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588245#M863970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T05:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588246#M863971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any ideas please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 05:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588246#M863971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T05:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588247#M863972</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;Try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select mblnr lgort ablad wempf menge from mseg into corresponding&lt;/P&gt;&lt;P&gt;fields of table t_mseg where&lt;/P&gt;&lt;P&gt;werks = '5900' and&lt;/P&gt;&lt;P&gt;bwart = '101' and&lt;/P&gt;&lt;P&gt;bwart = '102' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MKPF TABLE&lt;/P&gt;&lt;P&gt;select budat mblnr xblnr from mkpf into corresponding&lt;/P&gt;&lt;P&gt;fields of table t_mkpf &lt;/P&gt;&lt;P&gt;for all entries in t_mseg&lt;/P&gt;&lt;P&gt;where mblnr = t_mseg-mblnr and&lt;/P&gt;&lt;P&gt;budat ge pa_sdate and&lt;/P&gt;&lt;P&gt;budat le pa_edate .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 05:45:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/3588247#M863972</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2008-03-27T05:45:32Z</dc:date>
    </item>
  </channel>
</rss>

