<?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/1682083#M300560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an transaction to measure the report performance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Florina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Oct 2006 13:55:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-23T13:55:22Z</dc:date>
    <item>
      <title>SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682076#M300553</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 just start to learn ABAP ...so this question maybe is not difficult but I didn't find an answer on my own. I have the ABAP code:&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;SELECT A&lt;SUB&gt;VBELN  A&lt;/SUB&gt;FKART  A&lt;SUB&gt;VKORG  A&lt;/SUB&gt;VTWEG  A&lt;SUB&gt;KKBER  A&lt;/SUB&gt;SPART&lt;/P&gt;&lt;P&gt;A&lt;SUB&gt;KUNAG  A&lt;/SUB&gt;FKDAT  A&lt;SUB&gt;ERNAM  A&lt;/SUB&gt;ERZET  B~WERKS&lt;/P&gt;&lt;P&gt;INTO table IT_VBRK&lt;/P&gt;&lt;P&gt;FROM VBRK AS A INNER JOIN&lt;/P&gt;&lt;P&gt;     VBRP AS B ON&lt;/P&gt;&lt;P&gt;     A&lt;SUB&gt;VBELN = B&lt;/SUB&gt;VBELN&lt;/P&gt;&lt;P&gt;WHERE FKDAT = DATAF.&lt;/P&gt;&lt;P&gt;SORT IT_VBRK BY VBELN.&lt;/P&gt;&lt;P&gt;LOOP AT IT_VBRK.&lt;/P&gt;&lt;P&gt;AT NEW VBELN.&lt;/P&gt;&lt;P&gt;WRITE : /5 IT_VBRK-VBELN , IT_VBRK-FKDAT , IT_VBRK-FKART .&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;AT END OF VBELN.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;And the result is:&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;90080973   *&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;*** ****&lt;/P&gt;&lt;P&gt;90080974   *&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;*** ****&lt;/P&gt;&lt;P&gt;90080975   *&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;*** ****&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why the system don't write the date and the type of the invoices? It's something wrong with the SELECT statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Florina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:23:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682076#M300553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-23T13:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682077#M300554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why the system don't write the date and the type of the invoices? It's something wrong with the SELECT statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is nothing wrong with the select statement..it is due to the control statement AT NEW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, the way AT NEW event works is that it asteriks all the fields to the right of the defined field. So in your case AT NEW VBELN all the fields to the right of VBELN in the internal table are replaced be asterix. To get the value you can initialise another field string similar to itab and move that before AT event and you can use the values from field strings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:25:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682077#M300554</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-23T13:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682078#M300555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florina,&lt;/P&gt;&lt;P&gt;   Your select is Good.&lt;/P&gt;&lt;P&gt; The Culprit is the at new statement.&lt;/P&gt;&lt;P&gt;you should read the internal table immediatley after a at new statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT IT_VBRK BY VBELN.&lt;/P&gt;&lt;P&gt;LOOP AT IT_VBRK.&lt;/P&gt;&lt;P&gt;AT NEW VBELN.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;read table it_vbrk index sy-tabix.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;WRITE : /5 IT_VBRK-VBELN , IT_VBRK-FKDAT , IT_VBRK-FKART .&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;AT END OF VBELN.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;Make the highlighted change.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:26:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682078#M300555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-23T13:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682079#M300556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The effect is coming from the AT NEW statement, you can get around it by doing this.  Define a wa, and move the line into it before the AT NEW, and use the WA to write out the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data: wa_vbrk like line of it_vbrk.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_VBRK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;wa_vbrk = it_vbrk.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT NEW VBELN.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;WRITE : /5 wa_VBRK-VBELN , wa_VBRK-FKDAT , wa_VBRK-FKART .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;AT END OF VBELN.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:26:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682079#M300556</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-23T13:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682080#M300557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe was a stupid question but asking stupid question I'm learning .&lt;/P&gt;&lt;P&gt;I hope I didn't offend you ;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Florina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:43:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682080#M300557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-23T13:43: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/1682081#M300558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"There are no stupid questions. There are only questions"-- Anonymous&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:45:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682081#M300558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-23T13:45: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/1682082#M300559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Floirna,  Ravi's answer may work, but you are then reading the same internal table line twice.  This is not a good thing,  in my example, you are only reading the line once.  This will be important when performance is an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682082#M300559</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-23T13:45: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/1682083#M300560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an transaction to measure the report performance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Florina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:55:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682083#M300560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-23T13:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682084#M300561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes .&lt;/P&gt;&lt;P&gt;se30 is the tcode for performance analysis of programs.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:57:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682084#M300561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-23T13:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682085#M300562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Transaction SE30.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 13:57:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682085#M300562</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-23T13:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682086#M300563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you again all of you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Florina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 14:02:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/1682086#M300563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-23T14:02:19Z</dc:date>
    </item>
  </channel>
</rss>

