Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

function module for opening balance?

Hi Experts,

I have created a customer outstanding report in which the balance calculation is wrong. The client wants opening balance in the top and then opening balance + debit - credit and then closing balance in the last. And I have just done the debit - credit. Is there any function module to calculate it?

The purpose of the customer outstanding report is that in standard report there is only one column for balance. Client wants to separate it in debit and credit. Please guide.

I have created a cash journal report earlier in which there was opening and closing balance. I copied RFCASH20 into a customized report and made changes according to the user.

Regards

Purnand

Former Member
replied

Consider your code for customer outstanding report .

Inside that there is a field for Posting date (BUDAT) and a field for Customer ( KUNNR ).

Now while filling the final internal table for that report ( i.e CUSTOMER OUTSTANDING REPORT )

just after filling the values BUDAT and KUNNR call that BAPI .

eg :

LOOP AT BSID.

WA_FINAL-BUDAT = BSID-BUDAT.

WA_FINAL-KUNNR = BSID-KUNNR.

CALL FUNCTION BAPI_AR_ACC_GETKEYDATEBALANCE.

EXPORTING COMPANYCODE = '1000'.

                    CUSTOMER        = BSID-KUNNR

                    KEYDATE           = BSID-BUDAT.

TABLES    KEYBALANCE

ENDLOOP.

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question