<?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: closing bal calculation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880952#M676579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pankaj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is quiet a common issue. What I'd suggest will be to maintain the op &amp;amp; CL bals ni a Z table based on the posting dates and doc nos ad the key fields. I mean, whenever you are calculating the value for closing balance, insert it into a Z table so that you will not face such problems in future. Such reports are supposed to be run for the date range of the 1st and last days of a month, but since u wanna daily run, i suggest u archive these values in a Z table and retrieve from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u can't do that for whatever reason, check programatically if the date-low is the 1st day of the month. If not, calculate the balance from date-low minus 1 (from 01.08.2005 in ur case)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps... reward if it does &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Sep 2007 06:32:33 GMT</pubDate>
    <dc:creator>former_member189629</dc:creator>
    <dc:date>2007-09-29T06:32:33Z</dc:date>
    <item>
      <title>closing bal calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880951#M676578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi frnds,&lt;/P&gt;&lt;P&gt;           i cant make out a certain logic , the problem is like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    e.g. i have a g/l account no. say 13005(bsis-hkont).&lt;/P&gt;&lt;P&gt;   now total amount of  this g/l account no. on 01.08.2005(bsis-budat) is 900 , on  02.08.2005 is 1000 , on  03.08.2005 is 500 -  and so on.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; now i have to show closing bal  on 01.08.2005 is 900, &amp;lt;b&amp;gt;on  02.08.2005 is 1900&amp;lt;/b&amp;gt; (i.e. 900 + 1000) , &amp;lt;b&amp;gt;on  03.08.2005 is 1400&amp;lt;/b&amp;gt; (i.e. 1900 - 500) , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my sel-screen cosists of g/l account no(hkont) and posting date (budat).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now note:  01.08.2005 is the first posting date of this g/l account no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;everything is ok fine when i m giving the  date range from i.e. 01.08.2005 to 03.08.2005 -&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;the closing balance is coming 100% correct i.e. &lt;/P&gt;&lt;P&gt;on 01.08.2005 is 900 , on  02.08.2005 is 1900 , on  03.08.2005 is 1400.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my date range will be from  02.08.2005  to 03.08.2005 ,the closing balance on&lt;/P&gt;&lt;P&gt;02.08.2005  is coming 1000 and not 1900 i.e ( amt of 01.08.2005,  900 + amount of&lt;/P&gt;&lt;P&gt;02.08.2005  ,1000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to show closing bal on 02.08.2005  as 1900 ( i.e. in sel-screen date wiil be &lt;/P&gt;&lt;P&gt;02.08.2005 to 03.08.2005  but the amount of 01.08.2005 will also be calculated&lt;/P&gt;&lt;P&gt;according to the requirement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i m waiting for ur valuable suggestions .&lt;/P&gt;&lt;P&gt;pls help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;pankaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2007 06:19:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880951#M676578</guid>
      <dc:creator>former_member841898</dc:creator>
      <dc:date>2007-09-29T06:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: closing bal calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880952#M676579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pankaj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is quiet a common issue. What I'd suggest will be to maintain the op &amp;amp; CL bals ni a Z table based on the posting dates and doc nos ad the key fields. I mean, whenever you are calculating the value for closing balance, insert it into a Z table so that you will not face such problems in future. Such reports are supposed to be run for the date range of the 1st and last days of a month, but since u wanna daily run, i suggest u archive these values in a Z table and retrieve from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u can't do that for whatever reason, check programatically if the date-low is the 1st day of the month. If not, calculate the balance from date-low minus 1 (from 01.08.2005 in ur case)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps... reward if it does &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2007 06:32:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880952#M676579</guid>
      <dc:creator>former_member189629</dc:creator>
      <dc:date>2007-09-29T06:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: closing bal calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880953#M676580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sir &lt;/P&gt;&lt;P&gt;      can u give me some more details on 2 nd method.&lt;/P&gt;&lt;P&gt;i m sending u my 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;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZGL                                                         *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zgl  NO STANDARD PAGE HEADING..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: bsis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ibsis OCCURS 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      hkont LIKE bsis-hkont,&lt;/P&gt;&lt;P&gt;      budat LIKE bsis-budat,&lt;/P&gt;&lt;P&gt;      shkzg LIKE bsis-shkzg,&lt;/P&gt;&lt;P&gt;      dmbtr TYPE bsis-dmbtr,&lt;/P&gt;&lt;P&gt;      waers LIKE bsis-waers,&lt;/P&gt;&lt;P&gt;      END OF ibsis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF st_tab,&lt;/P&gt;&lt;P&gt;*budat LIKE bsis-budat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       hkont LIKE bsis-hkont,&lt;/P&gt;&lt;P&gt;      budat LIKE bsis-budat,&lt;/P&gt;&lt;P&gt;      shkzg LIKE bsis-shkzg,&lt;/P&gt;&lt;P&gt;      dmbtr LIKE bsis-dmbtr,&lt;/P&gt;&lt;P&gt;      waers LIKE bsis-waers,&lt;/P&gt;&lt;P&gt;     END OF st_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab TYPE STANDARD TABLE OF st_tab INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;      wa TYPE st_tab,&lt;/P&gt;&lt;P&gt;      wa_d TYPE st_tab. " dummy work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA: itab1 TYPE STANDARD TABLE OF st_tab INITIAL SIZE 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: sum_comp TYPE p DECIMALS 2,&lt;/P&gt;&lt;P&gt;      sum1 TYPE p DECIMALS 2,&lt;/P&gt;&lt;P&gt;      sum2 TYPE p DECIMALS 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_gl FOR bsis-hkont,&lt;/P&gt;&lt;P&gt;                s_budat for bsis-budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;SELECT   hkont  budat shkzg dmbtr waers  FROM bsis INTO corresponding fields of TABLE ibsis WHERE hkont IN s_gl and budat in s_budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  WRITE:/ 'no records'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE: ibsis WHERE hkont &amp;lt;&amp;gt; 13001 AND hkont &amp;lt;&amp;gt; 13002  AND hkont &amp;lt;&amp;gt; 13003 AND hkont &amp;lt;&amp;gt; 13005.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ibsis.&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING ibsis TO wa.&lt;/P&gt;&lt;P&gt;  IF ibsis-shkzg = 'S'.              "debit&lt;/P&gt;&lt;P&gt;    wa-dmbtr = ibsis-dmbtr * 1.&lt;/P&gt;&lt;P&gt;  ELSEIF ibsis-shkzg = 'H'.          "credit&lt;/P&gt;&lt;P&gt;    wa-dmbtr = ibsis-dmbtr * - 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  APPEND wa TO itab.&lt;/P&gt;&lt;P&gt;  CLEAR wa.&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;SORT itab BY hkont ASCENDING budat ASCENDING .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa.&lt;/P&gt;&lt;P&gt;  wa_d = wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   AT NEW  hkont.&lt;/P&gt;&lt;P&gt;    WRITE:/50 'ACCOUNT NO#' , wa_d-hkont color 3.&lt;/P&gt;&lt;P&gt;    skip 2.&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;&lt;/P&gt;&lt;P&gt;  AT NEW  budat.&lt;/P&gt;&lt;P&gt;    WRITE:/ wa_d-budat .&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  AT END OF budat.&lt;/P&gt;&lt;P&gt;    SUM .&lt;/P&gt;&lt;P&gt;    sum_comp = wa-dmbtr.&lt;/P&gt;&lt;P&gt;    sum1 = sum1 + sum_comp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WRITE: 38 sum1 COLOR 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SKIP.&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  at end of hkont.&lt;/P&gt;&lt;P&gt;  sum1 = 0 .&lt;/P&gt;&lt;P&gt;  uline.&lt;/P&gt;&lt;P&gt; endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;*==================================================&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2007 06:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880953#M676580</guid>
      <dc:creator>former_member841898</dc:creator>
      <dc:date>2007-09-29T06:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: closing bal calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880954#M676581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;B4 changing ur code, I sugest u ask ur functional team at what date intervals they r gonna run this rept. If it is monthly (from 1st day - last day of a month), it need not be changed. Moreover, suggest ur sr. abap heads abt maintaining the values in a Z table... Meanwhile, i will c ur code &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2007 06:58:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880954#M676581</guid>
      <dc:creator>former_member189629</dc:creator>
      <dc:date>2007-09-29T06:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: closing bal calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880955#M676582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sir,&lt;/P&gt;&lt;P&gt;     it will run on any date like from 03.08.2005 to 09.08.2005,&lt;/P&gt;&lt;P&gt;     but the closing bal of 03.08.2005 will also contain the bal&lt;/P&gt;&lt;P&gt;of date previous than 03.08.2005 .&lt;/P&gt;&lt;P&gt;z table could not be maintained for some reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls run my code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;pankaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2007 07:22:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880955#M676582</guid>
      <dc:creator>former_member841898</dc:creator>
      <dc:date>2007-09-29T07:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: closing bal calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880956#M676583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 06:56:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/closing-bal-calculation/m-p/2880956#M676583</guid>
      <dc:creator>former_member841898</dc:creator>
      <dc:date>2010-12-23T06:56:18Z</dc:date>
    </item>
  </channel>
</rss>

