<?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 STMT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733318#M898511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remove the spaces between ( and fieldnames .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eq &lt;/P&gt;&lt;P&gt;instead of ( f1 , f2 )&lt;/P&gt;&lt;P&gt;write (f1,f2)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2008 06:21:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-22T06:21:04Z</dc:date>
    <item>
      <title>SELECT STMT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733315#M898508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fOLLOWING SELECT STMT GIVING ERROR.cAN ANYONE TELL ME Y??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR&lt;/P&gt;&lt;P&gt;       WERKS&lt;/P&gt;&lt;P&gt;       LGORT&lt;/P&gt;&lt;P&gt;       ERSDA&lt;/P&gt;&lt;P&gt;       SUM( LABST,SPEME,INSME,RETME,UMLME ) I&lt;/P&gt;&lt;P&gt;            INTO TABLE T_MARD&lt;/P&gt;&lt;P&gt;            FROM MARD&lt;/P&gt;&lt;P&gt;            FOR ALL ENTRIES IN T_EKORG&lt;/P&gt;&lt;P&gt;            WHERE WERKS = T_EKORG-WERKS AND&lt;/P&gt;&lt;P&gt;                  LGORT IN S_LGORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR:COMMA WIDOUT PRECEDING COLON(AFTER SELECT?).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 06:11:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733315#M898508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T06:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT STMT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733316#M898509</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;Check whether the spaces of the bracket are provided or not.&lt;/P&gt;&lt;P&gt;It is the problem i think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 06:19:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733316#M898509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T06:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT STMT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733317#M898510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might be because of the comma u have placed in between the field names whithin the sum clause of the select stmnt.&lt;/P&gt;&lt;P&gt;Try removing the comma and replace it with a space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jayadeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 06:20:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733317#M898510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T06:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT STMT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733318#M898511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remove the spaces between ( and fieldnames .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eq &lt;/P&gt;&lt;P&gt;instead of ( f1 , f2 )&lt;/P&gt;&lt;P&gt;write (f1,f2)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 06:21:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733318#M898511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T06:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT STMT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733319#M898512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;remove the spaces between the brackets and fields&lt;/P&gt;&lt;P&gt;use like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR&lt;/P&gt;&lt;P&gt;WERKS&lt;/P&gt;&lt;P&gt;LGORT&lt;/P&gt;&lt;P&gt;ERSDA&lt;/P&gt;&lt;P&gt;SUM ( LABST  SPEME INSME RETME UMLME )  &lt;/P&gt;&lt;P&gt;INTO TABLE T_MARD&lt;/P&gt;&lt;P&gt;FROM MARD&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN T_EKORG&lt;/P&gt;&lt;P&gt;WHERE WERKS = T_EKORG-WERKS AND&lt;/P&gt;&lt;P&gt;LGORT IN S_LGORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;moreover&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement SUM can only be specified within a loop starting with LOOP, and is only considered within a AT- ENDAT control structure. Prerequisites for using the statement SUM include using the addition INTO in the LOOP statement, and that the specified work area wa is compatible with the row type of the internal table. In addition, SUM cannot be used when the row type of the internal table itab contains components that are tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement SUM calculates the component total with the numeric data type (i, p, f) of all rows in the current control level and assigns these to the components of the work area wa. In the control levels FIRST, LAST, and outside of an AT-ENDAT control structure, the system calculates the sum of numeric components of all rows in the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful&lt;/P&gt;&lt;P&gt;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 06:22:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733319#M898512</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-04-22T06:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT STMT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733320#M898513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi madan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't give comas in fields whatever u used for SUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;SELECT MATNR&lt;/P&gt;&lt;P&gt;WERKS&lt;/P&gt;&lt;P&gt;LGORT&lt;/P&gt;&lt;P&gt;ERSDA&lt;/P&gt;&lt;P&gt;SUM( LABST SPEME INSME RETME UMLME ) I&lt;/P&gt;&lt;P&gt;INTO TABLE T_MARD&lt;/P&gt;&lt;P&gt;FROM MARD&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN T_EKORG&lt;/P&gt;&lt;P&gt;WHERE WERKS = T_EKORG-WERKS AND&lt;/P&gt;&lt;P&gt;LGORT IN S_LGORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful give reward,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Narasimha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 06:26:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733320#M898513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T06:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT STMT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733321#M898514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is another option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you want to sum 4 fields,  you can use 4 SUM clauses&lt;/P&gt;&lt;P&gt;and store result for each sum in another variable.&lt;/P&gt;&lt;P&gt;Finally you can add up these 4 variables to get the final sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eq &lt;/P&gt;&lt;P&gt;select f1 SUM(f2) sum(f3) &lt;/P&gt;&lt;P&gt;into (v_1,v_2,v_3)&lt;/P&gt;&lt;P&gt;from...&lt;/P&gt;&lt;P&gt;where...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_f = v_1 + v_2 + v_3 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves the problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 06:30:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/3733321#M898514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T06:30:09Z</dc:date>
    </item>
  </channel>
</rss>

