2009 Mar 26 2:51 PM
hi..
i need to select the month interval in select-option.. it should not exceed the particular month..
for eg..
in selection screen:
date : 10.03.2009 to ________________
the high end should be the last day of that particular month..
how to do it..
hi..
i need to select the month interval in select-option.. it should not exceed the particular month..
for eg..
in selection screen:
date : 10.03.2009 to ________________
the high end should be the last day of that particular month..
how to do it..
2009 Mar 26 2:54 PM
HI,
use this FM LAST_DAY_OF_MONTHS
Tables syst.
select-OPTIONS : s_date for syst-datum.
DATA l_date TYPE sy-datum.
INITIALIZATION.
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
day_in = sy-datum
IMPORTING
LAST_DAY_OF_MONTH = l_date
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2
.
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-sign = 'I'.
s_date-option = 'BT'.
s_date-low = sy-datum.
s_date-high = l_date.
append s_date.
2009 Mar 26 2:54 PM
Use the fm RP_LAST_DAY_OF_MONTHS to get last day of month
in select options high field and use validation at selection screen to restrict it.
2009 Mar 26 3:02 PM
Hi,
do coding like this.
DATA: I_DATUM type sy-datum,
high_date type sy-datum.
DATA: DATMM TYPE I,
DATJJ TYPE I,
REST TYPE I,
ZW_TT TYPE I.
i_datum = sy-datum.
DATMM = I_DATUM+4(2).
CASE DATMM.
WHEN 1. ZW_TT = 31.
WHEN 2. ZW_TT = 28.
WHEN 3. ZW_TT = 31.
WHEN 4. ZW_TT = 30.
WHEN 5. ZW_TT = 31.
WHEN 6. ZW_TT = 30.
WHEN 7. ZW_TT = 31.
WHEN 8. ZW_TT = 31.
WHEN 9. ZW_TT = 30.
WHEN 10. ZW_TT = 31.
WHEN 11. ZW_TT = 30.
WHEN 12. ZW_TT = 31.
ENDCASE.
IF DATMM = 2.
DATJJ = I_DATUM+0(4).
REST = DATJJ MOD 4.
IF REST = 0.
ZW_TT = 29.
ENDIF.
ENDIF.
high_date = i_datum.
high_date+4(2) = zw_tt.regards,
bharat.
2009 Mar 26 3:03 PM
select-options: s_date for sy-datum.
initialization.
s_date-low = sy-datum.
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
day_in = sy-datum
IMPORTING
LAST_DAY_OF_MONTH = s_date-high
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
append s_date.
2009 Mar 26 3:08 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |