cancel
Showing results for 
Search instead for 
Did you mean: 

contract term

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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é

Former Member
0 Kudos

hi andre

if table is not avaiIable then i need to know the formula on the basis of which SAP has calculated no of months.

and if possible where it is written..in the recn program?

best regards

shantanu

Former Member
0 Kudos

Hi Shantanu,

All the values defined in contract term will be stored in VICNCN table. As said in the above reply term in months will be derived in runtime based on contract start date and 1st Contract end

Regards,

Chandra

franz_posch
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Shantanu Singh,

Frans Porsh described the functions that generate this information in the message above.

You managed to solve the problem?

Need some help?

Regards, Andre

Former Member
0 Kudos

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