Diff = date_today - tag
*date_today: today's date.
*tag : is always an earlier date than today's date.
tag is a field in table ztab.
i have coded:
DATA :
date_today TYPE sy-datum,
w_days TYPE i,
w_months TYPE i,
w_years TYPE i.
date_today = sy-datum .
CALL FUNCTION 'C14B_DIFF_BT_2_DATES'
EXPORTING
i_date_from = wa_ztab-tag
i_date_to = date_today
IMPORTING
e_days = w_days
e_months = w_months
e_years = w_years
EXCEPTIONS
plausibility_check_failed = 1.
WRITE /:
w_days,
w_months,
w_years.
Q) will the following code work right? if yes, then how can i insert the result into "diff" variable ??