<?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 Fetching data from MSEG table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-data-from-mseg-table/m-p/6427642#M1410357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Abap Gurus ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to prepare a vendor Rating Report . There are particular 2 queries which have perfomance issues .The requirement is such that this report has to be executed for the whole financial year .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st Query :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BELNR GJAHR BLDAT BUDAT CPUDT FROM EKBE INTO CORRESPONDING FIELDS OF TABLE T_ekbe&lt;/P&gt;&lt;P&gt;WHERE BUDAT IN S_SRDATE&lt;/P&gt;&lt;P&gt;AND BEWTP = 'E'&lt;/P&gt;&lt;P&gt;AND WERKS IN S_PLANT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 1: Is there any additional parameter which i can add in the where clause for getting data from ekbe for vendor rating .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above query gives 98,000 records .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After This , another below query is taking 12 minutes to get executed which takes data from MSEG . T_EKBE has 98,000 records .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MBLNR ZEILE CHARG ABLAD EBELN EBELP MATNR MENGE WERKS ABLAD LIFNR FROM MSEG INTO CORRESPONDING FIELDS OF TABLE T_MSEG&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN T_ekbe&lt;/P&gt;&lt;P&gt;WHERE MBLNR = T_ekbe-BELNR&lt;/P&gt;&lt;P&gt;AND MJAHR = T_ekbe-GJAHR&lt;/P&gt;&lt;P&gt;AND MATNR IN S_MATNR&lt;/P&gt;&lt;P&gt;AND WERKS IN S_PLANT&lt;/P&gt;&lt;P&gt;AND BWART = '101'&lt;/P&gt;&lt;P&gt;AND LIFNR IN S_VENDCD .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 2 : How to increase speed of this query for MSEG .&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;&lt;/P&gt;&lt;P&gt;Devendra Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Dec 2009 10:13:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-16T10:13:47Z</dc:date>
    <item>
      <title>Fetching data from MSEG table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-data-from-mseg-table/m-p/6427642#M1410357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Abap Gurus ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to prepare a vendor Rating Report . There are particular 2 queries which have perfomance issues .The requirement is such that this report has to be executed for the whole financial year .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st Query :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BELNR GJAHR BLDAT BUDAT CPUDT FROM EKBE INTO CORRESPONDING FIELDS OF TABLE T_ekbe&lt;/P&gt;&lt;P&gt;WHERE BUDAT IN S_SRDATE&lt;/P&gt;&lt;P&gt;AND BEWTP = 'E'&lt;/P&gt;&lt;P&gt;AND WERKS IN S_PLANT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 1: Is there any additional parameter which i can add in the where clause for getting data from ekbe for vendor rating .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above query gives 98,000 records .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After This , another below query is taking 12 minutes to get executed which takes data from MSEG . T_EKBE has 98,000 records .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MBLNR ZEILE CHARG ABLAD EBELN EBELP MATNR MENGE WERKS ABLAD LIFNR FROM MSEG INTO CORRESPONDING FIELDS OF TABLE T_MSEG&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN T_ekbe&lt;/P&gt;&lt;P&gt;WHERE MBLNR = T_ekbe-BELNR&lt;/P&gt;&lt;P&gt;AND MJAHR = T_ekbe-GJAHR&lt;/P&gt;&lt;P&gt;AND MATNR IN S_MATNR&lt;/P&gt;&lt;P&gt;AND WERKS IN S_PLANT&lt;/P&gt;&lt;P&gt;AND BWART = '101'&lt;/P&gt;&lt;P&gt;AND LIFNR IN S_VENDCD .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 2 : How to increase speed of this query for MSEG .&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;&lt;/P&gt;&lt;P&gt;Devendra Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2009 10:13:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-data-from-mseg-table/m-p/6427642#M1410357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-16T10:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching data from MSEG table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-data-from-mseg-table/m-p/6427643#M1410358</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;there are various ways you can increase speed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) process a few number of records each time say 10000 using parallel processing then automatically the total time will be reduced bt 1/10&lt;/P&gt;&lt;P&gt;2) second query fetch the record based on open cursor approach&lt;/P&gt;&lt;P&gt;3) you declare types in place of doing move corresponding and alos sort the table after 1st query deleting adajcent duplicates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2009 10:59:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-data-from-mseg-table/m-p/6427643#M1410358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-16T10:59:43Z</dc:date>
    </item>
  </channel>
</rss>

