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: 

Calculate no of days from an input date(as parameter) to current sys date

Former Member
0 Kudos

Hi guyz ..

Whaz up ! gt a lill problem here..

i need to calculate the no of days from an input date (as parameter)

to current sys date.. how do i do it easily..any FM ..?

Thanks

Shahjahan.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi, the easiest way may look like this:

DATA: L_DIFF type I.

L_DIFF = SY-DATUM - P_DATEM.

You can check following FMs as well:

DAYS_BETWEEN_TWO_DATES

SD_DATETIME_DIFFERENCE

4 REPLIES 4

Former Member
0 Kudos

Hi, the easiest way may look like this:

DATA: L_DIFF type I.

L_DIFF = SY-DATUM - P_DATEM.

You can check following FMs as well:

DAYS_BETWEEN_TWO_DATES

SD_DATETIME_DIFFERENCE

Former Member
0 Kudos

hi,

<b>use any one of the function module as per your needs.</b>

<b>Use the fm 'DAYS_BETWEEN_TWO_DATES'.</b>

the above function module for number of day's along with weekends.

<b>follow this link for anotherway of solution.</b>

regards,

Ashok Reddy

Former Member
0 Kudos

Hi Jahan,

You can use FM HR_HK_DIFF_BT_2_DATES

or FIMA_DAYS_AND_MONTHS_AND_YEARS.

Regards,

Sameer

0 Kudos

Guyz thanks alot !

i gt it.

thnx

jahan