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: 

FM name..???

Former Member
0 Kudos

Hi,

is there any FM which calculates no. of days between today and last 6 months..???? or any other IDEA...???

Thanks in advance....

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Just check this function module to calculate no of days between two dates..

DAYS_BETWEEN_TWO_DATES

Thanks,

9 REPLIES 9

Former Member
0 Kudos

Hi,

Just check this function module to calculate no of days between two dates..

DAYS_BETWEEN_TWO_DATES

Thanks,

Former Member
0 Kudos

Hi!

DATA: gv_today LIKE sy-datum,

gv_6_months_pre LIKE sy-datum,

gv_difference TYPE i.

MOVE sy-datom TO gv_today.

MOVE '20080201' TO gv_6_months_pre.

gv_difference = gv_today - gv_6_months_pre.

gv_difference will contain the desired number.

Regards

Tamá

Former Member
0 Kudos

Hi,

Use FM 'DAYS_BETWEEN_TWO_DATES'

Regards,

Sujit

Former Member
0 Kudos

Hi,

try this FM HR_SGPBS_YRS_MTHS_DAYS

LAGF_DAYS_BETWEEN_2_DATES_GET

Pawan_Kesari
Active Contributor
0 Kudos

if both the dates are stored in DATUM type varible then you can simply subtract them to get days.

DATA : v_today type syst-datum ,

v_smnth type syst-datum ,

v_no type i .

v_no = v_today - v_smnth .

Former Member
0 Kudos

Hi Sandeep,

Try the foloowing function modules:

DAYS_BETWEEN_TWO_DATES

ISB_DAYS_BETWEEN_TWO_DATES

HR_HK_DIFF_BT_2_DATES

Hope this helps you

Regards,

Chandra Sekhar

Former Member
0 Kudos

Hi Sandeep.

I would like to suggest,

FIMA_DAYS_AND_MONTHS_AND_YEARS.

Export parameters - From date & End date.

Importing - Days, Months, Years.

Writing only-------> write:/ W_DAYS.

Will surely give you the days.

I also would like to suggest you a reference, as it is the same case as yours,

[SDN - Reference for Calculating number of days between two dates - function module|;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave

former_member125931
Active Participant
0 Kudos

Use : 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 year months and days.

Former Member
0 Kudos

Thanks

Regards,

Baidyanath