<?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 hi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846049#M924650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT SINGLE SUM(ERFMG) FROM MSEG INTO ITAB-ERFMG WHERE MBLNR = ITAB-MBLNR AND LGORT = 'FGS' AND BWART = '101'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this stmt is not working why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2008 09:43:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-20T09:43:06Z</dc:date>
    <item>
      <title>hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846049#M924650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT SINGLE SUM(ERFMG) FROM MSEG INTO ITAB-ERFMG WHERE MBLNR = ITAB-MBLNR AND LGORT = 'FGS' AND BWART = '101'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this stmt is not working why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 09:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846049#M924650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T09:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846050#M924651</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;you need spaces Abap is very sensitive with that &lt;/P&gt;&lt;P&gt;try &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SUM( ERFMG )
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or what was the exact error ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 09:47:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846050#M924651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T09:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846051#M924652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have given space but stil not giving  output. Its saying Sum un known coloumn name&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 09:51:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846051#M924652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T09:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846052#M924653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, &lt;/P&gt;&lt;P&gt;I THINK YOU HAVE GIVEN SPACE BETWEEN SUM AND THE BRACKET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GIVE THE FOLLOWING WAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM( ERFMG ).&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, 20 May 2008 10:00:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846052#M924653</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-05-20T10:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846053#M924654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG&gt;Anuradha&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT  SUM(ERFMG) 
        INTO ITAB-ERFMG
         FROM MSEG 
          WHERE MBLNR = ITAB-MBLNR 
          AND LGORT = 'FGS'
         AND BWART = '101'.&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;P&gt;&lt;STRONG&gt;IF Found Helpfull DO Reward.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Eshwar.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 10:08:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846053#M924654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T10:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846054#M924655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think the error is here&lt;/P&gt;&lt;P&gt;MBLNR = ITAB-MBLNR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u cannot apply this as itab currently is empty....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here itab is not the internal table but the work area which is empty when the query is called. u need to put this inside a loop at itab to get the query working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 11:06:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846054#M924655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T11:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846055#M924656</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;Actually sum you should't use in select querys why becuase it is a performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyhow,  your select query is in loop or not.  if it is in loop ok.  but it is not in loop&lt;/P&gt;&lt;P&gt;itab-mblnr is empty so it won't work.   then you have to read that table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it is one time requirement you can use read statement.&lt;/P&gt;&lt;P&gt;or it is required for all entries in itab then you have use loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below 2 eg are there 1st one is for read table  and  2nd one is looping table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: read table itab with key mblnr = mblnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;   select query.&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 16:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846055#M924656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T16:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846056#M924657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anuradha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked this query now and its working 100% correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
SELECT sum( erfmg )
        INTO lv_erfmg
         FROM mseg
          WHERE mblnr = '4900000010'
          AND lgort = '1020'
         AND bwart = '561'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check: There is no gap between sum and starting bracket also check your doc number in debug mode.. if its not in compatible format thats in table no data will be fetched. You will have to apeend zeros or something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please award points to all correct answers in this thread and mark question as answered.&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>Tue, 20 May 2008 18:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846056#M924657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T18:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846057#M924658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;y thr is necessary to SUM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ur using select single ,only one value will come .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use either  select single erfmg &lt;/P&gt;&lt;P&gt;or             select sum( erfmg ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as per ur requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 09:23:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846057#M924658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T09:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846058#M924659</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;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT ITAB-MBLNR IS INITIAL.&lt;/P&gt;&lt;P&gt;	SELECT SUM( ERFMG ) FROM MSEG INTO &lt;/P&gt;&lt;P&gt;                ITAB-ERFMG WHERE MBLNR = ITAB-MBLNR &lt;/P&gt;&lt;P&gt;                AND LGORT = 'FGS' AND BWART = '101'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Murthy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 01:46:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846058#M924659</guid>
      <dc:creator>former_member787646</dc:creator>
      <dc:date>2008-05-28T01:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846059#M924660</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;In your code ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE SUM(ERFMG) FROM MSEG INTO ITAB-ERFMG WHERE MBLNR = ITAB-MBLNR AND LGORT = 'FGS' AND BWART = '101'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change it like this.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE SUM( ERFMG ) FROM MSEG INTO ITAB-ERFMG WHERE MBLNR = '10032333' AND LGORT = 'FGS' AND BWART = '101'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in your the mistakes is the way you gave Sum(ERFMG) it shopuld be like Sum( ERFMG ) and in the where clause you cant use a field of itab as it is still initial...&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Syed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 04:58:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3846059#M924660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-28T04:58:35Z</dc:date>
    </item>
  </channel>
</rss>

