<?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: how to sum up in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899770#M681878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can use the field sysmbols to calculate the amounts based on the period&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form Local data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  data: l_period(2) type n,&lt;/P&gt;&lt;P&gt;        l_name(35)  type c,&lt;/P&gt;&lt;P&gt;        l_monat     type i .&lt;/P&gt;&lt;P&gt;  l_monat = p_date+4(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field Symbols&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  field-symbols &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;  clear it_bud_tab.&lt;/P&gt;&lt;P&gt;  refresh it_bud_tab.&lt;/P&gt;&lt;P&gt;  select lednr             " Ledger No&lt;/P&gt;&lt;P&gt;         objnr             " Object No&lt;/P&gt;&lt;P&gt;         gjahr             " Fiscal Year&lt;/P&gt;&lt;P&gt;         wrttp             " Actuals&lt;/P&gt;&lt;P&gt;         versn             " Version&lt;/P&gt;&lt;P&gt;         twaer             " Currency&lt;/P&gt;&lt;P&gt;         perbl             " Period Block&lt;/P&gt;&lt;P&gt;         kstar             " Cost Element/GL A/C No&lt;/P&gt;&lt;P&gt;         wog001            " Total Value&lt;/P&gt;&lt;P&gt;         wog002            " Total Value&lt;/P&gt;&lt;P&gt;         wog003            " Total Value&lt;/P&gt;&lt;P&gt;         wog004            " Total Value&lt;/P&gt;&lt;P&gt;         wog005            " Total Value&lt;/P&gt;&lt;P&gt;         wog006            " Total Value&lt;/P&gt;&lt;P&gt;         wog007            " Total Value&lt;/P&gt;&lt;P&gt;         wog008            " Total Value&lt;/P&gt;&lt;P&gt;         wog009            " Total Value&lt;/P&gt;&lt;P&gt;         wog010            " Total Value&lt;/P&gt;&lt;P&gt;         wog011            " Total Value&lt;/P&gt;&lt;P&gt;         wog012            " Total Value&lt;/P&gt;&lt;P&gt;    into table it_bud_tab&lt;/P&gt;&lt;P&gt;    from cosp&lt;/P&gt;&lt;P&gt;    where lednr = c_lednr  and&lt;/P&gt;&lt;P&gt;          gjahr = p_gjahr  and&lt;/P&gt;&lt;P&gt;          wrttp = c_wrttp  and&lt;/P&gt;&lt;P&gt;          versn = c_versn  and&lt;/P&gt;&lt;P&gt;          beknz in (c_d,c_s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the YTD Budget using Field Symbols&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        do l_monat times.&lt;/P&gt;&lt;P&gt;          l_period = sy-index.&lt;/P&gt;&lt;P&gt;          concatenate c_it_bud_tab_wog0 l_period&lt;/P&gt;&lt;P&gt;                       into l_name.&lt;/P&gt;&lt;P&gt;          assign (l_name) to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;          it_ytd_tab-amt_ytd = it_ytd_tab-amt_ytd +&lt;/P&gt;&lt;P&gt;                                      &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;        enddo.&lt;/P&gt;&lt;P&gt;        collect it_ytd_tab.&lt;/P&gt;&lt;P&gt;        clear   it_ytd_tab.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;    sort it_ytd_tab by gjahr kostl kstar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Oct 2007 06:07:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-18T06:07:53Z</dc:date>
    <item>
      <title>how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899766#M681874</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 am making a report using table COSP,if i have a period range suppose 1 to 4 and after that i have to add WTG001 - WTG004 in particular cost centre range.Please tell how to proceed.If any sample report is there plz mail it to me or in reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 05:57:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899766#M681874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T05:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899767#M681875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For such requirements please use&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DO VARYING f FROM f1 NEXT f2 &amp;lt;/b&amp;gt; statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Arun Nair&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 06:03:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899767#M681875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T06:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899768#M681876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA: w_wkgbtr LIKE coep-wkgbtr,
        w_mbgbtr LIKE coep-mbgbtr,&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;    DO 16 TIMES
      VARYING w_wkgbtr FROM cossa-wkg001 NEXT cossa-wkg002
      VARYING w_mbgbtr FROM cossa-meg001 NEXT cossa-meg002.
      MOVE sy-index TO coep-perio.
      CHECK coep-perio IN s-perio.
      ADD w_wkgbtr TO outtab-wkgbtr
*     ...
    ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 06:05:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899768#M681876</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-10-18T06:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899769#M681877</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 this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

**Let's say the structure/variable WTG001 is having the fields.

FIELD-SYMBOLS: &amp;lt;fs&amp;gt;.

DATA: V_FIELDNAME(30).
DATA: V_CHAR(2).
DATA: V_SUM TYPE NETPR.

DO.

  V_CHAR = SY-INDEX.
  
  CONCATENATE 'WTG001-'  V_CHAR INTO V_FIELDNAME.
   CONDENSE V_FIELDNAME. 

  ASSIGN (V_FIELDNAME) TO &amp;lt;FS&amp;gt;.

  V_SUM = V_SUM + &amp;lt;FS&amp;gt;.

  IF SY-INDEX &amp;gt; 4.   " this can be variable.
     EXIT.
  ENDIF.

ENDDO.

WRITE: / V_SUM.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 06:05:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899769#M681877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T06:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899770#M681878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can use the field sysmbols to calculate the amounts based on the period&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form Local data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  data: l_period(2) type n,&lt;/P&gt;&lt;P&gt;        l_name(35)  type c,&lt;/P&gt;&lt;P&gt;        l_monat     type i .&lt;/P&gt;&lt;P&gt;  l_monat = p_date+4(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field Symbols&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  field-symbols &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;  clear it_bud_tab.&lt;/P&gt;&lt;P&gt;  refresh it_bud_tab.&lt;/P&gt;&lt;P&gt;  select lednr             " Ledger No&lt;/P&gt;&lt;P&gt;         objnr             " Object No&lt;/P&gt;&lt;P&gt;         gjahr             " Fiscal Year&lt;/P&gt;&lt;P&gt;         wrttp             " Actuals&lt;/P&gt;&lt;P&gt;         versn             " Version&lt;/P&gt;&lt;P&gt;         twaer             " Currency&lt;/P&gt;&lt;P&gt;         perbl             " Period Block&lt;/P&gt;&lt;P&gt;         kstar             " Cost Element/GL A/C No&lt;/P&gt;&lt;P&gt;         wog001            " Total Value&lt;/P&gt;&lt;P&gt;         wog002            " Total Value&lt;/P&gt;&lt;P&gt;         wog003            " Total Value&lt;/P&gt;&lt;P&gt;         wog004            " Total Value&lt;/P&gt;&lt;P&gt;         wog005            " Total Value&lt;/P&gt;&lt;P&gt;         wog006            " Total Value&lt;/P&gt;&lt;P&gt;         wog007            " Total Value&lt;/P&gt;&lt;P&gt;         wog008            " Total Value&lt;/P&gt;&lt;P&gt;         wog009            " Total Value&lt;/P&gt;&lt;P&gt;         wog010            " Total Value&lt;/P&gt;&lt;P&gt;         wog011            " Total Value&lt;/P&gt;&lt;P&gt;         wog012            " Total Value&lt;/P&gt;&lt;P&gt;    into table it_bud_tab&lt;/P&gt;&lt;P&gt;    from cosp&lt;/P&gt;&lt;P&gt;    where lednr = c_lednr  and&lt;/P&gt;&lt;P&gt;          gjahr = p_gjahr  and&lt;/P&gt;&lt;P&gt;          wrttp = c_wrttp  and&lt;/P&gt;&lt;P&gt;          versn = c_versn  and&lt;/P&gt;&lt;P&gt;          beknz in (c_d,c_s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the YTD Budget using Field Symbols&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        do l_monat times.&lt;/P&gt;&lt;P&gt;          l_period = sy-index.&lt;/P&gt;&lt;P&gt;          concatenate c_it_bud_tab_wog0 l_period&lt;/P&gt;&lt;P&gt;                       into l_name.&lt;/P&gt;&lt;P&gt;          assign (l_name) to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;          it_ytd_tab-amt_ytd = it_ytd_tab-amt_ytd +&lt;/P&gt;&lt;P&gt;                                      &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;        enddo.&lt;/P&gt;&lt;P&gt;        collect it_ytd_tab.&lt;/P&gt;&lt;P&gt;        clear   it_ytd_tab.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;    sort it_ytd_tab by gjahr kostl kstar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 06:07:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899770#M681878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T06:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899771#M681879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to make a report on cost centre expenses with the help table COSP.I have to put cost centre from OBJNR in which last five haraters are cost centre and period like month and year.After that in report display i want KSTAR i.e. in down the line and cost centres of selection in vertical it may increase or decrease depending on selection.After that i have to add all the WTG001-WTG016.if in seletion period is 1 to 2 then i have to add WTG001 and WTG002 in corresponding in KSTAR and so on in desired cost centre column below that facing respective KSTAR.If anyone can send any report relating that i will be thankful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 06:15:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899771#M681879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T06:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899772#M681880</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;construct a range of specified period (eg: 1 to 4) in a i_period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at i_period.&lt;/P&gt;&lt;P&gt;  case i_period-val.&lt;/P&gt;&lt;P&gt;   when '01'.&lt;/P&gt;&lt;P&gt;     sum_wtg = sum_wtg + itab-wtg001.&lt;/P&gt;&lt;P&gt;  &amp;lt;repeat for 02 to 16&amp;gt;&lt;/P&gt;&lt;P&gt; endcase.&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt;collect itab_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Brunda&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Reward if useful'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 06:21:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899772#M681880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T06:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899773#M681881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to construct the range of specified period (eg: 1 to 4) in a i_period.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 06:38:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899773#M681881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T06:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899774#M681882</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count = so_perio.&lt;/P&gt;&lt;P&gt;    CLEAR low.&lt;/P&gt;&lt;P&gt;    DO count TIMES.&lt;/P&gt;&lt;P&gt;      low = low + 1.&lt;/P&gt;&lt;P&gt;      i_per_year-perio = low.&lt;/P&gt;&lt;P&gt;      APPEND i_per_year.&lt;/P&gt;&lt;P&gt;      CLEAR i_per_year.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;send your code exactly what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Brunda&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Reward if useful'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 06:47:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899774#M681882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T06:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to sum up</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899775#M681883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have to make a report on cost centre expenses with the help table COSP.I have to put cost centre from OBJNR in which last five charaters are cost centre,i have to select last five digits only and period like month and year.After that in report display i want all the values of  cost element i.e. KSTAR  down the line and cost centres of range selection in vertical.After that i have to add all the WTG001-WTG016.If  seletion period is 1 to 2 then i have to add WTG001 and WTG002 in corresponding in KSTAR and below desired cost centre range  column below that facing particular KSTAR.If anyone can send any report relating that i will be thankful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 07:33:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-sum-up/m-p/2899775#M681883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T07:33:32Z</dc:date>
    </item>
  </channel>
</rss>

