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

regarding function module

Former Member
0 Likes
633

hi experts,

cud u plz send me the function module in which when i enter the start and end date it will give me the number of days between these two dates ...thnx in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
609

Hi,

Check the following FM's

DATE_CHECK_WORKINGDAY

HR_SEN_CALE_DAYS_DURATION

HR_SGPBS_YRS_MTHS_DAYS

Check the following threads

Reward if useful.

4 REPLIES 4
Read only

Former Member
0 Likes
609

Hello,

USe this <b>DAYS_BETWEEN_TWO_DATES</b>


  CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
       EXPORTING
            I_DATUM_BIS             = G_T_PURO-AEDAT
            I_DATUM_VON             = G_T_EBAN-BADAT
       IMPORTING
            E_TAGE                  = G_F_DIFF
       EXCEPTIONS
            DAYS_METHOD_NOT_DEFINED = 1
            OTHERS                  = 2.

WRITE: G_F_DIFF.

Vasanth

Read only

Former Member
0 Likes
610

Hi,

Check the following FM's

DATE_CHECK_WORKINGDAY

HR_SEN_CALE_DAYS_DURATION

HR_SGPBS_YRS_MTHS_DAYS

Check the following threads

Reward if useful.

Read only

Former Member
0 Likes
609

Hi,

DAYS_BETWEEN_TWO_DATES

DATE_CONVERT_TO_FACTORYDATE.

FIMA_DAYS_BETWEEN_TWO_DATES_2

or FIMA_DAYS_BETWEEN_TWO_DATES.

<b>Reward points</b>

Regards

Read only

Former Member
0 Likes
609

Hi,

use code as below :

data : days type VTBBEWE-ATAGE, years type VTBBEWE-ATAGE, months type VTBBEWE-ATAGE.

data : a_new type sy-datum, b_new type sy-datum.

a_new = '20070101'.

b_new = '20070130'.

CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'

EXPORTING

i_date_from = a_new

I_KEY_DAY_FROM = '00'

i_date_to = b_new

I_KEY_DAY_TO = '00'

I_FLG_SEPARATE = ' '

IMPORTING

E_DAYS = days

E_MONTHS = months

E_YEARS = years.

write : days.

Reward points, if helpful,

Sandeep Kaushik