Find the difference between
two days in days, months and years
* * Type in two date and find the difference between the two dates in * days, months and years. * * Written by : SAP Basis, ABAP Programming and Other IMG Stuff * http://www.erpgreat.com * REPORT ZDATEDIFF. DATA: EDAYS LIKE VTBBEWE-ATAGE, EMONTHS LIKE VTBBEWE-ATAGE, EYEARS LIKE VTBBEWE-ATAGE. PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON, TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM. call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS' exporting i_date_from = FROMDATE i_date_to = TODATE * I_FLG_SEPARATE = ' ' IMPORTING E_DAYS = EDAYS E_MONTHS = EMONTHS E_YEARS = EYEARS. WRITE:/ 'Difference in Days ', EDAYS. WRITE:/ 'Difference in Months ', EMONTHS. WRITE:/ 'Difference in Years ', EYEARS. INITIALIZATION. FROMDATE = SY-DATUM - 60. Read Also
ABAP Books
More ABAP Tips
SAP ERP Modules, Basis, ABAP and Other IMG Stuff All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|