on 02-10-2015 12:33 PM
Dear all
Please let me know the table name for field "term in months" in tab term -contract.
I want to know the logic for calculation of total no of month.
thanks and regards
shantanu
Hello Shantanu Singh,
If your doubt is what I entedi: This information is not recorded in physical table but in structure and is designed at runtime.
Could you explain what your problem?
att,
André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shantanu,
as Chandra mentioned the "term in months" is calculated in runtime and not stored in the database.
Calculation is performed in
CL_RETM_PERIOD_MNGR
IF_RETM_PERIOD_MNGR
using function module MONTH_BETWEEN_TWO_DATES.
Maybe it is helpful to use function modules BAPI_RE_CN_GET_DETAIL or API_RE_CN_GET_DETAIL to get this value for a given contract.
Regards, Franz
Hi Franz/Andre
I debug function module "month_between_two_dates"and I got following formula for calculating no of months.
E_monate=(datum bis-jjjj - datum von -jjjj)*12+(datum bis-mm - datum von -mm)
but above formula will not work in all cases:
1.Contract start date =01/01/2008 and end date = 06/15/2013(mm/dd/yyyy) and no of months = 65 which is correct as per above formula.
2.if start date = 01/02/1996 and end date = 07/31/2011
it is calculating no of months as 187 which is not as per formula and it is adding +1 to the month coming from above formula.(186+1)
I am not able to find out how the system determines where to add +1 and from where not to add 1.
Please help.
Regards
Shantanu
User | Count |
---|---|
15 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.