Hi Experts,
I have the due date, base line date, and payment terms AND DUE AMOUNT of each year. also I have defined a field as DUER.
if the amount falls with in 0 to30 days then DUER = 1.
31 to 60 days then DUER = 2 and so on.
Now My problem is how to proceed to calcualte the amount is due or over due as 0 to 30 days or 31 to 60 days 60 to 90 days 91 to 120 days.
For this I have defined a field like AGEING.
I am claculating the ageing = keydate - due dat.
Now my problem is how to separate the amount into due and over due as well as with in the days i have defined.
Here the section of code I am using, through this I got the due amount of each fiscal year.
SORT IT_BSEG BY GJAHR DUER1.
LOOP AT IT_BSEG INTO WA_BSEG.
AT END OF GJAHR.
SUM.
LOOP AT IT_ITAB INTO WA_ITAB WHERE GJAHR = WA_BSEG-GJAHR.
WA_ITAB-PRICE = WA_BSEG-DUE_AMT.
MODIFY IT_ITAB FROM WA_ITAB TRANSPORTING PRICE SPART.
clear wa_itab.
ENDLOOP.
ENDAT.
ENDLOOP.
to get the due amount for 0 to 30 days and 31 to 60 days and so on I am using this code. But unable toget the desired result.
ON CHANGE OF WA_BSEG-DUER1. " DUER1 is to chekc whether the amount is over due , if its over due then when it falls ( 0 to 30 days , 31 to 60 dyas and so on)
SUM.
WA_ITAB-PRICE = WA_BSEG-DUE_AMT.
ENDON.
There are several standard due date analysis reports in the system - you may want to have a look at those. As for proper aging logic for your scenario, it depends on your business processes and how credits are matched against debits and cleared. In the simplest scenario, it is fairly easy to find all open debits for an account, calculate the age of each debit, then consume those debits with the existing open credits on the account. You can wind up with multiple balances by age or a single balance - just set up your age 'buckets' and then use loop processing on your open items to calculate what falls in each bucket.
Add a comment