2007 Nov 21 7:30 AM
Hi,
i want to do data validation for strat date(default to system date). plz give me code for this....
Thanks,
Ankitha
2007 Nov 21 8:06 AM
Hi ankitha,
parameters:
p_start type sydatum obligatory default sy-datum. "forces correct format
AT selection-screen on p_start.
perform date_validation using p_start.
form date_validation using p_date type sy-datum.
* do meaningful checks here, i.e.
if p_date type > sy-datum.
message E000(R1) 'Date must not be in the future'.
endif.
endform.In case of error, the cursor will jump to the parameter input field and mark it red color.
Regards,
Clemens
Hi,
i want to do data validation for strat date(default to system date). plz give me code for this....
Thanks,
Ankitha
2007 Nov 21 7:38 AM
You can use the function module <b>DATE_CHECK_PLAUSIBILITY</b> in the event AT SELECTION SCREEN ON <selscreen field> to validate the date.
2007 Nov 21 7:39 AM
parametrs p_date type sy-datum default sy-datum.
at selection-screnn.
if sy-atum = p_datum.
msg.
endif.
2007 Nov 21 8:06 AM
Hi ankitha,
parameters:
p_start type sydatum obligatory default sy-datum. "forces correct format
AT selection-screen on p_start.
perform date_validation using p_start.
form date_validation using p_date type sy-datum.
* do meaningful checks here, i.e.
if p_date type > sy-datum.
message E000(R1) 'Date must not be in the future'.
endif.
endform.In case of error, the cursor will jump to the parameter input field and mark it red color.
Regards,
Clemens
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |