当前位置:网站首页>How to upload local file trial version in binary mode in ABAP report
How to upload local file trial version in binary mode in ABAP report
2022-08-09 13:03:00 【Wang Zixi】
零基础 ABAP 学习教程系列文章的目录
ABAP 基础知识
更多文章正在写作中
Office 专题
ALV 开发专题
更多文章正在写作中
this step of the tutorial,用 ABAP 读取本地文本文件内容,我们介绍了使用 Function Module GUI_UPLOAD to upload a text file,The entire report however 18 行代码.
REPORT zreduce1.
DATA: lv_file_name TYPE string VALUE 'C:\temp\1.txt',
lv_file_length TYPE i,
lt_content TYPE string_table,
lv_content TYPE string.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lv_file_name
IMPORTING
filelength = lv_file_length
TABLES
data_tab = lt_content.
LOOP AT lt_content INTO lv_content.
WRITE:/ lv_content.
ENDLOOP.
执行之后,can be successfully stored in C 盘的文本文件 1.txt 的内容打印出来.

我们在 SE37 里打开 GUI_UPLOAD,find its parameters FILETYPE 是可选参数(optional),默认值为 ASC That is, upload the local file content in text mode.

显然,在实际项目中,We need to upload to ABAP 服务器的文件,除了文本文件之外,There are definitely other types of files included,比如 jpg,pdf,docx 这种文件.这些类型的文件,Apparently it can't be opened via a normal text editor,And also not suitable for passing ASC That is, upload in text mode.因此,我们需要使用另一种 BIN mode is binary mode for uploading.
In this step we introduce another useful one ABAP 工具类,CL_GUI_FRONTEND_SERVICES,它的 GUI_UPLOAD 方法,File upload is also possible.Actually if you look at the source code of this method,It turns out that it's actually just a simple call Function Module GUI_UPLOAD,The latter we have already learned:

In this article we demonstrate how to do it in binary,Upload a local text file to ABAP 服务器上.
下面是具体的步骤.
边栏推荐
猜你喜欢

超越CLIP的多模态模型,只需不到1%的训练数据!南加大最新研究来了

IDEA 关闭/开启引用提示Usages

专业人士使用的 11 种渗透测试工具

【Adobe Premiere Pro 2020】pr2020安装和基本操作【PR安装、新建项目流程、导入及管理素材项目文件、添加标记、创建出入点剪辑视频、快速剪接及自动音乐卡点的方法

#物联网征文#小熊派设备开发实战

JD.com architects tidy up: what are the core technical knowledge points of jvm and performance tuning

8、IDEA提交代码出现: Fetch failed fatal: Could not read from remote repository

《数字经济全景白皮书》银行业智能营销应用专题分析 发布

放下手机吧:实验表明花20分钟思考和上网冲浪同样快乐
![[Microservice ~ Remote Call] Integrate RestTemplate, WebClient, Feign](/img/8a/a0d1cf3586b7c33b7bcddf9ffede25.png)
[Microservice ~ Remote Call] Integrate RestTemplate, WebClient, Feign
随机推荐
Shell正则表达式,三剑客之grep命令
无需精子卵子子宫体外培育胚胎,Cell论文作者这番话让网友们炸了
ABAP 报表中如何以二进制方式上传本地文件试读版
专业人士使用的 11 种渗透测试工具
超越CLIP的多模态模型,只需不到1%的训练数据!南加大最新研究来了
Win10 compiles the x264 library (there are also generated lib files)
MySQL查询性能优化七种武器之索引潜水
发明时代,「幂集创新」事关你我
Two ways to enter the Oracle database
标准C语言学习总结14
[Microservice ~ Remote Call] Integrate RestTemplate, WebClient, Feign
十分钟教会你如何使用VitePress搭建及部署个人博客站点
学长告诉我,大厂MySQL都是通过SSH连接的
API调用,API传参,面向对接开发,你真的会写接口文档吗?
redis库没法引入
阿里高工带来的20022最新面试总结太香了
How should the acceptance criteria for R&D requirements be written?| Agile Practices
二重指针-char **、int **的作用
go基础之web获取参数
The redis library cannot be imported