Learn ABAP (3)

How to find the differences of dates ?
As simple as subtracting the two dates, but the variable should be in a type of numeric value such as i or p. See the example below :

/nse38

report zdiffdate.
data : date1 type d,
diffdate type i.

date1='20090701'.
diffdate = sy-datum - date1.
write / diffdate.

All SAP products are trademark of SAP AG. This blog is not affiliated with nor endorsed by SAP AG.