ABAP-TXT文件上传详解编程语言

at selection-screen on value-request for pc_file. 
  call function 'WS_FILENAME_GET' 
    exporting 
      def_filename '*.TXT' 
      def_path     'D:/' 
      mode         = 'O' 
      title        = 'UPLOAD' 
    importing 
      filename     = pc_file 
    exceptions 
      inv_winsys       = 1 
      no_batch         = 2 
      selection_cancel = 3 
      selection_error  = 4 
      others           = 5. 
  case sy-subrc. 
    when 0. 
    when others. 
      exit. 
  endcase.  
 
Start-of-selection.  
 
data:filename type string. 
     filename = pc_file. 
 
 call function 'GUI_UPLOAD' 
   exporting 
     filename            = filename 
     has_field_separator = 'X' 
   tables 
     data_tab            = tab 
   exceptions 
     file_open_error     = 1. 

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/17968.html

(0)
上一篇 2021年7月19日 20:41
下一篇 2021年7月19日 20:41

相关推荐

发表回复

登录后才能评论