‎2008 May 02 7:29 AM
Hi abaper's,
I need date (formate 06/2007 ) in select-options. my requirement is
Date (SPMON) Default = Current Month + 1
this is very urgent. please give me any idea...............
--Anji
‎2008 May 02 7:34 AM
allow ur user to put only month and year
write select-option: s_date for s111-spmon.
for month + 1.
spmon+(6) = sy-datum.
spmon+4(2) = spmon + 1.
Edited by: saathi s on May 2, 2008 8:47 AM
‎2008 May 02 7:38 AM
Hi,
Use the below code.
data: v_date(7), v_month(2) type n, v_year(4) type n.
select-options: s_date for v_date.
initialization.
v_month = sy-datum+4(2) + 1.
if sy-datum+4(2) = 12.
v_year = sy-datum+0(4) + 1.
else.
v_year = sy-datum+0(4).
endif.
CONCATENATE v_month '/' v_year into s_date-low.
append s_date.
‎2008 May 02 7:40 AM
hi,
use this code.
Parameter: p_date type mcperiod.
initialization.
p_date = sy-datum + 1.
‎2008 May 02 8:19 AM
Hi,
Have a look on the following code,it adds/subtracts the months to current date.
tables: ekko.
select-options: date1 for ekko-aedat.
data: var1 type sy-datum.
load-of-program.
This gives the previous month and next month
CALL FUNCTION 'HR_PT_ADD_MONTH_TO_DATE'
EXPORTING
dmm_datin = sy-datum
dmm_count = '1'
dmm_oper = '-' " Operation (add/subtract)
dmm_pos = 'B' " Set date in the beginning or end of month
IMPORTING
DMM_DAOUT = VAR1
EXCEPTIONS
UNKNOWN = 1
OTHERS = 2.
write:/ sy-datum.
write:/ var1.
initialization.
date1-low = var1.
date1-high = sy-datum.
append date1.
Reward,if useful.
Thanks,
Chandu