<?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 is not properly executing for CDHDR table? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-is-not-properly-executing-for-cdhdr-table/m-p/5418136#M1243868</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;This is not so simple. Because CDHDR table has more number of entries in any production system. Usually it records each change occured. In the production system which i work on, CDHDR table has 50,00,00,000 records. Hence this cannot be solved under anycase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better schedule it as a background job. Because most of the time TIME_OUT dump will occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead try to find some other logic for splitting your Select statement without using INNER JOIN. But as of my understanding, there is no logic i suppose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert back for any corrections needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Mar 2009 13:15:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-25T13:15:24Z</dc:date>
    <item>
      <title>SELECT statement is not properly executing for CDHDR table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-is-not-properly-executing-for-cdhdr-table/m-p/5418135#M1243867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a performance tunning problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have select options like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer : S_KUNNR&lt;/P&gt;&lt;P&gt;Create date : S_CRT_DT&lt;/P&gt;&lt;P&gt;Change Date : S_CHG_DT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this i am executing following select query.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Get the customer details.
  SELECT t1~kunnr t2~name1 t2~name2 t2~name3 t2~sort1
      INTO TABLE i_cust_details
      FROM kna1 AS t1
      INNER JOIN adrc AS t2
        ON t2~addrnumber = t1~adrnr
      INNER JOIN cdhdr AS t3
        ON t3~objectid = t1~kunnr
    WHERE t1~kunnr IN s_kunnr            " Customer
      AND t1~erdat IN s_crt_dt           " Creation date
*     Following sub query for the most recent changed date.
      AND t3~changenr = ( SELECT MAX( changenr )
                               FROM cdhdr AS t4
                            WHERE t4~objectclas = wc_objclass
                              AND t4~objectid   = t1~kunnr
                              AND t4~udate     IN s_chg_dt )
 
      AND t3~objectclas = wc_objclass
      AND t1~ktokd = ZACT1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it takes mauch time.&lt;/P&gt;&lt;P&gt;how can i solve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 12:00:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-is-not-properly-executing-for-cdhdr-table/m-p/5418135#M1243867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T12:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT statement is not properly executing for CDHDR table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-is-not-properly-executing-for-cdhdr-table/m-p/5418136#M1243868</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;This is not so simple. Because CDHDR table has more number of entries in any production system. Usually it records each change occured. In the production system which i work on, CDHDR table has 50,00,00,000 records. Hence this cannot be solved under anycase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better schedule it as a background job. Because most of the time TIME_OUT dump will occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead try to find some other logic for splitting your Select statement without using INNER JOIN. But as of my understanding, there is no logic i suppose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert back for any corrections needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 13:15:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-is-not-properly-executing-for-cdhdr-table/m-p/5418136#M1243868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T13:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT statement is not properly executing for CDHDR table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-is-not-properly-executing-for-cdhdr-table/m-p/5418137#M1243869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please do not cross post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 13:59:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-is-not-properly-executing-for-cdhdr-table/m-p/5418137#M1243869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T13:59:28Z</dc:date>
    </item>
  </channel>
</rss>

