当前位置:网站首页>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 服务器上.
下面是具体的步骤.
边栏推荐
- web course design
- Win10 compiles the x264 library (there are also generated lib files)
- 程序员的专属浪漫——用3D Engine 5分钟实现烟花绽放效果
- 世界第4疯狂的科学家,在103岁生日那天去世了
- ACM01 Backpack problem
- 数字化转型之支撑保障单元
- WPF 实现带蒙版的 MessageBox 消息提示框
- Senior told me that the giant MySQL is through SSH connection
- 【小程序】低代码+小游戏=小游戏可视化开发
- 京东架构师呕心整理:jvm与性能调优有哪些核心技术知识点
猜你喜欢
随机推荐
张朝阳对话俞敏洪:一边是手推物理公式,一边是古诗信手拈来
The grep command Shell regular expressions, the three musketeers
API调用,API传参,面向对接开发,你真的会写接口文档吗?
IDEA 关闭/开启引用提示Usages
国产抗新冠口服药每瓶不超300元/ 我国IPv6网络全面建成/ 谷歌入局折叠屏手机...今日更多新鲜事在此...
问题来了:4GB物理内存的机器上申请8G内存能成功吗?
用 API Factory 产品生成 API 文档
虚拟机安装出现的问题汇总
JD.com architects tidy up: what are the core technical knowledge points of jvm and performance tuning
GPT-3组合DALL·E,60秒内搞定游戏设定和原型动画!网友看后:这游戏想玩
JS 封装节流(后期优化)
荣耀携手Blue Yonder,加快企业战略增长
基于STM32+铂电阻设计的测温仪
Adalvo收购其首个品牌产品Onsolis
win10编译x264库(也有生成好的lib文件)
GRPC整体学习
WeChat payment development process
Byte Qiu Zhao confused me on both sides, and asked me under what circumstances would the SYN message be discarded?
从零开始Blazor Server(9)--修改Layout
h264协议