2006 Oct 05 1:30 PM
Hi
Pls tell me to get the previous date of the the date.
Thanx in advance,
Parvez.
2006 Oct 05 1:34 PM
Hi Venu,
Use this Function Module
data: prev_date like (type of calc_date).
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = sy-datum
days = 1
months = 0
signum = '-'
years = 0
IMPORTING
calc_date = prev_date.
This should surely work.
Thanks and Regards,
Prashanth
2006 Oct 05 1:31 PM
data w_date type sy-datum.
w_date = w_date - 1.
write: / w_date. "yetserday
~Suresh
2006 Oct 05 1:32 PM
u can subtract 1 from present date
previous_date = present_date - 1.
2006 Oct 05 1:32 PM
hi,
No need of any fm.
Just subtract the no of the days from the days. It gives the previous date.
Regards,
Sailaja/.
2006 Oct 05 1:33 PM
2006 Oct 05 1:34 PM
Hi Venu,
Use this Function Module
data: prev_date like (type of calc_date).
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = sy-datum
days = 1
months = 0
signum = '-'
years = 0
IMPORTING
calc_date = prev_date.
This should surely work.
Thanks and Regards,
Prashanth
2006 Oct 05 9:27 PM
Hello Venu
If you also need function modules dealing with <b>working days</b> you will find useful FMs in function group <b>FB00</b>.
Regards
Uwe
2006 Oct 05 9:32 PM
Hi,
Use the below logic,
data lastdate like sy-datum.
lastdate = sy-datum - 1.
Cheers,
Abdul Hakim
2006 Oct 05 9:51 PM
Hi Venu,
Check,
REPORT Z13708_TEST11 .
data : s_date type sy-datum.
data : s_table type table of CASDAYATTR with header line .
start-of-selection.
CALL FUNCTION 'DAY_ATTRIBUTES_GET'
EXPORTING
FACTORY_CALENDAR = ' '
HOLIDAY_CALENDAR = ' '
DATE_FROM = s_date
DATE_TO = SY-DATUM
LANGUAGE = SY-LANGU
IMPORTING
YEAR_OF_VALID_FROM =
YEAR_OF_VALID_TO =
RETURNCODE =
TABLES
DAY_ATTRIBUTES = s_table
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
s_date = s_table-date - 1.
write : s_date.
Regards,
Azaz.