‎2010 Oct 28 11:58 AM
Hi Experts,
In my declartaion I have declared a field DUER1. This field gets data at the run time. But on this field I am using ATEND OF DUER!.
For this the filed must be at the first poiitonof my internal table. Befor that once I have used the ATEND of GJAHR.
So I made it my 2nd field.. In my select statement i coded this field at the 2nd position. When Iactivated the program its getting activating.
But while I am checking the out put in another client I am getting run time error.
Is there any solution for this.
Or I have to put this field DUER! after all the predefined fields I have declared. How can this be solved.
Thanks in Advance.
‎2010 Oct 28 12:28 PM
i would do a manual groupchange check as the statements AT END OF, AT NEW are not to trust in such a complex scenario.
‎2010 Oct 28 12:47 PM
Hi Florian,
Actually I am calcualting the due and over due amount. in current fiscal year I have to show the over due amount into
0 to 30 days , 31 to 60 days, 61 to 90 days, 91 to 120 days, and above 120 days.
For this I have calculated the due date and as per the due date from Key date(mean current date) . I am calculating the days of overdue
For this I have declared DUER1 field.
I tried with Using ON CHANGE OF DUER1 and AT END OF DUER1. In both cases I did not got any result in those fields.
I thought may be its not the first field so I am not getting the result. So I made it as 2nd field. after that I got run time error.
So is there any other way to get the desired result.
Using this code I got all the financial years amoount.
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.
Now using thsi section of code to get the over due amount days like 0 to 30 and so on.
SORT IT_BSEG BY DUER1.
LOOP AT IT_BSEG INTO WA_BSEG.
AT END OF DUER1.
SUM.
LOOP AT IT_ITAB INTO WA_ITAB WHERE GJAHR = WA_BSEG-DUER1.
WA_ITAB-PRICE = WA_BSEG-DUE_AMT.
MODIFY IT_ITAB FROM WA_ITAB.
CLEAR WA_ITAB.
ENDLOOP.
ENDAT.
ENDLOOP.
Or is there any way to sum both the fields at the same location and at the same time. I mean can I do this in this way
SORT IT_BSEG BY GJAHR DUER1.
LOOP AT IT_BSEG INTO WA_BSEG.
AT END OF GJAHR DUER1.
SUM.
LOOP AT IT_ITAB INTO WA_ITAB GJAHR = WA_BSEG-GJAHR.
WA_ITAB-PRICE = WA_BSEG-DUE_AMT.
MODIFY IT_ITAB FROM WA_ITAB.
CLEAR WA_ITAB.
ENDLOOP.
ENDAT.
ENDLOOP.
Thanks and Regards
Ravi Narayan Padhi
Ravi Narayan Padhi
Edited by: Ravi Narayan Padhi on Oct 28, 2010 6:18 PM
‎2010 Oct 28 2:02 PM
So is there any other way to get the desired result.
Yes, this is the same question you asked in another post the other day - did you review the standard aging reports as I suggested? I see no aging logic in your code...
‎2010 Oct 29 6:36 AM
Hi Brad,
I have already calculated tall the due and over due amount. Also I am picking up the amount into each fiscal year. Also in My run time I am getting the desired overdue in which bucket it falls.
I used AT END of GJAHR to pick up the amounts for each fiscal year then SUM to calculate the total amount in the fiscal year.
The same syntax I am using to calculate if the desired amount falls in let 0 to 30 days bucket. But the amount is not picking up by my code. I have displayed the amount in my out put for each fiscal year.
Also I checked the standard ageing report RFDOPR10 AND RFKOPR10.
Thanks and Regards.
Edited by: Ravi Narayan Padhi on Oct 29, 2010 6:57 PM
‎2010 Oct 29 2:39 PM
Hi,
Please provide the run time error description.
You have made it as your second field. I donot think so the error will be from control break statements.
Check the select into clauses etc.
‎2010 Oct 30 6:25 AM
Hi Keshav,
Now I am not getting run time error, the field is getting value at the run time. So I changed the position of the field.After that the run time error is not coming.
Is there any way out to get value using AT END OF DUER1. I can't make this field as first or second field. Already I have made my GJAHR as the first filed. I am calculating the over due amount as per each fiscal year. After that I am checking the over due amount for 0 to 30 days and 31 to 60 days and so on.
Can I sort the field DUER1 as per the current financial year. I mean DUER1 should only be sorted at the current financial year in my internal table.
I tried using AT END of DUER1 also tried with using CASAE ENDCASE statemment. desired result is not coming.
Can u suggest me any other way to resolve this issue.
Thanks in Advance.