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

Differnce between two days

Former Member
0 Likes
934

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
Read only

bpawanchand
Active Contributor
0 Likes
905

Hi

[Sample Code|]

Regards

Pavan

Read only

Former Member
0 Likes
905

hi,

Use The FM.

HR_HK_DIFF_BT_2_DATES

Regards

Sumit Agarwal

Read only

Former Member
0 Likes
905

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

Read only

Former Member
0 Likes
905

hi,

refer the link

Read only

Former Member
0 Likes
905

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

Read only

Former Member
0 Likes
905

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

'

Read only

Former Member
0 Likes
905

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

Read only

Former Member
0 Likes
905

Hi Supriya,

Can u pls check thie FM : DAYS_BETWEEN_TWO_DATES

Regards,

Suresh.S