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: 

No no days

Former Member
0 Kudos

Hi ,

Is there any FM which can calculate no of period b/w two date ranges.

Let's say Dat1 - 01.03.2006

Dat2 - 01.03.2007

O/p should be 365.

Regards,

raghav

1 ACCEPTED SOLUTION

former_member181995
Active Contributor
0 Kudos

Did you manage any kind of work with SDN Search option?

i feel sadly if your answer is yes and say i did't get any suitable FM for calculating no of days beteen two dates!

than i would suggest you to use Calc than.

Amit.

7 REPLIES 7

MarcinPciak
Active Contributor
0 Kudos

Hi,

Simply subtract dates one from another.

data: days type i.

days = dat2 - dat1.

write days. "you will get number of days between these two dates

Regards

Marcin

0 Kudos

Hi,

Dat format :-

Dat1 - 01.03.2006 it is coimng like 20060301

Dat2 - 01.03.2007 "" "" "" "" 20070301

Now dat1 - dat 2 = 1000 ....I hope it is clear to u.

0 Kudos

Hi,

check these FM-

C14B_DIFF_BT_2_DATES

DAYS_BETWEEN_TWO_DATES

0 Kudos

I just manage a search in se37 with daysbetween* and F4 here is what i got 8 FM for this:

ISU_LEAP_DAYS_BETWEEN_2_DATES  
                               
FF04                           
FIMA_DAYS_BETWEEN_TWO_DATES    
FIMA_DAYS_BETWEEN_TWO_DATES_2  
FIMA_LEAP_DAYS_BETWEEN_2_DATES 
                               
FILAGFVS                       
LAGF_DAYS_BETWEEN_2_DATES_GET  
                               
FV02                           
DAYS_BETWEEN_TWO_DATES         
LEAP_DAYS_BETWEEN_TWO_DATES    
                               
JBDVT                          
ISB_DAYS_BETWEEN_TWO_DATES

former_member181995
Active Contributor
0 Kudos

Did you manage any kind of work with SDN Search option?

i feel sadly if your answer is yes and say i did't get any suitable FM for calculating no of days beteen two dates!

than i would suggest you to use Calc than.

Amit.

0 Kudos

I have checked and i found PCLO_DAY_DIFFERENCE_30..but it doesn't work.

0 Kudos

WOW! Never heard of a SAP defined FM that doesnt work - apart from the obselete/unreleased ones.

So which one of two is it?

pk