2007 Oct 24 7:59 AM
HI,
I am working on FI report, where i need to calculate the G/L account closing balance on a daily basis, which will be used as the opening balance for the next day, please help me out with some sample report or logic to claculate the closing balance day wise.
u can mail me to :soyunee@gawab.com
Regards
Soyunee.
2007 Oct 24 8:06 AM
hi Soyunee,
I am not sure a FM exists for G/L, however FMs exist for vendor and customer.
Pls check BAPI_AR_ACC_GETKEYDATEBALANCE (this is for customer), if you copy this you have to replace BSID and BSAD with BSIS and BSAS and you have good chances that it will work.
Come back if you have more questions
ec
2007 Oct 24 8:06 AM
hi Soyunee,
I am not sure a FM exists for G/L, however FMs exist for vendor and customer.
Pls check BAPI_AR_ACC_GETKEYDATEBALANCE (this is for customer), if you copy this you have to replace BSID and BSAD with BSIS and BSAS and you have good chances that it will work.
Come back if you have more questions
ec
2007 Oct 24 11:45 AM
Hi EC,
Thank so much for ur quick response, i tried changing BSID AND BSAD to BSIS AND BSAS, just by changing these two table names, its not working, i tried changing corresponding fileds as well, there are other inter-related performs which has to be changed.
2007 Oct 24 11:59 AM
Hi,
You have to make use of many tables for this purpose.
1. You have to claculate the previuos period and finscal year for the given date..
2. You have to calculate the G/L balances for this period for the given G/L account from table GLT0.(You can use some of the standard function modules for the same)
3. You have get the line items from the various tables like BSIS,BSAS,BSIK, BASK, BSID and BSAD for the dates from the begining of the month to the given date-1. sum upthis amount with the amount retrieved from step 2 .This will be the opening balance for the given date.
4.retrieve the data from he same tables like step 3 for the given date. This will the transactions of the given date.
5. sum up the amounts from step 4 with step 3. this will be the closing balance for that date.
let me know id you want any further info..
Reward the points if i answered your question..
2007 Oct 24 12:08 PM
Hi EC,
Thank so much for ur quick response, i tried changing BSID AND BSAD to BSIS AND BSAS, just by changing these two table names, its not working, i tried changing corresponding fileds as well, there are other inter-related performs which has to be changed.