FM to Find Date Difference


Fm to find date difference.

Imports:

 import1

import2

Exports:

 export1

 export2

Codes:

FUNCTION ZTB_FIND_DATE_DIFFERENCE.

*”———————————————————————-

*”*”Local Interface:

*”  IMPORTING

*”     REFERENCE(I_DATE1) TYPE  DATUM

*”     REFERENCE(I_DATE2) TYPE  DATUM

*”  EXPORTING

*”     REFERENCE(E_DAYS) TYPE  STRING

*”     REFERENCE(E_MONTHS) TYPE  STRING

*”     REFERENCE(E_YEARS) TYPE  STRING

*”———————————————————————-

datalv_date1  type vtbbewedbervon.

datalv_date2  type vtbbewedberbis.

datale_days   type vtbbeweatage.

datale_months type vtbbeweatage.

datale_years  type vtbbeweatage.

lv_date1 i_date1.

lv_date2 i_date2.

call function ‘FIMA_DAYS_AND_MONTHS_AND_YEARS’

  exporting

    i_date_from  lv_date1

    i_date_to    lv_date2

 importing

   e_days        le_days

   e_months      le_months

   e_years       le_years.

e_days   le_days.

e_months le_months.

e_years  le_years.

ENDFUNCTION.

Leave a comment

Your email address will not be published. Required fields are marked *