Skip to Content
0
Former Member
Jan 18, 2008 at 06:47 PM

urgent interesting req

17 Views

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.

ELSE.

wa_bsid-dmbtr = 0 - wa_bsid-dmbtr.

z_closeditems = wa_bsid-dmbtr + z_closeditems.

ENDIF.

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.