当前位置:网站首页>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 服务器上.
下面是具体的步骤.
边栏推荐
猜你喜欢
听声辨物,这是AI视觉该干的???|ECCV 2022
Ways to prevent data fraud
Too much volume... Tencent was asked on the side that the memory was full, what would happen?
数字化转型之支撑保障单元
在北极都可以穿短袖了,温度飙升至32.5℃
人体解析(Human Parse)开源数据集整理
h264协议
JD.com architects tidy up: what are the core technical knowledge points of jvm and performance tuning
报告:想学AI的学生数量已涨200%,老师都不够用了
【小程序】低代码+小游戏=小游戏可视化开发
随机推荐
两分钟录音就可秒变语言通!火山语音音色复刻技术如何修炼而成?
字节秋招二面把我干懵了,问我SYN报文什么情况下会被丢弃?
中科院打脸谷歌:普通电脑追上量子优越性,几小时搞定原本要一万年的计算...
【重要】C语言进阶 -- 自定义类型:结构体、枚举、联合
JD.com architects tidy up: what are the core technical knowledge points of jvm and performance tuning
又有大厂员工连续加班倒下/ 百度搜狗取消快照/ 马斯克生父不为他骄傲...今日更多新鲜事在此...
从零开始Blazor Server(9)--修改Layout
JS封装防抖(代码持续优化)
Blazor Server (9) from scratch -- modify Layout
鹅厂机器狗花式穿越10m梅花桩:前空翻、单桩跳、起身作揖...全程不打一个趔趄...
"Digital Economy Panorama White Paper" Special Analysis of Banking Industry Intelligent Marketing Application Released
放下手机吧:实验表明花20分钟思考和上网冲浪同样快乐
MySQL查询性能优化七种武器之索引潜水
Gumbel_Softmax 概要
听声辨物,这是AI视觉该干的???|ECCV 2022
We really need DApp?Really can't meet our fantasy App?
GPT-3组合DALL·E,60秒内搞定游戏设定和原型动画!网友看后:这游戏想玩
Here comes the question: Can I successfully apply for 8G memory on a machine with 4GB physical memory?
Apexsqlrecover无法连接数据库
曼城推出可检测情绪的智能围巾,把球迷给整迷惑了