对FUNCTION: GUI_DOWNLOAD中某些参数的用法.

 
 

  call function 'GUI_DOWNLOAD'

    exporting

*     BIN_FILESIZE                    =

*     filename                        = p_file

*     FILETYPE                        = 'DAT'

*     APPEND                          = ' '

*     write_field_separator           = 'X'

*     HEADER                          = '00'

*     TRUNC_TRAILING_BLANKS           = ' '

*     WRITE_LF                        = 'X'

*     COL_SELECT                      = ' '

*     COL_SELECT_MASK                 = ' '

*     DAT_MODE                        = ' '

*     CONFIRM_OVERWRITE               = ' '

*     NO_AUTH_CHECK                   = ' '

*     CODEPAGE                        = '4103'

*     IGNORE_CERR                     = ABAP_TRUE

*     REPLACEMENT                     = '#'

*     WRITE_BOM                       = 'X'

*     TRUNC_TRAILING_BLANKS_EOL       = 'X'

*     WK1_N_FORMAT                    = ' '

*     WK1_N_SIZE                      = ' '

*     WK1_T_FORMAT                    = ' '

*     WK1_T_SIZE                      = ' '

*     WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE

*     SHOW_TRANSFER_STATUS            = ABAP_TRUE

*   IMPORTING

*     FILELENGTH                      =

*   tables

*     data_tab                        = it_kna1

*     fieldnames                      = it_filedname[]

*    EXCEPTIONS

*     FILE_WRITE_ERROR                = 1

*     NO_BATCH                        = 2

*     GUI_REFUSE_FILETRANSFER         = 3

*     INVALID_TYPE                    = 4

*     NO_AUTHORITY                    = 5

*     UNKNOWN_ERROR                   = 6

*     HEADER_NOT_ALLOWED              = 7

*     SEPARATOR_NOT_ALLOWED           = 8

*     FILESIZE_NOT_ALLOWED            = 9

*     HEADER_TOO_LONG                 = 10

*     DP_ERROR_CREATE                 = 11

*     DP_ERROR_SEND                   = 12

*     DP_ERROR_WRITE                  = 13

*     UNKNOWN_DP_ERROR                = 14

*     ACCESS_DENIED                   = 15

*     DP_OUT_OF_MEMORY                = 16

*     DISK_FULL                       = 17

*     DP_TIMEOUT                      = 18

*     FILE_NOT_FOUND                  = 19

*     DATAPROVIDER_EXCEPTION          = 20

*     CONTROL_FLUSH_ERROR             = 21

*     OTHERS                          = 22.

 
 

1. FILETYPE: GUI_DOWNLOAD FILETYPE

'ASC' :

ASCII format. The table is transferred as text. Conversion exits are performed. The output format additionally depends on the parameters CODEPAGE, TRUNC_TRAILING_BLANKS, and TRUNC_TRAILING_BLANKS_EOL.

'IBM' :

ASCII format with IBM codepage conversion (DOS). This format corresponds to the 'ASC' format when using target codepage 1103. This codepage is frequently used for data exchange via floppy disk.

'DAT' :

Column-by-column transfer. With this format, the data is transferred as text as with ASC. However, no conversion exits are performed and the columns are separated by tab characters. This format generates files than can be uploaded again using gui_upload or ws_upload.

'DBF' :

Data is downloaded in dBase format. Since in this format the data types of the individual columns are stored as well, you can often avoid import problems, for example, into Microsoft Excel, especially when interpreting numeric values.

'WK1' :

Data is downloaded in Lotus 1-2-3 format.

'BIN' :

Binary format. Data is transferred binarily. There is no formatting and no codepage conversion. The data is interpreted row by row; it is not formatted by columns. Specify the data length in parameter BIN_FILESIZE. The table should consist of a column of type X, because especially in Unicode systems, the conversion of structured into binary data causes errors.

Default

'ASC'

2. APPEND

GUI_DOWNLOAD APPEND

By default, existing local files are overwritten by new versions. By setting APPEND to 'X', the downloaded data is appended to an existing file. If the file does not yet exist, it is created.

Value range

'X'   = Data is appended.

SPACE = Data is overwritten if the file already exists.

Default

SPACE

3. WRITE_FIELD_SEPARATOR

GUI_DOWNLOAD WRITE_FIELD_SEPARATOR

In the downloaded file, the columns are separated by tab characters (cl_abap_char_utilities=>horizontal_tab). You should use this setting if you want to upload the data from the file at a later time, because this is the only way of identifying individual columns.

The parameter makes sense only for the FILETYPE values ASC, DAT and IBM; for DAT it is set implicitly.

Value range

'X'   : Write separator.

SPACE : Do not write separator.

Default

SPACE

4. WRITE_LF

GUI_DOWNLOAD WRITE_LF

If this parameter is set, at the end of each row a row separator is inserted by CL_ABAP_CHAR_UTILITIES=>CR_LF. This parameter makes sense only for FILETYPE 'ASC', 'DAT' and 'IBM'. If this parameter is not set, blanks at the end of a row are not removed.

Value range

'X': Row separator is inserted.

SPACE: Row separator is not inserted.

Default

'X'

5. DAT_MODE

GUI_DOWNLOAD DAT_MODE

If parameter DAT_MODE is set, the file is stored in 'DAT' format. No conversion exits are performed. Number and date fields are stored in a standard format which makes it possible, to later import the file using gui_upload.

Value range

'X': DAT_MODE is switched on.

SPACE: DAT_MODE is not switched on.

Default

SPACE

6. CODEPAGE

GUI_DOWNLOAD CODEPAGE

Use parameter CODEPAGE to specify the desired target codepage. If this parameter is not set, the codepage of the SAP GUI is used as the target codepage.

Value range

4-digit number of the SAP codepage. The function module SCP_CODEPAGE_BY_EXTERNAL_NAME returns the SAP codepage number for an external character set name, for example, "iso-8859-1". The function module NLS_GET_FRONTEND_CP returns the appropriate non-Unicode frontend codepage for a language.

You can determine the desired codepage interactively, if the parameter with_encoding of method file_save_dialog is set by cl_gui_frontend_services.

SPACE: Codepage of the SAP GUI

Default

SPACE

7. REPLACEMENT

GUI_DOWNLOAD REPLACEMENT

Specifies the replacement character to be used when during a character set conversion a character cannot be converted.

Value range

An individual character.

Default

'#'

8. WRITE_BOM

GUI_DOWNLOAD WRITE_BOM

If the data is written in a Unicode codepage, at the beginning of the file the respective byte order mark (BOM) is inserted.

Unicode - Little Endian Codepage 4103, binary values 'FFFE'

Unicode - Big Endian Codepage 4102, binary values 'FEFF'

UTF-8 Codepage 4110, binary values 'EFBBBF'

Note: Microsoft Excel only supports Unicode data if they have been written in the format Unicode - Little Endian.

Value range

'X': Write BOM.

SPACE: Do not write BOM.

Default

SPACE

9. FIELDNAMES

GUI_DOWNLOAD FIELDNAMES

Optional table with column names for the individual columns.

  • 'DBF': The column names are entered into the structure definition of the DBF file.
  • 'DAT':  An additional row with the column names is inserted at the beginning of the table.

 
 

From <http://venusz.blog.163.com/blog/static/180504520096272351602/>

GUI_DOWNLOAD参数说明的更多相关文章

  1. 《连载 | 物联网框架ServerSuperIO教程》2.服务实例的配置参数说明

    1.C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍  <连载 | 物联网框架ServerSuperIO教程>1.4种通讯模式机制 一.综述 SuperIO(SIO)定位 ...

  2. JQuery UI dialog 弹窗实例及参数说明

    按钮代码: <a id="suprise" style="margin-left: 0.5em;cursor:pointer;">点我会有惊喜< ...

  3. 服务器.htaccess 详解以及 .htaccess 参数说明(转载)

    htaccess文件(或者”分布式配置文件”)提供了针对目录改变配置的方法, 即,在一个特定的文档目录中放置一个包含一个或多个指令的文件, 以作用于此目录及其所有子目录.作为用户,所能使用的命令受到限 ...

  4. Mongodb启动命令mongod参数说明

    Mongodb启动命令mongod参数说明 mongod的主要参数有: 基本配置 ----------------------------------------------------------- ...

  5. Connect to Database Using Custom params链接数据库配置参数说明

    使用RF的关键字Connect to Database Using Custom params链接数据库,对应的参数说明: a)     第一个参数我使用的是cx_Oracle,就写这个 b)     ...

  6. .htaccess详解及.htaccess参数说明【转】

    目录(?)[-] htaccess 详解 htaccess rewrite 规则详细说明 RewriteEngine OnOff RewriteBase URL-path RewriteCond Te ...

  7. 转载《SimpleAdapter的参数说明》

    SimpleAdapter的参数说明 第一个参数 表示访问整个android应用程序接口,基本上所有的组件都需要 第二个参数表示生成一个Map(String ,Object)列表选项 第三个参数表示界 ...

  8. Redis配置文件参数说明

    Redis配置文件参数说明   1. Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程 daemonize no 2. 当Redis以守护进程方式运行时,Redis ...

  9. mosquitto_pub和mosquitto_sub 命令参数说明

    mosquitto_pub 命令参数说明 1. -d  打印debug信息 2. -f  将指定文件的内容作为发送消息的内容 3. -h  指定要连接的域名  默认为localhost 4. -i   ...

随机推荐

  1. HTTP gzip和deflate的几点区别

    gzip是一种数据格式,默认且目前仅使用deflate算法压缩data部分:deflate是一种压缩算法,是huffman编码的一种加强. deflate与gzip解压的代码几乎相同,可以合成一块代码 ...

  2. 把exe嵌入到自己的exe中。delphi xe3

    下面是一个把exe程序嵌入到我们自己的exe中.开发环境 Delphi XE3 Version 17.0.4625.53395.OS环境WIN7 SP1,由于xe3版本的引用库发生变化.换成其他版本的 ...

  3. ELK stack elasticsearch/logstash/kibana 关系和介绍

    ELK stack elasticsearch 后续简称ES logstack 简称LS kibana 简称K 日志分析利器 elasticsearch 是索引集群系统 logstash 是日志归集集 ...

  4. (easy)LeetCode 263.Ugly Number

    Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers ...

  5. addAll()报NullPointer原因

    如下代码在注释行会报错,原因是:getSeatTravelerInfo()时值为空,对空对象addAll会报错 SeatBookingInfo b=new SeatBookingInfo(); b.s ...

  6. KSImageNamed-Xcode-master 对项目中图片提供自动提示功能的插件

    .使用介绍: (1)KSImageNamed-Xcode-master的使用 安装该插件后,会对文件中图片进行智能提示.  下载地址:http://yun.baidu.com/s/1qWNkvGK  

  7. junit组合模式应用

    组合模式 定义: 将对象组合成树形结构以表示“部分-整体”的层次结构.Composite模式使得用户对单个对象和组合对象的使用具有一致性 构成: Component:这是一个抽象角色,它给参加组合的对 ...

  8. MAC 下用GCC编译报错:“Undefined symbols for architecture x86_64: ”

    解决方法: 因为GCC编译的时候没有链接C++ standard library, 因此在编译的时候要加入符号 -lstdc++ 使用命令: gcc myprog.c -o myprog -lstdc ...

  9. 请慢慢移动……由于操作快慢导致的bug

    最近的工作中,遇到一个由于操作快慢不同导致的bug,原因是,操作慢的时候程序接收到了停止操作,继续处理正确,而快速操作的时候程序来不及处理操作停止的动作,导致需要传入的数据值已经改变,程序报错.这种缺 ...

  10. 初探接口测试框架--python系列4

    点击标题下「蓝色微信名」可快速关注 坚持的是分享,搬运的是知识,图的是大家的进步,没有收费的培训,没有虚度的吹水,喜欢就关注.转发(免费帮助更多伙伴)等来交流,想了解的知识请留言,给你带来更多价值,是 ...