Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

MONTHS_BETWEEN_TWO_DATES_NEW

former_member220286
Participant
0 Likes
2,125

I am entering below inputs in the above function module   : -

I_DATUM_BIS    =   01.06.2015

I_DATUM_VON  =   01.07.2014

I_KZ_INCL_BIS  = *

I_KZ_VOLLE_MONATE = x

When I execute the above function module with above inputs I am getting the output : -          1.100000000000000E+01

What type of number I am getting in month as this function module  gives the month between two dates ..please suggest ??

4 REPLIES 4
Read only

Former Member
0 Likes
1,539

Deepak,

why don't you use the FM FIMA_DAYS_AND_MONTHS_AND_YEARS. This gives back clear results.

Thanks,

Vikram.M

Read only

rajkumarnarasimman
Active Contributor
0 Likes
1,539

Hi Deepak,

The FM MONTHS_BETWEEN_TWO_DATES_NEW is returning the month in exponential form. If you want to convert the exponential value to normal value, you can FM QSS0_FLTP_TO_CHAR_CONVERSION

Regards

Rajkumar Narasimman

Read only

Former Member
0 Likes
1,539

Hi Deepak,

You are passing the date fields in wrong format. Check your user profile. It must be accepting MM/DD/YYYY or something else other than DD.MM.YYYY. You can test it in SE37.

Look below example with screenshot.

Regards,

Raju Shrestha

Read only

GauravKoundal
Explorer
0 Likes
1,539

Use HR_MONTHS_DIFFERENCE_TWO_DATES.