1、获取外部导入文件的地址的几种方法
a、CALL FUNCTION 'WS_FILENAME_GET'
b、CALL METHOD cl_gui_frontend_services=>file_open_dialog
2、获取外部导入文件的内容的几种方法
a、CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
b、CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
3、这个函数用在外部数据存到SAP里面的时候,转换格式使用的。
a、CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
Example:
(Input field and output field are both eight characters in length)
1. '1234 ' --> '00001234'
2. 'ABCD ' --> 'ABCD '
3. ' 1234 ' --> '00001234'
4、at new f
行组的开头,行组指的是字段f和f前面(即左边)的全部字段,如果行组中的任何字段内容不同于上一行,执行语句块中的内容。
5、获取p_dir文件夹下所有p_fit类型文件,将总数及文件清单放入gv_count和gt_file_table。
call method cl_gui_frontend_services=>directory_list_files
exporting
directory = p_dir
filter = p_fit
files_only = 'X'
changing
file_table = gt_file_table
count = gv_count
exceptions
cntl_error = 1
directory_list_files_failed = 2
wrong_parameter = 3
error_no_gui = 4
not_supported_by_gui = 5
others = 6.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16181884/viewspace-746777/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16181884/viewspace-746777/