report.
"方法1.
data: size type i.
call method cl_gui_frontend_services=>file_get_size
exporting
file_name = 'D:\ToExcel.xls'
importing
file_size = size
exceptions
file_get_size_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
others = 5.
call method cl_gui_cfw=>flush.
write size.
"方法2.
data: info_obj like obj_record.
create object info_obj 'SAPINFO' no flush.
call method of info_obj 'GetFileSize' = size
exporting #1 = 'D:\ToExcel.xls' .
write size.
评论