<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945216#M389691</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;here you have to declare TABLES : PAYR which will create a table work area with the name PAYR so in your select * all the corresponding fields are populated by select query if you want to display them you have to use WRITE : / PAYR-LIFNR or like that. so it will take the data from that table work area and show the data.&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;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Feb 2007 05:35:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-28T05:35:17Z</dc:date>
    <item>
      <title>select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945209#M389684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;           i came across a select statement like this.&lt;/P&gt;&lt;P&gt;    SELECT * FROM PAYR WHERE&lt;/P&gt;&lt;P&gt;           ZBUKR EQ I_ALL_PAY_COMP-ZBUKR AND&lt;/P&gt;&lt;P&gt;           LIFNR IN S_LIFNR AND&lt;/P&gt;&lt;P&gt;           ZALDT IN S_BUDAT AND&lt;/P&gt;&lt;P&gt;           VOIDR EQ '00'.&lt;/P&gt;&lt;P&gt;   here theres no destination after retreiving.how can this be useful?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 04:59:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945209#M389684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T04:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945210#M389685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prashant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes if there is onlu a single row selection from the statement that you have provided , the row gets filled in the header line having the same line as that of the table and then this line or the fields in this line can be used in further code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunmit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 05:02:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945210#M389685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T05:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945211#M389686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Checkout the workarea PAYR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK THE sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 05:03:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945211#M389686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T05:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945212#M389687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;If PAYR has been declared in the TABLES, then theres no need for a specific workarea.&lt;/P&gt;&lt;P&gt;Any tables that are declared in the TABLES stmt, it is treated as the workarea.&lt;/P&gt;&lt;P&gt;Eg: TABLES: PAYR,&lt;/P&gt;&lt;P&gt;                     BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 05:06:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945212#M389687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T05:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945213#M389688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prashanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The PAYR must have been defined as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : PAYR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case the PAYR is defined as a table having a workarea attached to it. In this case you need not specify the destination in the select statement.&lt;/P&gt;&lt;P&gt;SELECT * FROM PAYR WHERE&lt;/P&gt;&lt;P&gt;ZBUKR EQ I_ALL_PAY_COMP-ZBUKR AND&lt;/P&gt;&lt;P&gt;LIFNR IN S_LIFNR AND&lt;/P&gt;&lt;P&gt;ZALDT IN S_BUDAT AND&lt;/P&gt;&lt;P&gt;VOIDR EQ '00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above statement will fetch the data in the workarea PAYR which has been associated with table PAYR when it is defined as TABLES : PAYR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it resolves ur query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly award points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Himanshu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Himanshu Aggarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 05:11:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945213#M389688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T05:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945214#M389689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prasanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  This is useful for below scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 1.If we already know that for below  select statement there will be only one record &lt;/P&gt;&lt;P&gt;    will exist for given condition.That time selected record will come into header &lt;/P&gt;&lt;P&gt;    area of   "PAYR ".So need to deaclare any structure or internal table to store&lt;/P&gt;&lt;P&gt;    that data.&lt;/P&gt;&lt;P&gt;     Note : this data will get over write for each loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  2.If you want to check sy-subrc value .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 05:15:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945214#M389689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T05:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945215#M389690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI prasanth.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  your code is ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM PAYR WHERE&lt;/P&gt;&lt;P&gt;ZBUKR EQ I_ALL_PAY_COMP-ZBUKR AND&lt;/P&gt;&lt;P&gt;LIFNR IN S_LIFNR AND&lt;/P&gt;&lt;P&gt;ZALDT IN S_BUDAT AND&lt;/P&gt;&lt;P&gt;VOIDR EQ '00'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This will give u a Syntax error , if u doesn't declare PAYR under Tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u declare PAYR in Tables option it will create a Work area with PAYR Structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the code is like this ......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables: &lt;/P&gt;&lt;P&gt;  PAYR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM PAYR WHERE&lt;/P&gt;&lt;P&gt;ZBUKR EQ I_ALL_PAY_COMP-ZBUKR AND&lt;/P&gt;&lt;P&gt;LIFNR IN S_LIFNR AND&lt;/P&gt;&lt;P&gt;ZALDT IN S_BUDAT AND&lt;/P&gt;&lt;P&gt;VOIDR EQ '00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here also you will get Syntax error,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this code you need to put Endselect&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;Tables:&lt;/P&gt;&lt;P&gt;  payr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM PAYR WHERE&lt;/P&gt;&lt;P&gt;ZBUKR EQ I_ALL_PAY_COMP-ZBUKR AND&lt;/P&gt;&lt;P&gt;LIFNR IN S_LIFNR AND&lt;/P&gt;&lt;P&gt;ZALDT IN S_BUDAT AND&lt;/P&gt;&lt;P&gt;VOIDR EQ '00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*some code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;other wise u can write like this also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables:&lt;/P&gt;&lt;P&gt;  payr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT single * FROM PAYR WHERE&lt;/P&gt;&lt;P&gt;ZBUKR EQ I_ALL_PAY_COMP-ZBUKR AND&lt;/P&gt;&lt;P&gt;LIFNR IN S_LIFNR AND&lt;/P&gt;&lt;P&gt;ZALDT IN S_BUDAT AND&lt;/P&gt;&lt;P&gt;VOIDR EQ '00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here u will get only 1 record into PAYR work area&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 05:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945215#M389690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T05:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945216#M389691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;here you have to declare TABLES : PAYR which will create a table work area with the name PAYR so in your select * all the corresponding fields are populated by select query if you want to display them you have to use WRITE : / PAYR-LIFNR or like that. so it will take the data from that table work area and show the data.&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;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 05:35:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1945216#M389691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T05:35:17Z</dc:date>
    </item>
  </channel>
</rss>

