CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_EXIST EXPORTING FILE = l_file RECEIVING RESULT = l_rt EXCEPTIONS CNTL_ERROR = 1 ERROR_NO_GUI = 2 WRONG_PARAMETER = 3 NOT_SUPPORTED_BY_GUI = 4 others = 5 . IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY...
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXIST EXPORTING DIRECTORY = LW_PATH RECEIVING RESULT = LW_RESULT EXCEPTIONS CNTL_ERROR = 1 ERROR_NO_GUI = 2 WRONG_PARAMETER = 3 NOT_SUPPORTED_BY_GUI = 4 OTHERS = 5. 方法描述:检查目录是否存在 DIRECTORY为目录名 RESULT为返回结果:‘’不存在,‘...
1:创建文件夹 参数说明:RC为返回码类型为sy-subrc。 CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE EXPORTING DIRECTORY = 'E:\TESTDIR' CHANGING RC = RC. 2.文件夹的删除 下面方法删除E盘下TESTDIR文件夹 CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_DELETE EXPORTING DIRECTORY = 'E:\TESTD...
filename = 'c:/test.txt'. CALL METHOD cl_gui_frontend_services=>file_exist EXPORTING file = filename RECEIVING result = rc2. * write sy-subrc. * write rc2. IF sy-subrc = 0 AND rc2 = 'X'. CALL METHOD cl_gui_frontend_services=>file_delete EXPORTING filename = filename CHANGING rc...
directory_list_files_failed=2 wrong_parameter=3 error_no_gui=4 not_supported_by_gui=5 others=6 . 2,删除存在的文件 DATA:filename TYPE string, rc TYPE i, rc2 TYPE c. filename = 'c:\test.txt'. CALL METHOD cl_gui_frontend_services=>file_exist ...
l_filename = 'C:test.txt'. call method cl_gui_frontend_services=>file_exist exporting file = l_filename receiving result = l_ret exceptions others = 1. if l_ret = 'X'. write:/ 'File exists'. else. write:/ 'file doesnt exist'. endif. Regards, Rich Heilman Reply ...
CL_GUI_FRONTEND_SERVICES 类 包含了操作sap gui frontend 的 方法和属性。 使用这个类中的方法几乎可以对客户端操作系统做任何操作。 以几个例子来说明: 1,根据指定的参数列出指定目录下的文件系统信息 <!--StartFragment --> SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; back...
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXISTEXPORTINGDIRECTORY = LW_PATHRECEIVINGRESULT = LW_RESULTEXCEPTIONSCNTL_ERROR = 1ERROR_NO_GUI = 2WRONG_PARAMETER = 3NOT_SUPPORTED_BY_GUI = 4OTHERS = 5.方法调用是否成功判定:(例如:输入不合法)...
CL_GUI_FRONTEND_SERVICES类包含了操作sapguifrontend的方法和属性。使用这个类中的方法几乎可以对客户端操作系统做任何操作。以几个例子来说明:1,根据指定的参数列出指定目录下的文件系统信息!--StartFragment--styletype=text/cssSPAN{font-family:CourierNew;font-size:10pt;color:#000000;background:#FFFFFF;}.L1...
Hi SAP GUI Experts, I've installed the SAP GUI 7.20 and patched it to Patchlevel 4 on Windows 7, 64 Bit. When I run the following report REPORT z_test_frontend_services. DATA: temp_dir TYPE string, sapworkdir type string. cl_gui_frontend_services=>get_temp_directory( CHANGING temp_dir...