Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Data validations

Hi,

i want to do data validation for strat date(default to system date). plz give me code for this....

Thanks,

Ankitha

Tags:
Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question