<?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: At New problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569600#M1432659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Good day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. sorry for the disterb u. Generally for summing  i did At New event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you dont mind, plz send sample code for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Feb 2010 10:59:35 GMT</pubDate>
    <dc:creator>former_member251546</dc:creator>
    <dc:date>2010-02-08T10:59:35Z</dc:date>
    <item>
      <title>At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569597#M1432656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Good day guys.&lt;/P&gt;&lt;P&gt;Control break event problem. plz can any one help me&lt;/P&gt;&lt;P&gt;Iam dev the alv report. its fine. but client has chaged the req. He need the req is first i need to disply the total  and then items details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;   Name       Qty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   boltes      30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   boltes      10&lt;/P&gt;&lt;P&gt;                   10&lt;/P&gt;&lt;P&gt;                   10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so  first ive summed the items and then appending items to final ita. &lt;/P&gt;&lt;P&gt;iam using nested loops. but its not working. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA : lwa_out1 TYPE zsalessm.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CLEAR: lwa_out5.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; REFRESH: lt_machine_sales2,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          lt_machine_sales4.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; lt_machine_sales2[] = lt_machine_sales[].&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SORT lt_machine_sales2 BY ktgrm_d.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SORT lt_machine_sales BY ktgrm_d.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; LOOP AT lt_machine_sales INTO lwa_out5.      " Here iam doing the total sum&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   AT NEW ktgrm_d.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     SUM.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     lwa_out5-sales_qty = lwa_out5-sales_qty * -1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     lwa_out5-act_sales_p = lwa_out5-act_sales_p * -1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     lwa_out5-act_cos_p = lwa_out5-act_cos_p * -1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     lwa_out5-act_gross_p = lwa_out5-act_gross_p * -1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     lwa_out5-act_gross_perc_P = lwa_out5-act_gross_perc_p * -1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     lwa_out5-netwr      = lwa_out5-netwr * -1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     APPEND lwa_out5 TO lt_machine_sales4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     IF sy-subrc EQ 0.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       LOOP AT lt_machine_sales2 INTO lwa_out1 where ktgrm_d = lwa_out5-ktgrm_d.  " here iam appending the iteam details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       APPEND lwa_out1 TO lt_machine_sales4.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       clear:lwa_out1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; clear:lwa_out5.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ENDAT.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz any one tell me how to do it?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 10:41:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569597#M1432656</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-02-08T10:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569598#M1432657</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;Are you not able to sum up the items or you are not able to append the items into new internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, you can do both the things in a single step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just loop at you internla table. Thn, use collect statement to sum up the items, at the same time before summing up you can append your work area to new internal table. So, it will solve both issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 10:54:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569598#M1432657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-08T10:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569599#M1432658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iam using nested loops. but its not working. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What is the issue you are facing?Are you getting any error/ data is not getting filled??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 10:56:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569599#M1432658</guid>
      <dc:creator>former_member206377</dc:creator>
      <dc:date>2010-02-08T10:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569600#M1432659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Good day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. sorry for the disterb u. Generally for summing  i did At New event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you dont mind, plz send sample code for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 10:59:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569600#M1432659</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-02-08T10:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569601#M1432660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data was filed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:00:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569601#M1432660</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-02-08T11:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569602#M1432661</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 can do F1 on collect statement for more information. Refer to the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT lt_machine_sales INTO lwa_out5. " Here iam doing the total sum

 APPEND lwa_out1 TO " your new internal table.
 Collect lwa_out5 into lt_machine_sales4.
 clear:lwa_out1, lwa_out5.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569602#M1432661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-08T11:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569603#M1432662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; No need for nested loop.You can do the achieve the same by putting the detailed item level append after the AT ENDAT block.&lt;/P&gt;&lt;P&gt;Pls look at the below sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP AT lt_machine_sales INTO lwa_out5. &lt;/P&gt;&lt;P&gt; lwa_out = lwa_out5.&lt;/P&gt;&lt;P&gt; AT NEW ktgrm_d.&lt;/P&gt;&lt;P&gt; SUM.&lt;/P&gt;&lt;P&gt; lwa_out5-sales_qty = lwa_out5-sales_qty * -1.&lt;/P&gt;&lt;P&gt; lwa_out5-act_sales_p = lwa_out5-act_sales_p * -1.&lt;/P&gt;&lt;P&gt; lwa_out5-act_cos_p = lwa_out5-act_cos_p * -1.&lt;/P&gt;&lt;P&gt; lwa_out5-act_gross_p = lwa_out5-act_gross_p * -1.&lt;/P&gt;&lt;P&gt; lwa_out5-act_gross_perc_P = lwa_out5-act_gross_perc_p * -1.&lt;/P&gt;&lt;P&gt; lwa_out5-netwr = lwa_out5-netwr * -1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; APPEND lwa_out5 TO lt_machine_sales4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND lwa_out TO lt_machine_sales4.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vignesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569603#M1432662</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2010-02-08T11:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569604#M1432663</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;While using at new. Following is the standard functionality:&lt;/P&gt;&lt;P&gt;say itab1 has field F1, F2, F3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in when you give &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;loop at itab1.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;at new F2.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UR logic&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;endat.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the value of F1 changes and F2 is still the same. It will execute the At new logic.(i.e. if value of any of pramaters upto current paramter  changed the At new Logic will be executed). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check if this is working fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping it helps.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Komal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:11:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569604#M1432663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-08T11:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569605#M1432664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Thank you vignaswaran. ur right 100% coding. but i dont know ,At New event is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when iam summing the  Qty, Act sales, Act cost..and etc.. these r not summing.&lt;/P&gt;&lt;P&gt;When i was debugging..its not -ve value lke 123-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thats why ive taken values one which the fields are getting the -ve like "lwa_out5-sales_qty = lwa_out5-sales_qty * -1."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still there is prob. its not summing&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:19:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569605#M1432664</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-02-08T11:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569606#M1432665</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 am not sure ..how is your internal table is declared.If you are using KTGRM_D alone for summing the line,then make sure you declare KTGRM_D as a first field in the internal table .You are already sorted the intenral table by KTGRM_D .That is fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vigneswaran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:26:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569606#M1432665</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2010-02-08T11:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569607#M1432666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Iam sorry i didnt tell you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the internal table there is first field Mt_pos. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mt_pos got two values Znarm , NORM.  But  in my report mt-pos will not be displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If ive sorted the based on mt_pos. its diffecult to summed the Items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My itab Data is like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mtpos  ktgrm_d   values&lt;/P&gt;&lt;P&gt;znarm  ind            10&lt;/P&gt;&lt;P&gt;znarm  ind            10&lt;/P&gt;&lt;P&gt;norm    ind             10&lt;/P&gt;&lt;P&gt;norm    ind             10&lt;/P&gt;&lt;P&gt;znarm  aus            10&lt;/P&gt;&lt;P&gt;znarm  aus            10&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;REgards&lt;/P&gt;&lt;P&gt;Raghu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:31:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569607#M1432666</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-02-08T11:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569608#M1432667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Since you have not put KTGRM_D as a first field in internal table ,the control break statement AT NEW did not summ up correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the two basic steps need to be followed before using control break statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.The field(s) to be considered for summing up the line should be on the left hand side of the internal table.&lt;/P&gt;&lt;P&gt;2.The internal table should be sorted by those field(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the first condition is not satisfied in your case,the summation is going wrong.Put KTGRM_D field as a first field in internal table and then check your output.It should summ up correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vigneswaran .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:45:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569608#M1432667</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2010-02-08T11:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569609#M1432668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its not summing rightly. Can u plz send the solution plz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:48:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569609#M1432668</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-02-08T11:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569610#M1432669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  check out the below code.If you still say it is not summing up correclty,then just show me the actual content of the itab and also the summarized value you get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data:beging of  lwa_out5,
        KTGRM_d type c,
        Mtpos type posnr,
        qty1 type ..,
        qty2 type .
        end of lwa_out5,

lt_machine_sales like standard table of lwa_out5.
lt_machine_sales2 like standard table of lwa_out5.

 CLEAR: lwa_out5.
 REFRESH: lt_machine_sales2,
lt_machine_sales4.
 lt_machine_sales2] = lt_machine_sales[.
 SORT lt_machine_sales2 BY ktgrm_d.
 SORT lt_machine_sales BY ktgrm_d.

LOOP AT lt_machine_sales INTO lwa_out5. 
lwa_out = lwa_out5.
AT NEW ktgrm_d.
SUM.
lwa_out5-sales_qty = lwa_out5-sales_qty * -1.
lwa_out5-act_sales_p = lwa_out5-act_sales_p * -1.
lwa_out5-act_cos_p = lwa_out5-act_cos_p * -1.
lwa_out5-act_gross_p = lwa_out5-act_gross_p * -1.
lwa_out5-act_gross_perc_P = lwa_out5-act_gross_perc_p * -1.
lwa_out5-netwr = lwa_out5-netwr * -1.

APPEND lwa_out5 TO lt_machine_sales4.

ENDAT.

APPEND lwa_out TO lt_machine_sales4.
ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vigneswaran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 11:57:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569610#M1432669</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2010-02-08T11:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569611#M1432670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Ive declared the data as below as&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lwa_out1 type zsalessm.
  DATA: lwa_out5 type zsalessm.
: DATA  : lt_machine_sales4  TYPE TABLE OF zsalessm.
DATA  : lt_machine_sales  TYPE TABLE OF zsalessm.


And coding
SORT lt_machine_sales BY ktgrm_d ascending.

  LOOP AT lt_machine_sales INTO lwa_out5.
    lwa_out1 = lwa_out5.
    AT NEW ktgrm_d.
      SUM.
      lwa_out5-sales_qty = lwa_out5-sales_qty * -1.
      lwa_out5-act_sales_p = lwa_out5-act_sales_p * -1.
      lwa_out5-act_cos_p = lwa_out5-act_cos_p * -1.
      lwa_out5-act_gross_p = lwa_out5-act_gross_p * -1.
      lwa_out5-act_gross_perc_P = lwa_out5-act_gross_perc_p * -1.
      lwa_out5-netwr      = lwa_out5-netwr * -1.
      APPEND lwa_out5 TO lt_machine_sales4.
      clear:lwa_out5.
     ENDAT.

     Append lwa_out1 To lt_machine_sales4.
     clear:lwa_out1.


  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I think, except data dec, remaining everything is same.    I told you how my data wil looks like. if you dont mind, can u send &amp;lt;&amp;lt; request for personal information removed &amp;gt;&amp;gt; . so i can send the print screen of dubug itab data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for supporting&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please use code tags to format your code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Feb 8, 2010 2:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 12:23:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569611#M1432670</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-02-08T12:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569612#M1432671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    No need to worry about in which order the output fields is going to be displayed.In output,you can change the order of the fields displayed like any way and it does not necessarry be in same order like intenal table declaration.&lt;/P&gt;&lt;P&gt;So in your internal table declaration,instead of refering ZSALESMM structure,declare individual fields with the order mentioned in previous post.It should work.I dont think a any other better way than that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vignesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 13:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569612#M1432671</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2010-02-08T13:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569613#M1432672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you really need to resolve this issue with ABAP code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried to create and save an ALV Grid display variant which includes subtotals/totals? These totals can be displayed before the entries they summarise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mike Morgan on Feb 8, 2010 5:41 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 16:38:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569613#M1432672</guid>
      <dc:creator>mike_m1</dc:creator>
      <dc:date>2010-02-08T16:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569614#M1432673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this is a  report you want to create, simply use "reuse_alv_list_display" or "reuse_alv_grid_display" and pass the internal table to the function module and display ur report., the user can use various operations on the OUTPUT displayed by using the Graphical Items  on the display Page,.&lt;/P&gt;&lt;P&gt;eg: there is subtotal icon, grand total icon, sort icon's, list choose icon, export to presentation server icons, etc &lt;/P&gt;&lt;P&gt;sap has provided many things predefined use them to ur will........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Shravs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 18:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569614#M1432673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-08T18:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569615#M1432674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i mean explain to the user the various advantages of using graphical user display...............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps u find a solution cheaply...........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 18:44:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569615#M1432674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-08T18:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: At New problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569616#M1432675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Balaji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the "AT NEW ktgrm_d.", you also need to add this statement: &lt;/P&gt;&lt;P&gt;READ TABLE lt_machine_sales INTO lwa_out5 INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is needed if you access the fields defined after ktgrm_d.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bhanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 19:11:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new-problem/m-p/6569616#M1432675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-08T19:11:24Z</dc:date>
    </item>
  </channel>
</rss>

