Skip to Content
author's profile photo Former Member
Former Member

urgent interesting req

Hi friends ,

i have a req like this the I_BSID int table is having records like this

year/month posting dt assignmnet amount in loccurrency

opening balance as that of 04/01/2007 is last month end balance i.e march 0.00

2007/04 2007/04/03 ar0r 15020.23

2007/04 2007/04/07 0110 125.32-

sub total 15020.23 125.32

closing balance = open + ( 15020.23 + 125.23- )

Here i don;t have data for say month 05

could you let me know how to update z table from month 05

below logic is working for month 04 but not for 05 as the int table is not having values for month 05

Kindly let me know how to update z table for month 05 so that to get cumulative balance

closed open balance

apr 1500 1000 500

may 0.00 0.00 500 ( pre apr balance + (0.00-0.00)

Kindly let me know how to do it.

LOOP AT i_bsid.

wa_bsid = i_bsid.

IF wa_bsid-shkzg = 'S'.

z_newitems = wa_bsid-dmbtr + z_newitems.


wa_bsid-dmbtr = 0 - wa_bsid-dmbtr.

z_closeditems = wa_bsid-dmbtr + z_closeditems.


AT END OF budat+4(2).

CONCATENATE wa_bsid-budat0(4) wa_bsid-budat4(2) INTO v_spmon.

i_ztable-mandt = sy-mandt.

i_ztable-spmon = v_spmon.( year / month )

i_ztablekunnr = wa_bsid-kunnr.

i_ztable-bukrs = wa_bsid-bukrs.

i_z-tablez_newitems = z_newitems.

i_z-z_closeditems = z_closeditems.

i_z-z_balance = z_newitems + z_closeditems.

APPEND i_ztable.

CLEAR: z_newitems,z_closeditems.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 18, 2008 at 08:42 PM

    At end of the internal table, after you update month 04 - you need to calculate how many months left to update. Just use Do statement to calculate and add to internal table.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.