2007 Feb 26 12:55 PM
In Select-options in lower field the first date of the current month and in higher field last date of the current field should be displayed. how we can write code for this?
2007 Feb 26 1:12 PM
Hi,
ravi's code will work fine with one small correction
INTIALIZATION.<b>CONCATENATE sy-datum0(4) '01' sy-datum4(2) INTO v_low.</b>
call function 'LAST_DAY_OF_MONTHS'
exporting DAY_IN = sy-datum
importing LAST_DAY_OF_MONTH = s_date-high.
s_date-sign = 'I'.
s_date-option = 'BT'.
s_date-low = v_low.
APPEND s_date
In Select-options in lower field the first date of the current month and in higher field last date of the current field should be displayed. how we can write code for this?
2007 Feb 26 1:00 PM
initialization.
concatenate sy-datum4(4) sy-datum2(2) '01' into s_date-low.
call function 'LAST_DAY_OF_MONTHS'
exporting DAY_IN = sy-datum
importing LAST_DAY_OF_MONTH = s_date-high.
s_date-sign = 'I'.
s_date-option = 'BT'.
append s_date.
2007 Feb 26 1:01 PM
Hi,
In the INITIALIZATION event you can write this.
S_date-low = .1st date of the month (concatenate ..day(01)..month..year )..
s_date-high = last date ,, ,, day (last) month year
s_date-option = EQ.
append s_date.
Regards,
Anji
2007 Feb 26 1:12 PM
hi sorry previous one doesnt work as they were lot of code errors in that, check this one, its working perfectly
tables: ekko.
select-options: s_datum for ekko-aedat.
data: temp type int2, firs(2), sec(2).
initialization.
firs = sy-datum+4(2). " this will get present month
temp = firs.
sec = firs + 1. " this will get next month first day
unpack sec to sec.
*concatenate this into a date..
concatenate sy-datum(4) firs '01' into s_datum-low.
concatenate sy-datum(4) sec '01' into s_datum-high.
append s_datum.
2007 Feb 26 1:12 PM
Hi,
ravi's code will work fine with one small correction
INTIALIZATION.<b>CONCATENATE sy-datum0(4) '01' sy-datum4(2) INTO v_low.</b>
call function 'LAST_DAY_OF_MONTHS'
exporting DAY_IN = sy-datum
importing LAST_DAY_OF_MONTH = s_date-high.
s_date-sign = 'I'.
s_date-option = 'BT'.
s_date-low = v_low.
APPEND s_date
2007 Feb 26 1:15 PM
data : dat type d,
dat1 type d.
dat = sy-datum.
dat1 = sy-datum.
dat+6(2) = 01.
dat4(2) = dat4(2) + 1.
dat1+6(2) = 01.
s_test-low = dat1.
s_test-high = dat - 1.
append s_test.
Regards,
Rusidar S
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |