<?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: how long time take for executing following code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-long-time-take-for-executing-following-code/m-p/3534331#M850315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT MBLNR
         MJAHR
         BUDAT
         FROM MKPF
         INTO TABLE IT_MKPF
         WHERE BUDAT IN S_BUDAT.

*--Read Records from MSEG for all entries in IT_MKPF
  IF NOT IT_MKPF[] IS INITIAL.
    SELECT MBLNR
            MJAHR
            ZEILE
            BWART
            MATNR
            WERKS
            MEINS
            ERFMG
            FROM MSEG
            INTO TABLE IT_MSMK
            FOR ALL ENTRIES IN IT_MKPF
            WHERE MBLNR = IT_MKPF-MBLNR AND
                  MJAHR = IT_MKPF-MJAHR AND
                 ( BWART = '131' OR BWART = '132' ) AND
                 MATNR IN S_MATNR AND
                 WERKS IN S_WERKS.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use Matnr of it_msmk to look into MARA tabel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally, JOINS take much time. Please never use JOIN statements to fetch records. &lt;/P&gt;&lt;P&gt;Use for all entries, and let ur fields fetching be in an order and use INDEXes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveena.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Mar 2008 08:54:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-03T08:54:58Z</dc:date>
    <item>
      <title>how long time take for executing following code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-long-time-take-for-executing-following-code/m-p/3534328#M850312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;how long time take for executing following code&lt;/P&gt;&lt;P&gt;what possibilities for it plz tell me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT lk~mblnr "material doc number&lt;/P&gt;&lt;P&gt;         lk~budat "mat posting date&lt;/P&gt;&lt;P&gt;         lp~zeile "item in material document&lt;/P&gt;&lt;P&gt;         lp~bwart "movement type&lt;/P&gt;&lt;P&gt;         lp~matnr "material no.&lt;/P&gt;&lt;P&gt;         lp~werks "plant&lt;/P&gt;&lt;P&gt;         lp~prctr "profit center&lt;/P&gt;&lt;P&gt;         lp~xauto "item automatically created&lt;/P&gt;&lt;P&gt;         lp~menge "quantity&lt;/P&gt;&lt;P&gt;         lp~dmbtr "amount&lt;/P&gt;&lt;P&gt;         ma~mtart "material group&lt;/P&gt;&lt;P&gt;         ma~matkl "material type&lt;/P&gt;&lt;P&gt;         INTO CORRESPONDING FIELDs OF TABLE i_mseg&lt;/P&gt;&lt;P&gt;         FROM MKPF AS lk INNER JOIN MSEG AS lp&lt;/P&gt;&lt;P&gt;         ON lk&lt;SUB&gt;mblnr EQ lp&lt;/SUB&gt;mblnr&lt;/P&gt;&lt;P&gt;         INNER JOIN mara AS ma&lt;/P&gt;&lt;P&gt;         ON ma&lt;SUB&gt;matnr EQ lp&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;         FOR ALL ENTRIES IN i_faglflexa&lt;/P&gt;&lt;P&gt;         WHERE lp~prctr eq i_faglflexa-prctr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         AND lp~matnr IN s_matnr&lt;/P&gt;&lt;P&gt;         AND lp~xauto ne 'X'&lt;/P&gt;&lt;P&gt;           AND lk~budat le s_budat-high&lt;/P&gt;&lt;P&gt;           AND ma~mtart IN s_mtart&lt;/P&gt;&lt;P&gt;           AND ma~matkl IN s_matkl.&lt;/P&gt;&lt;P&gt;plz guide me&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2008 07:51:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-long-time-take-for-executing-following-code/m-p/3534328#M850312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-03T07:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: how long time take for executing following code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-long-time-take-for-executing-following-code/m-p/3534329#M850313</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;In the ON condition for the JOIN between MKPF and MSEG, try adding MJAHR. Also, donot use MARA in the join. The MSEG table itself is very huge, if you join MARA with it, it will definitely take a long time. Once you have retrieved data from MKPF and MSEG, create a new internal table with all the material numbers and SORT and delete adjacent duplicates. Using this table then access MARA to fetch the required fields using FOR ALL ENTRIES. Now looping at the MKPF_MSEG table, READ the MARA internal table to populate the required fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2008 08:13:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-long-time-take-for-executing-following-code/m-p/3534329#M850313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-03T08:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: how long time take for executing following code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-long-time-take-for-executing-following-code/m-p/3534330#M850314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;    the tcode se30 which is for the performance analysis &lt;/P&gt;&lt;P&gt;for the program or for the tcode  ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2008 08:32:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-long-time-take-for-executing-following-code/m-p/3534330#M850314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-03T08:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: how long time take for executing following code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-long-time-take-for-executing-following-code/m-p/3534331#M850315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT MBLNR
         MJAHR
         BUDAT
         FROM MKPF
         INTO TABLE IT_MKPF
         WHERE BUDAT IN S_BUDAT.

*--Read Records from MSEG for all entries in IT_MKPF
  IF NOT IT_MKPF[] IS INITIAL.
    SELECT MBLNR
            MJAHR
            ZEILE
            BWART
            MATNR
            WERKS
            MEINS
            ERFMG
            FROM MSEG
            INTO TABLE IT_MSMK
            FOR ALL ENTRIES IN IT_MKPF
            WHERE MBLNR = IT_MKPF-MBLNR AND
                  MJAHR = IT_MKPF-MJAHR AND
                 ( BWART = '131' OR BWART = '132' ) AND
                 MATNR IN S_MATNR AND
                 WERKS IN S_WERKS.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use Matnr of it_msmk to look into MARA tabel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally, JOINS take much time. Please never use JOIN statements to fetch records. &lt;/P&gt;&lt;P&gt;Use for all entries, and let ur fields fetching be in an order and use INDEXes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveena.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2008 08:54:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-long-time-take-for-executing-following-code/m-p/3534331#M850315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-03T08:54:58Z</dc:date>
    </item>
  </channel>
</rss>

