<?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 Table Performance Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764712#M1117005</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;try to avoid using the code  INTO CORRESPONDING addition as much as possible&lt;/P&gt;&lt;P&gt;and check whether there are any indexes to use so access rate becomes much faster.&lt;/P&gt;&lt;P&gt;One more i would like to tell u is check from your reqiurement whether u can keep&lt;/P&gt;&lt;P&gt;material number mandatory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Nov 2008 09:37:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-10T09:37:52Z</dc:date>
    <item>
      <title>MSEG Table Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764708#M1117001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I have developed one report for Stock age analysis in which i m using MSEG table which is taking so much time when running in production server because of so many records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the code.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MBLNR MJAHR VGART BUDAT&lt;/P&gt;&lt;P&gt;   FROM MKPF&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE IT_MKPF&lt;/P&gt;&lt;P&gt;      WHERE VGART IN S_VGART&lt;/P&gt;&lt;P&gt;      AND BUDAT IN S_DAT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF IT_MKPF[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT MBLNR MATNR  LGORT EBELN EBELP WERKS BWART HSDAT ERFMG LBKUM SHKZG DMBTR SALK3&lt;/P&gt;&lt;P&gt;     FROM MSEG&lt;/P&gt;&lt;P&gt;      INTO CORRESPONDING FIELDS OF TABLE IT_MSEG_TMP&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN IT_MKPF&lt;/P&gt;&lt;P&gt;           WHERE MBLNR = IT_MKPF-MBLNR&lt;/P&gt;&lt;P&gt;              AND MJAHR = IT_MKPF-MJAHR&lt;/P&gt;&lt;P&gt;              AND MATNR IN S_MATNR&lt;/P&gt;&lt;P&gt;              AND WERKS = P_WERKS&lt;/P&gt;&lt;P&gt;              AND LGORT IN S_LGORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF IT_MARA[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT MBLNR MATNR EBELN EBELP WERKS BWART    HSDAT ERFMG&lt;/P&gt;&lt;P&gt;     FROM MSEG&lt;/P&gt;&lt;P&gt;      INTO CORRESPONDING FIELDS OF TABLE IT_MSEG&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;         AND WERKS = P_WERKS&lt;/P&gt;&lt;P&gt;         AND BWART = '101'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both code taking so much time........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 05:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764708#M1117001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T05:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: MSEG Table Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764709#M1117002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every thing is correct in your code i think MSEG table contain huge data but one thing is that you remove the &lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE IT_MSEG_TMP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just keep INTO TABLE IT_MSEG_TMP atleast this will increase the performance before keep INTO TABLE IT_MSEG_TMP keep the fields in the order in the select statement just like internal table structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After fetching the data into the internal table sort the internal table&lt;/P&gt;&lt;P&gt;sort IT_MKPF by MBLNR MJAHR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 05:23:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764709#M1117002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T05:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: MSEG Table Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764710#M1117003</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;avoid using CORRESPONDING FIELDS OF TABLE IT_MSEG_TMP&lt;/P&gt;&lt;P&gt;plus there  are indexes provide in MSEG table .. &lt;/P&gt;&lt;P&gt;u can try using ne of those ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Renu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 05:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764710#M1117003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T05:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: MSEG Table Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764711#M1117004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;May be it is MKPF selection that is taking time when you Z_VGART and S_DAT is not entered in the selection screen.&lt;/P&gt;&lt;P&gt;I also dont see that you are using the MJAHR while selecting the MKPF (you can derive the year by lofrom S_DAT )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 08:58:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764711#M1117004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T08:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: MSEG Table Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764712#M1117005</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;try to avoid using the code  INTO CORRESPONDING addition as much as possible&lt;/P&gt;&lt;P&gt;and check whether there are any indexes to use so access rate becomes much faster.&lt;/P&gt;&lt;P&gt;One more i would like to tell u is check from your reqiurement whether u can keep&lt;/P&gt;&lt;P&gt;material number mandatory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 09:37:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mseg-table-performance-problem/m-p/4764712#M1117005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T09:37:52Z</dc:date>
    </item>
  </channel>
</rss>

