<?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: Replacing GET by a SELECT query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-get-by-a-select-query/m-p/4004184#M956611</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chinmay,&lt;/P&gt;&lt;P&gt;Since GET and CHECK together works like SELECT and WHERE, you dont need to either put ENDGET or ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think GET will end once it is executed. So it will select records and CHECK will filter them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can easily replace it by selecting data in internal table with where clause in place and then can process data from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;ags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2008 20:48:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-18T20:48:50Z</dc:date>
    <item>
      <title>Replacing GET by a SELECT query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-get-by-a-select-query/m-p/4004183#M956610</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;&lt;/P&gt;&lt;P&gt;i have a get+check options syntax in a report.&lt;/P&gt;&lt;P&gt;i want to replace the code with a select query..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to replace &lt;STRONG&gt;GET + CHECK&lt;/STRONG&gt;by &lt;STRONG&gt;SELECT+WHERE&lt;/STRONG&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when does this GET statement end? like if i replace it with select, then i would have to put ENDSELECT somewhere.. i guess there is no ENDGET in the report..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code is like as follows...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;START-OF-SELECTION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GET ekko FIELDS bstyp ebeln ekorg ekgrp bedat ernam lifnr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CHECK select-options.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CHECK ekko-bstyp = 'F'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PERFORM some_subroutine&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF sy-subrc EQ 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;"LOTS OF CODE PROCESSING"&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TOP-OF-PAGE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;"some code"&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;END-OF-SELECTION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, how do i replace it with the select query?&lt;/P&gt;&lt;P&gt;does the GET statement is executed for entire START-OF-SELECTION event?&lt;/P&gt;&lt;P&gt;also, whenever this GET is executed, does it fetch a single entry from the database table to work-area?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 20:38:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-get-by-a-select-query/m-p/4004183#M956610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T20:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing GET by a SELECT query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-get-by-a-select-query/m-p/4004184#M956611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chinmay,&lt;/P&gt;&lt;P&gt;Since GET and CHECK together works like SELECT and WHERE, you dont need to either put ENDGET or ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think GET will end once it is executed. So it will select records and CHECK will filter them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can easily replace it by selecting data in internal table with where clause in place and then can process data from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;ags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 20:48:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-get-by-a-select-query/m-p/4004184#M956611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T20:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing GET by a SELECT query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-get-by-a-select-query/m-p/4004185#M956612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters:EBELN like ekko-EBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_ekko occurs 0,&lt;/P&gt;&lt;P&gt;         bstyp  like ekko-bstyp,&lt;/P&gt;&lt;P&gt;         EBELN  like ekko-EBELN,&lt;/P&gt;&lt;P&gt;         ekorg  like ekko-ekorg,&lt;/P&gt;&lt;P&gt;         ekgrp  like ekko-ekgrp,&lt;/P&gt;&lt;P&gt;         bedat  like ekko-bedat,&lt;/P&gt;&lt;P&gt;         ernam  like ekko-ernam,&lt;/P&gt;&lt;P&gt;         lifnr  like ekko-lifnr,&lt;/P&gt;&lt;P&gt;      end of it_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select bstyp ebeln ekorg ekgrp bedat ernam lifnr&lt;/P&gt;&lt;P&gt;  into corresponding fields of table it_ekko from&lt;/P&gt;&lt;P&gt;    ekko where ebeln = ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   loop at it_ekko.&lt;/P&gt;&lt;P&gt;   endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 20:50:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-get-by-a-select-query/m-p/4004185#M956612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T20:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing GET by a SELECT query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-get-by-a-select-query/m-p/4004186#M956613</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;PRE&gt;&lt;CODE&gt;data : begin of it_tab,
         bstyp like ekko-bstyp,
        ebeln like ekko-ebeln,
         ekorg like ekko-ekorg,
          ekgrp like ekko-ekgrp,
          bedat like ekko-bedat,
         ernam  like ekko-ernam,
           lifnr like ekko-lifnr,
   end of it_tab.

START-OF-SELECTION.
select bstyp ebeln ekorg ekgrp bedat ernam lifnr 
from    ekko
into table it_tab
where ekko-bstyp = 'F'.

PERFORM some_subroutine

IF sy-subrc EQ 0.

"LOTS OF CODE PROCESSING"

ENDIF.

TOP-OF-PAGE.
"some code"

END-OF-SELECTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnaks&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 21:16:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-get-by-a-select-query/m-p/4004186#M956613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T21:16:09Z</dc:date>
    </item>
  </channel>
</rss>

