<?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: MSEG select performance problem - Please help me (URGERNT) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343660#M801628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;1) Avoid select into corresponding fields and use select into table.&lt;/P&gt;&lt;P&gt;2) Check the order of fields in the where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Gandhi Subramani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2008 01:08:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-30T01:08:33Z</dc:date>
    <item>
      <title>MSEG select performance problem - Please help me (URGERNT)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343656#M801624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following SELECT stmt which is taking more time to execute......Kindly help me how to improve performance ...&lt;/P&gt;&lt;P&gt;YOUR HELP IS HIGHLY APPRECIATED....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;SELECT  a~mblnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;a~matnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;a~werks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;a~charg&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;a~lifnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;a~bualt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;a~erfmg&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;a~ebeln&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;a~ebelp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;b~budat&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;               &lt;STRONG&gt;INTO CORRESPONDING FIELDS OF TABLE it_mseg_mkpf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;STRONG&gt;FROM mseg AS a INNER JOIN mkpf AS b&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;ON a&lt;SUB&gt;mblnr EQ b&lt;/SUB&gt;mblnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;               &lt;STRONG&gt;WHERE a~matnr IN s_matnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                 &lt;STRONG&gt;AND a~werks IN s_werks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                 &lt;STRONG&gt;AND a~lifnr IN s_lifnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                 &lt;STRONG&gt;AND a~bwart EQ p_bwart&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                 &lt;STRONG&gt;AND ( a&lt;SUB&gt;ebeln NE ' ' AND a&lt;/SUB&gt;ebeln IN s_ebeln )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                 &lt;STRONG&gt;AND b~budat IN s_budat.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT it_mseg_mkpf IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;SELECT matnr bismt zzshelf_life FROM mara INTO  TABLE it_mara&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    *		FOR ALL ENTRIES IN it_mseg_mkpf*&lt;/P&gt;&lt;P&gt;    *		WHERE matnr = it_mseg_mkpf-matnr.*&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT it_mara IS INITIAL.&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;SELECT matnr maktx FROM makt INTO TABLE it_makt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    *					FOR ALL ENTRIES IN it_mara*&lt;/P&gt;&lt;P&gt;    *			WHERE matnr = it_mara-matnr.*  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2008 11:54:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343656#M801624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-23T11:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: MSEG select performance problem - Please help me (URGERNT)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343657#M801625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not equal is always a problem on the index, it does tell hat you want, but what you don't, &lt;/P&gt;&lt;P&gt;it can not support an index-search&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the NE does not help&lt;/P&gt;&lt;P&gt;AND ( a&lt;SUB&gt;ebeln NE ' ' AND a&lt;/SUB&gt;ebeln IN s_ebeln )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try two branches for the whole select the one where s_ebeln is NOT initial,&lt;/P&gt;&lt;P&gt;there you write &lt;/P&gt;&lt;P&gt;AND  a~ebeln IN s_ebeln &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the other branch where s_ebeln is initial, is hopefully less important&lt;/P&gt;&lt;P&gt;AND  a~ebeln NE ' ' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2008 12:07:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343657#M801625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-23T12:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: MSEG select performance problem - Please help me (URGERNT)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343658#M801626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Join between MSEG and MKPF : Add the MJAHR field in join condition to give full key of table.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ON a&lt;SUB&gt;mblnr EQ b&lt;/SUB&gt;mblnr AND a&lt;SUB&gt;mjahr EQ b&lt;/SUB&gt;mjahr&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The not-equal test also generates performance problems, try to adjust the s_ebeln to insure that initial value is not selected (if empty use a dummy range like 00000000-999999999)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2008 12:23:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343658#M801626</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-01-23T12:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: MSEG select performance problem - Please help me (URGERNT)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343659#M801627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~mblnr&lt;/P&gt;&lt;P&gt;a~matnr&lt;/P&gt;&lt;P&gt;a~werks&lt;/P&gt;&lt;P&gt;a~charg&lt;/P&gt;&lt;P&gt;a~lifnr&lt;/P&gt;&lt;P&gt;a~bualt&lt;/P&gt;&lt;P&gt;a~erfmg&lt;/P&gt;&lt;P&gt;a~ebeln&lt;/P&gt;&lt;P&gt;a~ebelp&lt;/P&gt;&lt;P&gt;b~budat&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_mseg_mkpf&lt;/P&gt;&lt;P&gt;FROM &lt;STRONG&gt;mkpf AS b INNER JOIN mseg AS a&lt;/STRONG&gt;  (although result will be same by reversing this join it's better to keep header on left of the join)&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;mblnr EQ b&lt;/SUB&gt;mblnr &lt;STRONG&gt;and a&lt;SUB&gt;mjahr EQ b&lt;/SUB&gt;mjahr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;WHERE a~matnr IN s_matnr&lt;/P&gt;&lt;P&gt;AND a~werks IN s_werks&lt;/P&gt;&lt;P&gt;AND a~lifnr IN s_lifnr&lt;/P&gt;&lt;P&gt;AND a~bwart EQ p_bwart&lt;/P&gt;&lt;P&gt;AND ( a&lt;SUB&gt;ebeln NE ' ' AND a&lt;/SUB&gt;ebeln IN s_ebeln )&lt;/P&gt;&lt;P&gt;AND b~budat IN s_budat. &lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;(if possible, give mjahr in you selection screen and specify in where condition)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT &lt;STRONG&gt;it_mseg_mkpf [ ]&lt;/STRONG&gt;  IS INITIAL. &lt;STRONG&gt;(previous condition will check header line only)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr bismt zzshelf_life FROM mara INTO TABLE it_mara&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_mseg_mkpf&lt;/P&gt;&lt;P&gt;WHERE matnr = it_mseg_mkpf-matnr&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT &lt;STRONG&gt;it_mara[ ]&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;  IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT matnr maktx FROM makt INTO TABLE it_makt&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_mara&lt;/P&gt;&lt;P&gt;WHERE matnr = it_mara-matnr. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 10:34:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343659#M801627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T10:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: MSEG select performance problem - Please help me (URGERNT)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343660#M801628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;1) Avoid select into corresponding fields and use select into table.&lt;/P&gt;&lt;P&gt;2) Check the order of fields in the where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Gandhi Subramani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 01:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-select-performance-problem-please-help-me-urgernt/m-p/3343660#M801628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T01:08:33Z</dc:date>
    </item>
  </channel>
</rss>

