3、.DATA: SAPOBJID LIKE SAPB-SAPOBJID, SAPPFAD LIKE SAPB-SAPPFAD.DATA: GD_PATH TYPE STRING , FILETAB TYPE TABLE OF FILE_INFO WITH HEADER LINE, COUNT TYPE I.DATA: FILENAME(40) TYPE C , FILEEXT(10) TYPE C , LEN TYPE I .*重点图片名称要等于系统员工编号PARAMETERS: FILEPATH LIKE RLGRA
4、P-FILENAME."上传文件夹路径AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILEPATH. CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE EXPORTING WINDOW_TITLE = 'File Directory' INITIAL_FOLDER = 'C:' CHANGING SELECTED_FOLDER = GD_PATH. CALL METHOD CL_GUI_CFW=>FLUSH. C
7、判断图片编号是否等于8位 LOOP AT FILETAB. SPLIT FILETAB-FILENAME AT '.' INTO FILENAME FILEEXT. LEN = STRLEN( FILENAME ) . IF LEN <> 8 . MESSAGE E000(OO) WITH '文件名长度必须等于8位'. ENDIF. ENDLOOP. LOOP AT FILETAB.*判断员工编号是否存在 SELECT SINGLE * FROM PA0001 WHERE PERNR = FILETAB-