<?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: please validate my select stmt. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557232#M1075810</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your For All entries  is gt_soldto internal table but the where conditions are w.r.t to something else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;K.Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Oct 2008 04:49:01 GMT</pubDate>
    <dc:creator>kiran_k8</dc:creator>
    <dc:date>2008-10-04T04:49:01Z</dc:date>
    <item>
      <title>please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557231#M1075809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can I use for all entries IN &lt;/P&gt;&lt;P&gt;with offset ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT KUNNR &lt;/P&gt;&lt;P&gt;    FROM kna1&lt;/P&gt;&lt;P&gt;    INTO TABLE gt_kna1&lt;/P&gt;&lt;P&gt;   FOR ALL ENTRIES IN gt_soldto&lt;/P&gt;&lt;P&gt;   WHERE name2+7(10) = gt_bstnk_storeno_kunnr-store_no&lt;/P&gt;&lt;P&gt;   OR    j_3astcu    = gt_bstnk_storeno_kunnr-store_no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide me ... I need to select &lt;STRONG&gt;where kna1-name2&lt;/STRONG&gt; ( from 7th postion onwards )  contains  &lt;STRONG&gt;the internal table value&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;then select  kunnr field from kna1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2008 04:40:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557231#M1075809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-04T04:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557232#M1075810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your For All entries  is gt_soldto internal table but the where conditions are w.r.t to something else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;K.Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2008 04:49:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557232#M1075810</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2008-10-04T04:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557233#M1075811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really sorry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT KUNNR &lt;/P&gt;&lt;P&gt;FROM kna1&lt;/P&gt;&lt;P&gt;INTO TABLE gt_kna1&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN gt_soldto&lt;/P&gt;&lt;P&gt;WHERE name2+7(10) = gt_soldto-store_no&lt;/P&gt;&lt;P&gt;OR j_3astcu = gt_soldto-store_no&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is my select stmt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2008 05:01:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557233#M1075811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-04T05:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557234#M1075812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, &lt;/P&gt;&lt;P&gt;This code may help u...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIELD-SYMBOLS: &amp;lt;fs&amp;gt; like line of gt_soldto.

LOOP AT gt_soldto assigning &amp;lt;fs&amp;gt;.
CONCATENATE '%' &amp;lt;fs&amp;gt;-store_no into &amp;lt;fs&amp;gt;-store_no.
ENDLOOP

SELECT KUNNR
FROM kna1
INTO TABLE gt_kna1
FOR ALL ENTRIES IN gt_soldto
WHERE name2 LIKE gt_soldto-store_no
OR j_3astcu = gt_soldto-store_no
.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sukriti Saha on Oct 4, 2008 7:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2008 05:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557234#M1075812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-04T05:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557235#M1075813</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;You can not offset the field name in the where condition(i.e left side of operator)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE &lt;STRONG&gt;name2+7(10)&lt;/STRONG&gt; = gt_bstnk-store_no.............&amp;gt; wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use offset right side of operator&lt;/P&gt;&lt;P&gt;like this way matnr = &lt;STRONG&gt;i_mara-matnr+0(18)&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2008 07:03:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557235#M1075813</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2008-10-04T07:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557236#M1075814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the following code - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case cases you cannot use offset in select statement and hence use substr &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT KUNNR FROM kna1&lt;/P&gt;&lt;P&gt;INTO TABLE gt_kna1&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN gt_soldto&lt;/P&gt;&lt;P&gt;WHERE substr(name2,7,10) IN gt_bstnk_storeno_kunnr-store_no&lt;/P&gt;&lt;P&gt;OR j_3astcu = gt_bstnk_storeno_kunnr-store_no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Siddhi Daftary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2008 07:27:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557236#M1075814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-04T07:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557237#M1075815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not just press F1 on SELECT?? None of the other answers here are correct. Only one approaches correctness.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Oct 2008 17:37:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557237#M1075815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-04T17:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557238#M1075816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Rob.  (Yes There is no one in Performance tunning like you solve :-)....)&lt;/P&gt;&lt;P&gt; Yes None of the answer is correct. Your answer about correction is correct.  THANK YOU!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with F1 help ... it did not help much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw in debugging some where ... the offset is allowed .&lt;/P&gt;&lt;P&gt;But I missed to copy that and to document for my reference recently.  I hoped on SDN ....Still waiting for some as well as looking trying my self with F1 and all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did  any body do this offset in SELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Oct 2008 03:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557238#M1075816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-05T03:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557239#M1075817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After pressing F1 on SELECT, look at the portion on WHERE. (This isn't performance; it's syntax).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Oct 2008 14:36:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557239#M1075817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-05T14:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557240#M1075818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAM,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ur internal table is FOR ALL ENTRIES IN is "gt_soldto" ...&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;the table in for all entries need to be compared with in the WHERE clause.. &lt;/P&gt;&lt;P&gt;but you where not using the internal table "gt_soldto" in your where clause..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This leads to syntax error....&lt;/P&gt;&lt;P&gt;It has to lead to error .. COZ, There is no meaning in having a table in FOR ALL ENTRIES without using it in where clause.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make an additional comaprision between the fields of "KNA1" and "gt_soldto" ..  that will resolve your prob...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Oct 2008 18:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557240#M1075818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-05T18:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: please validate my select stmt.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557241#M1075819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry - this isn't as simple as I first thought.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution I was thinking of involved patterns (Which is in the HELP for SELECT). But since you are using FOR ALL ENTRIES and not SELECT-OPTIONS or a range table, that doesn't help much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can still use a pattern, but it will involve looping through the internal table, and changing it to a pattern and using that in the SELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternative is native SQL, but I think the first is better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for my confusion  &lt;EM&gt;Mea culpa&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 20:44:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-validate-my-select-stmt/m-p/4557241#M1075819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T20:44:46Z</dc:date>
    </item>
  </channel>
</rss>

