4、-----*"*"Local interface:*" IMPORTING*" REFERENCE(ZNAME) LIKE USR01-BNAME*" CHANGING*" REFERENCE(ZDATE) TYPE C*"----------------------------------------------------------------------DATA: lv_datfm LIKE usr01-datfm, lv_year(4) TYPE c, lv_month(2) TYPE c,
5、 lv_day(2) TYPE c.*zdate = sy-datum. lv_year = zdate+0(4). lv_month = zdate+4(2). lv_day = zdate+6(2). SELECT datfm INTO lv_datfm FROM usr01 UP TO 1 ROWS WHERE bname = zname . ENDSELECT. IF sy-subrc = 0. CLEAR zdate. CASE lv_datfm. WHEN '1'.
6、 CONCATENATE lv_day lv_month lv_year INTO zdate SEPARATED BY '.'. WHEN '2'. CONCATENATE lv_month lv_day lv_year INTO zdate SEPARATED BY '/'. WHEN '3'. CONCATENATE lv_month
7、 lv_day lv_year INTO zdate SEPARATED BY '-'. WHEN '4'. CONCATENATE lv_year lv_month lv_day INTO zdate SEPARATED BY '.'. WHEN '5'. CONCATENATE lv_year lv_month