惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

AI
AI
TaoSecurity Blog
TaoSecurity Blog
H
Heimdal Security Blog
Help Net Security
Help Net Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
爱范儿
爱范儿
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
N
News | PayPal Newsroom
V2EX - 技术
V2EX - 技术
博客园 - 【当耐特】
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
Secure Thoughts
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
有赞技术团队
有赞技术团队
S
Schneier on Security
S
SegmentFault 最新的问题
Google Online Security Blog
Google Online Security Blog
H
Hacker News: Front Page
The Last Watchdog
The Last Watchdog
Schneier on Security
Schneier on Security
PCI Perspectives
PCI Perspectives
IT之家
IT之家
Project Zero
Project Zero
博客园 - 司徒正美
P
Privacy International News Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Jina AI
Jina AI
Security Latest
Security Latest
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
V
Vulnerabilities – Threatpost
W
WeLiveSecurity
NISL@THU
NISL@THU
Webroot Blog
Webroot Blog
N
Netflix TechBlog - Medium
L
Lohrmann on Cybersecurity

博客园 - 冰冷

经典正则表达式 (转) 常用的javascript小技巧[作者oror][转] HR 事务代码 (转) rp-provide-from-last 给SAP系统安装联机帮助(事务码SR13) (转) - 冰冷 - 博客园 如何修改 SAP 登录后的背景图片(事务码 SMW0,SM30)(转) sapgui640免除每次登录都要输入密码(转) 关于MiPlatform310 关于oracle form开发中commit WHEN-VALIDATE-ITEM 和 KEY-NEXT-ITEM两个trigger 的先后顺序 vs2005中的treeview VS2005 写存储过程 关于给winform的DataGrid中添加复选框的问题 用.NET创建windows服务 google中的超强搜索 关于FAT32 -> NTFS 文件系统转换 数据库连接字符串大全 [TrackBack] 转自CSDN 地址:http://blog.csdn.net/gauss32/archive/2004/10/27/154621.aspx 关于配置证书服务器,和自己颁发企业证书 自动日志组件 - Log4net应用(转贴来自http://dotnet.3yee.com/)
导出txt文件简单的例子
冰冷 · 2007-09-18 · via 博客园 - 冰冷

REPORT  ZTEST_XIN0917                           .

TYPES:BEGIN OF i_file ,
       col1 TYPE i ,
        col2(3) TYPE c,
        col3(5) TYPE c,
     END OF i_file.

DATA: itab_file TYPE i_file OCCURS 0 WITH HEADER LINE.

***用户可看SAP帮助使用Download和upload的例##
***使用类弹出用户对话框
  DATA :s_filedir    LIKE rlgrap-filename .
  DATA: s_filemask(20) TYPE  c VALUE   ',*.txt ,*.txt. '.
  DATA: s_filepath(60) TYPE  c.


itab_file-col1 = 1.
itab_file-col2 = 'aaa'.
itab_file-col3 = 'aaa'.

append itab_file.


***Get current direcotry
  CALL FUNCTION 'WS_QUERY'
    EXPORTING
      query  = 'CD'
    IMPORTING
      return = s_filepath.
*** get file name ***
  CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
      def_filename     = space
      def_path         = s_filepath
      mask             = s_filemask
      mode             = 'O'
    IMPORTING
      filename         = s_filedir
    EXCEPTIONS
      inv_winsys       = 1
      no_batch         = 2
      selection_cancel = 3
      selection_error  = 4
      OTHERS           = 5.
  CHECK sy-subrc EQ 0. "User might cancel operation.
***如果文件后坠非.TXT加上后坠
  TRANSLATE s_filedir TO UPPER CASE.
  IF '.TXT' CN s_filedir .
    CONCATENATE s_filedir '.TXT' INTO s_filedir .
  ENDIF.
*** write data to file ****
  CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      filename         = s_filedir
      filetype         = 'DAT'
      mode             = 'A'
    TABLES
      data_tab         = itab_file
    EXCEPTIONS
      file_open_error  = 01
      file_write_error = 02
      invalid_type     = 03
      no_batch         = 04
      unknown_error    = 05.
  CASE sy-subrc.
    WHEN 0.
      MESSAGE i001(00) WITH 'Data have been write into file:'
                            s_filedir ',Please check!' .
    WHEN 1.
      MESSAGE i001(00) WITH 'Error while opening file:' s_filedir.
    WHEN 2.
      MESSAGE i001(00) WITH  'Error in writing file ' s_filedir.
    WHEN 3.
      MESSAGE i001(00) WITH  'invalid file type of ' s_filedir .
    WHEN OTHERS.
      MESSAGE i001(00) WITH  'unknown error occured'.
  ENDCASE.