判断输入时间类型是numc类型的函数

 


  call function 'NUMERIC_CHECK'

    exporting

      string_in = p_date

    importing

      htype     = lv_type.



  if lv_type ne 'NUMC'.

    lv_error 'X'.

  endif.


判断日期是否有效的函数

 



 lv_date = p_date+0(8).

  call function 'DATE_CHECK_PLAUSIBILITY'

    exporting

      date                      = lv_date

    exceptions

      plausibility_check_failed 1

      others                    2.

  if sy-subrc <> 0.

    lv_error 'X'.

  endif.

posted on 2017-05-25 17:22  倩倩很happy  阅读(346)  评论(0编辑  收藏  举报