当前位置:网站首页>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 服务器上.
下面是具体的步骤.
边栏推荐
猜你喜欢
Common gadgets of Shell (sort, uniq, tr, cut)
数字化转型之支撑保障单元
用皮肤“听”音乐,网友戴上这款装备听音乐会:仿佛住在钢琴里
GRPC整体学习
"Digital Economy Panorama White Paper" Special Analysis of Banking Industry Intelligent Marketing Application Released
鹅厂机器狗花式穿越10m梅花桩:前空翻、单桩跳、起身作揖...全程不打一个趔趄...
win10编译x264库(也有生成好的lib文件)
【Adobe Premiere Pro 2020】pr2020安装和基本操作【PR安装、新建项目流程、导入及管理素材项目文件、添加标记、创建出入点剪辑视频、快速剪接及自动音乐卡点的方法
水能自发变成“消毒水”,83岁斯坦福教授:揭示冬天容易得流感的部分原因...
阿里高工带来的20022最新面试总结太香了
随机推荐
C# 获取系统已安装的.NET版本
proto3-2语法
索引index
Go-based web access parameters
防止数据冒用的方法
西湖大学教授怎么看AI制药革命?|量子位智库圆桌实录
【小程序】低代码+小游戏=小游戏可视化开发
《数字经济全景白皮书》银行业智能营销应用专题分析 发布
[Microservice ~ Remote Call] Integrate RestTemplate, WebClient, Feign
Golang学习之路(五):Golang的函数
#物联网征文#小熊派设备开发实战
放下手机吧:实验表明花20分钟思考和上网冲浪同样快乐
WeChat Mini Program Payment and Refund Overall Process
已解决IndentationError: unindent does not match any oute r indentation Level
redis库没法引入
How should the acceptance criteria for R&D requirements be written?| Agile Practices
FFmpeg库在win10上配置使用(不配置libx264)
ABAP 面试题:如何使用 ABAP 编程语言的 System CALL 接口,直接执行 ABAP 服务器所在操作系统的 shell 命令?
程序员的专属浪漫——用3D Engine 5分钟实现烟花绽放效果
Web console control edit box