2007 Nov 13 10:59 AM
Hi,
I would like to set date on selection screen in my code and not trough variants.
eg.:
AT SELECTION-SCREEN.
INITIALIZATION.
berdatum = sy-datum.
so, what should i do instead of current sy-datum <b>to get the last day of current year?</b>
thank you in advance,
Maja
2007 Nov 13 11:03 AM
hi Maja,
you can code a bit:
lv_year type gjahr.
lv_year = sy-datum(4).
concatenate lv_year '1231' into berdatum.
hope this helps
ec
2007 Nov 13 11:03 AM
hi Maja,
you can code a bit:
lv_year type gjahr.
lv_year = sy-datum(4).
concatenate lv_year '1231' into berdatum.
hope this helps
ec
2007 Nov 13 11:05 AM
Hi,
Use FM LAST_DAY_IN_YEAR_GET and LAST_DAY_OF_MONTHS
Regards,
Prashant
2007 Nov 13 11:05 AM
call this
AT SELECTION-SCREEN.
INITIALIZATION.
CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
EXPORTING
I_GJAHR = YEAR
I_PERIV = FISC_VAR
IMPORTING
E_FIRST_DAY = BEG_DATE
E_LAST_DAY = END_DATE
EXCEPTIONS
INPUT_FALSE = 1
T009_NOTFOUND = 2
T009B_NOTFOUND = 3.
WRITE: / BEG_DATE, END_DATE.
berdatum = END_DATE.
2007 Nov 13 11:05 AM
check FM to get last dat of year
FUNCTION MODULES
http://www.erpgenie.com/abap/functions.htm
http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
2007 Nov 13 11:05 AM
sorry, if the calendar year is not the same like the fiscal year, than you ca use the following FMs:
FIRST_AND_LAST_DAY_IN_YEAR_GET
LAST_DAY_IN_YEAR_GET
2007 Nov 13 11:06 AM
REPORT ychatest2.
PARAMETERS : p_date LIKE sy-datum.
INITIALIZATION.
CONCATENATE sy-datum+0(4) '1231' INTO p_date.
2007 Nov 13 11:08 AM
Hi,
try this FM
FIRST_AND_LAST_DAY_IN_YEAR_GET
OR
data: last type sy-datum.
last = sy-datum.
last+4(4) = '1231'.
write:/ last.
Regards,
Omkar.
2007 Nov 13 11:13 AM