<?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: Ztable Read Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341647#M516189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Getting Planning Sections (Module / Line and Workcenter)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    SELECT  *  FROM  ZPLAN_SECTIONS&lt;/P&gt;&lt;P&gt;               INTO  CORRESPONDING FIELDS OF TABLE IT_PLAN_CAPACIT&lt;/P&gt;&lt;P&gt;               WHERE ZPLANT IN SO_PLANT&lt;/P&gt;&lt;P&gt;               AND   ZMODUL IN SO_MODUL&lt;/P&gt;&lt;P&gt;               AND   ZLINE  IN SO_LINE.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Getting Order Details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;      SELECT   ZPLAN_SECTIONS&lt;SUB&gt;ZPLANT ZPLAN_SECTIONS&lt;/SUB&gt;ZMODUL ZPLAN_SECTIONS&lt;SUB&gt;ZWCENT ZPLAN_SECTIONS&lt;/SUB&gt;ZLINE AFKO&lt;SUB&gt;AUFNR AFKO&lt;/SUB&gt;GAMNG AFKO&lt;SUB&gt;PLNBEZ AFKO&lt;/SUB&gt;GSTRS&lt;/P&gt;&lt;P&gt;               INTO  CORRESPONDING FIELDS OF TABLE IT_PLAN_CAPACIT2&lt;/P&gt;&lt;P&gt;               FROM  ZPLAN_SECTIONS&lt;/P&gt;&lt;P&gt;               INNER JOIN CRHD ON   ZPLAN_SECTIONS&lt;SUB&gt;ZMODUL = CRHD&lt;/SUB&gt;MATYP&lt;/P&gt;&lt;P&gt;                               AND  ZPLAN_SECTIONS&lt;SUB&gt;ZWCENT = CRHD&lt;/SUB&gt;ARBPL&lt;/P&gt;&lt;P&gt;                               AND  ZPLAN_SECTIONS&lt;SUB&gt;ZLINE  = CRHD&lt;/SUB&gt;SORTB&lt;/P&gt;&lt;P&gt;               INNER JOIN AFVC ON   CRHD&lt;SUB&gt;OBJID = AFVC&lt;/SUB&gt;ARBID&lt;/P&gt;&lt;P&gt;               INNER JOIN AFKO ON   AFVC&lt;SUB&gt;AUFPL = AFKO&lt;/SUB&gt;AUFPL&lt;/P&gt;&lt;P&gt;               WHERE ZPLAN_SECTIONS~ZPLANT IN SO_PLANT&lt;/P&gt;&lt;P&gt;               AND   ZPLAN_SECTIONS~ZMODUL IN SO_MODUL&lt;/P&gt;&lt;P&gt;               AND   ZPLAN_SECTIONS~ZLINE  IN SO_LINE&lt;/P&gt;&lt;P&gt;               AND   CRHD~OBJTY = 'A'&lt;/P&gt;&lt;P&gt;               AND   AFVC~STEUS = 'PP09'&lt;/P&gt;&lt;P&gt;               AND   AFKO~GSTRS IN SO_ORDAT.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;      LOOP AT IT_PLAN_CAPACIT2 ASSIGNING &amp;lt;FS_PLAN_CAPACIT&amp;gt;.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Getting Complete Production Qty (From ZPRODUCTION table)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;        SELECT SINGLE  LMNGA&lt;/P&gt;&lt;P&gt;               INTO    &amp;lt;FS_PLAN_CAPACIT&amp;gt;-LMNGA&lt;/P&gt;&lt;P&gt;               FROM    ZPRODUCTION&lt;/P&gt;&lt;P&gt;               WHERE   AUFNR = &amp;lt;FS_PLAN_CAPACIT&amp;gt;-AUFNR&lt;/P&gt;&lt;P&gt;               AND     BUDAT = SO_ORDAT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jun 2007 11:45:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-15T11:45:44Z</dc:date>
    <item>
      <title>Ztable Read Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341644#M516186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have a Z table call ZPRODUCTION there are so many records about 2,000,000 and daily growing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want a select one field from that table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.I have one internal table with 150 records.&lt;/P&gt;&lt;P&gt;2.I looped that table and fetch each record to ZPRODUCTION table for getting one record from that.&lt;/P&gt;&lt;P&gt;My problem is it was getting 15minutes to read that 150 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already create an index to Z table against what I use for where condition.&lt;/P&gt;&lt;P&gt;When I run the program I checked with SM50, action is sequential read&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you anybody help me to solve this matter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 11:21:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341644#M516186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T11:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Ztable Read Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341645#M516187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nelson , &lt;/P&gt;&lt;P&gt;  When you enter the same set of input in SE11 to fetch the data , does it also take the same amount of time.&lt;/P&gt;&lt;P&gt;If not then please do an SQL trace when you access using SE11 and see what is the diffrenece.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 11:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341645#M516187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T11:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Ztable Read Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341646#M516188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;could you please submit the code, so that we can check whats going wrong.&lt;/P&gt;&lt;P&gt;there seem to be a problem in your select statement.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;fazeel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 11:29:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341646#M516188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T11:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ztable Read Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341647#M516189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Getting Planning Sections (Module / Line and Workcenter)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    SELECT  *  FROM  ZPLAN_SECTIONS&lt;/P&gt;&lt;P&gt;               INTO  CORRESPONDING FIELDS OF TABLE IT_PLAN_CAPACIT&lt;/P&gt;&lt;P&gt;               WHERE ZPLANT IN SO_PLANT&lt;/P&gt;&lt;P&gt;               AND   ZMODUL IN SO_MODUL&lt;/P&gt;&lt;P&gt;               AND   ZLINE  IN SO_LINE.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Getting Order Details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;      SELECT   ZPLAN_SECTIONS&lt;SUB&gt;ZPLANT ZPLAN_SECTIONS&lt;/SUB&gt;ZMODUL ZPLAN_SECTIONS&lt;SUB&gt;ZWCENT ZPLAN_SECTIONS&lt;/SUB&gt;ZLINE AFKO&lt;SUB&gt;AUFNR AFKO&lt;/SUB&gt;GAMNG AFKO&lt;SUB&gt;PLNBEZ AFKO&lt;/SUB&gt;GSTRS&lt;/P&gt;&lt;P&gt;               INTO  CORRESPONDING FIELDS OF TABLE IT_PLAN_CAPACIT2&lt;/P&gt;&lt;P&gt;               FROM  ZPLAN_SECTIONS&lt;/P&gt;&lt;P&gt;               INNER JOIN CRHD ON   ZPLAN_SECTIONS&lt;SUB&gt;ZMODUL = CRHD&lt;/SUB&gt;MATYP&lt;/P&gt;&lt;P&gt;                               AND  ZPLAN_SECTIONS&lt;SUB&gt;ZWCENT = CRHD&lt;/SUB&gt;ARBPL&lt;/P&gt;&lt;P&gt;                               AND  ZPLAN_SECTIONS&lt;SUB&gt;ZLINE  = CRHD&lt;/SUB&gt;SORTB&lt;/P&gt;&lt;P&gt;               INNER JOIN AFVC ON   CRHD&lt;SUB&gt;OBJID = AFVC&lt;/SUB&gt;ARBID&lt;/P&gt;&lt;P&gt;               INNER JOIN AFKO ON   AFVC&lt;SUB&gt;AUFPL = AFKO&lt;/SUB&gt;AUFPL&lt;/P&gt;&lt;P&gt;               WHERE ZPLAN_SECTIONS~ZPLANT IN SO_PLANT&lt;/P&gt;&lt;P&gt;               AND   ZPLAN_SECTIONS~ZMODUL IN SO_MODUL&lt;/P&gt;&lt;P&gt;               AND   ZPLAN_SECTIONS~ZLINE  IN SO_LINE&lt;/P&gt;&lt;P&gt;               AND   CRHD~OBJTY = 'A'&lt;/P&gt;&lt;P&gt;               AND   AFVC~STEUS = 'PP09'&lt;/P&gt;&lt;P&gt;               AND   AFKO~GSTRS IN SO_ORDAT.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;      LOOP AT IT_PLAN_CAPACIT2 ASSIGNING &amp;lt;FS_PLAN_CAPACIT&amp;gt;.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Getting Complete Production Qty (From ZPRODUCTION table)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;        SELECT SINGLE  LMNGA&lt;/P&gt;&lt;P&gt;               INTO    &amp;lt;FS_PLAN_CAPACIT&amp;gt;-LMNGA&lt;/P&gt;&lt;P&gt;               FROM    ZPRODUCTION&lt;/P&gt;&lt;P&gt;               WHERE   AUFNR = &amp;lt;FS_PLAN_CAPACIT&amp;gt;-AUFNR&lt;/P&gt;&lt;P&gt;               AND     BUDAT = SO_ORDAT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 11:45:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341647#M516189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T11:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Ztable Read Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341648#M516190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nelson , &lt;/P&gt;&lt;P&gt;  One options is to  use select into table for all entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will reduce the number of hits on the database , but i am not sure if it will reduce the time , becauase then also you will have to loop and modify the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i would suggest is join all the three table , i.e. join this table z.._production.. also in the select statement just above the loop statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagds&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Arun R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 11:47:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341648#M516190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T11:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Ztable Read Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341649#M516191</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;have you checked that your index exists in database? When you create an index most possible it will require another step in order to be created in your database system. Also make sure you have included the mandt field in your index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 11:49:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341649#M516191</guid>
      <dc:creator>kostas_tsioubris</dc:creator>
      <dc:date>2007-06-15T11:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Ztable Read Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341650#M516192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is it not possible for you to take out the select from the loop...i mean execute the select first and get records in a table and then do a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a select within a loop will always reduce performance and should be avoided as much as possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write a select like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lmnga from zproduction into table itab for all entries in IT_PLAN_CAPACIT2 &lt;/P&gt;&lt;P&gt;where aufnr = it_plan_capacit2 and .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this do your looping on the table and read the table you used in the above statement....this will yield better results&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 11:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341650#M516192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T11:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Ztable Read Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341651#M516193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if  AUFNR  BUDAT ARE NOT THE KEY FIELDS YOU CAN TRY THIS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  LMNGA&lt;/P&gt;&lt;P&gt;INTO &amp;lt;FS_PLAN_CAPACIT&amp;gt;-LMNGA&lt;/P&gt;&lt;P&gt;FROM ZPRODUCTION UP TO 1 ROWS&lt;/P&gt;&lt;P&gt;WHERE AUFNR = &amp;lt;FS_PLAN_CAPACIT&amp;gt;-AUFNR&lt;/P&gt;&lt;P&gt;AND BUDAT = SO_ORDAT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT MAY HELP YOU OR BETTER TO GO FOR ALL ENTRIES IT WILL BE FASTER AS SAID BY OTHERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS&lt;/P&gt;&lt;P&gt;SHIBA DUTTA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 11:54:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ztable-read-problem/m-p/2341651#M516193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T11:54:44Z</dc:date>
    </item>
  </channel>
</rss>

