<?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: what is wrong with the select statement? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056256#M1353252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to do that only if we don't have any other options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because why to select unnecessary data first and delete the same.. As I will have lot of entries..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Aug 2009 19:21:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-31T19:21:31Z</dc:date>
    <item>
      <title>what is wrong with the select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056252#M1353248</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;I have a Z table ZTAB with PSPID,PSTRT &amp;amp; POSKI as Primary keys.&lt;/P&gt;&lt;P&gt;I have 6 entries for a record PSPID= 251194004 &amp;amp;	PSTRT =08/24/2009.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PSPID,            PSTART,          POSKI
251194004,	08/24/2009,	1010-02
251194004,	08/24/2009,	1010-03
251194004,	08/24/2009,	1010-05
251194004,	08/24/2009,	1010-10
251194004,	08/24/2009,	1010-11
251194004,	08/24/2009,	1010-14
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT x.

TABLES: ztab.

DATA: it_itab TYPE STANDARD TABLE OF ztab,
     wa_itab TYPE ztab.

PARAMETERS:

p_pspid LIKE ztab-pspid,
p_pstrt LIKE ztab-pstart.

SELECT * FROM ztab INTO CORRESPONDING FIELDS OF TABLE it_itab
WHERE pspid = p_pspid
AND pstart = p_pstrt.


LOOP AT it_itab INTO wa_itab.

  WRITE:/10 wa_itab-pspid , wa_itab-poski.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I execute this report I am getting only 5 records .What could be the mistake? I definetlly need these 2 where conditions.&lt;/P&gt;&lt;P&gt;If I comment S_PSPRT it brings up all 6 entries..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vara K on Aug 31, 2009 8:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 18:57:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056252#M1353248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-31T18:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with the select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056253#M1353249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select PSPID
            PSTART          
            POSKI
            from zitab 
            into table gt_itab
            where  WHERE pspid = p_pspid
                          AND pstart = p_pstrt.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 19:04:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056253#M1353249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-31T19:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with the select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056254#M1353250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nop! it did not work&lt;/P&gt;&lt;P&gt;I am still getting only 5 entries as output instead of 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 19:12:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056254#M1353250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-31T19:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with the select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056255#M1353251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then try this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select PSPID
            PSTART          
            POSKI
            from zitab 
            into table gt_itab
            where  WHERE pspid = p_pspid.

delete gt_itab where pstart NE p_pstrt.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 19:14:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056255#M1353251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-31T19:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with the select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056256#M1353252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to do that only if we don't have any other options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because why to select unnecessary data first and delete the same.. As I will have lot of entries..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 19:21:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056256#M1353252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-31T19:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with the select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056257#M1353253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what i'd do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- check if the problem is in the select statement or at the loop at statement.. debug it if you won't&lt;/P&gt;&lt;P&gt;- i do not use corresponding fields.. and as i don't know how the others fields in your table are... i'd remove the * from your select statement and specify the fields you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select PSPID  PSTART POSKI
into ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- and i didn't understand what you comment to get the right result.. where is S_PSPRT ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at the first look, i cannot see any problem.. and this kind of problem, for me, are the worst ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 19:25:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056257#M1353253</guid>
      <dc:creator>FabioPagoti</dc:creator>
      <dc:date>2009-08-31T19:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with the select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056258#M1353254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to problems of data, review records are stored as column PSTART, record can be followed by a space or character or another date format that is not taken in the condition  pstart = p_pstrt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this information is help to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;José&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 19:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056258#M1353254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-31T19:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with the select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056259#M1353255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect jose.&lt;/P&gt;&lt;P&gt;that's what it.I have awarded you full points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 20:36:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-the-select-statement/m-p/6056259#M1353255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-31T20:36:35Z</dc:date>
    </item>
  </channel>
</rss>

