<?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: database table access in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-access/m-p/2272624#M493776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOur select query seems to be really bad as far as performance is concerned. Firs of all , until and unless required, you should never select data from a DB table without use of primary keys as selection criteria. Make sure your selection criteria is complete and as specific as possible...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  You have written in where clause " kostl = bseg-kostl AND prctr = bseg-prctr.&lt;/P&gt;&lt;P&gt;"..what does this mean?? you are comparing 'kostl' value with bseg-kostl value? that doesnt make sense.check your selection criteria again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert if you have any issues.&lt;/P&gt;&lt;P&gt;Pls pls mark helpful answers.&lt;/P&gt;&lt;P&gt;Cheers,   &lt;/P&gt;&lt;P&gt;Karan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 May 2007 11:17:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-21T11:17:27Z</dc:date>
    <item>
      <title>database table access</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-access/m-p/2272622#M493774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi iam using a select command in which iam selecting from besg table . but the problem is that around 4000 record are getting selected so it takes a lot of time to execute as well as it is giving a time out error for another object that is also using the same exit. can u plss suggest me how to overcome this problem?&lt;/P&gt;&lt;P&gt;MY SAMPLE CODE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT hkont&lt;/P&gt;&lt;P&gt;         FROM bseg&lt;/P&gt;&lt;P&gt;         INTO&lt;/P&gt;&lt;P&gt;         TABLE gi_cstctr&lt;/P&gt;&lt;P&gt;         WHERE&lt;/P&gt;&lt;P&gt;         kostl = bseg-kostl AND prctr = bseg-prctr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.                                                                      "if rows are returned&lt;/P&gt;&lt;P&gt;    SORT gi_cstctr BY hkont.                                                             "sorting the internal table.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*if cost centers are there in the internal table then loop the internal table into corresponding work area and if the G/L account  matches any costcenter in the table&lt;/P&gt;&lt;P&gt;  CLEAR gw_cstctr.&lt;/P&gt;&lt;P&gt;  IF NOT gi_cstctr[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    LOOP AT gi_cstctr INTO  gw_cstctr.&lt;/P&gt;&lt;P&gt;      IF gw_cstctr-hkont EQ lv_hkont.&lt;/P&gt;&lt;P&gt;        lv_flag = gc_x.                                                                "set the flag to x&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      CLEAR gw_cstctr.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF lv_flag = space.                                                                "if the flag is not set&lt;/P&gt;&lt;P&gt;    MESSAGE s031(yd01) WITH lv_hkont  gw_cstctr-kostl    .                           "display the message&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 10:28:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-access/m-p/2272622#M493774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-21T10:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: database table access</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-access/m-p/2272623#M493775</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;try to hit the table BSEG by primary keys or else secondary indexes..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will grow up ur rperformance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewards if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;nazeer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 10:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-access/m-p/2272623#M493775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-21T10:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: database table access</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-access/m-p/2272624#M493776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOur select query seems to be really bad as far as performance is concerned. Firs of all , until and unless required, you should never select data from a DB table without use of primary keys as selection criteria. Make sure your selection criteria is complete and as specific as possible...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  You have written in where clause " kostl = bseg-kostl AND prctr = bseg-prctr.&lt;/P&gt;&lt;P&gt;"..what does this mean?? you are comparing 'kostl' value with bseg-kostl value? that doesnt make sense.check your selection criteria again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert if you have any issues.&lt;/P&gt;&lt;P&gt;Pls pls mark helpful answers.&lt;/P&gt;&lt;P&gt;Cheers,   &lt;/P&gt;&lt;P&gt;Karan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 11:17:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-access/m-p/2272624#M493776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-21T11:17:27Z</dc:date>
    </item>
  </channel>
</rss>

