Application Development 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: 

Differnce between two days

Former Member
0 Kudos

Hi All,

I want function module to get difference between two days. (billing date and delivery date).

So,can you help me out.

Regards,

Priya.

8 REPLIES 8

bpawanchand
Active Contributor
0 Kudos

Hi

[Sample Code|]

Regards

Pavan

Former Member
0 Kudos

hi,

Use The FM.

HR_HK_DIFF_BT_2_DATES

Regards

Sumit Agarwal

Former Member
0 Kudos

hi,

Check the function Modules

DAYS_BETWEEN_TWO_DATES

FIMA_DAYS_AND_MONTHS_AND_YEARS

in your case , I think Best will be

SD_DATETIME_DIFFERENCE

Former Member
0 Kudos

hi,

refer the link

Former Member
0 Kudos

Hi priya,

Instead of using FM u can directly substract the 2 dates to get the diff.

data: ldate1 like sy-datum,

ldate2 like sy-datum,

ldays type i.

l_date1 = '20081012'.

l_date2 = '20080912'.

ldays = ldate1 - ldate2. << ldays contains no. of days

Former Member
0 Kudos

Hi

HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.

FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.

Also go through the link given below :

http://www.saptechies.com/abap-function-modules/

With Regards

Nikunj shah

'

Former Member
0 Kudos

Hi,

with the help of following FM u can find out deff btwn two dates..

HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.

Thanks & regards

Ashu Singh

Former Member
0 Kudos

Hi Supriya,

Can u pls check thie FM : DAYS_BETWEEN_TWO_DATES

Regards,

Suresh.S